From 328e45595b12375b6d16a846069507d25086abdb Mon Sep 17 00:00:00 2001 From: obrien Date: Mon, 28 May 2001 05:21:37 +0000 Subject: Import of GNU Binutils version 2.11.0. Believe it or not, this is heavily stripped down. --- contrib/binutils/Makefile.in | 362 +- contrib/binutils/bfd/ChangeLog | 9266 +++++++---------- contrib/binutils/bfd/ChangeLog-9899 | 5595 +++++++++++ contrib/binutils/bfd/MAINTAINERS | 1 + contrib/binutils/bfd/Makefile.am | 994 +- contrib/binutils/bfd/Makefile.in | 1390 ++- contrib/binutils/bfd/README | 2 +- contrib/binutils/bfd/acinclude.m4 | 22 +- contrib/binutils/bfd/aclocal.m4 | 794 +- contrib/binutils/bfd/aout-arm.c | 40 +- contrib/binutils/bfd/aout-encap.c | 12 +- contrib/binutils/bfd/aout-target.h | 17 +- contrib/binutils/bfd/aout-tic30.c | 44 +- contrib/binutils/bfd/aoutf1.h | 19 +- contrib/binutils/bfd/aoutx.h | 136 +- contrib/binutils/bfd/archive.c | 291 +- contrib/binutils/bfd/archures.c | 235 +- contrib/binutils/bfd/armnetbsd.c | 2 +- contrib/binutils/bfd/bfd-in.h | 61 +- contrib/binutils/bfd/bfd-in2.h | 1294 ++- contrib/binutils/bfd/bfd.c | 103 +- contrib/binutils/bfd/binary.c | 13 +- contrib/binutils/bfd/cache.c | 21 +- contrib/binutils/bfd/coff-alpha.c | 29 +- contrib/binutils/bfd/coff-arm.c | 477 +- contrib/binutils/bfd/coff-aux.c | 8 +- contrib/binutils/bfd/coff-i386.c | 29 +- contrib/binutils/bfd/coff-ppc.c | 786 +- contrib/binutils/bfd/coff-sparc.c | 8 +- contrib/binutils/bfd/coff-tic30.c | 8 +- contrib/binutils/bfd/coff-z8k.c | 14 +- contrib/binutils/bfd/coffcode.h | 431 +- contrib/binutils/bfd/coffgen.c | 100 +- contrib/binutils/bfd/cofflink.c | 118 +- contrib/binutils/bfd/coffswap.h | 112 +- contrib/binutils/bfd/config.bfd | 160 +- contrib/binutils/bfd/config.in | 24 +- contrib/binutils/bfd/configure | 2348 +++-- contrib/binutils/bfd/configure.host | 6 + contrib/binutils/bfd/configure.in | 100 +- contrib/binutils/bfd/corefile.c | 2 - contrib/binutils/bfd/cpu-alpha.c | 2 +- contrib/binutils/bfd/cpu-arm.c | 14 +- contrib/binutils/bfd/cpu-i386.c | 42 +- contrib/binutils/bfd/cpu-powerpc.c | 136 +- contrib/binutils/bfd/cpu-sparc.c | 46 +- contrib/binutils/bfd/cpu-v850.c | 16 +- contrib/binutils/bfd/cpu-z8k.c | 8 - contrib/binutils/bfd/dep-in.sed | 1 + contrib/binutils/bfd/doc/ChangeLog | 31 + contrib/binutils/bfd/doc/Makefile.in | 9 +- contrib/binutils/bfd/doc/aoutx.texi | 2 +- contrib/binutils/bfd/doc/archures.texi | 161 +- contrib/binutils/bfd/doc/bfd.texinfo | 409 +- contrib/binutils/bfd/doc/bfdint.texi | 7 +- contrib/binutils/bfd/doc/bfdt.texi | 65 +- contrib/binutils/bfd/doc/cache.texi | 2 +- contrib/binutils/bfd/doc/chew.c | 1810 ++-- contrib/binutils/bfd/doc/coffcode.texi | 12 +- contrib/binutils/bfd/doc/format.texi | 4 +- contrib/binutils/bfd/doc/hash.texi | 2 +- contrib/binutils/bfd/doc/libbfd.texi | 10 +- contrib/binutils/bfd/doc/linker.texi | 2 +- contrib/binutils/bfd/doc/reloc.texi | 172 +- contrib/binutils/bfd/doc/section.texi | 439 +- contrib/binutils/bfd/doc/syms.texi | 4 +- contrib/binutils/bfd/doc/targets.texi | 111 +- contrib/binutils/bfd/dwarf1.c | 240 +- contrib/binutils/bfd/dwarf2.c | 581 +- contrib/binutils/bfd/ecoff.c | 79 +- contrib/binutils/bfd/ecofflink.c | 52 +- contrib/binutils/bfd/ecoffswap.h | 117 +- contrib/binutils/bfd/elf-bfd.h | 78 +- contrib/binutils/bfd/elf.c | 1041 +- contrib/binutils/bfd/elf32-arm.h | 681 +- contrib/binutils/bfd/elf32-gen.c | 32 + contrib/binutils/bfd/elf32-i386.c | 566 +- contrib/binutils/bfd/elf32-ppc.c | 454 +- contrib/binutils/bfd/elf32-sparc.c | 165 +- contrib/binutils/bfd/elf32-v850.c | 309 +- contrib/binutils/bfd/elf32.c | 1 - contrib/binutils/bfd/elf64-alpha.c | 188 +- contrib/binutils/bfd/elf64-gen.c | 32 + contrib/binutils/bfd/elf64-sparc.c | 274 +- contrib/binutils/bfd/elfarm-nabi.c | 73 +- contrib/binutils/bfd/elfarm-oabi.c | 16 +- contrib/binutils/bfd/elfcode.h | 118 +- contrib/binutils/bfd/elfcore.h | 76 +- contrib/binutils/bfd/elflink.c | 40 +- contrib/binutils/bfd/elflink.h | 480 +- contrib/binutils/bfd/elfxx-target.h | 17 +- contrib/binutils/bfd/format.c | 269 +- contrib/binutils/bfd/freebsd.h | 1 - contrib/binutils/bfd/hash.c | 4 +- contrib/binutils/bfd/ieee.c | 62 +- contrib/binutils/bfd/libaout.h | 3 +- contrib/binutils/bfd/libbfd-in.h | 19 +- contrib/binutils/bfd/libbfd.c | 183 +- contrib/binutils/bfd/libbfd.h | 186 +- contrib/binutils/bfd/libcoff-in.h | 9 + contrib/binutils/bfd/libcoff.h | 57 +- contrib/binutils/bfd/linker.c | 29 +- contrib/binutils/bfd/netbsd-core.c | 16 +- contrib/binutils/bfd/netbsd.h | 12 +- contrib/binutils/bfd/opncls.c | 4 +- contrib/binutils/bfd/pe-arm.c | 4 +- contrib/binutils/bfd/pe-i386.c | 1 - contrib/binutils/bfd/pe-ppc.c | 1 - contrib/binutils/bfd/po/POTFILES.in | 21 + contrib/binutils/bfd/po/bfd.pot | 1014 +- contrib/binutils/bfd/ppcboot.c | 4 +- contrib/binutils/bfd/ptrace-core.c | 22 +- contrib/binutils/bfd/reloc.c | 334 +- contrib/binutils/bfd/reloc16.c | 121 +- contrib/binutils/bfd/sco5-core.c | 54 +- contrib/binutils/bfd/section.c | 570 +- contrib/binutils/bfd/sparclinux.c | 8 +- contrib/binutils/bfd/sparcnetbsd.c | 2 +- contrib/binutils/bfd/srec.c | 99 +- contrib/binutils/bfd/stab-syms.c | 6 +- contrib/binutils/bfd/stabs.c | 4 +- contrib/binutils/bfd/syms.c | 34 +- contrib/binutils/bfd/sysdep.h | 12 + contrib/binutils/bfd/targets.c | 206 +- contrib/binutils/bfd/tekhex.c | 19 +- contrib/binutils/bfd/trad-core.c | 34 +- contrib/binutils/binutils/ChangeLog | 7764 ++------------- contrib/binutils/binutils/ChangeLog-9197 | 5218 ++++++++++ contrib/binutils/binutils/ChangeLog-9899 | 1908 ++++ contrib/binutils/binutils/MAINTAINERS | 78 + contrib/binutils/binutils/Makefile.am | 43 +- contrib/binutils/binutils/Makefile.in | 177 +- contrib/binutils/binutils/NEWS | 12 + contrib/binutils/binutils/README | 2 +- contrib/binutils/binutils/acinclude.m4 | 31 + contrib/binutils/binutils/aclocal.m4 | 805 +- contrib/binutils/binutils/addr2line.1 | 380 +- contrib/binutils/binutils/addr2line.c | 21 +- contrib/binutils/binutils/ar.1 | 392 +- contrib/binutils/binutils/ar.c | 23 +- contrib/binutils/binutils/binutils.texi | 488 +- contrib/binutils/binutils/bucomm.c | 2 +- contrib/binutils/binutils/bucomm.h | 11 +- contrib/binutils/binutils/coffgrok.c | 2 +- contrib/binutils/binutils/config.in | 3 - contrib/binutils/binutils/config.texi | 2 +- contrib/binutils/binutils/configure | 1972 ++-- contrib/binutils/binutils/configure.in | 33 +- contrib/binutils/binutils/dlltool.c | 9 +- contrib/binutils/binutils/dllwrap.c | 142 +- contrib/binutils/binutils/ieee.c | 31 +- contrib/binutils/binutils/nm.1 | 392 +- contrib/binutils/binutils/nm.c | 40 +- contrib/binutils/binutils/objcopy.1 | 400 +- contrib/binutils/binutils/objcopy.c | 52 +- contrib/binutils/binutils/objdump.1 | 389 +- contrib/binutils/binutils/objdump.c | 46 +- contrib/binutils/binutils/po/POTFILES.in | 2 - contrib/binutils/binutils/po/binutils.pot | 1965 ++-- contrib/binutils/binutils/ranlib.1 | 392 +- contrib/binutils/binutils/rclex.c | 2 +- contrib/binutils/binutils/rcparse.c | 1453 +-- contrib/binutils/binutils/rcparse.y | 98 +- contrib/binutils/binutils/rdcoff.c | 22 +- contrib/binutils/binutils/readelf.c | 1974 ++-- contrib/binutils/binutils/resrc.c | 42 +- contrib/binutils/binutils/size.1 | 392 +- contrib/binutils/binutils/size.c | 18 +- contrib/binutils/binutils/srconv.c | 31 +- contrib/binutils/binutils/stabs.c | 22 +- contrib/binutils/binutils/strings.1 | 390 +- contrib/binutils/binutils/strings.c | 4 +- contrib/binutils/binutils/strip.1 | 392 +- contrib/binutils/binutils/sysdump.c | 4 +- contrib/binutils/binutils/version.c | 4 +- contrib/binutils/config-ml.in | 159 +- contrib/binutils/config.guess | 547 +- contrib/binutils/config.if | 93 + contrib/binutils/config.sub | 129 +- contrib/binutils/config/ChangeLog | 17 + contrib/binutils/config/acinclude.m4 | 1 + contrib/binutils/config/mh-openedition | 2 + contrib/binutils/config/mh-sparcpic | 2 +- contrib/binutils/config/mt-sparcpic | 2 +- contrib/binutils/configure | 35 +- contrib/binutils/configure.in | 351 +- contrib/binutils/gas/ChangeLog | 8454 +++++++--------- contrib/binutils/gas/ChangeLog-9697 | 1 - contrib/binutils/gas/ChangeLog-9899 | 4854 +++++++++ contrib/binutils/gas/MAINTAINERS | 1 + contrib/binutils/gas/Makefile.am | 1533 +-- contrib/binutils/gas/Makefile.in | 1599 +-- contrib/binutils/gas/NEWS | 22 + contrib/binutils/gas/README | 2 +- contrib/binutils/gas/acinclude.m4 | 16 + contrib/binutils/gas/aclocal.m4 | 788 +- contrib/binutils/gas/app.c | 124 +- contrib/binutils/gas/as.c | 210 +- contrib/binutils/gas/as.h | 205 +- contrib/binutils/gas/asintl.h | 15 +- contrib/binutils/gas/atof-generic.c | 52 +- contrib/binutils/gas/bignum-copy.c | 7 +- contrib/binutils/gas/bit_fix.h | 33 +- contrib/binutils/gas/cond.c | 153 +- contrib/binutils/gas/config.in | 6 +- contrib/binutils/gas/config/aout_gnu.h | 7 - contrib/binutils/gas/config/atof-ieee.c | 205 +- contrib/binutils/gas/config/obj-aout.c | 140 +- contrib/binutils/gas/config/obj-aout.h | 10 +- contrib/binutils/gas/config/obj-coff.c | 292 +- contrib/binutils/gas/config/obj-coff.h | 72 +- contrib/binutils/gas/config/obj-ecoff.c | 23 +- contrib/binutils/gas/config/obj-elf.c | 341 +- contrib/binutils/gas/config/obj-elf.h | 43 +- contrib/binutils/gas/config/obj-generic.h | 16 +- contrib/binutils/gas/config/obj-ieee.c | 196 +- contrib/binutils/gas/config/obj-ieee.h | 14 +- contrib/binutils/gas/config/obj-multi.h | 63 +- contrib/binutils/gas/config/tc-alpha.c | 922 +- contrib/binutils/gas/config/tc-alpha.h | 7 + contrib/binutils/gas/config/tc-arm.c | 3863 +++++--- contrib/binutils/gas/config/tc-arm.h | 25 +- contrib/binutils/gas/config/tc-i386.c | 3648 ++++--- contrib/binutils/gas/config/tc-i386.h | 326 +- contrib/binutils/gas/config/tc-m68851.h | 104 +- contrib/binutils/gas/config/tc-ppc.c | 470 +- contrib/binutils/gas/config/tc-ppc.h | 33 +- contrib/binutils/gas/config/tc-sparc.c | 808 +- contrib/binutils/gas/config/tc-sparc.h | 27 +- contrib/binutils/gas/config/tc-tic30.c | 152 +- contrib/binutils/gas/config/tc-tic30.h | 4 +- contrib/binutils/gas/config/tc-v850.c | 1349 +-- contrib/binutils/gas/config/tc-v850.h | 16 +- contrib/binutils/gas/config/tc-z8k.c | 783 +- contrib/binutils/gas/config/tc-z8k.h | 8 +- contrib/binutils/gas/config/te-386bsd.h | 13 +- contrib/binutils/gas/config/te-aux.h | 2 +- contrib/binutils/gas/config/te-nbsd.h | 8 +- contrib/binutils/gas/config/te-ppcnw.h | 13 +- contrib/binutils/gas/config/te-sparcaout.h | 11 +- contrib/binutils/gas/config/te-sysv32.h | 2 +- contrib/binutils/gas/configure | 1514 ++- contrib/binutils/gas/configure.in | 134 +- contrib/binutils/gas/debug.c | 3 +- contrib/binutils/gas/dep-in.sed | 58 +- contrib/binutils/gas/depend.c | 17 +- contrib/binutils/gas/doc/Makefile.am | 4 + contrib/binutils/gas/doc/Makefile.in | 14 +- contrib/binutils/gas/doc/all.texi | 3 + contrib/binutils/gas/doc/as.1 | 392 +- contrib/binutils/gas/doc/as.texinfo | 999 +- contrib/binutils/gas/doc/c-arm.texi | 33 +- contrib/binutils/gas/doc/c-i386.texi | 254 +- contrib/binutils/gas/doc/gasp.texi | 410 +- contrib/binutils/gas/doc/internals.texi | 62 +- contrib/binutils/gas/dwarf2dbg.c | 1566 ++- contrib/binutils/gas/dwarf2dbg.h | 27 +- contrib/binutils/gas/ecoff.c | 376 +- contrib/binutils/gas/ehopt.c | 135 +- contrib/binutils/gas/expr.c | 546 +- contrib/binutils/gas/expr.h | 20 +- contrib/binutils/gas/flonum-copy.c | 39 +- contrib/binutils/gas/flonum-konst.c | 185 +- contrib/binutils/gas/flonum-mult.c | 78 +- contrib/binutils/gas/flonum.h | 18 +- contrib/binutils/gas/frags.c | 179 +- contrib/binutils/gas/frags.h | 75 +- contrib/binutils/gas/gasp.c | 813 +- contrib/binutils/gas/hash.c | 62 +- contrib/binutils/gas/input-file.c | 47 +- contrib/binutils/gas/input-file.h | 8 +- contrib/binutils/gas/input-scrub.c | 193 +- contrib/binutils/gas/itbl-ops.c | 166 +- contrib/binutils/gas/itbl-ops.h | 6 +- contrib/binutils/gas/listing.c | 282 +- contrib/binutils/gas/literal.c | 4 +- contrib/binutils/gas/macro.c | 133 +- contrib/binutils/gas/macro.h | 42 +- contrib/binutils/gas/messages.c | 160 +- contrib/binutils/gas/obj.h | 9 + contrib/binutils/gas/po/POTFILES.in | 12 + contrib/binutils/gas/po/gas.pot | 7521 ++++++++------ contrib/binutils/gas/read.c | 1149 ++- contrib/binutils/gas/read.h | 42 +- contrib/binutils/gas/sb.c | 22 +- contrib/binutils/gas/sb.h | 8 +- contrib/binutils/gas/stabs.c | 111 +- contrib/binutils/gas/struc-symbol.h | 21 +- contrib/binutils/gas/subsegs.c | 24 +- contrib/binutils/gas/subsegs.h | 26 +- contrib/binutils/gas/symbols.c | 441 +- contrib/binutils/gas/symbols.h | 6 +- contrib/binutils/gas/tc.h | 10 +- contrib/binutils/gas/write.c | 751 +- contrib/binutils/gas/write.h | 23 +- contrib/binutils/include/ChangeLog | 283 +- contrib/binutils/include/MAINTAINERS | 1 + contrib/binutils/include/alloca-conf.h | 24 + contrib/binutils/include/ansidecl.h | 8 + contrib/binutils/include/aout/ChangeLog | 9 + contrib/binutils/include/aout/aout64.h | 16 + contrib/binutils/include/bfdlink.h | 24 + contrib/binutils/include/bin-bugs.h | 2 +- contrib/binutils/include/coff/ChangeLog | 61 + contrib/binutils/include/coff/internal.h | 9 +- contrib/binutils/include/coff/pe.h | 191 +- contrib/binutils/include/coff/ti.h | 434 + contrib/binutils/include/demangle.h | 21 +- contrib/binutils/include/dis-asm.h | 17 +- contrib/binutils/include/elf/ChangeLog | 268 +- contrib/binutils/include/elf/alpha.h | 5 +- contrib/binutils/include/elf/arc.h | 24 +- contrib/binutils/include/elf/arm.h | 112 +- contrib/binutils/include/elf/avr.h | 4 +- contrib/binutils/include/elf/common.h | 94 +- contrib/binutils/include/elf/cris.h | 47 + contrib/binutils/include/elf/d10v.h | 4 +- contrib/binutils/include/elf/d30v.h | 4 +- contrib/binutils/include/elf/fr30.h | 5 +- contrib/binutils/include/elf/hppa.h | 577 +- contrib/binutils/include/elf/i370.h | 2 +- contrib/binutils/include/elf/i386.h | 5 +- contrib/binutils/include/elf/i860.h | 66 + contrib/binutils/include/elf/i960.h | 5 +- contrib/binutils/include/elf/ia64.h | 190 + contrib/binutils/include/elf/internal.h | 5 +- contrib/binutils/include/elf/m32r.h | 5 +- contrib/binutils/include/elf/m68hc11.h | 42 + contrib/binutils/include/elf/m68k.h | 5 +- contrib/binutils/include/elf/mcore.h | 5 +- contrib/binutils/include/elf/mips.h | 17 +- contrib/binutils/include/elf/mn10200.h | 4 +- contrib/binutils/include/elf/mn10300.h | 5 +- contrib/binutils/include/elf/pj.h | 5 +- contrib/binutils/include/elf/ppc.h | 16 +- contrib/binutils/include/elf/reloc-macros.h | 44 +- contrib/binutils/include/elf/sh.h | 17 +- contrib/binutils/include/elf/sparc.h | 5 +- contrib/binutils/include/elf/v850.h | 8 +- contrib/binutils/include/elf/x86-64.h | 46 + contrib/binutils/include/floatformat.h | 5 +- contrib/binutils/include/getopt.h | 12 +- contrib/binutils/include/hashtab.h | 42 +- contrib/binutils/include/libiberty.h | 27 +- contrib/binutils/include/md5.h | 142 + contrib/binutils/include/obstack.h | 3 +- contrib/binutils/include/opcode/ChangeLog | 249 +- contrib/binutils/include/opcode/i386.h | 2113 ++-- contrib/binutils/include/opcode/ppc.h | 8 + contrib/binutils/include/opcode/sparc.h | 6 +- contrib/binutils/include/safe-ctype.h | 100 + contrib/binutils/include/sort.h | 48 + contrib/binutils/include/splay-tree.h | 10 +- contrib/binutils/include/symcat.h | 13 +- contrib/binutils/ld/ChangeLog | 10902 +++------------------ contrib/binutils/ld/ChangeLog-9197 | 7576 ++++++++++++++ contrib/binutils/ld/ChangeLog-9899 | 2108 ++++ contrib/binutils/ld/MAINTAINERS | 1 + contrib/binutils/ld/Makefile.am | 185 +- contrib/binutils/ld/Makefile.in | 217 +- contrib/binutils/ld/NEWS | 30 +- contrib/binutils/ld/acinclude.m4 | 15 + contrib/binutils/ld/aclocal.m4 | 769 +- contrib/binutils/ld/configdoc.texi | 1 + contrib/binutils/ld/configure | 2107 ++-- contrib/binutils/ld/configure.host | 57 +- contrib/binutils/ld/configure.in | 24 +- contrib/binutils/ld/configure.tgt | 83 +- contrib/binutils/ld/deffile.h | 136 +- contrib/binutils/ld/dep-in.sed | 2 +- contrib/binutils/ld/emulparams/armelf.sh | 3 +- contrib/binutils/ld/emulparams/armelf_linux.sh | 9 +- contrib/binutils/ld/emulparams/elf32lppc.sh | 16 +- contrib/binutils/ld/emulparams/elf32lppcsim.sh | 18 + contrib/binutils/ld/emulparams/elf32ppc.sh | 12 +- contrib/binutils/ld/emulparams/elf32ppclinux.sh | 12 +- contrib/binutils/ld/emulparams/elf32ppcsim.sh | 18 + contrib/binutils/ld/emulparams/elf64_sparc.sh | 15 +- contrib/binutils/ld/emulparams/elf64alpha.sh | 55 +- contrib/binutils/ld/emulparams/elf_i386_chaos.sh | 10 + contrib/binutils/ld/emultempl/armcoff.em | 7 +- contrib/binutils/ld/emultempl/armelf.em | 1250 +-- contrib/binutils/ld/emultempl/armelf_oabi.em | 7 +- contrib/binutils/ld/emultempl/elf32.em | 1387 +-- contrib/binutils/ld/emultempl/generic.em | 10 +- contrib/binutils/ld/emultempl/linux.em | 7 +- contrib/binutils/ld/emultempl/pe.em | 579 +- contrib/binutils/ld/emultempl/ticoff.em | 202 + contrib/binutils/ld/emultempl/vanilla.em | 9 +- contrib/binutils/ld/gen-doc.texi | 1 + contrib/binutils/ld/genscripts.sh | 31 +- contrib/binutils/ld/ld.1 | 420 +- contrib/binutils/ld/ld.h | 49 +- contrib/binutils/ld/ld.texinfo | 615 +- contrib/binutils/ld/ldcref.c | 16 +- contrib/binutils/ld/ldctor.c | 11 +- contrib/binutils/ld/ldctor.h | 10 +- contrib/binutils/ld/ldemul.c | 153 +- contrib/binutils/ld/ldemul.h | 24 +- contrib/binutils/ld/ldexp.c | 706 +- contrib/binutils/ld/ldexp.h | 25 +- contrib/binutils/ld/ldfile.c | 166 +- contrib/binutils/ld/ldfile.h | 14 +- contrib/binutils/ld/ldgram.y | 7 +- contrib/binutils/ld/ldint.texinfo | 395 +- contrib/binutils/ld/ldlang.c | 1032 +- contrib/binutils/ld/ldlang.h | 200 +- contrib/binutils/ld/ldlex.h | 2 +- contrib/binutils/ld/ldlex.l | 2 +- contrib/binutils/ld/ldmain.c | 79 +- contrib/binutils/ld/ldmisc.c | 58 +- contrib/binutils/ld/ldver.c | 12 +- contrib/binutils/ld/ldwrite.c | 165 +- contrib/binutils/ld/lexsup.c | 234 +- contrib/binutils/ld/mri.c | 359 +- contrib/binutils/ld/pe-dll.c | 293 +- contrib/binutils/ld/po/ld.pot | 756 +- contrib/binutils/ld/scripttempl/elf.sc | 125 +- contrib/binutils/ld/scripttempl/v850.sc | 68 +- contrib/binutils/ld/scripttempl/z8000.sc | 45 +- contrib/binutils/libiberty/ChangeLog | 742 +- contrib/binutils/libiberty/Makefile.in | 75 +- contrib/binutils/libiberty/aclocal.m4 | 136 + contrib/binutils/libiberty/argv.c | 11 +- contrib/binutils/libiberty/basename.c | 4 +- contrib/binutils/libiberty/bsearch.c | 75 + contrib/binutils/libiberty/choose-temp.c | 10 +- contrib/binutils/libiberty/config.in | 52 +- contrib/binutils/libiberty/config.table | 1 + contrib/binutils/libiberty/config/mh-openedition | 2 +- contrib/binutils/libiberty/configure | 803 +- contrib/binutils/libiberty/configure.in | 98 +- contrib/binutils/libiberty/cp-demangle.c | 1369 ++- contrib/binutils/libiberty/cplus-dem.c | 280 +- contrib/binutils/libiberty/dyn-string.c | 24 + contrib/binutils/libiberty/floatformat.c | 41 +- contrib/binutils/libiberty/fnmatch.c | 10 +- contrib/binutils/libiberty/getcwd.c | 6 + contrib/binutils/libiberty/getopt.c | 4 +- contrib/binutils/libiberty/getopt1.c | 4 +- contrib/binutils/libiberty/getruntime.c | 14 +- contrib/binutils/libiberty/hashtab.c | 327 +- contrib/binutils/libiberty/md5.c | 421 + contrib/binutils/libiberty/memcmp.c | 4 +- contrib/binutils/libiberty/mkstemps.c | 3 +- contrib/binutils/libiberty/objalloc.c | 7 + contrib/binutils/libiberty/obstack.c | 4 +- contrib/binutils/libiberty/partition.c | 12 +- contrib/binutils/libiberty/pexecute.c | 53 +- contrib/binutils/libiberty/rename.c | 6 + contrib/binutils/libiberty/safe-ctype.c | 163 + contrib/binutils/libiberty/setenv.c | 14 +- contrib/binutils/libiberty/sigsetmask.c | 2 + contrib/binutils/libiberty/sort.c | 190 + contrib/binutils/libiberty/splay-tree.c | 115 +- contrib/binutils/libiberty/strerror.c | 19 +- contrib/binutils/libiberty/strncmp.c | 28 + contrib/binutils/libiberty/strsignal.c | 19 +- contrib/binutils/libiberty/strtod.c | 13 +- contrib/binutils/libiberty/strtol.c | 23 +- contrib/binutils/libiberty/strtoul.c | 21 +- contrib/binutils/libiberty/vasprintf.c | 54 +- contrib/binutils/libiberty/vfork.c | 4 + contrib/binutils/libiberty/waitpid.c | 7 + contrib/binutils/libiberty/xexit.c | 9 +- contrib/binutils/libiberty/xmalloc.c | 97 +- contrib/binutils/libiberty/xmemdup.c | 3 + contrib/binutils/ltconfig | 2436 ++--- contrib/binutils/ltmain.sh | 2706 +++-- contrib/binutils/md5.sum | 2992 ++++++ contrib/binutils/opcodes/ChangeLog | 6349 ++---------- contrib/binutils/opcodes/ChangeLog-9297 | 3791 +++++++ contrib/binutils/opcodes/ChangeLog-9899 | 1669 ++++ contrib/binutils/opcodes/MAINTAINERS | 1 + contrib/binutils/opcodes/Makefile.am | 388 +- contrib/binutils/opcodes/Makefile.in | 397 +- contrib/binutils/opcodes/acinclude.m4 | 16 + contrib/binutils/opcodes/aclocal.m4 | 788 +- contrib/binutils/opcodes/arm-dis.c | 68 +- contrib/binutils/opcodes/arm-opc.h | 73 +- contrib/binutils/opcodes/config.in | 3 - contrib/binutils/opcodes/configure | 1841 ++-- contrib/binutils/opcodes/configure.in | 52 +- contrib/binutils/opcodes/disassemble.c | 53 +- contrib/binutils/opcodes/i386-dis.c | 2329 ++++- contrib/binutils/opcodes/opintl.h | 24 +- contrib/binutils/opcodes/po/POTFILES.in | 20 + contrib/binutils/opcodes/po/opcodes.pot | 134 +- contrib/binutils/opcodes/ppc-dis.c | 14 +- contrib/binutils/opcodes/ppc-opc.c | 1099 ++- contrib/binutils/opcodes/sparc-dis.c | 18 +- contrib/binutils/opcodes/sparc-opc.c | 43 +- contrib/binutils/opcodes/sysdep.h | 2 +- contrib/binutils/opcodes/tic30-dis.c | 70 +- contrib/binutils/opcodes/z8k-dis.c | 23 +- contrib/binutils/symlink-tree | 5 + 496 files changed, 115570 insertions(+), 75506 deletions(-) create mode 100644 contrib/binutils/bfd/ChangeLog-9899 create mode 100644 contrib/binutils/bfd/MAINTAINERS create mode 100644 contrib/binutils/binutils/ChangeLog-9197 create mode 100644 contrib/binutils/binutils/ChangeLog-9899 create mode 100644 contrib/binutils/binutils/MAINTAINERS create mode 100644 contrib/binutils/config.if create mode 100644 contrib/binutils/config/mh-openedition create mode 100644 contrib/binutils/gas/ChangeLog-9899 create mode 100644 contrib/binutils/gas/MAINTAINERS create mode 100644 contrib/binutils/include/MAINTAINERS create mode 100644 contrib/binutils/include/alloca-conf.h create mode 100644 contrib/binutils/include/coff/ti.h create mode 100644 contrib/binutils/include/elf/cris.h create mode 100644 contrib/binutils/include/elf/i860.h create mode 100644 contrib/binutils/include/elf/ia64.h create mode 100644 contrib/binutils/include/elf/m68hc11.h create mode 100644 contrib/binutils/include/elf/x86-64.h create mode 100644 contrib/binutils/include/md5.h create mode 100644 contrib/binutils/include/safe-ctype.h create mode 100644 contrib/binutils/include/sort.h create mode 100644 contrib/binutils/ld/ChangeLog-9197 create mode 100644 contrib/binutils/ld/ChangeLog-9899 create mode 100644 contrib/binutils/ld/MAINTAINERS create mode 100644 contrib/binutils/ld/emulparams/elf32lppcsim.sh create mode 100644 contrib/binutils/ld/emulparams/elf32ppcsim.sh create mode 100644 contrib/binutils/ld/emulparams/elf_i386_chaos.sh create mode 100644 contrib/binutils/ld/emultempl/ticoff.em create mode 100644 contrib/binutils/libiberty/aclocal.m4 create mode 100644 contrib/binutils/libiberty/bsearch.c create mode 100644 contrib/binutils/libiberty/md5.c create mode 100644 contrib/binutils/libiberty/safe-ctype.c create mode 100644 contrib/binutils/libiberty/sort.c create mode 100644 contrib/binutils/libiberty/strncmp.c create mode 100644 contrib/binutils/md5.sum create mode 100644 contrib/binutils/opcodes/ChangeLog-9297 create mode 100644 contrib/binutils/opcodes/ChangeLog-9899 create mode 100644 contrib/binutils/opcodes/MAINTAINERS (limited to 'contrib') diff --git a/contrib/binutils/Makefile.in b/contrib/binutils/Makefile.in index ed19949..14a7756 100644 --- a/contrib/binutils/Makefile.in +++ b/contrib/binutils/Makefile.in @@ -1,7 +1,7 @@ # # Makefile for directory with subdirs to build. -# Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 -# Free Software Foundation +# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, +# 1999, 2000, 2001 Free Software Foundation # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,7 +37,8 @@ infodir=${prefix}/info mandir=${prefix}/man gxx_include_dir=${includedir}/g++ -tooldir = $(exec_prefix)/$(target) +tooldir = $(exec_prefix)/$(target_alias) +build_tooldir = $(exec_prefix)/$(target_alias) program_transform_name = @@ -97,9 +98,9 @@ CHILL_LIB = -lchill CXX = c++ # Use -O2 to stress test the compiler. -LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -fexceptions +LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates -fexceptions +LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates RANLIB = ranlib @@ -111,6 +112,7 @@ NM = nm LD = ld BZIPPROG = bzip2 +MD5PROG = md5sum # These values are substituted by configure. DEFAULT_YACC = yacc @@ -167,9 +169,7 @@ OTHERS = # This is set by the configure script to the list of directories which # should be built using the target tools. - - -TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon +TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstdc++ libg++ winsup opcodes bsp libstub cygmon libf2c libchill libobjc # Target libraries are put under this directory: # Changed by configure to $(target_alias) if cross. @@ -186,14 +186,19 @@ SET_LIB_PATH = # the libraries. This may be changed by configure.in. RPATH_ENVVAR = LD_LIBRARY_PATH +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that programs built for the host machine work. +HOST_LIB_PATH = $$r/bfd:$$r/opcodes + +# This is the list of directories that may be needed in RPATH_ENVVAR +# so that prorgams built for the target machine work. +TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:$$r/$(TARGET_SUBDIR)/libstdc++ + # configure.in sets SET_LIB_PATH to this if --enable-shared was used. +# Some platforms don't like blank entries, so we remove duplicate, +# leading and trailing colons. REALLY_SET_LIB_PATH = \ - if [ x"$$$(RPATH_ENVVAR)" != x ]; then \ - $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \ - else \ - $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes; \ - fi; \ - export $(RPATH_ENVVAR); + $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); ALL = all.normal INSTALL_TARGET = installdirs \ @@ -210,66 +215,17 @@ INSTALL_TARGET_CROSS = installdirs \ $(INSTALL_X11_MODULES) \ $(INSTALL_DOSREL) -CC_FOR_TARGET = ` \ - if [ -f $$r/gcc/xgcc ] ; then \ - if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ - case "$(target_canonical)" in \ - i[3456]86-*-cygwin*) \ - echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \ - ;; \ - *) \ - echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ - ;; \ - esac \ - else \ - echo $$r/gcc/xgcc -B$$r/gcc/; \ - fi; \ - else \ - if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ - echo $(CC); \ - else \ - t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ - fi; \ - fi` +# Should be substed by configure.in +FLAGS_FOR_TARGET = +CC_FOR_TARGET = +CHILL_FOR_TARGET = +CXX_FOR_TARGET = -# If CC_FOR_TARGET is not overriden on the command line, then this +# If GCC_FOR_TARGET is not overriden on the command line, then this # variable is passed down to the gcc Makefile, where it is used to # build libgcc2.a. We define it here so that it can itself be # overridden on the command line. -GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ - -CHILL_FOR_TARGET = ` \ - if [ -f $$r/gcc/xgcc ] ; then \ - echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \ - else \ - if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ - echo $(CC); \ - else \ - t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ - fi; \ - fi` - -CXX_FOR_TARGET = ` \ - if [ -f $$r/gcc/xgcc ] ; then \ - if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ - case "$(target_canonical)" in \ - i[3456]86-*-cygwin*) \ - echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/winsup/include -idirafter $$s/newlib/libc/include -idirafter $$s/newlib/libc/sys/cygwin -idirafter $$s/newlib/libc/sys/cygwin32 -nostdinc; \ - ;; \ - *) \ - echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ - ;; \ - esac \ - else \ - echo $$r/gcc/xgcc -B$$r/gcc/; \ - fi; \ - else \ - if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ - echo $(CXX); \ - else \ - t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \ - fi; \ - fi` +GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) AS_FOR_TARGET = ` \ if [ -f $$r/gas/as-new ] ; then \ @@ -422,6 +378,7 @@ BASE_FLAGS_TO_PASS = \ "sharedstatedir=$(sharedstatedir)" \ "sysconfdir=$(sysconfdir)" \ "tooldir=$(tooldir)" \ + "build_tooldir=$(build_tooldir)" \ "gxx_include_dir=$(gxx_include_dir)" \ "gcc_version=$(gcc_version)" \ "gcc_version_trigger=$(gcc_version_trigger)" \ @@ -521,6 +478,7 @@ ALL_MODULES = \ all-bison \ all-byacc \ all-bzip2 \ + all-cgen \ all-cvssrc \ all-db \ all-dejagnu \ @@ -563,7 +521,9 @@ ALL_MODULES = \ all-sed \ all-send-pr \ all-shellutils \ + all-sid \ all-sim \ + all-snavigator \ all-tar \ all-tcl \ all-tcl8.1 \ @@ -574,6 +534,7 @@ ALL_MODULES = \ all-uudecode \ all-wdiff \ all-zip \ + all-zlib \ $(EXTRA_TARGET_HOST_ALL_MODULES) # This is a list of the check targets for all of the modules which are @@ -597,6 +558,7 @@ CROSS_CHECK_MODULES = \ check-bfd \ check-binutils \ check-bzip2 \ + check-cgen \ check-cvssrc \ check-db \ check-dejagnu \ @@ -635,6 +597,8 @@ CROSS_CHECK_MODULES = \ check-sed \ check-send-pr \ check-shellutils \ + check-snavigator \ + check-sid \ check-sim \ check-tar \ check-tcl \ @@ -667,6 +631,7 @@ INSTALL_MODULES = \ install-binutils \ install-bison \ install-byacc \ + install-cgen \ install-cvssrc \ install-db \ install-dejagnu \ @@ -709,7 +674,9 @@ INSTALL_MODULES = \ install-sed \ install-send-pr \ install-shellutils \ + install-sid \ install-sim \ + install-snavigator \ install-tar \ install-textutils \ install-tgas \ @@ -764,9 +731,13 @@ INSTALL_X11_MODULES = \ ALL_TARGET_MODULES = \ all-target-libio \ all-target-libstdc++ \ + all-target-libstdc++-v3 \ all-target-librx \ all-target-libg++ \ all-target-newlib \ + all-target-libf2c \ + all-target-libchill \ + all-target-libobjc \ all-target-libtermcap \ all-target-winsup \ all-target-libgloss \ @@ -774,6 +745,11 @@ ALL_TARGET_MODULES = \ all-target-gperf \ all-target-examples \ all-target-libstub \ + all-target-libffi \ + all-target-libjava \ + all-target-zlib \ + all-target-boehm-gc \ + all-target-qthreads \ all-target-bsp \ all-target-cygmon @@ -782,9 +758,13 @@ ALL_TARGET_MODULES = \ CONFIGURE_TARGET_MODULES = \ configure-target-libio \ configure-target-libstdc++ \ + configure-target-libstdc++-v3 \ configure-target-librx \ configure-target-libg++ \ configure-target-newlib \ + configure-target-libf2c \ + configure-target-libchill \ + configure-target-libobjc \ configure-target-libtermcap \ configure-target-winsup \ configure-target-libgloss \ @@ -792,6 +772,11 @@ CONFIGURE_TARGET_MODULES = \ configure-target-gperf \ configure-target-examples \ configure-target-libstub \ + configure-target-libffi \ + configure-target-libjava \ + configure-target-zlib \ + configure-target-boehm-gc \ + configure-target-qthreads \ configure-target-bsp \ configure-target-cygmon @@ -800,10 +785,19 @@ CONFIGURE_TARGET_MODULES = \ CHECK_TARGET_MODULES = \ check-target-libio \ check-target-libstdc++ \ + check-target-libstdc++-v3 \ check-target-libg++ \ check-target-newlib \ + check-target-libf2c \ + check-target-libchill \ + check-target-libobjc \ check-target-winsup \ check-target-libiberty \ + check-target-libffi \ + check-target-libjava \ + check-target-zlib \ + check-target-boehm-gc \ + check-target-qthreads \ check-target-gperf # This is a list of the install targets for all of the modules which are @@ -811,13 +805,21 @@ CHECK_TARGET_MODULES = \ INSTALL_TARGET_MODULES = \ install-target-libio \ install-target-libstdc++ \ + install-target-libstdc++-v3 \ install-target-libg++ \ install-target-newlib \ + install-target-libf2c \ + install-target-libchill \ + install-target-libobjc \ install-target-libtermcap \ install-target-winsup \ install-target-libgloss \ install-target-libiberty \ install-target-bsp \ + install-target-libjava \ + install-target-zlib \ + install-target-boehm-gc \ + install-target-qthreads \ install-target-gperf # This is a list of the targets for which we can do a clean-{target}. @@ -832,6 +834,7 @@ CLEAN_MODULES = \ clean-bison \ clean-byacc \ clean-bzip2 \ + clean-cgen \ clean-cvssrc \ clean-db \ clean-dejagnu \ @@ -874,7 +877,9 @@ CLEAN_MODULES = \ clean-sed \ clean-send-pr \ clean-shellutils \ + clean-sid \ clean-sim \ + clean-snavigator \ clean-tar \ clean-tcl \ clean-texinfo \ @@ -883,21 +888,31 @@ CLEAN_MODULES = \ clean-time \ clean-uudecode \ clean-wdiff \ - clean-zip + clean-zip \ + clean-zlib # All of the target modules that can be cleaned CLEAN_TARGET_MODULES = \ clean-target-libio \ clean-target-libstdc++ \ + clean-target-libstdc++-v3 \ clean-target-librx \ clean-target-libg++ \ clean-target-newlib \ + clean-target-libf2c \ + clean-target-libchill \ + clean-target-libobjc \ clean-target-winsup \ clean-target-libgloss \ clean-target-libiberty \ clean-target-gperf \ clean-target-examples \ clean-target-libstub \ + clean-target-libffi \ + clean-target-libjava \ + clean-target-zlib \ + clean-target-boehm-gc \ + clean-target-qthreads \ clean-target-bsp \ clean-target-cygmon @@ -1052,7 +1067,12 @@ $(CLEAN_TARGET_MODULES): true; \ fi -clean-target: $(CLEAN_TARGET_MODULES) +clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc +clean-target-libgcc: + test ! -d gcc/libgcc || \ + (cd gcc/libgcc && find . -type d -print) | \ + while read d; do rm -f gcc/$$d/libgcc.a || : ; done + -rm -rf gcc/libgcc # Check target. @@ -1154,7 +1174,6 @@ gcc-no-fixedincludes: mv gcc/tmp-include gcc/include 2>/dev/null; \ else true; fi - # This rule is used to build the modules which use FLAGS_TO_PASS. To # build a target all-X means to cd to X and make all. # @@ -1433,12 +1452,12 @@ all-gcc: # in parallel. # .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean -bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-texinfo all-bison all-byacc all-binutils all-gas all-ld +bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-bootstrap @r=`pwd`; export r; \ s=`cd $(srcdir); pwd`; export s; \ $(SET_LIB_PATH) \ echo "Bootstrapping the compiler"; \ - cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@ + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ @r=`pwd`; export r; \ s=`cd $(srcdir); pwd`; export s; \ case "$@" in \ @@ -1454,7 +1473,7 @@ bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean b esac; \ $(SET_LIB_PATH) \ echo "$$msg"; \ - cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare @r=`pwd`; export r; \ s=`cd $(srcdir); pwd` ; export s; \ $(SET_LIB_PATH) \ @@ -1467,7 +1486,7 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld s=`cd $(srcdir); pwd`; export s; \ $(SET_LIB_PATH) \ echo "Building the C and C++ compiler"; \ - cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" + cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" @r=`pwd`; export r; \ s=`cd $(srcdir); pwd` ; export s; \ $(SET_LIB_PATH) \ @@ -1533,20 +1552,23 @@ all-bash: all-bfd: all-libiberty all-intl all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl all-bison: all-texinfo -configure-target-bsp: $(ALL_GCC) -all-target-bsp: configure-target-bsp all-gcc all-binutils all-target-newlib +configure-target-boehm-gc: $(ALL_GCC_CXX) configure-target-qthreads +all-target-boehm-gc: configure-target-boehm-gc +configure-target-bsp: $(ALL_GCC_C) +all-target-bsp: configure-target-bsp all-byacc: all-bzip2: +all-cgen: all-libiberty all-cvssrc: -configure-target-cygmon: $(ALL_GCC) -all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub all-target-bsp +configure-target-cygmon: $(ALL_GCC_C) +all-target-cygmon: configure-target-cygmon all-target-libiberty all-target-libio all-target-libstub all-target-bsp all-db: all-dejagnu: all-tcl all-expect all-tk all-diff: all-libiberty all-emacs: all-emacs19: all-bison all-byacc all-etc: -configure-target-examples: $(ALL_GCC) +configure-target-examples: $(ALL_GCC_C) all-target-examples: configure-target-examples all-expect: all-tcl all-tk all-fileutils: all-libiberty @@ -1557,15 +1579,18 @@ all-gas: all-libiberty all-opcodes all-bfd all-intl all-gash: all-tcl all-gawk: ALL_GCC = all-gcc -all-gcc: all-bison all-byacc all-binutils all-gas all-ld -all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld +ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss +ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++ all-target-libstdc++-v3 +all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib +all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK) all-gettext: all-gnuserv: -configure-target-gperf: $(ALL_GCC) +configure-target-gperf: $(ALL_GCC_C) all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++ all-gprof: all-libiberty all-bfd all-opcodes all-intl +all-grep: all-libiberty all-grez: all-libiberty all-bfd all-opcodes all-gui: all-gdb all-libproc all-target-librx all-guile: @@ -1577,40 +1602,56 @@ all-intl: all-ispell: all-emacs19 all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl -configure-target-libg++: $(ALL_GCC) configure-target-librx -all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++ +configure-target-libg++: $(ALL_GCC_CXX) configure-target-librx +all-target-libg++: configure-target-libg++ all-target-libiberty all-target-librx configure-target-libgloss: $(ALL_GCC) all-target-libgloss: configure-target-libgloss configure-target-newlib -configure-target-libio: $(ALL_GCC) +configure-target-libio: $(ALL_GCC_C) all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib -check-target-libio: +check-target-libio: all-target-libstdc++ all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl all-libiberty: -configure-target-librx: $(ALL_GCC) configure-target-newlib +configure-target-libffi: $(ALL_GCC_C) +all-target-libffi: configure-target-libffi +configure-target-libjava: $(ALL_GCC_CXX) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi +all-target-libjava: configure-target-libjava all-zip all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi +configure-target-librx: $(ALL_GCC_C) all-target-librx: configure-target-librx -configure-target-libstdc++: $(ALL_GCC) -all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio -configure-target-libstub: $(ALL_GCC) +configure-target-libstdc++: $(ALL_GCC_C) +all-target-libstdc++: configure-target-libstdc++ all-target-libiberty all-target-libio +configure-target-libstdc++-v3: $(ALL_GCC_C) +all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-libiberty +configure-target-libstub: $(ALL_GCC_C) all-target-libstub: configure-target-libstub all-libtool: +configure-target-libf2c: $(ALL_GCC_C) +all-target-libf2c: configure-target-libf2c all-target-libiberty +configure-target-libchill: $(ALL_GCC_C) +all-target-libchill: configure-target-libchill all-target-libiberty +configure-target-libobjc: $(ALL_GCC_C) +all-target-libobjc: configure-target-libobjc all-target-libiberty all-m4: all-libiberty all-make: all-libiberty all-mmalloc: configure-target-newlib: $(ALL_GCC) -configure-target-libtermcap: $(ALL_GCC) -all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc -all-target-libtermcap: configure-target-libtermcap all-binutils all-gas all-gcc -all-opcodes: all-bfd all-libiberty +all-target-newlib: configure-target-newlib +configure-target-libtermcap: $(ALL_GCC_C) +all-target-libtermcap: configure-target-libtermcap +all-opcodes: all-bfd all-libiberty all-cgen all-patch: all-libiberty all-perl: all-prms: all-libiberty +configure-target-qthreads: $(ALL_GCC_C) +all-target-qthreads: configure-target-qthreads all-rcs: all-readline: all-recode: all-libiberty all-sed: all-libiberty all-send-pr: all-prms all-shellutils: -all-sim: all-libiberty all-bfd all-opcodes all-readline +all-sid: all-tcl all-tk +all-sim: all-libiberty all-bfd all-opcodes all-readline all-cgen +all-snavigator: all-tcl all-tk all-itcl all-db all-grep all-libgui all-tar: all-libiberty all-tcl: all-tcl8.1: @@ -1623,15 +1664,19 @@ all-tgas: all-libiberty all-bfd all-opcodes all-time: all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1 all-wdiff: -all-target-winsup: all-target-newlib all-target-libiberty all-target-libtermcap configure-target-winsup -configure-target-winsup: configure-target-newlib +configure-target-winsup: $(ALL_GCC_C) +all-target-winsup: all-target-libiberty all-target-libtermcap configure-target-winsup all-uudecode: all-libiberty all-zip: -configure-target-libiberty: $(ALL_GCC) -all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib +all-zlib: +configure-target-zlib: $(ALL_GCC_C) +all-target-zlib: configure-target-zlib +configure-target-libiberty: $(ALL_GCC_C) +all-target-libiberty: configure-target-libiberty all-target: $(ALL_TARGET_MODULES) install-target: $(INSTALL_TARGET_MODULES) install-gdb: install-tcl install-tk install-itcl install-tix install-libgui +install-sid: install-tcl install-tk ### other supporting targets MAKEDIRS= \ @@ -1677,22 +1722,67 @@ DEVO_SUPPORT= README Makefile.in configure configure.in \ config.guess config.if config.sub config move-if-change \ mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ - mkinstalldirs ltconfig ltmain.sh missing ylwrap + mkinstalldirs ltconfig ltmain.sh missing ylwrap \ + libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh # Files in devo/etc used in any net release. # ChangeLog omitted because it may refer to files which are not in this # distribution (perhaps it would be better to include it anyway). ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ make-stds.texi standards.info* configure.texi configure.info* \ - configbuild.* configdev.* + configbuild.* configdev.* + # When you use `make setup-dirs' or `make taz' you should always redefine # this macro. SUPPORT_FILES = list-of-support-files-for-tool-in-question -.PHONY: taz +# 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 \ + sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ + else \ + sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ + fi` +PACKAGE = $(TOOL) +.PHONY: taz taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex + $(MAKE) -f Makefile.in do-proto-toplev \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-md5sum \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-tar-bz2 \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + +.PHONY: gdb-taz +gdb-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex + $(MAKE) -f Makefile.in do-proto-toplev \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-md5sum \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-djunpack \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + $(MAKE) -f Makefile.in do-tar-bz2 \ + TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ + MD5PROG="$(MD5PROG)" \ + SUPPORT_FILES="$(SUPPORT_FILES)" + +.PHONY: do-proto-toplev +do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex + echo "==> Making $(PACKAGE)-$(VER)/" # Take out texinfo from a few places. sed -e '/^all\.normal: /s/\all-texinfo //' \ -e '/^ install-texinfo /d' \ @@ -1701,7 +1791,8 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex # ./configure sun4 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \ - || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \ + || $(MAKE) $(CONFIGURE_TARGET_MODULES) \ + ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \ CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)" # Make links, and run "make diststuff" or "make info" when needed. rm -rf proto-toplev ; mkdir proto-toplev @@ -1721,7 +1812,7 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex fi ; \ else ln -s ../$$d proto-toplev/$$d ; fi ; \ done - cd etc ; $(MAKE) info + cd etc && $(MAKE) info $(MAKE) distclean # mkdir proto-toplev/etc @@ -1742,25 +1833,35 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \ else true; fi chmod -R og=u . || chmod og=u `find . -print` - if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ - ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \ - else \ - ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \ - fi; \ - if test x"$(PACKAGE)" = x; then \ - package="$(TOOL)"; \ - else \ - package="$(PACKAGE)"; \ - fi; \ - $(MAKE) -f Makefile.in do-tar-bz2 TOOL=$(TOOL) VER=$$ver PACKAGE=$$package + # + -rm -f $(PACKAGE)-$(VER) + ln -s proto-toplev $(PACKAGE)-$(VER) +.PHONY: do-tar-bz2 do-tar-bz2: echo "==> Making $(PACKAGE)-$(VER).tar.bz2" - -rm -f $(PACKAGE)-$(VER) - ln -s proto-toplev $(PACKAGE)-$(VER) - tar cfh $(PACKAGE)-$(VER).tar $(PACKAGE)-$(VER) + -rm -f $(PACKAGE)-$(VER).tar.bz2 + find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \ + | tar cTfh - $(PACKAGE)-$(VER).tar $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar +.PHONY: do-md5sum +do-md5sum: + echo "==> Adding md5 checksum to top-level directory" + cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \ + | xargs $(MD5PROG) > ../md5.sum + mv md5.sum proto-toplev + +.PHONY: do-djunpack +do-djunpack: + echo "==> Adding updated djunpack.bat to top-level directory" + echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/' + sed < djunpack.bat > djunpack.new \ + -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/' + mv djunpack.new djunpack.bat + -rm -f proto-toplev/djunpack.bat + ln -s ../djunpack.bat proto-toplev/djunpack.bat + TEXINFO_SUPPORT= texinfo/texinfo.tex DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) @@ -1768,6 +1869,7 @@ DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas $(MAKE) -f Makefile.in taz TOOL=gas \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" # The FSF "binutils" release includes gprof and ld. @@ -1775,53 +1877,62 @@ gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils $(MAKE) -f Makefile.in taz TOOL=binutils \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)" .PHONY: gas+binutils.tar.bz2 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas $(MAKE) -f Makefile.in taz TOOL=gas \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" .PHONY: libg++.tar.bz2 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty libg++.tar.bz2: $(DIST_SUPPORT) libg++ $(MAKE) -f Makefile.in taz TOOL=libg++ \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" GNATS_SUPPORT_DIRS=include libiberty send-pr gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats $(MAKE) -f Makefile.in taz TOOL=gnats \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" .PHONY: gdb.tar.bz2 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb - $(MAKE) -f Makefile.in taz TOOL=gdb \ + $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" .PHONY: dejagnu.tar.bz2 DEJAGNU_SUPPORT_DIRS= tcl expect libiberty dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu $(MAKE) -f Makefile.in taz TOOL=dejagnu \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)" .PHONY: gdb+dejagnu.tar.bz2 GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb - $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=gdb+dejagnu \ + $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" .PHONY: insight.tar.bz2 INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb - $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE=insight \ + $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" .PHONY: insight+dejagnu.tar.bz2 INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb - $(MAKE) -f Makefile.in taz TOOL=gdb PACKAGE="insight+dejagnu" \ + $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" .PHONY: newlib.tar.bz2 @@ -1839,6 +1950,7 @@ NEWLIB_SUPPORT_DIRS=libgloss # supports newlib (if only minimally). newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib $(MAKE) -f Makefile.in taz TOOL=newlib \ + MD5PROG="$(MD5PROG)" \ SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib diff --git a/contrib/binutils/bfd/ChangeLog b/contrib/binutils/bfd/ChangeLog index 638ea67..380d1ff 100644 --- a/contrib/binutils/bfd/ChangeLog +++ b/contrib/binutils/bfd/ChangeLog @@ -1,6581 +1,4383 @@ -2000-11-07 Alan Modra +2001-03-31 Philip Blundell - * coff-h8300.c (special): Adjust reloc address. + From 2001-03-26 H.J. Lu + * elf32-gen.c (elf32_generic_link_add_symbols): New. Check + if there are any relocations for generic ELF. + (bfd_elf32_bfd_link_add_symbols): Defined to + elf32_generic_link_add_symbols. + * elf64-gen.c (elf64_generic_link_add_symbols): New. Check + if there are any relocations for generic ELF. + (bfd_elf64_bfd_link_add_symbols): Defined to + elf64_generic_link_add_symbols. - From mainline 2000-04-03 Kazu Hirata - * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to - the R_PCRWORD_B case. +2001-03-21 Alan Modra -2000-11-05 Philip Blundell + * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section + non-NULL before attempting to dereference. - * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit - BFDs containing no sections to be merged, regardless of their flags. +2001-03-20 Andreas Schwab -2000-11-04 Philip Blundell + * elf32-m68k.c (elf_m68k_relocate_section): Don't need the + relocation value when resolving a reference from a debugging + section. - * elf32-arm.h (elf32_arm_relocate_section): Suppress error message - if a relocation for an undefined symbol also results in an - overflow. +2001-03-16 Philip Blundell -2000-10-31 Philip Blundell + * configure: Regenerate. - * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle - EF_SOFT_FLOAT if it is defined. +2001-03-16 Alan Modra - From 2000-05-23 H.J. Lu - * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo. + * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call. + (hppa_link_hash_newfunc): Init it. + (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller + section appears to be non-PIC. + (final_link_relocate): Likewise. + (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any + possible candidate function, and set pic_call for those that will + only have a .plt entry for the PIC call stub. + (hppa_handle_PIC_calls): Set maybe_pic_call. -2000-10-27 Philip Blundell + * elf32-hppa.c: Correct field selector in stub comments. + (clobber_millicode_symbols): Formatting fix. - * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse - attempts to mix PIC code with non-PIC, just mark the output as - being position dependent. - (elf32_arm_merge_private_bfd_data): Likewise. Print an error - message for EF_SOFT_FLOAT mismatches. Display diagnostics for - all mismatches, not just the first one. - -2000-10-23 Philip Blundell +2001-03-11 Philip Blundell - From 2000-05-23 H.J. Lu - * elf64-alpha.c (elf64_alpha_relocate_section): Check - h->root.other not h->other. - * elf32-mips.c (mips_elf_calculate_relocation): Likewise. + * configure.in: Set version to 2.11. -2000-10-23 Philip Blundell + * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT + entries that could serve as a definition for a weak symbol. - * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Undo previous - accidental checkin. +2001-03-07 Andreas Jaeger -2000-10-22 Philip Blundell + * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of + some relocation values. - * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make - PLT entries that could serve as a definition for a weak symbol. +2001-02-28 Andreas Jaeger - From 2000-06-05 H.J. Lu - * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag - an error when seeing an undefined symbol with hidden/internal - attribute. It is handled in *_relocate_section (). + * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation + to addend. - From 2000-05-23 H.J. Lu - * elf32-i386.c (elf_i386_relocate_section): Don't allow the - undefined symbol with the non-default visibility attributes. - * elf-hppa.h (elf_hppa_relocate_section): Likewise. - * elf32-arm.h (elf32_arm_relocate_section): Likewise. - * elf32-i370.c (i370_elf_relocate_section): Likewise. - * elf32-m68k.c (elf_m68k_relocate_section): Likewise. - * elf32-mcore.c (mcore_elf_relocate_section): Likewise. - * elf32-mips.c (mips_elf_calculate_relocation): Likewise. - * elf32-ppc.c (ppc_elf_relocate_section): Likewise. - * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. - * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. - * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. +2001-02-26 Andreas Jaeger -2000-10-16 Geoffrey Keating + * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries. - From 2000-10-14 Geoffrey Keating - * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT - entries that could serve as a definition for a weak symbol. +2001-02-21 David Mosberger -2000-10-15 Philip Blundell + * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for + C8 said "1" instead of "8". Clarify error string for IMM22: + "signed integer" instead of just "integer". - From 2000-09-08 Nick Clifton - * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not - initialise flags in output bfd if the input bfd is the default - architecture with the default flags. +2001-02-20 Andreas Jaeger - From 2000-09-03 Philip Blundell - * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate - references to undefined symbols in debugging sections. + * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make + PLT entries that could serve as a definition for a weak symbol. - From 2000-05-30 H.J. Lu - * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the - visibility bits if the symbol is undefined. Correctly handle - weak undefined symbols with hidden and internal attributes. - * elflink.h (elf_link_add_object_symbols): Always turn the - symbol into local if it has the hidden or internal attribute. +2001-02-18 David O'Brien - From 2000-05-22 H.J. Lu - * elflink.h (elf_link_output_extsym): Clear the visibility - field for symbols not defined locally. + * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat + FreeBSD/i386-CURRENT differently until I can figure out the needed + corefile changes. + * configure: Regenerate. + * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm, + FreeBSD/PowerPC, and FreeBSD/sparc64. - From 2000-05-03 Martin v. Löwis - * elflink.h (elf_link_add_object_symbols): Reset dynindx for - hidden and internal symbols. - (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with - visibility. - * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not - assign a PLT or GOT entry to symbols with hidden and - internal visibility. +2001-02-14 Philip Blundell -2000-10-16 Philip Blundell + From 2001-02-06 H.J. Lu + * bfd/peicode.h (coff_swap_filehdr_in): Remove the e_magic + checking. + (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and + external_PEI_IMAGE_hdr. - * configure.in: Set version to 2.10.1. - * configure: Regenerate. +2001-02-14 Bo Thorsen -2000-09-24 H.J. Lu + * elf64-x86-64.c: Small formatting fixes and rearrangements of code. + (elf64_86_64_size_info): Struct added to fix a problem + with the hashtable string entries. + (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt. + (elf64_x86_64_size_dynamic_sections): A FIXME removed. + (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and + remove the FIXME for this. + (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt + section. Also removed the FIXME for it. + (x86_64_elf_howto_table): Use bfd_elf_generic_reloc. + (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker. + (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing. - From 2000-04-20 H.J. Lu - * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10 - patch to symbols defined by a shared object. +2001-02-14 Philip Blundell -2000-09-06 Philip Blundell + From 2001-02-08 H.J. Lu + * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_32 + relocation entries for weak definitions when building DSO with + -Bsymbolic. - Merge from mainline: - - 2000-05-31 Ulrich Drepper +2001-02-13 Richard Henderson - * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version - definitions. We must not assume they are sorted in the file - according to their index numbers. + * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required + and not user provided. -2000-09-06 Philip Blundell +2001-02-13 Alan Modra - * config.bfd (arm*-*-uclinux*): New target. - (armeb-*-elf, arm*b-*-linux-gnu*): Likewise. + * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If + $global$ referenced but not defined, set its value here. -2000-08-22 Doug Kwan +2001-02-09 Bo Thorsen - * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo. - * coffcode.h (coff_set_flags): Add detection of w65 architecture. + * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section + alignment to 3. + (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry + and relocation. + (elf64_x86_64_relocate_section): Fix formatting. + (elf64_x86_64_relocate_section): Fix addend for relocation of + R_X86_64_(8|16|32|PC8|PC16|PC32). -2000-04-14 Matthew Green - - * config.bfd: Add NetBSD/sparc64 support. +Mon Feb 12 17:44:39 CET 2001 Jan Hubicka -2000-05-31 Mark Kettenis + * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL. - Add support for FreeBSD/Alpha. - * configure.in: Add alpha*-*-freebsd* entry to prevent including - OSF core file support. - * configure: Regenerate. +2001-02-10 Nick Clifton -2000-05-29 Philip Blundell + * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC + rel, it will be handled later on. - * ppcboot.c: Add packed attribute if compiling with GCC. +2001-02-09 David Mosberger -2000-05-29 Anatoly Vorobey + * elfxx-ia64.c (is_unwind_section_name): New function. Returns + true if section name is an unwind table section name. + (elfNN_ia64_additional_program_headers): Count each unwind section + separately. + (elfNN_ia64_modify_segment_map): Install one unwind program header + for each unwind separate section. Note: normally the linker + script merges the unwind sections that go into a single segment, + so this still generates at most one unwind program header per + segment. - * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal. + * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section + name for SHT_IA_64_UNWIND, not just .IA_64.unwind. + (elfNN_ia64_fake_sections): Mark sections with names that start + with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64 + unwind section. -2000-05-26 Alan Modra + * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function. + Use it to make sh_info in unwind section point to the text section + it applies to. - * sysdep.h (gettext, dgettext, dcgettext, textdomain, - bindtextdomain): Replace defines with those from intl/libgettext.h - to quieten gcc warnings. +2001-02-07 Mark Elbrecht -2000-05-26 Eli Zaretskii + * coffgen.c (coff_find_nearest_line): If stabs info is successfully + found, do not attempt to find dwarf2 info before returning. - * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH. +2001-01-30 Alan Modra - * archive.c (normalize, bfd_bsd_truncate_arname, - bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support - file names with backslashes. + * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function. + (elf_backend_get_symbol_type): Define. + (elf64_hppa_object_p): Set architecture and machine from elf + header flags. - * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file - before opening it. +2001-01-30 Curtis L. Janssen - * sysdep.h: Include filenames.h. + * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2 + before mdebug. -2000-05-26 Alan Modra +2001-01-26 Richard Henderson - * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777. + * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false + for non-default visibility. + * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but + delete ugly macro and replace with pretty function. -2000-05-23 Philip Blundell +2001-01-25 Mark Elbrecht - * configure.in: Set version to 2.10. - * configure: Regenerate. + * coff-go32.c: Update copyright. + * coff-stgo32.c: Likewise. + * coff-go32.c (COFF_LONG_FILENAMES): Define. + * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise. + * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry. + * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise. -Sat Jul 3 10:35:19 CDT 1999 Joel Sherrill +2001-01-25 Kazu Hirata - * config.bfd (sparc-rtemself): Added. - (sparc-rtemsaout): Added as alternate name for current sparc-rtems. - (sparc-rtems): Switched to ELF from a.out - (i386-rtemscoff): Added as alternate name for current i386-rtems. - (i386-rtems): Switched to ELF. + * bfd-in2.h: Rebuild. + * libbfd.h: Likewise. -2000-05-09 Alan Modra +2001-01-23 H.J. Lu - * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela - section is empty. - (copy_private_bfd_data): Allow for space possibly taken up by elf - headers when calculating segment physical address from lma. + * bfd-in2.h: Rebuild. -2000-05-08 Alan Modra +2001-01-23 H.J. Lu - * versados.c (versados_scan): Init stringlen and pass_2_done. + * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf) + is NULL or PRIV(vms_rec) is outside of the buffer. - * trad-core.c (trad_unix_core_file_p): Return - bfd_error_wrong_format rather than bfd_error_file_truncated. +2001-01-23 Kazu Hirata - * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to - add_data_entry. DataDirectory virtual address is relative. - (pe_print_idata): Account for relative DataDirectory virtual - addresses. Don't trash datasize inside POWERPC_LE_PE code. - (pe_print_edata): Similarly. + * coff64-rs6000.c: Fix formatting. + * coff-arm.c: Likewise. + * coffgen.c: Likewise. + * cofflink.c: Likewise. + * coff-mcore.c: Likewise. + * coff-mips.c: Likewise. + * coff-pmac.c: Likewise. + * coff-ppc.c: Likewise. + * coff-rs6000.c: Likewise. + * elf32.c: Likewise. + * elf32-fr30.c: Likewise. + * elf32-i370.c: Likewise. + * elf32-i860.c: Likewise. + * elf32-m32r.c: Likewise. + * elf32-m68k.c: Likewise. + * elf32-mcore.c: Likewise. + * elf32-ppc.c: Likewise. + * elf32-sh.c: Likewise. + * elf32-v850.c: Likewise. + * elf64-alpha.c: Likewise. + * elf64-sparc.c: Likewise. + * elflink.c: Likewise. + * elflink.h: Likewise. + * elf-m10200.c: Likewise. + * elf-m10300.c: Likewise. + * elfxx-ia64.c: Likewise. + + * aoutx.h: Fix formatting. + * bfd.c: Likewise. + * bfd-in2.h: Likewise. + * bfd-in.h: Likewise. + * cpu-i386.c: Likewise. + * cpu-m68hc11.c: Likewise. + * dwarf2.c: Likewise. + * elf64-x86-64.c: Likewise. + * format.c: Likewise. + * freebsd.h: Likewise. + * hash.c: Likewise. + * hp300hpux.c: Likewise. + * hppabsd-core.c: Likewise. + * hpux-core.c: Likewise. - From Szabolcs Szakacsits - * peigen.c (dir_names): Add Delay Import Directory. - (pe_print_idata): Always search for bfd section containing - idata address rather than looking up section name. Print this - section name rather than .idata. - (pe_print_edata): Similarly. Also print some fields as %08lx. - (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as - Win32Version. +2001-01-22 Bo Thorsen -2000-05-03 Mark Elbrecht + * elf64-x86-64.c: Added PIC support for X86-64. + (elf64_x86_64_link_hash_newfunc): Function added. + (elf64_x86_64_link_hash_table_create): Likewise. + (elf64_x86_64_check_relocs): Likewise. + (elf64_x86_64_gc_mark_hook): Likewise. + (elf64_x86_64_gc_sweep_hook): Likewise. + (elf64_x86_64_adjust_dynamic_symbol): Likewise. + (elf64_x86_64_size_dynamic_sections): Likewise. + (elf64_x86_64_discard_copies): Likewise. + (elf64_x86_64_finish_dynamic_symbol): Likewise. + (elf64_x86_64_finish_dynamic_sections): Likewise. + (elf64_x86_64_relocate_section): Add relocation of PIC sections. - * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for - the .bss section. - * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise. +2001-01-21 Maciej W. Rozycki -2000-05-02 H.J. Lu + * Makefile.am (install-data-local): Make use of $(DESTDIR). + * Makefile.in: Regenerate. - * elf.c (prep_headers): Use ELFOSABI_NONE instead of - ELFOSABI_SYSV. +2001-01-21 Kazu Hirata -2000-04-29 Andreas Jaeger + * coff-a29k.c: Fix formatting. - * libbfd-in.h: Correctly check GCC version. - * bfd-in.h: Likewise. - * libhppa.h: Likewise. - * libbfd.h: Regenerate. - * bfd-in2.h: Regenerate. +2001-01-19 H.J. Lu -2000-04-19 Michael Sokolov + * elf32-i386.c (elf_i386_check_relocs): Report files with bad + relocation section names. + (elf_i386_relocate_section): Report files with bad relocation + section names and return false. - K&R compiler fixes. - * dwarf2.c (concat_filename): Avoid string literal concatenation. - * ieee.c (ieee_get_symtab): Don't initialise union in struct. +2001-01-17 Bo Thorsen -2000-04-12 Alan Modra + * targets.c: Alphabetize list of xvecs. - * dep-in.sed: Match space before file name, not after. - * Makefile.am: Regenerate dependencies. - * Makefile.in: Regenerate. +2001-01-14 Alan Modra - * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield - case, allow address wrap-around stupidly removed 2000-03-17. Sign - extend without an if statement. + * config.bfd: Add linux target variant for elfxx-hppa. + * configure.in: Recognize bfd_elf32_hppa_linux_vec and + bfd_elf64_hppa_linux_vec. + * configure: Regenerate. + * elf64-hppa.c: Include elf64-target.h again to support linux + target variant. + (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux. + * elf32-hppa.c: Include elf32-target.h again to support linux + target variant. + (elf32_hppa_post_process_headers): New function. + (elf_backend_post_process_headers): Define. + * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and + bfd_elf32_hppa_linux_vec. -2000-04-04 Alan Modra + * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base, + and data_segment_base fields. + (elf32_hppa_link_hash_table_create ): Init them. + (elf32_hppa_check_relocs): Update comments. + (hppa_record_segment_addr): New function. + (elf32_hppa_relocate_section): Call it. + (final_link_relocate): Handle R_PARISC_SEGREL32. + (elf32_hppa_final_link): New function. + (bfd_elf32_bfd_final_link): Define to call it. + (hppa_unwind_entry_compare): New function. + * cache.c (bfd_open_file): Create files in write+read mode. - * po/bfd.pot: Regenerate. + * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for + SEGREL32 and numerous other relocs. Change duplicate + R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED. - * Makefile.am: Remove extraneous mkdep comment. - (MKDEP): Use gcc -MM rather than mkdep. - (DEP): Quote when passing vars to sub-make. Add warning - message to end. - (DEP1): Rewrite for "gcc -MM". - (CLEANFILES): Add DEP2. - Update dependencies. - * Makefile.in: Regenerate. + * opncls.c (bfd_fdopenr): Add parens like the comment says around + O_ACCMODE. -2000-04-03 H.J. Lu + * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create + .plt entries for DT_INIT and DT_FINI. + (elf32_hppa_finish_dynamic_sections): Remove special handling of + DT_INIT and DT_FINI. - * cache.c (bfd_open_file): Unlink the output file only if - it has non-zero size. + * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit + offsets for stub .plt access if wide mode. Check offset in range. -2000-04-01 Ken Block USG +2001-01-13 Nick Clifton - * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit - relative relocations for non-loaded sections in shared objects. - (elf64_alpha_check_relocs): Similarly. + * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank + line. -2000-03-31 Thomas de Lellis + * coffcode.h (coff_canonicalize_reloc): Remove spurious blank + line. - * srec.c : Set CHUNK size to 16 bytes to prevent download failures - on some targets. - * ihex.c : Ditto. +2001-01-12 Alan Modra -Wed Mar 30 15:28:00 2000 Donald Lindsay + * configure.in ([bfd_elf64_x86_64_vec]): Set target64. + * configure: Regenerate. - * elf32-m32r.c (m32r_elf_generic_reloc): new function. All - HOWTO references to bfd_elf_generic_reloc, that have - partial_inplace == true, now use the new function. The function - is based on the recent rewrite of m32r_elf_lo16_reloc(), and - extends its fixes to the R_M32R_{16,24,32} relocs. - The new logic in m32r_elf_lo16_reloc() has been removed, and - it instead calls the new routine to obtain that functionality. +2001-01-11 Peter Targett -2000-03-27 Alan Modra + * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5, + bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants. + * cpu-arc.c (arch_info_struct): Add entries for variants. + (bfd_arc_arch) Set default to bfd_mach_arc_5. + (arc_get_mach) Don't assume machine names prefixed arc- before + testing. + * elf32-arc.c (arc_elf_object_p): Set machine number based on new + selections. + (arc_elf_final_write_processing) Likewise. + (ELF_MACHINE_CODE) Use EM_ARC. - * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook, - elf32_avr_check_relocs, avr_final_link_relocate, - elf32_avr_relocate_section, bfd_elf_avr_final_write_processing, - elf32_avr_object_p): Add prototypes. - (elf32_avr_gc_mark_hook): Add default for h->root.type. - (bfd_elf_avr_final_write_processing): Make static. +2001-01-10 Nick Clifton -2000-03-27 Denis Chertykov + * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "". - * cpu-avr.c: New file. BFD support routines for AVR architecture. - * archures.c (bfd_architecture): Add AVR architecture. - (bfd_archures_list): Add reference to AVR architecture info. - * elf.c (prep_headers): Handle bfd_arch_avr. - * reloc.c: Add various AVR relocation enums. - * targets.c (bfd_elf32_avr_vec): Declare and add to target vector - list. - * Makefile.am: Add support for AVR elf. - * configure.in: Likewise. - * config.bfd: Likewise. - * Makefile.in: Regenerate. - * configure: This too. - * bfd-in2.h: And this. - * libbfd.h: And this. +2001-01-07 Philip Blundell -2000-03-24 H.J. Lu + * README: Replace `bug-gnu-utils@gnu.org' with + `bug-binutils@gnu.org'. - * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype. - (elf64_alpha_find_reloc_at_ofs): Likewise. +2001-01-04 Kazu Hirata -2000-03-17 Alan Modra + * som.c: Fix formatting. - * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield, - flag an overflow if the bitfield is outside -2**n to 2**n-1. The - allowable range used to be -2**(n-1) to 2**n-1. - * reloc.c (_bfd_relocate_contents): Same here. Also replace - "boolean overflow" with "bfd_reloc_status_type flag". +2001-01-03 Kazu Hirata -2000-03-14 Doug Evans + * ecoffswap.h: Fix formatting. + * elf-bfd.h: Likewise. + * elfarm-nabi.c: Likewise. + * elfarm-oabi.c: Likewise. + * elfcode.h: Likewise. + * elfcore.h: Likewise. + * elflink.c: Likewise. + * elflink.h: Likewise. + * elfxx-ia64.c: Likewise. + * elfxx-target.h: Likewise. + * libbfd.c: Likewise + * linker.c: Likewise. + * lynx-core.c: Likewise. - * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite. +2001-01-02 Kazu Hirata -2000-03-14 Kazu Hirata + * pc532-mach.c: Fix formatting. + * pe-arm.c: Likewise. + * pe-i386.c: Likewise. + * pe-mips.c: Likewise. + * pe-ppc.c: Likewise. + * pe-sh.c: Likewise. + * pei-mips.c: Likewise. + * pei-sh.c: Likewise. + * peicode.h: Likewise. + * ppcboot.c: Likewise. + * ptrace-core.c: Likewise. - * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number - of shrinks properly, including the last reloc. +2001-01-01 Kazu Hirata -2000-03-13 Kazu Hirata + * reloc.c: Fix formatting. + * riscix.c: Likewise. + * rs6000-core.c: Likewise. + * xcoff-target.h: Likewise. - * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity - check for R_MOVL2. +2000-12-29 Hans-Peter Nilsson -2000-03-11 Alan Modra + * elfcode.h (elf_object_p): Also restore the bfd mach field on + error, by calling bfd_default_set_arch_mach with incoming + values. - * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on - a format mismatch rather than an "error" from bfd_read such as - bfd_error_file_truncated. +2000-12-26 Kazu Hirata -2000-03-10 Geoff Keating + * vaxnetbsd.c: Fix formatting. + * versados.c: Likewise. + * vms-gsd.c: Likewise. + * vms-hdr.c: Likewise. + * vms-misc.c: Likewise. - * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper - sign-extension and big-endian compensation for - R_MIPS_64 even in ld -r. +2000-12-25 Alexandre Oliva -2000-03-10 Geoffrey Keating + * archive.c (coff_write_armap): Don't write more than symbol_count + `archive_member_file_ptr's. - * elf32-mips.c (mips_elf_next_relocation): Rename from - mips_elf_next_lo16_relocation, and generalize to look - for any relocation type. - (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset. - (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16. - (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16. - (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2. - (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64. - (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32. - (bfd_elf32_bfd_reloc_type_lookup): Add new relocs. - (mips_rtype_to_howto): Likewise. - (mips_elf_calculate_relocation): Handle new relocs. - (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs - are paired. The addend for R_MIPS_GNU_REL16_S2 - is shifted right two bits. +2000-12-25 Kazu Hirata -2000-03-10 Alan Modra + * vms-tir.c: Fix formatting. - * reloc.c (bfd_perform_relocation): Undo emacs formatting of - comment, and ensure it doesn't happen again. - (bfd_install_relocation): Same here. - (_bfd_relocate_contents): Don't bother assigning unused signmask - shift result. Fix typos in comments. - Remove trailing whitespace throughout file. +2000-12-23 Kazu Hirata -2000-03-07 Doug Evans + * vms.c: Fix formatting. + * vms.h: Likewise. - * reloc.c (reloc_howto_struct): Fix partial_inplace comment. - * bfd-in2.h: Rebuild. - -2000-03-06 Nick Clifton - - * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and - sym_ptr_ptr fields. - (SIZEOF_ILF_SYM_PTR_TABLE): Define. - (SIZEOF_ILF_STRINGS): Redefine. - (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol - relative reloc, as opposed to a section relative reloc. - (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT - not C_LABEL. - Add length of symbol's prefix to string pointer. - Store a pointer to the symbol in the symbol pointer table. - (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7. - Initialise the symbol pointer table. - Store the hint in the Hint/Name table. - Make the jump reloc be symbol realtive, not section relative. - Create an import symbol for imported code. - -2000-03-06 Catherine Moore - - * elf.c (swap_out_syms): Check for null type_ptr. - -2000-03-01 Hans-Peter Nilsson - - * aout-target.h (MY(write_object_contents)): Remove unused - and unusable "#if CHOOSE_RELOC_SIZE". - * pc532-mach.c (MY(write_object_contents)): Ditto. - * netbsd.h (MY(write_object_contents)): Ditto. - * hp300hpux.c (MY(write_object_contents)): Ditto. - * freebsd.h (MY(write_object_contents)): Ditto. - * aout-tic30.c (tic30_aout_write_object_contents): Ditto. - -2000-02-29 H.J. Lu - - * peicode.h (jtab): Make it static. - - * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is - defined and COFF_IMAGE_WITH_PE is not defined. - (_bfd_sh_align_load_span): Defined as sh_align_load_span if - COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined. - -2000-03-01 Nick Clifton - - * coff-arm.c (bfd_arm_process_before_allocation): Make - 'symndx' signed to prevent compile time warning. - - * coff-mcore.c: Remove unused prototype for pe_object_p. - - * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static - functions that are not used when COFF_IMAGE_WITH_PE is - defined. - (struct sh_opcode): Change type of 'flags' field to unsigned - long so that it can hold the USESAS flag. - - * coffcode.h (styp_to_sec_flags): Initialise 'target_name'. - - * elf-m10300.c (mn10300_elf_relax_section): Initialise - 'sym_sec'. - - * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function - parameters. - Remove unusued variables and code. - (elf_backend_add_symbol_hook): Fix prototype. - - * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and - 'srelgot'. - - * elf32-mcore.c (mcore_elf_relocate_section): Initialise - 'oldinst'. - - * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function - parameters. - Remove unusued variables and code. - (elf_backend_add_symbol_hook): Fix prototype. - - * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'. - - * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED - to unused function parameter. - - * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function - parameters. - Use EMPTY_HOWTO to initialise empty howto slots. - Remove unused variables. - - * peicode.h (pe_ILF_build_a_bfd): Initialise id6. - -2000-03-01 H.J. Lu - - * aoutx.h (aout_link_input_section_std): Pass "true" to - the undefined_symbol callback. - (aout_link_input_section_ext): Likewise. - * bout.c (get_value): Likewise. - * coff-a29k.c (coff_a29k_relocate_section): Likewise. - * coff-alpha.c (alpha_ecoff_get_relocated_section_conten): - Likewise. - (alpha_relocate_section): Likewise. - * coff-arm.c (coff_arm_relocate_section): Likewise. - * coff-i960.c (coff_i960_relocate_section): Likewise. - * coff-mcore.c (coff_mcore_relocate_section): Likewise. - * coff-mips.c (mips_relocate_section): Likewise. - * coff-ppc.c (coff_ppc_relocate_section): Likewise. - * coff-sh.c (sh_relocate_section): Likewise. - * coff-tic80.c (coff_tic80_relocate_section): Likewise. - * cofflink.c (_bfd_coff_generic_relocate_section): Likewise. - * elf-m10200.c (mn10200_elf_relocate_section): Likewise. - * elf-m10300.c (mn10300_elf_relocate_section): Likewise. - * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. - * elf32-fr30.c (fr30_elf_relocate_section): Likewise. - * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. - * elf32-i370.c (i370_elf_relocate_section): Likewise. - * elf32-m32r.c (m32r_elf_relocate_section): Likewise. - * elf32-mcore.c (mcore_elf_relocate_section): Likewise. - * elf32-sh.c (sh_elf_relocate_section): Likewise. - * elf32-v850.c (v850_elf_relocate_section): Likewise. - * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise. - * elflink.h (elf_link_output_extsym): Likewise. - * pe-mips.c (coff_pe_mips_relocate_section): Likewise. - * reloc.c (bfd_generic_get_relocated_section_conten): Likewise. - * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise. - - * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the - undefined_symbol callback when building shared library with - -Bsymbolic and undefined symbols are allowed. Otherwise, pass - "true". - * elf32-arm.h (elf32_arm_relocate_section): Likewise. - * elf32-i386.c (elf_i386_relocate_section): Likewise. - * elf32-m68k.c (elf_m68k_relocate_section): Likewise. - * elf32-mips.c (mips_elf_calculate_relocation): Likewise. - (elf32_mips_get_relocated_section_content): Likewise. - * elf32-ppc.c (ppc_elf_relocate_section): Likewise. - * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. - * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. - * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - -2000-02-28 Nick Clifton - - * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects. - * Makefile.in: Regenerate. - - * configure.in: Add support for mips and sh pe vectors. - * configure: regenerate. - - * config.bfd: Add support for arm-wince, mips-pe and sh-pe - targets. - - * targets.c: Add mips and sh pe vectors. - - * libpei.h (coff_final_link_postscript): Only define if not - already defined. - - * coffcode.h: Add support for WinCE magic numbers. - - * peigen.c (pe_print_reloc): Update comment and rearrange - appending of newline character. - - * peicode.h: Add support for Image Library Format. - (pe_ILF_vars): Structure containing data used by ILF code. - (pe_ILF_make_a_section): New function. Create a section based - on ILF data. - (pe_ILF_make_a_reloc): New function. Create a reloc based on - ILF data. - (pe_ILF_make_a_symbol): New function. Create a symbol based - on ILF data. - (pe_ILF_save_relocs): New function. Store the relocs created - by pe_ILF_make_a_reloc in a section. - (pe_ILF_build_a_bfd): New function. Create a BFD describing - an ILF object. - (pe_ILF_object_p): New function. Return a bfd_target pointer - for an ILF object. - (pe_bfd_object_p): If an ILF object is detected call - pe_ILF_object_p on it. - - * coff-arm.c: Add support for WinCE relocs which are different - from normal ARM COFF relocs. - * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target. - - * coff-sh.c: Add support for sh-pe target. - * pe-sh.c: New file. Support code for sh-pe target. - * pei-sh.c: New file. Support code for sh-pe target. - - * pe-mips.c: New file. Support code for mips-pe target. - * pei-mips.c: New file. Support code for mips-pe target. - -2000-02-27 Jakub Jelinek - - * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump - architecture if the object causing the bump is dynamic. - * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise, - and also don't it for memory ordering. - (sparc64_elf_write_relocs): Take src_rela out of the loop. - -2000-02-27 Ian Lance Taylor - - * dwarf2.c (read_abbrevs): Use _raw_size directly rather than - calling bfd_get_section_size_before_reloc. - (decode_line_info): Likewise. - (_bfd_dwarf2_find_nearest_line): Likewise. - -2000-02-27 Eli Zaretskii - - * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the - name of the libtool directory. - * Makefile.in: Rebuild. - -Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com) - - * som.c (SOM_HOWTO): Define. - (som_hppa_howto_table): Use it. - -2000-02-25 Alexandre Oliva - - * config.bfd: Enable 64 bit support for GNU/Linux/sparc. - - * config.bfd: Enable 64 bit support for Solaris7+/sparc. - -2000-02-24 Catherine Moore - - * som.c (som_misc_symbol_info): Add field - secondary_def. - (som_bfd_derive_misc_symbol_info): Initialize - secondary_def. - (som_build_and_write_symbol_table): Keep track - of secondary_def field. - (som_slurp_symbol_table): Set BSF_WEAK symbol flag - if secondary_def field is set. - (som_bfd_ar_write_symbol_stuff): Initialize - secondary_def. - -2000-02-23 Stephane Carrez - - * dwarf2.c (read_address): Read 16-bits addresses. - (parse_comp_unit): Accept addr_size == 2. - -2000-02-23 Alan Modra - - * bfd-in.h: Update copyright date. - -2000-02-23 Linas Vepstas - - * cpu-i370.c: New file. - * elf32-i370.c: New file. - * archures.c (enum bfd_architecture): Add bfd_arch_i370. - (bfd_i370_arch): New. - (bfd_archures_list): Add bfd_i370_arch. - * elf.c (prep_headers): Add bfd_arch_i370. - * Makefile.am: Add support for IBM 370 elf. - * config.bfd: Likewise. - * configure.in: Likewise. - * libbfd.h (bfd_reloc_code_real_names): Likewise. - * reloc.c (bfd_reloc_code_type): Likewise. - * targets.c: Likewise. - - * Makefile.in: Regenerate. - * configure: Regenerate. - * bfd-in2.h: Regenerate. - -2000-02-22 Ian Lance Taylor - - * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for - invalid relocation types, and change them to R_386_NONE. - -2000-02-22 H.J. Lu - - * elflink.h (elf_link_add_object_symbols): If a version symbol is - not defined, don't add a second ELF_VER_CHR. - - * elflink.h (elf_bfd_final_link): Call output_extsym for global - symbols converted to local symbols even when stripping all - symbols. - (elf_link_output_extsym): Process global symbols converted to - local symbols even if they are being stripped. - -2000-02-21 Alan Modra - - * archures.c (bfd_octets_per_byte): Return unsigned int. - (bfd_arch_mach_octets_per_byte): Ditto. - * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned - comparison warning. - * section.c (bfd_get_section_size_before_reloc): Quell signed - vs. unsigned comparison warning. - (bfd_get_section_size_after_reloc): Same here. Fix parentheses too. - * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27 - change. What was I thinking? - * bfd-in2.h: Regenerate. - - * elflink.h (elf_gc_sweep): Skip non-elf input bfds. - (elf_gc_sections): Same here. - (elf_gc_common_finalize_got_offsets): And here. - -2000-02-21 Ian Lance Taylor - - ELF HPPA doesn't work at present; remove it until it does. - * config.bfd: Comment out setting targ_defvec to - bfd_elf32_hppa_vec. - * Makefile.am: Rebuild dependencies. - (BFD32_BACKENDS): Remove elf32-hppa.lo. - (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c. - (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h. - * Makefile.in: Rebuild. - * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec. - -2000-02-18 Geoff Keating - - * coffcode.h (coff_set_arch_mach_hook): Use free(), because there - is no bfd_free(). Revert bfd_free part of previous change. - -2000-02-18 Geoff Keating - - * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size - arrays. - (coff_compute_section_file_positions): Use bfd_free to pair - bfd_malloc. - (coff_write_object_contents): Likewise. - - * coff-rs6000.c (xcoff_howto_table_16): New variable. - (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs. - -2000-02-18 Ulrich Drepper - - * coff-rs6000.c (XCOFFARMAGBIG): New macro. - (xcoff_ar_file_hdr_big): New structure. - (SIZEOF_AR_FILE_HDR_BIG): New macro. - (xcoff_ar_hdr_big): New structure. - (SIZEOF_AR_HDR_BIG): New macro. - (xcoff_big_format_p): New macro. - (xcoff_ardata_big): New macro. - (arch_xhdr_big): New macro. - (xcoff_slurp_armap): Handle large archives. - (xcoff_archive_p): Detect large archives. - (xcoff_read_ar_hdr): Handle large archives. - (xcoff_openr_next_archived_file): Handle large archives. - (xcoff_generic_stat_arch_elt): Handle large archives. - (xcoff_write_armap_old): Rename from xcoff_write_armap. - (xcoff_write_armap_big): New function. - (xcoff_write_armap): New function, dispatch to _old or _big. - (xcoff_write_archive_contents_old): Rename from - xcoff_write_archive_contents. - (xcoff_write_archive_contents_big): New function. - (xcoff_write_archive_contents): New function, dispatch to _old or - _big. - -2000-02-18 Richard Henderson - - * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect - and hide_symbol members. - (elf_link_hash_copy_indirect): Remove. - (elf_link_hash_hide_symbol): Remove. - (struct elf_backend_data): Add elf_backend_copy_indirect_symbol - and elf_backend_hide_symbol. - (_bfd_elf_link_hash_copy_indirect): Declare. - (_bfd_elf_link_hash_hide_symbol): Declare. - * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument. - (_bfd_elf_link_hash_hide_symbol): Likewise. - (_bfd_elf_link_hash_table_init): Don't init killed members. - * elflink.h (elf_link_add_object_symbols): Use the bed function - pointers not elf_link_hash_{copy_indirect,hide_symbol}. - (elf_link_assign_sym_version): Likewise. - * elfxx-target.h (elf_backend_copy_indirect_symbol): Default. - (elf_backend_hide_symbol): Likewise. - (elfNN_bed): Update for new members. - -2000-02-17 Kevin Buettner - - * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD, - STACK_END_ADDR): Define for new core file format. - (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines - for handling the vagaries of the various core file structures used - by AIX over the years. - (rs6000coff_core_p, rs6000coff_core_file_matches_executable, - Rs6kCorData): Use above defines to adapt code to use AIX 4.3's - core_dumpx structure. - -Thu Feb 17 00:04:48 2000 J"orn Rennecke - - * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros. - (bfd_mach_sh3_dsp): Likewise. - (bfd_mach_sh4): Reinstate. - (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750. - * bfd-in2.h: Regenerate. - * coff-sh.c (struct sh_opcode): flags is no longer short. - (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros. - (sh_opcode41, sh_opcode42): Integrate as sh_opcode41. - (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes. - (sh_opcode41, sh_opcode4, sh_opcode80): Likewise. - (sh_opcodes): No longer const. - (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays. - (sh_insn_uses_reg): Check for USESAS and USESR8. - (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS. - (_bfd_sh_align_load_span): Return early for SH4. - Modify sh_opcodes lookup table for sh-dsp / sh3-dsp. - Take into account that field b of a parallel processing insn - could be mistaken for a separate insn. - * cpu-sh.c (arch_info_struct): New array elements for - sh2, sh-dsp and sh3-dsp. - Reinstate element for sh4. - (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros. - (SH4_NEXT): Reinstate. - (SH3_NEXT, SH3E_NEXT): Adjust. - * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare. - * elf32-sh.c (sh_elf_set_private_flags): New function. - (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise. - (sh_elf_merge_private_data): New function. - (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define. - (bfd_elf32_bfd_copy_private_bfd_data): Define. - (bfd_elf32_bfd_merge_private_bfd_data): Change to - sh_elf_merge_private_data. - -2000-02-13 Richard Henderson - - * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and - hide_symbol members. - (elf_link_hash_copy_indirect): New. - (elf_link_hash_hide_symbol): New. - * elflink.h (elf_link_add_object_symbols): Break out copy from - indirect new new symbol to elf.c. - (elf_link_assign_sym_version): Break out privatization of - non-exported symbol to elf.c. - * elf.c (_bfd_elf_link_hash_copy_indirect): New. - (_bfd_elf_link_hash_hide_symbol): New. - (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol. - -2000-02-13 Ian Lance Taylor - - * section.c (_bfd_strip_section_from_output): Add info parameter. - If it passed as non-NULL, use it to check whether any input BFD - has an input section which uses this output section. Change all - callers. - * bfd-in2.h: Rebuild. - - * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and - bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of - 1999-11-29. - * bfd-in2.h: Rebuild. - -2000-02-10 Timothy Wall - - * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to - allow final modifications of swapped-in symbol. - (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST. - * coffcode.h (coff_write_relocs): Use macro - SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether - symbol index should be set to -1. - -Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com) - - * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG, - USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros. - * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes. - * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg, - sh_insns_uses_or_sets_freg): New functions. - * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros. - * (sh_insns_conflict): Use new functions and new macros to - detect conflicts when two instructions both set same integer registers, - both set same fp register, and both set special register. - -2000-02-09 Timothy Wall - - * coffgen.c (coff_real_object_p): Set arch/mach info prior to - swapping in sections, so that the swapping routines have access to - the arch/mach info. - -2000-02-08 Mark Elbrecht - - * coff-go32.c: Update comment. Update copyright. - -2000-01-27 Thomas de Lellis - - * syms.c (bfd_decode_symclass) - Two new class characters were added - 'V' and 'v'. The - meaning of 'W' is now restricted to just weak non-object - symbols. This allows differentiation between, for example, - weak functions vs weak objects. nm for example now dumps: - 'W' = weak global - 'w' = weak unresolved - 'V' = weak global object - 'v' = weak unresolved object - - (bfd_is_undefined_symclass): New function. Return true if the - given symbol class represents and undefined/unresolved symbol. - - (bfd_symbol_info): Use bfd_is_undefined_symclass to check for - unresolved symbols. - - * bfd-in2.h: Add prototype for bfd_is_undefined_symbol(). - - * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the - STT_ARM_16BIT flag set, but it is not attached to a data object - return STT_ARM_16BIT so that it will be treated as code by the - disassembler. - -2000-01-27 Alan Modra - - * coff-i386.c (i3coff_object_p): Remove prototype. - Update copyright. - - * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const - to name. Update copyright. - - * trad-core.c (trad_unix_core_file_p): Cast core_regsec - assignment to avoid warning. Update copyright. - -2000-01-24 Robert Lipe (robertl@sco.com) - - * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc - instead of using GNU C extension. - -2000-01-21 Nick Clifton - - * libbfd.c (bfd_read): Do not attempt to get a negativly sized - amount from a bfd_in_memory structure. - (bfd_seek): Do not allow seeks past the end of a bfd_in_memory - structure. - -2000-01-14 Nick Clifton - - * linker.c (default_indirect_link_order): oops - fix incorrectly - applied patch from Tim Wall. - -2000-01-13 Timothy Wall (twall@tiac.net> - - * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx - = scnhsz, filhsz, relsz, aoutsz, etc) - - * coffswap.h: Ditto. - -2000-01-13 Nick Clifton - - * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to - interwork thumb to arm stub. - -2000-01-13 Timothy Wall (twall@tiac.net> - - * archures.c (bfd_octets_per_byte): New function: Return - target byte size. - (bfd_arch_mach_octets_per_byte): New function: Return target - byte size. - - * section.c: Distinguish between octets and bytes for usage of - _cooked_size, _raw_size, and output_offset. Clarify - description of bfd_set_section_contents. - - * bfd-in2.h: Regenerate. - - * coffgen.c: Indicate that the offset parameter is in bytes, not - octets. - - * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte - where appropriate to get the octet offset when calling - bfd_set_section_contents. - (bfd_coff_reloc_link_order): Ditto. - - * linker.c (bfd_generic_reloc_link_order): Ditto. - (_bfd_default_link_order): Ditto. - - * reloc.c (bfd_perform_relocation): Distinguish between octets - and bytes. Use octets when indexing into octet data; use bytes - when calculating target addresses. - (bfd_install_relocation): Ditto. - - * srec.c (srec_write_section): Ditto. - -2000-01-13 Nick Clifton - - * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from - 3 to 2. This allows 4 byte sized sections, which is necessary for - dlltool to build funcitoning DLLs. - -2000-01-10 Philip Blundell - - * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu. - (arm*-*-conix*): New target. - -2000-01-10 Egor Duda - - * config.bfd: Include elf32_i386 vector to target list for cygwin - and mingw. - - * config.in: Undefine HAVE_WIN32_PSTATUS_T. - * configure.in: Test for structure win32_pstatus_t in - - * configure: Regenerate. - - * elf.c (elfcore_grok_win32pstatus): New function: process - win32_pstatus_t notes in elf core file. - (elfcore_grok_note): Detect win32_pstatus notes. - -2000-01-03 Martin v. Loewis - - * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol - visibility. - * elflink.h (elf_link_add_object_symbols): Combine visibilities. - * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility. - -1999-12-29 Richard Henderson - - * elflink.h (bfd_elf,size_dynamic_sections): Don't export all - if no dynamic sections created. - -1999-12-27 Nick Clifton - - * peicode.h (pe_bfd_object_p): Only define for PE format - targets. - -1999-12-17 Nick Clifton - - * coff-i386.c (i3coff_object_p): Delete. - (i386coff_vec): Replace reference to i3coff_object_p with a - reference to coff_object_p. - - * coff-mcore.c (pe_object_p): Delete. - - * peicode.h (pe_bfd_object_p): New function: Detect the - presence of a PE format COFF object file. Also detect and - warn about the presence of LINK6 format Image Library Format - object files. - -1999-12-16 Nick Clifton - - * coff-arm.c (NUM_ELEM): New macro. - (NUM_RELOCS): New macro: The number of known ARM relocs. - (RTYPE2HOWTO): Return NULL if the reloc type is out of range. - (coff_arm_rtype_to_howto): Return NULL if the reloc type is out - of range. - (bfd_arm_process_before_allocation): Produce a warning message if - an out of range symbol index is encountered. - -1999-12-14 Nick Clifton - - * elflink.h (is_global_symbol_definition): New Function: Return - true iff the symbol is being given a global definition in this - bfd. - (elf_link_is_defined_archive_symbol): Do not bother processing - symbols for an archive element that has already been included - in the link. - Use is_global_symbol_definition(). - -1999-12-09 Andrew Cagney - - * config.bfd: Add support for sparc-*-netbsdelf* and - sparc-*-netbsdaout*. - -1999-12-13 Nick Clifton - - * elflink.h (elf_link_is_defined_archive_symbol): Check to see - if the symbol is in the common section. - -1999-12-10 Nick Clifton - - * elflink.h (elf_link_is_defined_archive_symbol): New - function: Decide if a symbol, in an archive map is there - because it is defined in the archive element, or because it is - just another common declaration of it. - (elf_link_add_archive_symbols): Use - elf_link_is_defined_archive_symbol to decide if an archive - element contain a reference to a common symbol should be - linked in or not. - -1999-12-10 Nick Clifton - - * elflink.h: Revert previous patch. - * targets.c: Revert previous patch. - * libbfd-in2.h: Revert previous patch. - * libbfd.h: Revert previous patch. - * elfxx-target.h: Revert previous patch. - * archive.c: Revert previous patch. - * aout-target.h: Revert previous patch. - * aout-tic30.h: Revert previous patch. - * bfd.c: Revert previous patch. - * coff-alpha.c: Revert previous patch. - * coff-rs6000.c: Revert previous patch. - * elf64-mips.c: Revert previous patch. - * ieee.c: Revert previous patch. - * libecoff.h: Revert previous patch. - * oasys.c: Revert previous patch. - * som.c: Revert previous patch. - * vms.c: Revert previous patch. - -1999-12-09 Nick Clifton - - * elflink.h (elf_link_add_archive_symbols): Add an archive - element even if contains a symbol which is currently only - considered to be a common. - - * targets.c (struct bfd_target): Add new field - _bfd_allow_commons_in_armap. - * bfd-in2.h:Regenerate. - - * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap): - Define. - (_bfd_archive_bsd_allow_commons_in_armap): Define. - * libbfd.h: Regenerate. - - * elfxx-target.h: If using COFF archive map, override - definition of allow_commons_in_armap and replace with - bfd_false. - - * archive.c (bfd_compute_and_write_armap): Do not place common - symbols into the archive map unless _bfd_allow_commons_in_armap - returns true. - - * aout-target.h (MY_allow_commons_in_armap): Define. - * aout-tic30.h (MY_allow_commons_in_armap): Define. - * bfd.c (bfd_allow_commons_in_armap): Define. - * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define. - * coff-rs6000.h (xcoff_allow_commons_in_armap): Define. - * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define. - * ieee.c (ieee_ecoff_allow_commons_in_armap): Define. - * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define. - * oasys.c (oasys_allow_commons_in_armap): Define. - * som.c (som_allow_commons_in_armap): Define. - * vms.c (vms_allow_commons_in_armap): Define. - -1999-12-07 Jim Blandy - - Add support for SSE registers in ELF core files. - * elf.c (elfcore_make_note_pseudosection): New function. - (elfcore_grok_prfpreg): Use it. - (elfcore_grok_prxfpreg): New function. - (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes. - -1999-12-03 Ian Lance Taylor - - * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16 - value by 4 before storing it back in the field. From - Koundinya. K . - -Tue Nov 30 22:41:14 1999 Jeffrey A Law (law@cygnus.com) - - * archures.c (bfd_mach_am33): Define. - * bfd-in2.h: Rebuilt. - * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list - * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions. - (compute_function_info): Handle additional registers saved by - movm on the am33. - (elf_mn10300_mach): Handle E_MN10300_MACH_AM33. - (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33. - -1999-11-29 Jim Blandy - - * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New - functions. - * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New - declarations. - -1999-11-27 Michael Meissner - - * reloc.c (BFD_RELOC_ALPHA_USER_LITERAL): New relocation for - internal use within gas for alpha explicit relocations. - (BFD_RELOC_ALPHA_USER_LITUSE_BASE): Ditto. - (BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF): Ditto. - (BFD_RELOC_ALPHA_USER_LITUSE_JSR): Ditto. - (BFD_RELOC_ALPHA_USER_GPDISP): Ditto. - (BFD_RELOC_ALPHA_USER_GPRELHIGH): Ditto. - (BFD_RELOC_ALPHA_USER_GPRELLOW): Ditto. - - * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for - BFD_RELOC_ALPHA_USER_*. - - * bfd-in2.h: Regenerate. - * libbfd.h: Regenerate. - -1999-11-26 Fred Fish - - * elf.c (elfcore_read_notes): Add prototype for static function. - (_bfd_elf_make_section_from_phdr): Renamed from bfd_section_from_phdr. - (bfd_section_from_phdr): Replacement function that calls - _bfd_elf_make_section_from_phdr for generic segment types and - backend fucntion pointed to by elf_backend_section_from_phdr for - backend specific segment types. - (_bfd_elfcore_section_from_phdr): Remove call to elfcore_read_notes, - now called by _bfd_elf_make_section_from_phdr. Note that this func - is now just a stub between the caller and bfd_section_from_phdr. - - * elf-bfd.h (struct elf_backend_data): Add new function pointer - elf_backend_section_from_phdr. - (elf_backend_section_from_phdr): Add prototype. - - * elfxx-target.h (elf_backend_section_from_phdr): Define default. - (elfNN_bed): Add elf_backend_section_from_phdr. - -1999-11-25 Nick Clifton - - * coff-arm.c (bfd_arm_get_bfd_for_interworking): Add - SEC_CODE and SEC_READONLY flags to glue sections. - - * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add - SEC_CODE and SEC_READONLY flags to glue sections. - -1999-11-20 Nick Clifton - - * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous - delta. - -1999-11-19 Catherine Moore - - * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding. - (elf_cpu32_plt_entry): Likewise. - -1999-11-18 Nick Clifton - - * coff-mcore.c (coff_mcore_rtype_to_howto): Special case handling - for RVA relocs. - (coff_mcore_relocate_section): Initialise addend to 0. - Special case processing of RVA reloc. - -1999-11-17 Richard Henderson - - * elf-bfd.h (struct elf_backend_data): Reorder collect and - type_change_ok; add sign_extend_vma. - * elf32-mips.c (elf_backend_sign_extend_vma): Define. - * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma. - (elf_swap_shdr_in, elf_swap_phdr_in): Likewise. - * elfxx-target.h (elf_backend_sign_extend_vma): Default. - (elfNN_bed): Follow struture changes. - -1999-11-09 Ian Lance Taylor - - * libbfd.c (bfd_read): Check result of read against desired result - using !=, not <. - (_bfd_generic_get_section_contents): Set bfd_error if the seek is - invalid compared to the section size. - - * ieee.c (ieee_slurp_debug): Get the length of the debug - information right if there is no data part. - -Tue Nov 2 01:44:41 1999 Jeffrey A Law (law@cygnus.com) - - * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND, - R_LINETAB, R_LINETAB_ESC, and R_COMMENT. - -1999-10-28 Ian Lance Taylor - - * elflink.h (elf_bfd_final_link): Make last_local signed. - -1999-10-27 Ian Lance Taylor - - * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section - starts with a zero. - -Sat Oct 23 17:36:12 1999 Andrew Cagney - - * archures.c: Add definitions bfd_mach_d10v, bfd_mach_d10v_ts2 and - bfd_mach_d10v_ts3. - * cpu-d10v.c (d10v_ts3_info, d10v_ts2_info): Add. - * bfd-in2.h: Regenerate. - -1999-10-15 Andrew Haley - - * dwarf1.c (parse_die): Fail to parse a die if its length is zero. - -Sun Oct 17 17:19:00 1999 Jeffrey A Law (law@cygnus.com) - - * libhppa.h (bfd_hppa_insn2fmt): Change to return an int. - -1999-10-08 Ian Lance Taylor - - * elflink.h (elf_merge_symbol): When overriding a weak symbol with - a defined symbol in a shared library, clear the DEF_DYNAMIC flag - too. - -Fri Oct 8 13:03:45 1999 Geoffrey Keating - - * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL - relocs also need the GP value. - (_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs - properly. Handle sign-extension for R_MIPS_64 correctly. Correct - the GP value for R_MIPS_LITERAL relocs too. Handle - R_MIPS_64 relocs properly on big-endian MIPS. - (mips_elf_sign_extend): Behave properly with 'long long'. - (mips_elf_highest): Correct typo. - -Mon Oct 4 17:49:45 1999 Nick Clifton - - * cpu-m32r.c (arch_info_struct): New static global. - (bfd_m32r_arch): Refer to it. - * elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH. - (m32r_elf_print_private_bfd_data): Ditto. - (m32r_elf_final_write_processing): Handle bfd_mach_m32rx. - * archures.c (bfd_mach_m32rx): Define it. - * bfd-in2.h: Rebuild. - -1999-09-28 Fred Fish - - * targets.c (cisco_core_vec): Replaced with two new vecs ... - (cisco_core_big_vec): Add new bigendian vec. - (cisco_core_little_vec): Add new little endian vec. - - * cisco-core.c (CRASH_INFO): Fixed offset replaced with ... - (crash_info_locs): Add array of possible offsets. - (MASK_ADDR): Mask to apply to crash info offset. - (crashinfo_external): Add textbase, database, bssbase and - turn into a typedef. - (cisco_core_file_validate): Renamed from cisco_core_file_p. - Many small changes to account for additional hardware versions. - Pick a reasonable size for ".reg" section. Add a ".crash" - section to allow access to crashinfo_external struct. - (cisco_core_file_p): New version of this function that - iterates over crash_info_locs, calling cisco_core_file_validate. - (cisco_core_vec): Old big endian only vec replaced with ... - (cisco_core_big_vec): Add big endian version. - (cisco_core_little_vec): Add little endian version. - - * configure.in (cisco_core_vec): Split to two new vectors ... - (cisco_core_big_vec): New target vector. - (cisco_core_little_vec): New target vector. - * configure: Regenerate. - * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec - to cisco_core_big_vec in targ_selvecs. - -1999-09-28 Geoffrey Keating - - * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete. - (mips_elf_relocate_got_local): Unused, delete. - (mips_elf_relocate_global_got): Unused, delete. - -1999-09-24 Fred Fish - - * elf.c (bfd_section_from_phdr): Add typename variable. Use p_type - to initialize it to something meaningful. Then use it to generate - more useful segment names. - -Sun Sep 19 12:16:47 1999 Jeffrey A Law (law@cygnus.com) - - * som.c (NO_PCREL_MODES): Define if the system does not define - R_SHORT_PCREL_MODE. - (hppa_som_gen_reloc_type): Handle both short and long pcrel branches. - (som_write_fixups): Eliminate redundant pcrel mode relocs. Handle - R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE - * libhppa.h (dis_assemble_22): New function. - (bfd_hppa_insn2fmt): Handle long branch. - - * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found - in PA2.0. - -1999-09-17 Alan Modra - - * coff-i386.c (coff_i386_reloc_type_lookup): Support BFD_RELOC_16, - BFD_RELOC_16_PCREL, BFD_RELOC_8, BFD_RELOC_8_PCREL relocs. - (reloc_howto_type howto_table): Tidy comments and whitespace. - -1999-09-17 Nick Clifton - - * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo - previous delta. Set sec->gc_mark instead. - -Thu Sep 16 11:21:13 1999 Catherine Moore - - * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0. - (elf_cpu32_plt_entry): Likewise. - -Thu Sep 16 10:48:17 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL. - - * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the - symbol table, then just compute a suitable value (but do not - create a __gp symbol). - - * elf-hppa.h (elf_hppa_relocate_section): Allow undefined - symbols when building shared libraries. - (elf_hppa_final_link_relocate): Correct handling of PCREL - relocations against undefined symbols. - -1999-09-16 Nick Clifton - - * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Mark - interworking sections as linker created so that they will not - be removed by garbage collection. - -Wed Sep 15 02:31:57 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling. - (elf_hppa_final_link_relocate): Consistently create an absolute - address, then subtract out the value of __gp. - -1999-09-14 Michael Meissner - - * configure.in (Canonicalization of target names): Remove adding - ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 - generates $ac_config_sub with a ${CONFIG_SHELL} already. - * configure: Regenerate. - -1999-09-14 Nick Clifton - - * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of - Mitsubishi). - -Mon Sep 13 20:01:47 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_record_segment_addrs): New function. - (elf_hppa_final_link): Initialize text_segment_base and - data_segment_base. - (elf_hppa_final_link_relocate): Handle SEGREL relocations. - - * elf-hppa.h (elf_hppa_final_link): Remove unused variables. - (elf_hppa_final_link_relocate): Likewise. - (elf_hppa_relocate_insn): Likewise. - (elf_hppa_relocate_section): Initialize HOWTO. - -1999-09-13 Donn Terry - - * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT - handling to support both GNU and MS objects. - - * coffcode.h (coff_write_object_contents): Don't check reloc_count - when determining whether to set F_RELFLG. - -1999-09-13 Philip Blundell - - * elf32-arm.h (elf32_arm_final_link_relocate): Don't range-check - PC24 relocs if the target is an undefined weak symbol. - (arm_add_to_rel): Fix compiler warning. - (elf32_arm_plt0_entry): Correct comments. - -1999-09-13 Alan Modra - - * elfcode.h (write_relocs): Check for the_bfd NULL when handling - an absolute symbol in REL relocs. - -Sun Sep 12 23:47:58 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32. - Stub SEGREL32. Return an error for any relocation not handled. - -1999-09-12 Ian Lance Taylor - - * cofflink.c (coff_link_add_symbols): Look for special MSVC string - constant symbols, and avoid multiple definition errors on them. - -1999-09-12 Donn Terry - - * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most - significant bit is set. - -1999-09-11 Ian Lance Taylor - - * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define. - - * elfcode.h (write_relocs): Handle an absolute symbol in REL - relocs as we do for RELA relocs. - -1999-09-11 Donn Terry - - * libpei.h (_bfd_pei_final_link_postscript): Declare. - (coff_final_link_postscript): Define. - * peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data - directory entries here. - (_bfd_pei_final_link_postscript): New function. - - * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets - section flags based on the section name. - - * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the - get the overflow of the s_nlnno field from the s_nreloc field. - * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap - the s_nlnno overflow of the .text section into the s_nreloc - field. - - * peigen.c (add_data_entry): Declare. - (pei_swap_aouthdr_out): Get image size right. Set linker version - more intuitively. - (pei_swap_scnhdr_out): Test for UNINIT section, not .bss. - (pe_print_idata): Code cleanup, print more info, get rid of (now) - extraneous ImageBase. - (pe_print_edata): Likewise. - (pe_print_pdata): Likewise. Print exception entries. - (pe_print_reloc): Likewise. Print MIPS_JMPADDR. - (tbl): Make const, add "UNKNOWN". - (_bfd_pe_print_private_bfd_data_common): Print timestamp. - (_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted - section data directory. - (_bfd_pe_bfd_copy_private_section_data): Copy pe_flags. - - * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare. - * peigen.c (_bfd_pe_bfd_get_symbol_info): New function. - * peicode.h (coff_get_symbol_info): Define. - - * config.bfd (i[3456]86-*-interix*): Set targ_cflags to - -DSTRICT_PE_FORMAT. - * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather - than __INTERIX. - (coff_classify_symbol): Re-revert 1999-08-08 patch if - STRICT_PE_FORMAT. - - * libpei.h: New file, broken out of peicode.h. - * peigen.c: New file, broken out of peicode.h. - * peicode.h: A bunch of code moved out to libpei.h and peigen.c. - * configure.in: Add peigen.lo to list of files required for each - PE target. - * Makefile.am: Rebuild dependencies. - (BFD32_BACKENDS): Add peigen.lo. - (BFD32_BACKENDS_CFILES): Add peigen.c. - (SOURCE_HFILES): Add libpei.h. - * configure, Makefile.in: Rebuild. - - * peicode.h (coff_swap_scnhdr_in): Don't check for a special - section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA - instead. Don't clear the s_paddr field for an uninitialized data - section. - - * coffcode.h (coff_mkobject_hook): Set timestamp field in - coff_data_type to f_timdat. - * peicode.h (pe_mkobject_hook): Likewise. - - * peicode.h (coff_swap_filehdr_in): Check the NT executable magic - number if COFF_IMAGE_WITH_PE. - - * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG - to the reverse of IMAGE_FILE_DEBUG_STRIPPED. - (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if - there is no SEC_DEBUGGING section. - * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of - IMAGE_FILE_DEBUG_STRIPPED. - - * pe-i386.c (COFF_LONG_FILENAMES): Define. - (COFF_SECTION_ALIGNMENT_ENTRIES): Define. - * pei-i386.c (COFF_LONG_FILENAMES): Define. - (COFF_SECTION_ALIGNMENT_ENTRIES): Define. - - * coffswap.h (IMAGE_BASE): Don't define. - * pei-arm.c (IMAGE_BASE): Don't define. - * pei-i386.c (IMAGE_BASE): Don't define. - * pei-mcore.c (IMAGE_BASE): Don't define. - * pei-ppc.c (IMAGE_BASE): Don't define. - - * cofflink.c (_bfd_coff_link_input_bfd): When writing out a - symbol, switch on the class when determining whether to modify the - value. For PE, don't modify the value of a C_FCN symbol not named - .bf. - - * libbfd-in.h (_bfd_abort): Declare. - (abort): Define. - * bfd.c (_bfd_abort): New function. - * libbfd.h: Rebuild. - - * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE - special handling. - - * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped, - don't write out the associated line numbers. - - * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol - aux entries. - - * cofflink.c (coff_link_add_symbols): Don't warn about symbol type - changes when the base type is unknown. - - * coffgen.c (coff_print_symbol): Fix printing of aux record for - function symbols. - - * syms.c (BSF_DEBUGGING_RELOC): Define. - * coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING - for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such - symbols named .bf. - * coffgen.c (fixup_symbol_value): Relocate a symbol which has - BSF_DEBUGGING_RELOC set. - * bfd-in2.h: Rebuild. - -1999-09-10 Ian Lance Taylor - - * ecoff.c (bfd_debug_section): Update initialization for new - comdat_info field. - (_bfd_ecoff_styp_to_sec_flags): Add section parameter. - * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration. - -1999-09-10 H.J. Lu - - * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new - _bfd_filnmlen field. - * coff-mips.c (mips_ecoff_backend_data): Likewise. - -Fri Sep 10 00:35:14 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries - for FPTR relocs involving local symbols. - - * elf-hppa.h (elf_hppa_final_link_relocate): Get the right - value for the stub address in a call through a stub. - Install the value for a local symbol directly into the DLT - instead of generating a reloc. Correctly handle FPTR64 relocs. - - * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function. - (elf_hppa_remark_useless_dynamic_symbols): Similarly. - (elf_hppa_final_link): Call them. - -1999-09-10 Ian Lance Taylor - - * elflink.h (elf_fix_symbol_flags): Move weakdef handling here... - (elf_adjust_dynamic_symbol): ...from here. - -Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR - relocation, remove them. SECREL64->LTOFF16WF. - (elf_hppa_final_link_relocate): Handle LTOFF* relocations. Handle - DIR* relocations. - (elf_hppa_relocate_insn): Similarly. - - * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs. - (elf_hppa_relocate_insn): Similarly. - - * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and - GPREL* relocations. - (elf_hppa_relocate_insn): Similarly. - - * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos. - Handle LTOFF_TP* relocs. - (elf_hppa_relocate_insn): Similarly. - - * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs. - Consistently deal with addends. Handle DLTIND14F and DLTREL14F. - (elf_hppa_relocate_insn): Handle PCREL* relocs. - - * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*, - DIR32, DIR64 and FPTR64 relocations. - (elf_hppa_relocate_insn): Similarly. - - * elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the - address of the .PARISC.global section. - (elf_hppa_relocate_section): Lookup and pass the PA64 hash - table entry elf_hppa_final_link_relocate. Do not give a warning - for a reloc against an external symbol if it has a PA64 hash - table entry. - (elf_hppa_final_link_relocate): Significantly rework. Handle - DLTIND relocations. Compute the final value of the relocation - before passing the value of elf_hppa_relocate_insn. - (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling - relocation support. Handle DLTIND relocation requests just like - DLTREL relocation requests. Simplify branch handling. - -1999-09-08 Ulrich Drepper - - * elf-hppa.h (elf_hppa_relocate_section): Catch problems with - non-allocated section as done in i386 version. - (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch - statement since this is no know relocation. - -Tue Sep 7 17:25:12 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F - relocs. - (elf_hppa_relocate_insn): Similarly. - - * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and - DLTREL14WD relocs. - (elf_hppa_relocate_insn): Similarly. - - * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and - DLTREL21L relocs. Pass the output bfd to elf_hppa_relocate_insn. - Pass the relocate type rather than the insn format to - elf_hppa_relocate_insn. - (elf_hppa_relocate_insn): Make switch dependent on relocation type - rather than the opcode. Handle DLTREL21L and DLTREL14R relocs. - -1999-09-07 Ian Lance Taylor - - * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field. - (bfd_coff_filnmlen): Define. - (bfd_coff_std_swap_table): Initialize new field. - * coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather - than FILNMLEN. - (coff_write_symbols): Likewise. - (coff_get_normalized_symtab): Likewise. - * coff-sh.c (bfd_coff_small_swap_table): Initialize new field. - * libcoff.h: Rebuild. - -1999-09-06 Donn Terry - - * coffcode.h (sort_by_secaddr): New static function if - COFF_IMAGE_WITH_PE. - (coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort - sections by VMA when assigning target_index values. Always set - virt_size. - - * libcoff-in.h (struct pei_section_tdata): Add pe_flags field. - * coffcode.h (coff_set_alignment_hook) [COFF_WITH_PE version]: Set - pe_flags field. - * libcoff.h: Rebuild. - - * coffcode.h (coff_set_custom_section_alignment): Add const to - declaration to match definition. - (coff_write_object_contents): Don't set F_AR32W(R)? if - COFF_WITH_PE. - - * coff-i386.c (in_reloc_p): Add declaration. - (i386coff_vec): Simplify initialization of - application_section_flags. - - * coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE - version. Move COFF_WITH_PE specific code to new version. - (stype_to_sec_flags): Likewise. Add section parameter. - * coffgen.c (make_a_section_from_file): Set target_index before - calling styp_to_sec_flags. Pass section to styp_to_sec_flags. - * libcoff.h: Rebuild. - - * syms.c (stt): Add some PE/PEI section names. - (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined - symbol. - (bfd_symbol_info): Check for 'w'. - - * section.c (struct bfd_comdat_info): Define. - (asection): Add comdat field. - (STD_SECTION): Initialize comdat field. - (bfd_make_section_anyway): Likewise. - * bfd-in2.h: Rebuild. - -1999-09-06 Andreas Schwab - - * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag - to version symbols. - -1999-09-06 Nick Clifton - - * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and - bfd_realloc instead of calloc and realloc. - -1999-09-04 Steve Chamberlain - - * cpu-pj.c: New file. - * elf32-pj.c: New file. - * config.bfd (pj*): New cpu. - (pj-*-*, pjl-*-*): New targets. - * configure.in (bfd_elf32_pj_vec): New target vector. - (bfd_elf32_pjl_vec): New target vector. - * archures.c (bfd_arch_pj): Define. - * elf.c (prep_headers): Handle bfd_arch_pj. - * reloc.c: Define BFD_RELOC_PJ_* relocations. - * targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add - to target vector list. - * Makefile.am: Rebuild dependencies. - (ALL_MACHINES): Add cpu-pj.lo. - (ALL_MACHINES_CFILES): Add cpu-pj.c. - (BFD32_BACKENDS): Add elf32-pj.lo. - (BFD32_BACKENDS_CFILES): Add elf32-pj.c. - * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild. - -1999-09-04 Ian Lance Taylor - - * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define. - * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK - and NON_GOT_REF from weak defined symbol to real symbol. - * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF. - (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't - create a COPY reloc. - * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF. - (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set, - don't create a COPY reloc. - -1999-09-03 Ian Lance Taylor - - * elflink.h (elf_bfd_final_link): When counting relocations, don't - count those in sections we are not including in the link. - -Thu Sep 2 17:41:20 1999 Jeffrey A Law (law@cygnus.com) - - * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK - field in hpux11 shared libraries. - -1999-09-02 Nick Clifton - - * elflink.h (elf_gc_record_vtentry): Fix memory leak. - -Wed Sep 1 13:34:29 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_add_symbol_hook): New function. - (elf_hppa_final_link, elf_hppa_relocate_section): Likewise. - (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise. - -1999-08-31 Alexandre Petit-Bianco - - * elflink.h (record_link_assignment): When possible, keep the - original type of the symbol. - -Mon Aug 30 15:26:48 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both - R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the - tools were configured. - * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare. - -1999-08-26 Mark Mitchell - - * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local - GOT entries for GOT16 relocations; they're not required. - -1999-08-24 Nick Clifton - - From a patch submitted by Roland McGrath - - * config.bfd (arm-*-netbsd*): New target. - * configure.in (armnetbsd_vec): New target vector. - * configure: Regenerate - * targets.c (bfd_target_vector): Add &armnetbsd_vec. - - * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo. - (ALL_MACHINES_CFILES): Add armnetbsd.c. - (armnetbsd.lo): New rule with deps. - * Makefile.in: Regenerate. - - * armnetbsd.c: New file: Definitions specific to arm-netbsd - target. - -Tue Aug 24 00:25:58 1999 Jeffrey A Law (law@cygnus.com) - - * som.c (som_slurp_symbol_table): Fix typo in comment. - -Fri Aug 20 17:01:23 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_fake_sections): Compute section indices - here instead of using elf_section_data... - -1999-08-19 Nick Clifton - - * coff-mcore.c (mcore_emit_base_file_entry): New function: Emit - relocations into the base file. - (coff_mcore_relocate_section): Call mcore_emit_base_file_entry if - we are building a base file. - -1999-08-19 Nick Clifton - - * elf32-arm.h (arm_add_to_rel): New function. Add a value to - a REL style reloc. - (elf32_arm_relocate_section): Use arm_add_to_rel to increment - REL relocs when performing a partial relocation. - -1999-08-18 Donn Terry - - * cofflink.c: Move definitions of N_TMASK, et. al., out of - _bfd_coff_link_input_bfd into top level. - - * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE. - (RTYPE2HOWTO): Return NULL if reloc type is out of range. - (coff_i386_rtype_to_howto): Likewise. - * coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG. - Completely ignore symbols which are all zero. - (dummy_reloc16_estimate): Add return 0. - * cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope - variable copy to name_copy to avoid shadowing outer scope - variable. - * libcoff-in.h (coff_data_type): Change raw_syment_count field - from unsigned int to unsigned long. Add timestamp field. - * libcoff.h: Rebuild. - -1999-08-17 H.J. Lu - - * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in - macro definition. - -1999-08-17 Ian Lance Taylor - - * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC - for special section symbols. - * elflink.h (elf_merge_symbol): If we have no old BFD, check - BSF_DYNAMIC on the section symbol to see whether the old BFD is - dynamic. - -1999-08-15 Mark Mitchell - - * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate - coincidence of variable names between old and new code. - -1999-08-12 Nick Clifton - - * elf32-arm.h (elf32_arm_to_thumb_stub): Make 'offset' parameter - into a bfd_vma and 'addend' parameter a 'bfd_signed_vma'. - (elf32_thumb_to_arm_stub): Make 'offset' parameter into a bfd_vma - and 'addend' parameter a 'bfd_signed_vma'. - (elf32_arm_final_link_relocate): Do not involve stubs in - R_ARM_THM_PC22 relocs relative to section symbols, they are long - jumps, not function calls. - -1999-08-11 Robin Farine - - * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow - in R_ARM_PC24 relocs. - -Tue Aug 10 12:48:09 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (elf_hppa_fake_sections): New function. - * elf32-hppa.c (elf_backend_fake_sections): Define. - - * elf-hppa.h (elf_hppa_final_write_processing): Update for - recent changes to the arch_info structure. - - * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle - R_HPPA_SEGBASE and R_HPPA_SEGREL32. - * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info - list. - -Tue Aug 10 00:34:29 1999 Mark P. Mitchell - Ralf Baechle - - * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always - output DT_MIPS_GOTSYM. - (_bfd_mips_elf_finish_dynamic_sections): Use the same value as - DT_MIPS_SYMTABNO if there are no global GOT symbols. - -Tue Aug 10 00:21:08 1999 Mark P. Mitchell - - * elf32-mips.c (mips_elf_create_dynamic_relocation): Change - prototype. Handle local symbols. Add commentary. - (mips_elf_calculate_relocation): Adjust accordingly. - (_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32 - relocations. - - * elflink.h (elf_bfd_final_link): Tweak last change. - -1999-08-09 Mark Mitchell - - * elflink.h (elf_link_size_reloc_section): Use the counts in the - elf-section data to allocate just the right amount of relocation - space. Don't allocate the hash space twice. - (elf_bfd_final_link): Calculate the amount of space to allocate in - each relocation section. - -Mon Aug 9 17:37:30 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in - 64bit mode, generate a section relative relocation for a 32bit - wide relocation. - (elf_hppa_is_local_label_name): New function. - * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted. To be - shared between 32bit and 64bit port. - -1999-08-09 Mark Mitchell - - * elf32-mips.c (elf_mips_howto_table): Fix src_mask for - R_MIPS_GOT16 and R_MIPS_CALL16. - (mips_elf_got16_entry): Use mips_elf_high to calculate the value - to use when looking for a preexisting GOT entry. - -1999-08-09 Jakub Jelinek - - * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of - the Sep. 4th, 1998 change. glibc 2.0.x dynamic linker had bug, - not binutils. - * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. - -1999-08-09 Geoff Keating - - * elflink.h (elf_link_output_extsym): Don't output a weak - reference to an undefined symbol just because it was defined weak - in a shared object. - -1999-08-09 Eli Zaretskii - - * coffgen.c (coff_find_nearest_line): When looking for file, use - last best match rather than first. If address is beyond last line - number record, don't return the last line as the correct value. - -1999-08-08 Ian Lance Taylor - - * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT. - * bfd-in2.h: Rebuild. - -1999-08-08 Mark Elbrecht - - * libcoff-in.h (struct coff_section_alignment_entry): Define. - * coffcode.h (coff_set_custom_section_alignment): New static - function. - (coff_section_alignment_table): New static array. - (coff_new_section_hook): Use coff_set_customer_section_alignment. - * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define. - * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define. - * libcoff.h: Rebuild. - -1999-08-08 Ian Lance Taylor - - * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to - MKDEP. - * Makefile.in: Rebuild. - -1999-08-08 Mumit Khan - - * section.c (SEC_SHARED): Define. - * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED. - (styp_to_sec_flags): Likewise. - * peicode.h (coff_swap_scnhdr_out): Likewise. - * bfd-in2.h: Rebuild. - -1999-08-08 Ian Lance Taylor - - * coffcode.h (coff_classify_symbol): Comment out part of - 1999-08-05 change which breaks cygwin DLLs. - - * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*. - * aclocal.m4, configure: Rebuild. - -1999-08-06 Ian Lance Taylor - - * section.c (global_syms): Only initialize union field if - __STDC__. - -1999-08-04 Mark Mitchell - - * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by - the size of a GOT entry here. - (mips_elf_calculate_relocation): Don't create a local GOT entry - for the symbol in a GOT16 relocation; just for it's high-order bit - (_bfd_mips_elf_relocate_section): Fix thinko. - -1999-08-05 Ian Lance Taylor - - Based on patches from Donn Terry : - * coffcode.h (enum coff_symbol_classification): Define. - (bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to - _bfd_coff_classify_symbol. Change return type. - (bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global. - (coff_slurp_symbol_table): Use coff_classify_symbol. - (coff_classify_symbol): New static function. - (coff_sym_is_global): Never define. - (bfd_coff_std_swap_table): Initialize with coff_classify_symbol. - * cofflink.c (coff_link_check_ar_symbols): Use - bfd_coff_classify_symbol rather than bfd_coff_sym_is_global. - (coff_link_add_symbols): Likewise. - (_bfd_coff_link_input_bfd): Likewise. - * coff-sh.c (bfd_coff_small_swap_table): Initialize with - coff_classify_symbol. - * libcoff.h: Rebuild. - -Wed Aug 4 18:08:07 1999 Jeffrey A Law (law@cygnus.com) - - * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors - (e_ltpsel, e_rtpsel): Similarly. - - * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel - and 14bit ertpsel. Handle 64bit psel. - -1999-08-04 Mark Mitchell - - * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16 - handling for REL relocations. And only left-shift R_MIPS26 - relocation addends where necessary. - -1999-08-03 Mark Mitchell - - * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ... - (mips_elf_next_lo16_relocation): Don't compute the addend here. - Just return the relocation found. - (mips_elf_relocate_section): Pull the LO16 addend out of the - section itself when using REL relocations. - - * elf32-mips.c (mips_elf_calculate_relocation): Restore - _DYNAMIC_LINK handling and handling of undefined symbols in shared - libraries. - -1999-08-03 Ian Lance Taylor - - * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation - value of a symbol in a SEC_DEBUGGING section. Warn when doing a - relocation against a symbol in an input section with no output - section. From Daniel Jacobowitz . - - * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used. - - * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to - look for generated file correctly. - * aclocal.m4, configure: Rebuild. - -1999-08-02 Mark Mitchell - - * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26 - and R_MIPS16_26 relocations correctly when relocating. - (_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16 - and R_MIPS_CALL_LO16 are for global symbols. - -1999-08-02 Jakub Jelinek - - * elflink.h (elf_bfd_final_link): Copy the whole isym, not just - some fields. - * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used - variables and initialize them. - -1999-08-01 Mark Mitchell - - * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where - there are no global symbols requiring GOT entries. - (_bfd_mips_elf_size_dynamic_sections): Likewise. - (_bfd_mips_elf_finish_dynamic_symbol): Likewise. - (_bfd_mips_elf_finish_dynamic_sections): Likewise. - - * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak - symbols are considered to have the value zero. - (_bfd_mips_elf_relocate_section): Don't try to perform a - relocation for an undefined symbol. - (_bfd_mips_elf_check_relocs): Allocate locate GOT space for local - GOT16 relocations. - -1999-07-30 Jakub Jelinek - - * elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI - wants ba,a,pt %xcc instead of %icc. - Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots - of large PLT entries. - (sparc64_elf_plt_ptr_offset): Fix calculation. - (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT - addend should be relative to load address, not .plt section start. - (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries. - -1999-07-30 Jakub Jelinek - - * elf-bfd.h (struct elf_backend_data): Add - print_symbol_all and output_arch_syms backend methods. - * elfxx-target.h: Likewise. - * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create, - sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms, - sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New - functions. - (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER - symbols in .dynsym, add their names into .dynstr. Put those symbols - into dynlocal. - (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER - pointers to STT_REGISTER symbols in dynsym section. - (sparc64_elf_print_symbol_all): New function. - * elf.c (bfd_elf_print_symbol): Allow special backend symbol - printing using the print_symbol_all hook. - -1999-07-30 Catherine Moore - - * elf32-arm.h (elf32_arm_check_relocs): Use r_offset for - R_ARM_GNU_VTENTRY. - -1999-07-29 Richard Henderson - - * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if - dynamic_sections_created. - -1999-07-29 Richard Henderson - - * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ... - (mips_rtype_to_howto): ... new function. - (_bfd_mips_elf_relocate_section): Use it. - -1999-07-28 Mark Mitchell - - * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo. - -1999-07-27 Nick Clifton - - Patch generated by Bernd Schmidt. - - * coff-arm.c (coff_arm_is_local_label_name): Change to strip - out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'. - -1999-07-23 Donn Terry - - * libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags - field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL. - * cofflink.c (coff_link_add_symbols): If PE, handle section - symbols specially. - * libcoff.h: Rebuild. - - * config.bfd (i[3456]86-*-interix*): New target. - -1999-07-21 Mark Elbrecht - - * coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and - COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with - .gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD. - * coff-go32.c: (COFF_LONG_SECTION_NAMES): Define. - (COFF_SUPPORT_GNU_LINKONCE): Define. - * coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define. - (COFF_SUPPORT_GNU_LINKONCE): Define. - -1999-07-21 Ian Lance Taylor - - From Mark Elbrecht: - * makefile.dos: Remove; obsolete. - * configure.bat: Remove; obsolete. - -1999-07-21 H.J. Lu - - * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes. - -1999-07-21 Philippe De Muyter - - * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error - message and fail if a symbol index is out of range. - -1999-07-21 Ian Lance Taylor - - * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value - when looking at a R_MIPS_GOT16 relocation. - -1999-07-20 Nick Clifton - - * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC. - -Mon Jul 19 14:03:44 1999 Mark P. Mitchell - - * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP - removed in previous change. - (_bfd_mips_elf_relocate_section): Adjust GP relative relocations - in relocateable output. - -1999-07-19 Ian Lance Taylor - - * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target - structure. - - * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD - if they appear to be specially created by the linker. - -1999-07-19 Nick Clifton - - * targets.c (alternative_target): New field in bfd_target - structure. - (bfd_search_for_target): New function: Find a target that - satisifies a search function. - * bfd-in2.h: Regenerate. - - * elfxx-target.h: Initialise the alternative_target field of - the bfd_target structures to point to the other target (if - defined). - * nlm-target.h: Initialise the alternative_target field of - the bfd_target structures to point to the other target (if - defined). - - * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): New macro. - (CREATE_LITTLE_COFF_TARGET_VEC): New macro. - - * aix386-core.c: Initialise new field of bfd_target structure. - * aout-adobe.c: Initialise new field of bfd_target structure. - * aout-arm.c: Initialise new field of bfd_target structure. - * aout-target.h: Initialise new field of bfd_target structure. - * aout-tic30.c: Initialise new field of bfd_target structure. - * binary.c: Initialise new field of bfd_target structure. - * bout.c: Initialise new field of bfd_target structure. - * cisco-core.c: Initialise new field of bfd_target structure. - * coff-a29k.c: Use CREATE_BIG_COFF_TARGET_VEC. - * coff-alpha.c: Initialise new field of bfd_target structure. - * coff-apollo.c: Use CREATE_BIG_COFF_TARGET_VEC. - * coff-arm.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC. - * coff-h8300.c: Use CREATE_BIG_COFF_TARGET_VEC. - * coff-h8500.c: Use CREATE_BIG_COFF_TARGET_VEC. - * coff-i386.c: Initialise new field of bfd_target structure. - * coff-i860.c: Initialise new field of bfd_target structure. - * coff-i960.c: Use CREATE_LITTLE_COFF_TARGET_VEC. - * coff-m68k.c: Use CREATE_BIG_COFF_TARGET_VEC. - * coff-mcore.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC. - * coff-mips.c: Initialise new field of bfd_target structure. - * coff-ppc.c: Initialise new field of bfd_target structure. - * coff-rs6000.c: Initialise new field of bfd_target structure. - * coff-sh.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC. - * coff-sparc.c: Use CREATE_BIG_COFF_TARGET_VEC. - * coff-tic30.c: Initialise new field of bfd_target structure. - * coff-tic80.c: Use CREATE_LITTLE_COFF_TARGET_VEC. - * coff-w65.c: Use CREATE_LITTLE_COFF_TARGET_VEC. - * coff-we32k.c: Use CREATE_BIG_COFF_TARGET_VEC. - * coff-z8k.c: Use CREATE_BIG_COFF_TARGET_VEC. - * hppabsd-core.c: Initialise new field of bfd_target structure. - * hpux-core.c: Initialise new field of bfd_target structure. - * i386msdos.c: Initialise new field of bfd_target structure. - * i386os9k.c: Initialise new field of bfd_target structure. - * ieee.c: Initialise new field of bfd_target structure. - * ihex.c: Initialise new field of bfd_target structure. - * irix-core.c: Initialise new field of bfd_target structure. - * mipsbsd.c: Initialise new field of bfd_target structure. - * netbsd-core.c: Initialise new field of bfd_target structure. - * oasys.c: Initialise new field of bfd_target structure. - * osf-core.c: Initialise new field of bfd_target structure. - * ppcboot.c: Initialise new field of bfd_target structure. - * ptrace-core.c: Initialise new field of bfd_target structure. - * sco5-core.c: Initialise new field of bfd_target structure. - * som.c: Initialise new field of bfd_target structure. - * srec.c: Initialise new field of bfd_target structure. - * tekhex.c: Initialise new field of bfd_target structure. - * trad-core.c: Initialise new field of bfd_target structure. - * versados.c: Initialise new field of bfd_target structure. - * vms.c: Initialise new field of bfd_target structure. - -1999-07-19 Andreas Schwab - - * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash - and rel_hdr. - -Sat Jul 17 02:28:28 1999 Mark P. Mitchell - - * elflink.h (elf_link_adjust_relocs): New function. - (elf_bfd_final_link): Use it. - (elf_link_input_bfd): Deal with the fact that there can be - two relocation sections for a single section. - (elf_reloc_link_order): Likewise. - - * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for - a relocateable object. - (_bfd_mips_elf_relocate_section): Handle relocateable links. - -1999-07-16 Jakub Jelinek - - * elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID. - (sparc64_elf_get_reloc_upper_bound, - sparc64_elf_get_dynamic_reloc_upper_bound, - sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table, - sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs): - New functions. - (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use - ELF64_R_TYPE_ID/DATA where appropriate. - -1999-07-16 Jakub Jelinek - - * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove - DT_SPARC_PLTFMT. - -1999-07-16 Ian Lance Taylor - - * elf32-mips.c (mips_elf_local_relocation_p): New static - function. - (mips_elf_next_lo16_addend): Call bfd_set_error on failure. - (mips_elf_calculate_relocation): Use mips_elf_local_relocation_p. - Always set *require_jalxp. - (mips_elf_stub_section_p): Mark abfd parameter as unused. - (_bfd_mips_elf_relocate_section): Only look for LO16 following - GOT16 if the GOT16 is against a local symbol. Don't return false - for an undefined symbol. If there is an overflow, assert that we - have a name. - -1999-07-16 Andreas Schwab - - * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused - variables `link' and `elfsec'. - (elf_bfd_final_link): Remove unused variable `os'. - -Thu Jul 15 17:55:31 1999 Mark P. Mitchell - - * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require - a PT_PHDR program headers. - (_bfd_mips_elf_final_link): Don't assume there are going to be - section symbols when we're not building a shared object. - (_bfd_mips_elf_check_relocs): Make sure we have a GOT when - we need one. - -1999-07-15 J.T. Conklin - - * config.bfd (i[3456]86-*-vxworks*): New target. - -1999-07-15 Mark Mitchell - - * elf32-mips.c (mips_elf_stub_section_p): New function. - (mips_elf_calculate_relocation): Handle MIPS16 stub functions. - (mips_elf_relocate_section): Adjust calling sequence for - mips_elf_calculate_relocation and mips_elf_perform_relocation. - (mips_elf_perform_relocation): Turn `jal' into `jalx' where - required. - -1999-07-15 Ian Lance Taylor - - * configure.in: Bump version number to 2.9.5. - * configure: Rebuild. - -Thu Jul 15 02:56:15 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle - 64bit format. - (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type - to derive final type instead of hardwiring a selection. - -1999-07-14 Mark Mitchell - - * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of - things relocated by R_MIPS16_GPREL. - (mips_elf_perform_relocation): Likewise. - -Wed Jul 14 15:23:19 1999 Jim Wilson - - * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss. - -1999-07-14 Richard Henderson - - * elf32-mips.c (struct mips_got_info): Add global_gotno. - (_bfd_mips_elf_size_dynamic_sections): Set it. - (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow. - (mips_elf_sort_hash_table): Set max_non_got_dynindex based off - new argument max_local. - -1999-07-14 Mark Mitchell - - * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit - subwords when handling an R_MIPS16_26 relocation. - (mips_elf_perform_relocation): Don't be paranoid abour right-shift - semantics. - - * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and - dst_mask to match reality. - (_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL. - (mips_elf_obtain_contents): Use bfd_get. - (mips_elf_perform_relocation): Handle R_MIPS16_GPREL. - (mips_elf_relocate_section): Likewise. - -1999-07-13 Mark Mitchell - - * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26. - (mips_elf_relocate_section): Adjust calling sequence for - mips_elf_perform_relocation. - (mips_elf_perform_relocation): Take additional argument. Handle - R_MIPS16_26. Use bfd_put for convenience. - -1999-07-13 Richard Henderson - - * elf.c (assign_file_positions_for_segments): Thinko last change. - Always overwrite p_flags. - -1999-07-13 Richard Henderson - - * elf-bfd.h (struct elf_backend_data): Add want_dynbss. - * elflink.c (_bfd_elf_create_dynamic_sections): Only create - .dynbss and .rel[a].bss if want_dynbss. - * elfxx-target.h (elf_backend_want_dynbss): Provide default. - -1999-07-13 Richard Henderson - - * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags. - -1999-07-13 Richard Henderson - - * elf-bfd.h (struct elf_link_local_dynamic_entry): New. - (struct elf_link_hash_table): Add dynlocal. - (_bfd_elf_link_lookup_local_dynindx): Prototype. - (_bfd_elf_link_adjust_dynindx): Delete. - (_bfd_elf_link_renumber_dynsyms): Prototype. - (_bfd_elf,link_record_local_dynamic_symbol): Prototype. - * elfcode.h (elf_link_record_local_dynamic_symbol): New alias. - * elflink.c (_bfd_elf_link_adjust_dynindx): Delete. - (_bfd_elf_link_lookup_local_dynindx): New function. - (elf_link_renumber_hash_table_dynsyms): New function. - (_bfd_elf_link_renumber_dynsyms): New function. - * elflink.h (elf_link_record_local_dynamic_symbol): New function. - (struct elf_assign_sym_version_info): Delete removed_dynamic. - (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output - instead of elf_link_remove_section_and_adjust_dynindices. - Remove removed_dynamic code. Use _bfd_elf_link_renumber_dynsyms. - (elf_link_assign_sym_version): Remove removed_dynamic code. - (elf_link_renumber_dynsyms): Delete. - (elf_bfd_final_link): Install section and local symbols into .dynsym. - - * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete. - (elf_m68k_size_dynamic_sections): Don't set section dynindicies. - (elf_m68k_finish_dynamic_sections): Don't write section dynsyms. - * elf32-mips.c: Similarly. - * elf32-ppc.c: Similarly. - * elf32-sparc.c: Similarly. - * elf64-alpha.c: Similarly. - * elf64-sparc.c: Similarly. - -1999-07-13 Mark Mitchell - - * elf32-mips.c (mips_elf_calculate_relocation): Do not complain - when _gp_disp is undefined. Do not check R_MIPS_LO16 for overflow - when the relocation is against _gp_disp. - -1999-07-12 Mark Mitchell - - * dwarf2.c (read_attribute): Support DW_FORM_ref8. - * elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs - to possibly_dynamic_relocs. Adjust usage throughout code. - (elf_mips_howto_table): Handle R_MIPS_64 correctly. - (elf_mips_ctor64_howto): Likewise. - (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32. - Adjust indentation. - (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode. - (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32. - Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries. - * elf64-mips.c (elf_backend_may_use_rel_p): Define. - -1999-07-12 Ian Lance Taylor - - * Makefile.am: Rebuild dependencies. - * Makefile.in: Rebuild. - - * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE. - * bfd-in2.h: Rebuild. - - * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED - as appropriate. Use EMPTY_HOWTO as appropriate. Fill in - structure initializations. Add casts. - * reloc.c (EMPTY_HOWTO): Define. - * bfd-in2.h: Rebuild. - * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless - comparisons against 0. - * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change - previous_ibfd_e_flags to unsigned long. - * vms.h (struct vms_private_data_struct): Change section_count to - unsigned. - * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned. - (_bfd_vms_write_gsd): Change symnum to unsigned. - * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned. - * vms-tir.c (etir_sta): Change psect to unsigned. - (alloc_section): Change idx to unsigned. - (tir_sta, tir_ctl): Change psect to unsigned. - (_bfd_vms_write_tir): Change len and before to bfd_size_type. - * vms.c (priv_section_count): Change to unsigned. - -1999-07-12 Andreas Schwab - - * elf32-m68k.c: Add some ATTRIBUTE_UNUSED. - * m68klinux.c: Likewise. - -1999-07-12 Ian Lance Taylor - - * Many files: Changes to avoid gcc warnings: Remove unused local - variables. Add default case to enum switches. - * coff-arm.c (bfd_arm_allocate_interworking_sections): Only - compile if not COFF_IMAGE_WITH_PE. - (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise. - (bfd_arm_get_bfd_for_interworking): Likewise. - (bfd_arm_process_before_allocation): Likewise. - * epoc-pei-arm.c: Don't rename bfd_arm functions. - * pei-arm.c: Likewise. - * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare. - (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change. - (mips_elf_got16_entry): Put parens around & in body of ==. - (mips_elf_calculate_relocation): Correct test for empty string. - * vms-gsd.c: Use _bfd_error_handler rather than fprintf to - stderr. - * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf - format. - -1999-07-11 Ian Lance Taylor - - * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED - as appropriate. Fill in structure initializations. Add variable - initializations. Add casts. - * dwarf1.c (parse_line_table): Change eachLine to unsigned long. - (dwarf1_unit_find_nearest_line): Change i to unsigned long. - - * elf.c (bfd_elf_hash): Change parameter from unsigned char * to - char *. - * elf-bfd.h (bfd_elf_hash): Update declaration. - * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts - when calling bfd_elf_hash. - -1999-07-11 Mark Mitchell - - * libbfd.c (bfd_put_8): Make it of type `void'. - * bfd-in2.h: Regenerated. - * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize - for 32-bit hosts. - (_bfd_mips_elf_final_link): Likewise. - - * elflink.h (elf_link_read_relocs_from_section): Be type-correct. - -Thu Jul 8 12:32:23 1999 John David Anglin - - * config.bfd (hppa*-*-linux-gnu*): New target - -1999-07-07 Mark Mitchell - - * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify. - (_bfd_mips_elf_create_dynamic_sections): New function. - (_bfd_mips_elf_add_symbol_hook): Likewise. - (_bfd_mips_elf_adjust_dynamic_symbol): Likewise. - (_bfd_mips_elf_finish_dynamic_symbol): Likewise. - (_bfd_mips_elf_finish_dynamic_sections): Likewise. - (_bfd_mips_elf_gc_mark_hook): Likewise. - (_bfd_mips_elf_gc_sweep_hook): Likewise. - (_bfd_mips_elf_always_size_sections): Likewise. - (_bfd_mips_elf_size_dynamic_sections): Likewise. - (_bfd_mips_elf_check_relocs): Likewise. - (_bfd_mips_elf_link_hash_table_create): Likewise. - (_bfd_mips_elf_print_private_data): Likewise. - (_bfd_mips_elf_link_output_symbol_hook): Likewise. - (_bfd_mips_elf_final_link): Likewise. - (_bfd_mips_elf_additional_program_headers): Likewise. - (_bfd_mips_elf_modify_segment_map): Likewise. - (_bfd_mips_elf_relocate_section): Likewise. - * elf32-mips.c (mips_elf32_object_p): Move contents into - _bfd_mips_elf_object_p. - (mips_elf_additional_program_headers): Rename to - _bfd_mips_elf_additional_program_headers. - (mips_elf_modify_segment_map): Rename to - _bfd_mips_elf_modify_segment_map. - (elf_mips_abi_name): Change prototype. - (mips_elf32_section_from_shdr): Merge into - _bfd_mips_elf_section_from_shdr. - (mips_elf32_section_processing): Merge into - _bfd_mips_elf_section_processing. - (mips_elf_final_link): Rename to _bfd_mips_elf_final_link. Invoke - the right back-end ELF linker. - (mips_elf_relocate_section): Rename to - _bfd_mips_elf_relocate_section. Clean up. Adjust for 64-bit code. - (mips_elf_link_output_symbol_hook): Rename to - _bfd_mips_elf_link_output_symbol_hook. - (mips_elf_create_dynamic_section): Rename to - _bfd_mips_elf_create_dynamic_section. - (mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs. - Adjust for 64-bit code. Use mips_elf_got_section. - (mips_elf_adjust_dynamic_symbol): Rename to - _bfd_mips_elf_adjust_dynamic_symbol. Use - mips_elf_allocate_dynamic_relocations. - (mips_elf_finish_dynamic_symbol): Rename to - _bfd_mips_elf_finish_dynamic_symbol. Use mips_elf_got_section. - Adjust for 64-bit code. - (mips_elf_finish_dynamic_sections): Rename to - _bfd_mips_elf_finish_dynamic_sections. Adjust for 64-bit code. - (mips_elf_always_size_sections): Rename to - _bfd_mips_elf_always_size_sections. - (mips_elf_add_symbol_hook): Rename to - _bfd_mips_elf_add_symbol_hook. - (mips_elf_next_lo16_addend): Constify. - (mips_elf_calculate_relocation): Likewise. - (mips_elf_obtain_contents): Likewise. - (mips_elf_perform_relocation): Likewise. - (mips_elf_create_dynamic_relocation): Likewise. - (mips_elf_allocate_dynamic_relocations): New function. - (MIPS_ELF_REL_DYN_SECTION_NAME): New macro. - (MIPS_ELF_REL_SIZE): Likewise. - (MIPS_ELF_DYN_SIZE): Likewise. - (MIPS_ELF_GOT_SIZE): Likewise. - (MIPS_ELF_SYM_SIZE): Likewise. - (MIPS_ELF_LOG_FILE_ALIGN): Likewise. - (MIPS_ELF_GET_WORD): Likewise. - (MIPS_ELF_PUT_WORD): Likewise. - (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise. - (STUB_LW): Conditionalize for 64-bit value. - (elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST - entries. - (_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS]. - Check it for inconsistency. - (_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit - ABI. - (_bfd_mips_elf_fake_sections): Remove duplicate handling of - .msym. - (mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE. - (mips_elf_got_offset_from_index): Use misp_elf_got_section. - (mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE. - (mips_elf_local_got_index): Likewise. - (mips_elf_got_page): Likewise. - (mips_elf_got_info): Likewise. - (mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split. - (ELF_DYNAMIC_INTERPRETER): Handle 64-bit code. - (mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN, - instead of constant `2'. - (mips_elf_create_got_section): Tidy. Use MIPS_ELF_GOT_SIZE. - (mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN. - (mips_elf_size_dynamic_sections): Use - MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE, - MIPS_ELF_ADD_DYNAMIC_ENTRY. Remove #if 0'd code. - Adjust all releveant entries in elf backend table. - * elf64-mips.c (mips_elf64_section_from_shdr): Remove. - (mips_elf64_section_processing): Likewise. - Adjust elf backend entries to use _bfd_mips_elf variants now - publicly available. - - * elflink.h (elf_link_create_dynamic_sections): Handle non-standard - hash-entry sizes. - (size_dynamic_sections): Likewise. - (elf_link_output_extsym): Likewise. - * elf.c: (elf_fake_sections): Likewise. - * libbfd.c (bfd_get): New macro. - (bfd_put): Likewise. - * bfd-in2.h: Regenerated. - -1999-07-07 Mark Mitchell - - * elf-bfd.h (elf_size_info): Add hash_entry_size, - int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out, - wap_reloca_in, and swap_reloca_out. - * elflink.h (elf_link_read_relocs_from_section): Adjust to handle - multiple internal relocations per external relocation. - (link_read_relocs): Likewise. - (elf_bfd_final_link): Likewise. - (elf_link_input_bfd): Likewise. - (elf_gc_mark): Likewise. - (elf_gc_smash_unused_vtentry_relocs): Likewise. - * elfcode.h (elf_swap_dyn_out): Adjust type to match - elf_swap_dyn_in. - (size_info): Add entries for new fields. - * elf64-mips.c (mips_elf64_swap_reloc_out): Enable. - (mips_elf64_be_swap_reloc_in): New function. - (mips_elf64_be_swap_reloc_out): Likewise. - (mips_elf64_be_swap_reloca_in): Likewise. - (mips_elf64_be_swap_reloca_out): Likewise. - (mips_elf64_size_info): Add entries for new fields. - -1999-07-07 Ian Lance Taylor - - * elflink.h (elf_bfd_final_link): Assert that section reloc_count - field equals the new rel_count field. - (elf_link_input_bfd): When doing a relocateable link, use the new - rel_count field rather than the reloc_count field. - (elf_reloc_link_order): Likewise. - (elf_finish_pointer_linker_section): Likewise. - - Based on patch from H.J. Lu : - * elflink.h (elf_merge_symbol): Permit a non-weak definition in a - shared library to override a weak definition in a regular object. - -Tue Jul 6 10:23:39 1999 Jeffrey A Law (law@cygnus.com) - - * libhppa.h: Revert July 2, 1999 patch. - - * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors - need to generate DLTIND relocations, not DLTREL relocations. - -1999-07-05 Nick Clifton - - * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5 - architectures. - (coff_set_flags): Recognise arm 5 architectures. - - * cpu-arm.c: Add support for strongarm and arm9 cpus. - Add support for armv5 architecture. - - * archures.c: Add bfd_mach_arm_5 and bfd_mach_arm_5T. - - * reloc.c: Add new, assembler only, ARM reloc: - BFD_RELOC_ARM_ADRL_IMMEDIATE. - - * bfd-in2.h: Regenerate. - -1999-07-02 Mark Mitchell - - * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter. - (_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter. - * elf.c (_bfd_elf_find_nearest_line): Pass it. - * elf32-arm.h (elf32_arm_find_nearest_line): Likewise. - * elf32-mips.c (ABI_64_P): New macro. - (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P. - (_bfd_mips_elf_find_nearest_line): Adjust call to - _bfd_dwarf2_find_nearest_line. - * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype. - * libbfd.h: Regenerated. - -1999-07-02 Ian Lance Taylor - - * config.bfd: Add * at the end of i[3456]86-*-unixware. - -Fri Jul 2 12:21:10 1999 Jeffrey A Law (law@cygnus.com) - - * libhppa.h (HPPA_R_ARG_RELOC): Delete. - (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise. - -1999-07-01 Mark Mitchell - - * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2 - fields. - (_bfd_elf_init_reloc_shdr): New function. - * elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than - bfd_alloc followed by memset. - (_bfd_elf_init_reloc_shdr): New function, split out from ... - (elf_fake_sections): Here. - (assign_section_numbers): Assign section numbers for the second - relocation section, if required. - * elflink.h (elf_link_output_relocs): New function. - (elf_link_size_reloc_section): Likewise. - (elf_bfd_final_link): Use elf_link_size_reloc_section. - (elf_link_input_bfd): Use elf_link_output_relocs. - - * elf32-mips.c (_bfd_mips_elf_fake_sections): Use - _bfd_elf_init_reloc_shdr to initialize rel_hdr2. - -Thu Jul 1 13:58:48 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL - with 22bit format. - -1999-06-28 Mark Mitchell - - * elf32-mips.c (mips_elf_got_info): Move declaration before - prototypes. Change global_gotsym to be a pointer to a hash entry, - rather than a number index. - (mips_elf_link_hash_entry): Move declaration before prototypes. - (mips_elf_irix6_finish_dynamic_symbol): New function. - (mips_elf_sign_extend): Likewise. - (mips_elf_high): Likewise. - (mips_elf_higher): Likewise. - (mips_elf_highest): Likewise. - (mips_elf_global_got_index): Likewise. - (mips_elf_local_got_index): Likewise. - (mips_elf_got_offset_from_index): Likeiwse. - (mips_elf_record_global_got_symbol): Likewise. - (mips_elf_got_page): Likewise. - (mips_elf_next_lo16_addend): Likewise. - (mips_elf_calculate_relocation): Likewise. - (mips_elf_obtain_contents): Likewise. - (mips_elf_perform_relocation): Likewise. - (mips_elf_assign_gp): Likewise. - (mips_elf_sort_hash_table_f): Likewise. - (mips_elf_sort_hash_table): Likewise. - (mips_elf_got_section): Likewise. - (mips_elf_got_info): Likewise. - (mips_elf_create_local_got_entry): Likewise. - (mips_elf_got16_entry): Likewise. - (mips_elf_create_dynamic_relocation): Likewise. - (elf_mips_howto_table): Add description of R_MIPS_SCN_DISP. - (mips_elf_final_gp): Use mips_elf_assign_gp. - (_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols - into SHN_SCOMMON automatically on IRIX6. - (mips_elf_add_symbol_hook): Likewise. - (mips_elf_relocate_section): Rewrite, using - mips_elf_calculate_relocation and mips_elf_perform_relocation. - (mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME. - Don't deal with .rld_map on IRIX6. - (mips_elf_create_got_section): Adjust use of global_gotsym. Set - section flags appropriately for .got. - (mips_elf_check_relocs): Handle IRIX6 relocations making use of - the got. Call mips_elf_record_global_got_symbol and allocate - local got space appropriately. - (mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned - char *. Rework calculation of GOT size. Sort dynamic symbol - table entries so entries that do not require GOT entries appear at - the beginning. Don't use DT_MIPS_HIPAGENO on IRIX6. Remove dead - code dealing with DT_INIT and DT_FINI. Remove fiddling with - global_gotsym. - (mips_elf_finish_dynamic_symbol): Adjust creation of global GOT - entries. - (mips_elf_finish_dynamic_symbol): Use - mips_elf_irix6_finish_dynamic_symbol. - (mips_elf_finish_dynamic_sections): Correct off-by-one error - setting DT_MIPS_UNREFEXTNO. Adjust setting of DT_MIPS_GOTSYM for - change to global_gotsym. Set DT_MIPS_OPTIONS on IRIX6. - -1999-06-30 Ian Lance Taylor - - * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a - relocateable link. From Ralf Baechle . - -1999-06-04 Philip Blundell - - * elf32-arm.h (elf_backend_got_header_size): Define. - (elf_backend_plt_header_size): Likewise. - -1999-06-28 Jim Pick - - * elf32-arm.h (elf32_arm_relocate_section): Mind no_undefined - -Tue Jun 29 02:25:03 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as - relocation function. - * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function. - -1999-06-27 Mark Mitchell - - * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro. - (MIPS_ELF_OPTIONS_SECTION_NAME): Likewise. - (MIPS_ELF_STUB_SECTION_NAME): Likewise. - (_bfd_mips_elf_section_from_shdr): Use them. - (_bfd_mips_elf_fake_sections): Likewise. Add .srdata to the list - of GP-relative sections. - (_bfd_mips_elf_set_section_contents): Use them. - (_bfd_mips_elf_section_processing): Share code between .sdata and - .lit4/.lit8 sections. Set appropriate flags for .srdata. - (mips_elf_additional_program_headers): Add handling for - PT_MIPS_OPTIONS segment on IRIX6. - (mips_elf_modify_segment_map): Likeiwse. - (mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI. - Include the options sections on IRIX6. Don't look for GP-relative - sections by name; use SHF_MIPS_GPREL instead. - (ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for - the N32 ABI. - (mips_elf_create_dynamic_sections): Don't muck about with section - alignments and such on IRIX6. - (mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME. - (mips_elf_size_dynamic_sections): Likewise. Adjust to handle the - fact that ELF_DYNAMIC_INTERPRETER is no longer a constant. Use - bfd_zalloc rather than bfd_alloc and memset. - (mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME. - Don't assert the existence of .rld_map on IRIX6. - (mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME. - - * elf32-mips.c (mips_elf_adjust_dynindx): Remove. - (mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx - instead. - -1999-06-26 Mark Mitchell - - * elf32-mips.c (mips_elf_swap_msym_in): New function. - (mips_elf_swap_msym_out): New function. - (mips_elf_create_msym_section): Likewise. - (MIPS_ELF_MSYM_SECTION_NAME): New macro. - (_bfd_mips_elf_final_write_processing): Set sh_link for .msym. - (_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM - section not named .msym. - (_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not - .msym directly. Set appropriate attributes for the .msym - section. - (mips_elf_link_hash_entry): Add min_dyn_reloc_index field. - (mips_elf_link_hash_newfunc): Clear it. - (mips_elf_create_dynamic_sections): Create the .msym section - on IRIX6. - (mips_elf_size_dynamic_sections): Allocate space for the - .msym section. Add a DT_MIPS_MSYM entry. - (mips_elf_finish_dynamic_symbol): Write out a .msym entry for - the symbol. - (mips_elf_finish_dynamic_sections): Assign a value for - DT_MIPS_MSYM. Add .msym entries for the section symbols as well. - - * elf32-mips.c (irix_compat_t): New enumeration. - (ABI_N32_P): New macro. - (IRIX_COMPAT): Likewise. - (SGI_COMPAT): Implement in terms of IRIX_COMPAT. - (mips_elf_relocate_section): Fix typo. - -1999-06-26 Mumit Khan - - * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections - as writable PE sections. - -1999-06-26 David Mosberger - - * dwarf2.c (struct arange): New type. - (struct comp_unit): Replace LOW and HIGH by member ARANGE. - (arange_add): New function. - (decode_line_info): Keep track of address ranges that a compilation - unit covers. - (comp_unit_contains_address): Return true if address is contained - in _any_ of the address ranges associated with a compilation unit. - (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line - on the first comp_unit that contains the address. - -1999-06-26 David Mosberger - - * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer. - (decode_line_info): Add variable STASH and initialize it to point - to the per-bfd dwarf2_debug info. Remove static variable - dwarf_line_buffer and use stash->dwarf_line_buffer in its place. - -1999-06-26 Ian Lance Taylor - - * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic - shared library to have an undefined symbol. - - From Franz Sirl : - * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch. - -Thu Jun 24 20:59:11 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.c (elf_hppa_final_write_processing): New function. - * elf32-hppa.c: Remove everything related to symbol extension - sections & records. Use the common elf_hppa_final_write_processing. - -1999-06-22 Mark Mitchell - - * elflink.h (size_dynamic_sections): Use user-specified init/fini - functions instead of _init/_fini if requested. - -1999-06-23 Ian Lance Taylor - - * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link - field. - -1999-06-22 Ian Lance Taylor - - From Franz Sirl : - * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx - field to 0, not -1. - (ppc_elf_finish_dynamic_sections): Check for positive section - dynindx field, rather than comparing against -1. - (ppc_elf_relocate_section): Only return false if undefined_symbol - or reloc_overflow fail, not always upon encountering an error. - -1999-06-22 Mark Mitchell - - * elflink.h (link_read_relocs): Explicitly cast external_relocs to - bfd_byte * before performing pointer arithmetic. - -Tue Jun 22 13:06:25 1999 Jeffrey A Law (law@cygnus.com) - - * elf-hppa.h: New file. Common stuff for elf32 and elf64 PA - support. - * elf32-hppa.c: Include elf-hppa.h. - (ARCH_SIZE): Define. - (elf_hppa_reloc_type_lookup): Delete. Found in the common code - now. - (elf32_hppa_info_to_howto): Similarly. - (elf_hppa_howto_table): Similarly. - (elf_hppa_reloc_type_lookup): Similarly. - (hppa_elf_gen_reloc_type): Similarly. - * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete. - -1999-06-22 Nick Clifton - - * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow - handling R_V850_22_PCREL relocation. - -1999-06-21 Ian Lance Taylor - - * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return - type. - -Sun Jun 20 14:13:57 1999 Richard Henderson - - * section.c (_bfd_strip_section_from_output): Ignore sections - DISCARDed by the link script. - -1999-06-19 Ian Lance Taylor - - * elflink.h (elf_link_remove_section_and_adjust_dynindices): - Remove unused local variable spp. - - * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if - the entry symbol is not set. - -Fri Jun 18 04:24:57 1999 Richard Henderson - - * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust - GPDISP or LITUSE in a relocatable link. +2000-12-21 Santeri Paavolainen -Thu Jun 17 21:24:43 1999 J"orn Rennecke + * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined. - * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc. - * (alloc_dwarf1_func): Likewise. + * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM. -Wed Jun 16 03:09:57 1999 Jeffrey A Law (law@cygnus.com) + * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *) + arithmetic. - * libhppa.h: Fix various formatting errors. - (assemble_3); Rewrite using CATENATE. - (assemble_17): Fix various bugs. + * elf32-fr30.c: Add casts to avoid (void *) arithmetic. -1999-06-16 Nick Clifton + * coffcode.h (styp_to_sec_flags): Add empty statement after label. - * elf32-mcore.c (R_MCORE_RAW): Fix definition. +2000-12-21 Richard Sandiford -1999-06-15 Richard Henderson + * libbfd.c (bfd_get_bits): Added + (bfd_put_bits): Likewise + * bfd-in.h: Declared the above. + * bfd-in2.h: Regenerated. - * section.c (SEC_SHORT): Define. - * bfd-in2.h: Rebuild. +2000-12-20 Kazu Hirata -1999-06-13 Mark Mitchell + * targets.c: Fix formatting. + * tekhex.c: Likewise. + * trad-core.c: Likewise. - * elflink.h (elf_link_remove_section_and_adjust_dynindices): - Remove abfd parameter. Use _bfd_strip_section_from_output. - (bfd_elf_size_dynamic_sections): Adjust callers accordingly. - - * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function. - * elflink.c (_bfd_elf_link_adjust_dynindx): Define it. - * elflink.h (elf_link_remove_section_and_adjust_dynindices): New - function. - (bfd_elf_size_dynamic_sections): Use it. +2000-12-19 Kazu Hirata -1999-06-13 Alan Modra + * sco5-core.c: Fix formatting. + * section.c: Likewise. + * sparclinux.c: Likewise. + * sparclynx.c: Likewise. + * sparcnetbsd.c: Likewise. + * srec.c: Likewise. + * stabs.c: Likewise. + * stab-syms.c: Likewise. + * sunos.c: Likewise. + * syms.c: Likewise. + * sysdep.h: Likewise. - * elf32-i386.c (elf_howto_table): Change R_386_PC8 from - complain_overflow_bitfield to complain_overflow_signed. +2000-12-18 Nick Clifton -1999-06-13 Mark Mitchell + * coff-arm.c (EXTRA_S_FLAGS): Only define if not already + defined. + * epoc-pe-arm.c (EXTRA_S_FLAGS): Define. + * epoc-pei-arm.c (EXTRA_S_FLAGS): Define. - * elflink.h (elf_link_read_relocs_from_section): New function, - split out from ... - (elf_link_read_relocs): Here. Use it for both relocation - sections. +2000-12-18 Nick Clifton -1999-06-12 Mark Mitchell + * vms-misc.c (_bfd_vms_get_record): Add default case to + file_format switch. - * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume - asect->reloc_count is valid. +2000-12-15 Miloslav Trmac -1999-06-12 Ian Lance Taylor + * elfcore.h (elf_core_file_p): Move to the start of the program + headers before attempting to read them. - * elf32-mips.c (mips_elf32_section_processing): Permit a - SHT_MIPS_REGINFO section to have a size of 0. +2000-12-14 Kazu Hirata -1999-06-12 David O'Brien + * peigen.c: Fix formatting. + * som.c: Likewise. + * som.h: Likewise. - * config.bfd (alpha*-*-freebsd*): New target. - (i[3456]86-*-freebsd*): Now defaults to ELF. +2000-12-13 Kazu Hirata -1999-06-11 Ian Lance Taylor + * peigen.c: Fix formatting. - * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to - wrap if the relocation covers the high bit of an address. +2000-12-12 Jim Wilson - * dwarf2.c (decode_line_info): Remove unused variable first_time. + * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *. -1999-06-10 Jakub Jelinek +2000-12-08 Mark Salter - * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std - instead of R_SPARC_max. - (sparc64_elf_info_to_howto): Likewise. - * elf32_sparc.c (elf32_sparc_relocate_section): Likewise. - (elf32_sparc_info_to_howto): Likewise; handle vtable relocations. + * binary.c (binary_set_section_contents): Ignore sections + with zero size. -1999-06-07 Richard Henderson +2000-12-12 Kazu Hirata - * section.c (_bfd_strip_section_from_output): Remove output - sections with no initial link_order. + * m68klinux.c: Fix formatting. + * m68knetbsd.c: Likewise. + * mipsbsd.c: Likewise. + * netbsd-core.c: Likewise. + * netbsd.h: Likewise. + * newsos3.c: Likewise. + * nlm32-alpha.c: Likewise. + * nlm32-i386.c: Likewise. + * nlm32-ppc.c: Likewise. + * nlm32-sparc.c: Likewise. + * nlmcode.h: Likewise. + * nlmswap.h: Likewise. + * nlm-target.h: Likewise. + * ns32knetbsd.c: Likewise. + +2000-12-10 Fred Fish + + * elflink.h (elf_link_output_extsym): Don't complain about undefined + symbols in shared objects if allow_shlib_undefined is true. + +2000-12-12 Nick Clifton + + * cpu-sh.c: Fix formattng. + * elf.c: Fix formattng. + * elf32-mips.c: Fix formattng. + * elf32-sh.c: Fix formattng. + * elf64-alpha.c: Fix formattng. + +2000-12-09 Nick Clifton + + * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass + dwarf2_find_line_info as last parameter to invocation of + _bfd_dwarf2_find_nearest_line. + * elf32-arm.h (elf32_arm_find_nearest_line): Pass + dwarf2_find_line_info as last parameter to invocation of + _bfd_dwarf2_find_nearest_line. -1999-06-07 Nick Clifton +2000-12-08 Mark Elbrecht - * elf32-m88k.c (ELF_MAXPAGESIZE): Define. + * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here... + (BFD_LIBS): ...to here. + (BFD32_BACKENDS_CFILES): Move dwarf2.c from here... + (BFD_LIBS_CFILES): ...to here. + * Makefile.in: Regenerate. + * configure.in: Remove dwarf.lo from the elf shell variable. + * configure: Regenerate. + * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info. + * libcoff.h: Regenerate. + * coffgen.c (coff_find_nearest_line): Call + _bfd_dwarf2_find_nearest_line. + * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update + accordingly. + (read_abbrevs): Likewise + (decode_line_info): Likewise. + (parse_comp_unit): Likewise. + (comp_unit_find_nearest_line): Likewise. + * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype. + * libbfd.h: Regenerate. + * elf.c (_bfd_elf_find_nearest_line): Update call. + * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR. + * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH. + * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros. + (sec_to_styp_flags): Use them. Handle DWARF2 sections. + (styp_to_sec_flags): Handle DWARF2 sections. + * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call + to _bfd_find_nearest_line. + * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to + call to _bfd_find_nearest_line. + +2000-12-08 Kazu Hirata + + * coffgen.c: Fix formatting. + * elf-m10300.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-i960.c: Likewise. + * elf32-m68k.c: Likewise. + * elf32-mcore.c: Likewise. + * elf32-ppc.c: Likewise. + * elf32-sh.c: Likewise. + * elf32-sparc.c: Likewise. + * elf32-v850.c: Likewise. + * elf64-alpha.c: Likewise. + * elf64-hppa.c: Likewise. + * elf64-mips.c: Likewise. + * elf64-sparc.c: Likewise. -Mon Jun 7 11:49:43 1999 Andreas Schwab +2000-12-07 Kazu Hirata - * Makefile.am (SOURCE_HFILES): Add missing headers. - * Makefile.in: Regenerated. + * elf32-ppc.c: Fix formatting. + * elf64-x86-64.c: Likewise. -1999-06-06 Mark Mitchell +2000-12-06 Ulf Carlsson - * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize - the N32 ABI. + From Ralf Baechle -1999-06-04 Franz Sirl + * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit + BFDs containing no sections or empty .text, .data or .bss sections + to be merged, regardless of their flags. - * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of - range undefweak symbols. - * hash.c: Add missing comma after @xref{} - * linker.c: Likewise. +2000-12-06 Kazu Hirata -1999-06-04 Nick Clifton + * elf32-m32r.c: Fix formatting. + * elf32-m68hc11.c: Likewise. + * elf32-m68hc12.c: Likewise. + * elf32-m68k.c: Likewise. + * elf32-mcore.c: Likewise. + * elf32-pj.c: Likewise. + * elf32-ppc.c: Likewise. - * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message - if not defined. - * elf32-gen.c (ELF_MAXPAGESIZE): Define. - * elf32-i860.c (ELF_MAXPAGESIZE): Define. - * elf32-i960.c (ELF_MAXPAGESIZE): Define. - * elf64-gen.c (ELF_MAXPAGESIZE): Define. +2000-12-05 Kazu Hirata + + * elf32-fr30.c: Fix formatting. + * elf32-hppa.c: Likewise. + * elf32-i370.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-i860.c: Likewise. + * elf32-i960.c: Likewise. + +2000-12-03 Kazu Hirata + + * elf32-arm.h: Fix formatting. + * elf32-avr.c: Likewise. + * elf32-cris.c: Likewise. + * elf32-d10v.c: Likewise. + * elf32-d30v.c: Likewise. + * elf-hppa.h: Likewise. + * elf-m10200.c: Likewise. + * elf-m10300.c: Likewise. + +2000-12-01 Chris Demetriou + + * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and + bfd_mach_mips32_4k. Update FIXME comment. + * archures.c (bfd_mach_mips32): New constant. + (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to + the latter, renumber it. + * bfd-in2.h (bfd_mach_mips32): New constant. + (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to + the latter, renumber it. + * cpu-mips.c (I_mips32): New constant. + (I_mips4K, I_mips32_4k): Rename the former to the latter. + (arch_info_struct): Add bfd_mach_mips32 entry, replace + bfd_mach_mips4K entry with bfd_mach_mips32_4k entry. + * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case. + (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32 + with E_MIPS_MACH_MIPS32_4K. + (_bfd_mips_elf_final_write_processing): Replace + bfd_mach_mips4K with bfd_mach_mips32_4k case, add + bfd_mach_mips32 case. + (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing + comparison with support for MIPS32. + (_bfd_mips_elf_print_private_bfd_data): Print ISA name for + MIPS32. + + * aoutx.h (NAME(aout,machine_type)): Add cases for + bfd_mach_mips5 and bfd_mach_mips64. + * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants. + * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise. + * cpu_mips.c (I_mips5, I_mips64): New definitions. + (arch_info_struct): Add entries for bfd_mach_mips5 and + bfd_mach_mips64. + * elf32-mips.c (elf_mips_isa, elf_mips_mach, + _bfd_mips_elf_print_private_bfd_data): Add cases for + E_MIPS_ARCH_5 and E_MIPS_ARCH_64. + (_bfd_mips_elf_final_write_processing): Add cases for + bfd_mach_mips5 and bfd_mach_mips64. + + * bfd/aoutx.h (NAME(aout,machine_type)): Add a + bfd_mach_mips_sb1 case. + * bfd/archures.c (bfd_mach_mips_sb1): New constant. + * bfd/bfd-in2.h (bfd_mach_mips_sb1): New constant. + * bfd/cpu-mips.c (I_sb1): New constant. + (arch_info_struct): Add entry for bfd_mach_mips_sb1. + * bfd/elf32-mips.c (elf_mips_mach): Add case for + E_MIPS_MACH_SB1. + (_bfd_mips_elf_final_write_processing): Add case for + bfd_mach_mips_sb1. + +2000-12-01 Joel Sherrill + + * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets. + (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets. + (sparc*-*-rtems*): Switched from a.out to ELF. + +2000-11-30 Jan Hubicka + + * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo + BFD64_BACKENDS_CFILES): Add elf64-x86-64.c + (elf64-x86-64.lo): Add dependencies. + * archures.c (DESCRIPTION): Add bfd_mach_x86_64, + bfd_mach_x86_64_intel_syntax. + * elf.c (prep_headers): Use EM_x86_64 for 64bit output. + * config.bfd (x86_64): Add. + * configure.in: Add support for bfd_elf64_x86_64_vec. + * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add. + (bfd_i386_arch, i8086_ar): Link in. + * elf64-x86-64.c: New file. + * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*. + * targets.c (bfd_elf64_x86_64_vec): Add. + (bfd_target_vect): Add bfd_elf64_x86_64_vec. + +2000-11-30 Kazu Hirata + + * xcofflink.c: Fix formatting. + +2000-11-28 Kazu Hirata + + * aoutx.h: Fix formatting. + * bfd-in.h: Likewise. + * bfd-in2.h: Likewise. + * cache.c: Likewise. + * cisco-core.c: Likewise. + * coff64-rs6000.c: Likewise. + * coffcode.h: Likewise. + * coffswap.h: Likewise. + * corefile.c: Likewise. + * elf32-mips.c: Likewise. -1999-06-04 Ian Lance Taylor +2000-11-27 Kazu Hirata - * Makefile.am: Rebuild dependencies. - (BFD32_BACKENDS): Add dwarf1.lo. - (BFD32_BACKENDS_CFILES): Add dwarf1.c. - * Makefile.in: Rebuild. + * aout-adobe.c: Fix formatting. + * coff64-rs6000.c: Likewise. + * coffgen.c: Likewise. + * cofflink.c: Likewise. -1999-06-04 Nick Clifton +2000-11-27 Philip Blundell - * Makefile.am: Add epoc-arm-pe target. - * Makefile.in: Regenerate. - * pe-arm.c: Only redefine interworking function names if they have - not already been redefined. - * pei-arm.c: Only redefine interworking function names if they have - not already been redefined. - * epoc-pe-arm.c: Redefine interworking function names to avoid a - name space clash. - * epoc-pei-arm.c: Redefine interworking function names to avoid a - name space clash. + * libcoff-in.h (coff_tdata): Add `strings_written' flag. + (obj_coff_strings_written): New accessor macro for above. + * libcoff.h: Regenerate. + * cofflink.c (_bfd_coff_final_link): Say that we wrote the + strings. + * coffcode.h (coff_write_object_contents): No need to write out + the string table if it's already been done. -1999-06-03 Nick Clifton +2000-11-22 Philip Blundell - * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1. + * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to + weak undefined symbols. -Fri Jun 4 10:05:11 1999 Andreas Schwab +2000-11-24 Nick Clifton - * elf.c (elf_fake_sections): Undo change of 1999-05-10. + * archures.c (bfd_mach_arm_5TE): Define. + (bfd_mach_arm+XScale): Define. + * bfd-in2.h: Regenerate. -Fri Jun 4 03:10:49 1999 J"orn Rennecke + * coff-arm.c (coff_arm_reloc_type_lookup): Accept + BFD_RELOC_ARM_PCREL_BLX. - * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of - start / stop for recalculating of r_addend of R_SH_SWITCH*. + * coffcode.h (coff_set_flags): Set flags for 5t, 5te and + XScale machine numbers. -Fri Jun 4 02:53:13 1999 J"orn Rennecke + * config.bfd (xscale-elf): Add target. + (xscale-coff): Add target. - * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32 - in other text sections. + * cpu-arm.c: Add xscale machine name. + Add v5t, v5te and XScale machine numbers. -Fri Jun 4 02:29:34 1999 J"orn Rennecke +2000-11-23 Kazu Hirata - * libbfd.c (_bfd_generic_verify_endian_match): New function. - * libbfd-in.h (_bfd_generic_verify_endian_match): Declare. - * libbfd.h: Regenerate. - * coff-sh.c (sh_merge_private_data): Delete. - (coff_bfd_merge_private_bfd_data): Change to - _bfd_generic_verify_endian_match. - (elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define. + * aix386-core.c: Fix formatting. -1999-06-03 Ulrich Drepper +2000-11-22 Jim Wilson - * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE. + * coff-ia64.c (howto_table): Use EMPTY_HOWTO. + (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters. + * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise. + (ins_imms_scaled): Initialize sign_bit at function entry. + (elf64_ia64_operands): Add missing initializers. + * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup, + elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections, + elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name, + elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff, + elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused + parameters. + (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents, + and free_extsyms at function entry. + (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result. + (elfNN_ia64_create_dynamic_sections): Delete unused local h. + (get_got): Delete unused local srel. + (elfNN_ia64_check_relocs): Initialize dynrel_type when declared. + (elfNN_ia64_relocate_section): Delete unused local dynindx. + +2000-11-21 Kazu Hirata + + * coff-a29k.c: Fix formatting. + * coff-h8500.c: Likewise. + * coff-i960.c: Likewise. + * coff-ppc.c: Likewise. + * coff-rs6000.c: Likewise. + * coff-stgo32.c: Likewise. + * coff-tic54x.c: Likewise. + * coff-w65.c: Likewise. + * cpu-h8500.c: Likewise. + * cpu-hppa.c: Likewise. + * cpu-ns32k.c: Likewise. + * ecoff.c: Likewise. + * ecofflink.c: Likewise. + +2000-11-21 Nick Clifton + + * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and + remove possibility of infinite loop. + +2000-11-20 Kazu Hirata + + * aix386-core.c: Fix formatting. + * aout-adobe.c: Likewise. + * aout-arm.c: Likewise. + * aout-encap.c: Likewise. + * aout-ns32k.c: Likewise. + * aout-target.h: Likewise. + * aout-tic30.c: Likewise. + * aoutf1.h: Likewise. + * aoutx.h: Likewise. + * archive.c: Likewise. + * bfd-in.h: Likewise. + * bfd-in2.h: Likewise. + * bfd.c: Likewise. + * bout.c: Likewise. -1999-06-03 Ian Lance Taylor +2000-11-17 H.J. Lu - * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct - prototype. - (bfd_elf32_arm_process_before_allocation): Likewise. - * bfd-in2.h: Rebuild. + * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create + pltoff entries for DT_INIT and DT_FINI. + (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries. + (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI + entries. -1999-06-03 David Mosberger - - * dwarf2.c (struct line_info): Add member END_SEQUENCE to keep - track of end_sequence markers. - (add_line_info): Add END_SEQUENCE arg. - (decode_line_info): Don't try to infer lo_pc and hi_pc from the - debug-line info---it doesn't work right if a compilation unit - consists of multiple discontiguous code-sequences. It would be - worthwhile to optimize for the common case where a compilation - unit results in a contiguous set of code sequences, but this is - quite tricky to get right for arbitrary DWARF2 files. - (lookup_address_in_line_info_table): Don't use the last line entry - for a compilation unit for anything with an address higher than - this line entry. Also, check for end_sequence markers to - correctly handle discontinuities. - (_bfd_dwarf2_find_nearest_line): When checking previously loaded - compilation units, check all compilation units with each->high==0 - just like when reading compilation units. - - * dwarf2.c (decode_line_info): Initialize table->files and - table->last_line to NULL to avoid segfaults due to random - values in these members. - (concat_filename): Check for out-of-range file number before - indexing filename table. Segfaults suck. - - * dwarf2.c (decode_line_info): Don't truncate address to least - significant 32 bits (breaks 64 bit targets). - (lookup_address_in_function_table): Ditto. - (comp_unit_contains_address): Ditto. - -1999-06-02 Mark Mitchell > - - * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR. - * elf64-mips.c (mips_elf64_howto_table_rel): Likewise. - (mips_elf64_howto_table_rela): Likewise. - - * elfcode.h (elf_slurp_reloc_table_from_section): New function, - split out from ... - (elf_slurp_reloc_table): Here. Use it to handle the case where a - single section has two associated relocation sections. - -1999-06-02 Mark Salter - - * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if - COFF_WITH_PE defined. - -1999-06-02 Nick Clifton - - * pe-arm.c: Rename global arm interworking functions to avoid name - collision when all targets BFD is built. - * pei-arm.c: Ditto. - -1999-05-31 Mark Mitchell - - * elf-bfd.h (elf_backend_data): Remove use_rela_p. Add - may_use_rel_p, may_use_rela_p, default_use_rela_p. - (bfd_elf_section_data): Add use_rela_p. - * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately. - (_bfd_elf_new_section_hook): Likewise. - (elf_fake_sections): Use may_use_rela_p, etc., instead of - use_rela_p. - (_bfd_elf_copy_private_section_data): Copy use_rela_p. - * elfcode.h (write_relocs): Determine whether or not use rela - relocs based on the relocation section header. - * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p - instead of use_rela_p. - * elfxx-target.h (elf_backend_may_use_relp): New macro. - (elf_backend_may_use_rela_p): Likewise. - (elf_backend_default_use_rela_p): Likewise. - (elfNN_bed): Use them. - -Wed Jun 2 12:38:49 1999 Miodrag Vallat - - * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096. - -Tue Jun 1 17:57:58 1999 Mark P. Mitchell - - * reloc.c (BFD_RELOC_MIPS_SUB): New relocation. - (BFD_RELOC_MIPS_GOT_PAGE): Likewise. - (BFD_RELOC_MIPS_GOT_OFST): Likewise. - (BFD_RELOC_MIPS_GOT_DISP): Likewise. - * bfd-in2.h: Regenerated. - * libbfd.h: Likewise. - * elf32-mips.c (mips_info_to_howto_rela): New function. - (USE_REL): Adjust for new conventions. - (MINUS_ONE): New macro. - (elf_mips_howto_table): Add R_MIPS_SUB. - (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST, - and MIPS_GOT_DISP. - (mips_elf_final_write_processing): Set sh_link, not sh_info, for a - .MIPS.content section. - (_bfd_mips_elf_fake_sections): Treat all sections that begin - with .MIPS.content as .MIPS.content sections. Set - SHF_MNIPS_NOSTRIP for such section. - (elf_info_to_howto): Define to mips_info_to_howto_rela. - * elf64-mips.c (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, - MIPS_GOT_OFST, and MIPS_GOT_DISP. +2000-11-16 Richard Henderson + + * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs. + (allocate_dynrel_entries): Likewise. + (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly. + (set_pltoff_entry): Likewise. + (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB + (elfNN_ia64_reloc_type_lookup): Likewise. + (elfNN_ia64_install_value): Likewise. + (elfNN_ia64_relocate_section): Likewise. + * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove. + (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove. + +2000-11-16 Kazu Hirata + + * cpu-a29k.c: Fix formatting. + * cpu-alpha.c: Likewise. + * cpu-arm.c: Likewise. + * cpu-avr.c: Likewise. + * cpu-d10v.c: Likewise. + * cpu-h8500.c: Likewise. + * cpu-hppa.c: Likewise. + * cpu-i370.c: Likewise. + * cpu-i386.c: Likewise. + * cpu-i960.c: Likewise. + * cpu-ia64-opc.c: Likewise. + * cpu-ia64.c: Likewise. + * cpu-m32r.c: Likewise. + * cpu-m68hc11.c: Likewise. + * cpu-m68hc12.c: Likewise. + * cpu-m68k.c: Likewise. + * cpu-m88k.c: Likewise. + * cpu-mips.c: Likewise. + * cpu-ns32k.c: Likewise. + * cpu-pj.c: Likewise. + * cpu-powerpc.c: Likewise. + * cpu-sh.c: Likewise. + * cpu-sparc.c: Likewise. + * cpu-tic54x.c: Likewise. + * cpu-v850.c: Likewise. + * cpu-vax.c: Likewise. + * cpu-w65.c: Likewise. + * cpu-we32k.c: Likewise. + * cpu-z8k.c: Likewise. + * dwarf1.c: Likewise. + * dwarf2.c: Likewise. + +2000-11-15 Kazu Hirata + + * coff-arm.c: Fix formatting. + * coff-ppc.c: Likewise. + * coff-rs6000.c: Likewise. + * coff-sh.c: Likewise. + * coff-sparc.c: Likewise. + * coff-tic30.c: Likewise. + * coff-tic54x.c: Likewise. + * coff-tic80.c: Likewise. + * coff-w65.c: Likewise. + * coff-we32k.c: Likewise. + * coff-z8k.c: Likewise. + +2000-11-15 Richard Henderson + + * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc + section with the same ALLOC|LOAD flags as the source section. + +2000-11-14 Jakub Jelinek + + * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used + by STO_ALPHA constants. + +2000-11-14 Kazu Hirata + + * coff-pmac.c: Fix formatting. + * coff-ppc.c: Likewise. + +2000-11-13 H.J. Lu + + * elflink.h (elf_link_add_object_symbols): Also add indirect + symbols for common symbols with the default version. + +2000-11-09 Philip Blundell + + * section.c (STD_SECTION): Set gc_mark flag. + +2000-11-11 Kazu Hirata + + * coff-i960.c: Likewise. + * coff-m68k.c: Likewise. + * coff-m88k.c: Likewise. + * coff-mcore.c: Likewise. + * coff-mips.c: Likewise. + +2000-11-11 Bernd Schmidt + + * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs. + +2000-11-10 Kazu Hirata + + * coff-h8300.c: Fix formatting. + * coff-h8500.c: Likewise. + * coff-i386.c: Likewise. + * coff-i860.c: Likewise. + * coff-i960.c: Likewise. + * coff-ia64.c: Likewise. + +2000-11-09 Kazu Hirata + + * archive.c: Fix formatting. + * archures.c: Likewise. + +2000-11-07 Richard Henderson + + * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec. + Set it before bfd_elf64_bfd_final_link call. Use it after the call. + * section.c (bfd_set_section_contents): Call memcpy if + section->contents set and location not equal to contents plus offset. + +2000-11-08 Kazu Hirata + + * bfd-in.h: Fix formatting. + * bfd-in2.h: Likewise. + * bfd.c: Likewise. + * binary.c: Likewise. + * bout.c: Likewise. + * coff-a29k.c: Likewise. + * coff-alpha.c: Likewise. + * coff-apollo.c: Likewise. + * coff-aux.c: Likewise. -Wed Jun 2 11:51:12 1999 Andreas Schwab +2000-11-07 Kazu Hirata - * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized - variable. + * aix386-core.c: Fix formatting. + * aoutf1.h: Likewise. + * aoutx.h: Likewise. + * archures.c: Likewise. + * armnetbsd.c: Likewise. - * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous - `else'. +2000-11-07 Alan Modra -1999-05-30 Philip Blundell + * coff-h8300.c (special): Adjust reloc address. - * elf32-arm.h (elf32_arm_relocate_section): Reinstate change of - 1993-03-25 (!!). Take into account the bitmasks for the reloc so - the addend does not overflow into the rest of the word. +2000-11-06 Steve Ellcey -1999-05-29 Nick Clifton + * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines + to differentiate elf32 and elf64 on ia64. + * bfd-in2.h: Regenerate. + * config.bfd: Add target for "ia64*-*-hpux*". + * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch. + * configure: Regenerate. + * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure. + * targets.c: Add bfd_target bfd_elf32_ia64_big_vec. - * bfd-in.h: Amend prototype for - bfd_elf32_arm_process_before_allocation . - * bfd-in.h: Regenerate. + * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects + from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo. + * Makefile.in: Regnerate. + * elf64-ia64.c: Deleted. + * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c. - * elfarm-oabi.c (NUM_ELEM): New macro: Compute the number of - elements in a fixed sized array. - (ARM_ELF_ABI_VERSION): Define. - (ARM_ELF_OS_ABI_VERSION): Define. - (R_ARM_THM_ABS5): Fix rightshift and size. - (R_ARM_THM_PC22): Fix size. - (R_ARM_PLT32): Define Howto. - (find_howto): New function: Locate a howto based on a reloc - number. - (elf32_arm_info_to_howto): Use find_howto if necessary. - (elf32_arm_reloc_map): Change type of field bfd_reloc_val to - bfd_reloc_code_real_type. - (elf32_arm_reloc_map[]): Add entries for BFD_RELOC_VTABLE_INHERIT - and BFD_RELOC_VTABLE_ENTRY. - (elf32_arm_reloc_type_lookup): Use find_howto if necessary. - - * elfarm-nabi.c (NUM_ELEM): New macro: Compute the number of - elements in a fixed sized array. - (ARM_ELF_ABI_VERSION): Define. - (ARM_ELF_OS_ABI_VERSION): Define. - (R_ARM_THM_ABS5): Fix rightshift and size. - (R_ARM_THM_PC22): Fix size. - (elf32_arm_info_to_howto_rel): Rename to elf32_arm_info_to_howto. - (elf32_arm_reloc_map): Change type of field bfd_reloc_val to - bfd_reloc_code_real_type. - - * elf32-arm.h (struct elf32_arm_link_hash_table): Add new field: - no_pipeline_knowledge. - (elf32_arm_link_hash_create): Initialise new field to zero. - (bfd_elf32_arm_process_before_allocation): Add new paraemter: - no_pipeline_knowledge. Use this parameter to initialise the field - in the globals data structure. - (elf32_arm_final_link_relocate): Only add in pipeline offset if - no_pipeline_knowledge is false and the binary is from an old - toolchain. - (elf32_arm_merge_private_data): Generate an error if an attempt is - made to linl together big endian and little endian code. - (elf32_arm_post_process_headers): New function: Initialise the - EI_OSABI and EI_ABIVERSION fields of the newly created ELF program - header. - (elf_backend_post_process_headers): Define. +2000-11-06 Kazu Hirata -1999-05-28 Nick Clifton - - * elf-bfd.h (struct elf_backend_data): Add new field: - elf_backend_post_process_headers. - - * elfxx-target.h (elf_backend_post_process_headers): Define to - NULL if not already defined. - (elfNN_bed): Initialise elf_backend_post_process_headers field. - - * elf.c (prep_headers): Set the EI_OSABI and EI_ABIVERSION fields - to zero. - (_bfd_elf_compute_section_file_positions): Call - elf_backend_post_process_headers if defined. - -1999-05-28 Ian Lance Taylor - - * configure.in: Check whether getuid and getgid exist. - * archive.c: Define getuid and getgid as macros if HAVE_GETUID or - HAVE_GETGID are not defined, respectively. - (bfd_write_armap): Don't special case on _WIN32 for getuid and - getgid. - * configure.host: Set ac_cv_func_get{ug}id for *-*-windows*. - * configure, config.in: Rebuild. - -1999-05-28 Martin Dorey - - * elf32-i960.c: New file. - * elf.c (prep_headers): Handle bfd_arch_i960. - * targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec. - * config.bfd (i960-*-elf*): New target. - * configure.in (bfd_elf32_i960_vec): New target vector. - * Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo. - (BFD32_BACKENDS_CFILES): Add elf32-i960.c. - * Makefile.in, aclocal.m4, configure: Rebuild. - -1999-05-27 Nick Clifton - - * elfarm-oabi.c (elf32_arm_howto_table): Add entry for - R_ARM_PLT32. - (find_howto): New function: Find entries in the - elf32_arm_howto_table. - (elf32_arm_info_to_howto): Use find_howto if the entry cannot be - computed simply. - (elf32_arm_reloc_type_lookup): Add lookup for - BFD_RELOC_ARM_PLT32. - -1999-05-25 Philip Blundell - - * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function. - (elf32_arm_link_hash_table_create): Use above function as the - constructor for hash table entries. - (elf32_arm_relocate_section): Avoid crash when there is no output - section. - (elf32_arm_final_link_relocate): New parameter h. - (elf32_arm_relocate_section): Pass symbol hash entry to above - routine. - (elf32_arm_gc_sweep_hook, elf32_arm_check relocs): Correct - comments. + * aout-adobe.c: Fix formatting. + * aout-arm.c: Likewise. + * aout-cris.c: Likewise. + * aout-encap.c: Likewise. + * aout-ns32k.c: Likewise. + * aout-target.h: Likewise. + * aout-tic30.c: Likewise. -1999-05-25 Catherine Moore +2000-11-05 Philip Blundell - * coff-arm.c (coff_arm_relocate_section): Don't emit - base file entries for pc-relative values. + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit + BFDs containing no sections to be merged, regardless of their flags. -1999-05-25 DJ Delorie +2000-11-04 Philip Blundell - * peicode.h (coff_swap_sym_in): When we create the actual section - to reflect the not-there section C_SECTION symbols refer to, - change the symbol class to C_STAT as the section is now really - there. + * elf32-arm.h (elf32_arm_relocate_section): Suppress error message + if a relocation for an undefined symbol also results in an + overflow. -1999-05-24 Philip Blundell +2000-11-06 Christopher Faylor - * elf32-arm.h (elf32_arm_relocate_section): Undo change of - 1999-03-25. + * config.bfd: Add support for Sun Chorus. -Mon May 17 13:35:35 1999 Stan Cox +2000-11-05 David O'Brien - * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed - F_PIC_INT to F_PIC. - * coffcode.h (coff_set_arch_mach_hook): Added F_ARM_2a, and - F_ARM_3M labels. Changed F_PIC_INT to F_PIC. + * configure.in: Recognize alpha-*-freebsd*. + * configure: Regenerate. -1999-05-16 Nick Clifton +2000-11-02 Luciano Gemme - * coff-mcore.c (in_reloc_p): Reinstate. + * srec.c (CHUNK): Rename to DEFAULT_CHUNK. + (Chunk): New global variable set by a parameter in objcopy.c. + (S3Forced): New global variable set by a parameter in + objcopy.c. + (srec_set_section_contents): If S3Forced is true, always generate + S3 records. + (srec_write_section): Use 'Chunk' to limit maximum length of S + records. -1999-05-15 Nick Clifton +2000-11-02 Per Lundberg - * reloc.c (BFD_RELOC_MCORE_RVA): Define. - * bfd-in2.h: Regenerate. - * coff-mcore.c (in_reloc_p): Remove defintion. - (mcore_coff_howto): Add IMAGE_REL_MCORE_RVA. - (mcore_coff_reloc_type_lookup): Map BFD_RELOC_RVA to - IMAGE_REL_MCORE_RVA. - (coff_mcore_rtype_to_howto): Add special processing for - IMAGE_REL_MCORE_RVA. - (coff_mcore_relocate_section): Add support for - IMAGE_REL_MCORE_RVA. - * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE. - (mcore_elf_reloc_type_lookup): Map BFD_RELOC_RVA to - R_MCORE_RELATIVE. - (mcore_elf_relocate_section): Delete redundant case labels. - -Fri May 14 10:59:55 1999 Andreas Schwab - - * elf32-arm.h (elf32_arm_relocate_section): Fix operator - precedence between bit-and and comparison. - -Thu May 13 09:45:23 1999 Joel Sherrill (joel@OARcorp.com) - - * config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to - list of target formats (targ_selvecs). - (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets. - (powerpcle*-*rtems*, sh-*-rtemself*): New targets. - -1999-05-10 DJ Delorie - - * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a - reasonable mode until "ar x" is smart enough to skip it (fixes - gcc/libgcc.a builds on mips-ecoff targets - - * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed - to work. Hack to support MS import libraries, which use different - COMDAT types than GNU. - (coff_slurp_symbol_table): C_SECTION symbols are local; they refer - to implied zero-length sections (see peicode below) - * coffgen.c (coff_get_normalized_symtab): Properly read long MS - filename symbols, which use one *or more* auxents. - * coffswap.h (coff_swap_aux_in): ditto - * peicode.h (coff_swap_sym_in): Build the implied zero-length - sections - -Tue May 11 15:51:58 1999 Jeffrey A Law (law@cygnus.com) - - * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false - for all relocations. - -1999-05-10 Catherine Moore - - * bfd-in.h (bfd_arm_allocate_interworking_sections): Static - if COFF_IMAGE_WITH_PE. - (bfd_arm_process_before_allocation): Likewise. - (bfd_arm_get_bfd_for_interworking): Likewise. - * coff-arm.c: Likewise. + * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos. + * Makefile.in: Regenerate. * bfd-in2.h: Regenerate. - * configure.in (armpe_little_vec): Remove coff-arm.lo. - (armpe_big_vec): Likewise. - * configure: Rebuild. - -1999-05-10 Nick Clifton - - * elf.c (elf_fake_sections): Check for .rel. as start of rel - section, not just .rel. Same for .rela. - -1999-05-07 Nick Clifton - - * coff-mcore.c (coff_mcore_relocate_section): Replace assert about - endianism with an error message. + * po/bfd.pot: Regenerate. -Thu May 6 17:09:09 1999 Fred Fish +2000-10-31 Philip Blundell - * dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer - assignment from "unsigned char *" to "char *". - (decode_line_info): Likewise for dwarf_line_buffer assignment. + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle + EF_SOFT_FLOAT if it is defined. -1999-05-05 Catherine Moore +2000-10-27 Philip Blundell - * coff-arm.c (coff_arm_relocate_section): Add one to - address of ARM_RVA32 thumb functions. + * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse + attempts to mix PIC code with non-PIC, just mark the output as + being position dependent. + (elf32_arm_merge_private_bfd_data): Likewise. Print an error + message for EF_SOFT_FLOAT mismatches. Display diagnostics for + all mismatches, not just the first one. -1999-05-05 Catherine Moore +2000-10-25 Chris Demetriou - * elf32-m68k.c (elf32_m68k_set_private_flags): New. - (elf32_m68k_copy_private_bfd_data): New. - (elf32_m68k_merge_private_bfd_data): New. - (elf32_m68k_print_private_bfd_data): New. - (CPU32_FLAG): Define. - (PLT_CPU32_ENTRY_SIZE): Define. - (elf_cpu32_plt0_entry): Declare. - (elf_cpu32_plt_entry): Declare. - (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries. - (elf_m68k_finish_dynamic_symbol): Likewise. - (elf_m68k_finish_dynamic_sections): Likewise. - (elf_backend_plt_header_size): Remove definition. - (bfd_elf32_bfd_copy_private_bfd_data): Define. - (bfd_elf32_bfd_merge_private_bfd_data): Define. - (bfd_elf32_bfd_set_private_flags): Define. - (bfd_elf32_bfd_print_private_bfd_data): Define. + * ieee.c (ieee_archive_p): Plug one of many possible + memory leaks in error handling. -Mon May 3 09:24:49 1999 Jeffrey A Law (law@cygnus.com) +2000-10-20 Jakub Jelinek - * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE - and R_LONG_PCREL_MODE. + * elf32-sparc.c (elf32_sparc_merge_private_bfd_data, + elf32_sparc_object_p, elf32_sparc_final_write_processing): + Support v8plusb. + * elf64-sparc.c (sparc64_elf_merge_private_bfd_data, + sparc64_elf_object_p): Support v9b. + * archures.c: Declare v8plusb and v9b machines. + * bfd-in2.h: Ditto. + * cpu-sparc.c: Ditto. -1999-04-29 Nick Clifton +2000-10-16 Geoffrey Keating - * coff-mcore.c (coff_mcore_relocate_section): Fix typos. + * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location + of a GOT reloc. -Fri Apr 28 16:36:19 1999 Stan Cox + * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro. + (SYMBOL_CALLS_LOCAL): New macro. + (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL. + (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL. + (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL. + (ppc_elf_relocate_section): Use flag variable to determine + whether the relocation refers to a local symbol. + Test whether a PLTREL24 reloc will produce a reloc by looking + to see whether a PLT entry was made. - * elf32-sh.c (sh_elf_relocate_section): Include relocation addend - in relocation calculation. +2000-10-14 Geoffrey Keating -1999-04-26 Tom Tromey + * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT + entries that could serve as a definition for a weak symbol. - * aclocal.m4, configure: Updated for new version of libtool. +2000-10-13 Ulf Carlsson -1999-04-21 Nick Clifton + From Ralf Baechle - * coff-mcore.c: Add support for mcore relocs. + * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument + local_p. Add symbol value only for non-R_MIPS_REL32 relocations + against local symbols. + (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01. -1999-04-20 Gavin Romig-Koch +2000-10-12 Alan Modra - * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the - incorrect use EF_MIPS_xxBITPTRS. + * section.c (struct sec): Add kept_section. + (struct bfd_comdat_info): Remove sec, we can use above. + (STD_SECTION): Add initializer. + (bfd_make_section_anyway): Init here too. -1999-04-18 Ian Lance Taylor + * bfd-in2.h: Regenerate. - * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local - variable insn. + * elflink.h (elf_link_add_object_symbols): Remove unnecessary + zeroing of `flags'. + (elf_link_input_bfd): Set all asection->symbol->value's here, and + fudge values for discarded link-once section symbols. - * bfd-in2.h: Rebuild. - * libbfd.h: Rebuild. + * elf64-hppa.c: Include alloca-conf.h -Sat Apr 17 20:55:15 1999 Catherine Moore +2000-10-11 Alan Modra - * coff-arm.c (coff_arm_rtype_to_howto): Remove ARM26D transform. - (coff_arm_relocate_section): Add ARM26D transform. Only - change to ARM26D for relocateable links. + * elf.c (swap_out_syms): Revert 2000-10-07 changes. -1999-04-16 Gavin Romig-Koch + * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg. - * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New. - (bfd_elf32_bfd_print_private_bfd_data): New. +2000-10-10 Alan Modra -1999-04-15 Doug Evans + * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc. - * elf32-arm.h (elf32_arm_final_link_relocate): For R_ARM_THM_ABS5, - refetch addend if USE_REL, add many comments regarding current state. - For R_ARM_THM_PC22, refetch addend if USE_REL, simplify. - * elfarm-nabi.c (elf32_arm_howto_table): For R_ARM_THM_ABS5, fix - size and rightshift. For R_ARM_THM_PC22, fix bitsize. - * elfarm-oabi.c (elf32_arm_howto_table): Ditto. +2000-10-10 Tom Rix -Wed Apr 14 14:33:08 1999 Richard Henderson + * section.c (bfd_make_section_anyway): Release newsect ptr when + newsect->symbol fails to alloc. Use bfd_release instead of free. - * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'. - * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise. +2000-10-09 Richard Henderson + * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New. + (elf64_ia64_unwind_entry_compare): New. + (elf64_ia64_final_link): Sort the .IA_64.unwind section. - * dwarf2.c (decode_line_info): Don't truncate address to least - significant 32 bits (breaks 64 bit targets). - (lookup_address_in_function_table): Ditto. - (comp_unit_contains_address): Ditto. +2000-10-07 Alan Modra -Tue Apr 13 21:27:19 1999 Catherine Moore + * elflink.h (size_dynamic_sections): Don't create various tags if + .dynstr is excluded from the link. Don't set first dynsym entry + if dynsymcount is zero. + (elf_bfd_final_link): Don't try to swap out dynamic syms if + .dynsym excluded from the link. Don't try to write any dynamic + sections excluded from the link. - * coff-arm.c (arm_emit_base_file_entry): New routine. - (A2T3_OFFSET): Define. - (T2A3_OFFSET): Define. - (coff_arm_relocate_section): Emit base file entries for interworking - stubs. + * elf.c (swap_out_syms): Handle global section symbols. -1999-04-13 Philip Blundell +2000-10-05 DJ Delorie - * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for - relocs 17 through 19. + * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs + * coffcode.h (coff_set_alignment_hook): read extended reloc count + (coff_write_relocs): write extended reloc count + (coff_write_object_contents): account for extended relocs -Sun Apr 11 01:25:17 1999 Richard Henderson +2000-10-05 Jim Wilson - * elfcode.h: Remove fnmatch.h. - * elflink.h (elf_link_assign_sym_version): Call back to ld - instead of calling fnmatch. + * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags + field. + * elf.c (_bfd_elf_make_section_from_shdr): Call the + elf_backend_section_flags function. + * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion + code. + (elf64_ia64_section_flags): New function containing flag conversion + code. + (elf_backend_section_flags): Define to elf64_ia64_section_flags. + * elfxx-target.h (elf_backend_section_flags): Define. + (elfNN_bed): Initialize elf_backend_section_flags field. - * config.bfd (i?86-*-beoself): Include pe vecs. +2000-10-02 Alan Modra -Sun Apr 11 01:14:06 1999 Richard Henderson + * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to + _bfd_elf32_gc_record_vtable. Correct a comment. - * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt - to go missing. +2000-10-01 Ulf Carlsson -1999-04-10 Richard Henderson + From Ralf Baechle - * elf32-i386.c (elf_i386_relocate_section): Mind no_undefined - when trying to resolve dynamic symbol references. - * elf32-m68k.c (elf_m68k_relocate_section): Likewise. - * elf32-mips.c (mips_elf_relocate_section): Likewise. - * elf32-ppc.c (ppc_elf_relocate_section): Likewise. - * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. - * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. - * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - * elflink.h (elf_link_output_extsym): Likewise. + * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld + produces binaries with got[1] = 0x80000001 to differenciate them + for the dynamic linker from the broken binaries produced by old + versions. -Sat Apr 10 15:12:09 1999 Richard Henderson +2000-09-30 Petr Sorfa - * section.c (_bfd_strip_section_from_output): New function moved from - * elf64-alpha.c (elf64_alpha_strip_section_from_output): ... here. - * elf32-i386.c (elf_i386_size_dynamic_sections): Use it. - * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. - * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise. - * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. - * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise. - * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise. - * bfd-in2.h: Update. + * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t. + (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t. + * configure.in: Add check for pxstatus_t and lwpxstatus_t. + * configure: Regenerate. -1999-04-09 Ian Lance Taylor +2000-09-27 Hans-Peter Nilsson + + Define two bfd_targets for absence and presence of leading + underscore on symbols. Make sure to only link same kind. + * elf32-cris.c (cris_elf_object_p, + cris_elf_final_write_processing, cris_elf_print_private_bfd_data, + cris_elf_merge_private_bfd_data): New. + (elf_backend_object_p, elf_backend_final_write_processing, + bfd_elf32_bfd_print_private_bfd_data, + bfd_elf32_bfd_merge_private_bfd_data): Define. + : Include elf32-target.h twice with + different macro settings: + (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as + bfd_elf32_us_cris_vec. + (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris". + (elf_symbol_leading_char): First as 0, then '_'. + (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h. + * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs. + * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector. + * configure: Regenerate. + * targets.c: Declare bfd_elf32_us_cris_vec. + * po/bfd.pot: Regenerate. - * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow. +2000-09-29 Momchil Velikov -1999-04-08 Nick Clifton + * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for + R_ARM_THM_PC22 relocations. - * coff-mcore.c: New File: Support for mcore-pe targets. - * cpu-mcore.c: New File: Support for mcore targets. - * elf32-mcore.c: New File: Support for mcore-elf target. - * pe-mcore.c: New File: Definitions for mcore-pe target. - * pei-mcore.c: New File: Definitions for mcore-pei target. - * Makefile.am: Add support for MCore targets. - * Makefile.in: Regenerate. - * config.bfd: Add support for MCore targets. - * configure.in: Add support for MCore targets. - * configure: Regenerate. - * archures.c: Add support for MCore architecture. - * bfd-in2.h: Regenerate. - * coffcode.h: Add support for mcore-pe targets. - * elf.c: Add support for mcore-elf target. - * reloc.c: Add support for MCore relocs. - * targets.c: Add support for MCore targets. +2000-09-29 NIIBE Yutaka -1999-04-07 Nick Clifton + * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath. - * elfarm-nabi.c (elf32_arm_howto_table): Add entries for - R_ARM_XPC25 and R_ARM_THM_XPC22. - (elf32_arm_reloc_map): Remove redundant entries. +2000-09-29 Momchil Velikov -1999-04-06 Ian Lance Taylor + * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if + is has the SEC_HAS_CONTENTS flag set. - * sysdep.h (LC_MESSAGES): Never define. +2000-09-28 Örjan Friberg + Hans-Peter Nilsson -1999-04-06 Chris Torek + * aout-cris.c (N_TXTADDR): Define. - * reloc.c (bfd_check_overflow): Add addrsize parameter. Change - all callers. Rewrite completely. - (_bfd_relocate_contents): Rewrite overflow checking. - * bfd-in2.h: Rebuild. +2000-09-28 John David Anglin -1999-04-05 Ian Lance Taylor + * som.c: Include alloca-conf.h. + * Makefile.am: "make dep-am" + * Makefile.in: Regenerate. - From Gabriel Paubert : - * elf32-ppc.c (ppc_elf_howto_raw): Set R_PPC_GOT16_LO, - R_PPC_PLT16_LO and R_PPC_SECTOFF_LO to be complain_overflow_dont. - Set R_PPC_PLT16_HA, R_PPC_SECTOFF_HA and R_PPC_EMB_NADDR16_HA to - have a rightshift of 16 and use ppc_elf_addr16_ha_reloc. - * ppcboot.c (ppcboot_vec): Use little endian routines for - headers. +2000-09-27 Alan Modra + + * elf32-hppa.c (plt_stub): New. + (PLT_STUB_ENTRY): Define. + (elf32_hppa_link_hash_table): Change multi_subspace to packed + boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch. + (elf32_hppa_link_hash_table_create): Init to suit. + (elf32_hppa_check_relocs): Set has_12bit_branch and + has_17bit_branch as appropriate. + (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for + non-local functions. + (elf32_hppa_size_dynamic_sections): Correct setting of reltext. + Add space for plt_stub as needed. + (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global + functions at plt_stub. + (elf32_hppa_finish_dynamic_sections): Write plt_stub. + (elf32_hppa_create_dynamic_sections): Leave .plt executable. + + * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param. + * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead + of fixed size, and if negative, disable handling of input sections + before stub section. Set up default stub group size depending + on detected branch relocs. + (hppa_build_one_stub): Use lrsel and rrsel for import stubs to + ensure different offsets from sym_value aren't rounded to + different 2k blocks. Use lrsel and rrsel for other stubs too for + consistency rather than necessity. + (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F. + (final_link_relocate): Likewise. + (elf32_hppa_relocate_section): Likewise. + + * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc. + (_bfd_elf_hppa_gen_reloc_type): Generate them. + (elf_hppa_final_link_relocate): Handle them. + (elf_hppa_relocate_insn): Likewise. + (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases. - * elf.c (elfcore_strndup): Only define if it will be used. - * elf32-ppc.c (ppc_elf_relax_section): Remove unused locals irel - and irelend. - (ppc_elf_check_relocs): Remove unused local i. - (ppc_elf_gc_mark_hook): Add default case to switch. +2000-09-26 Hans-Peter Nilsson - From Bernd Nitzler : - * srec.c (srec_scan): Accept \r in symbol definitions. - (srec_object_p): Set HAS_SYMS if we saw any symbols. - (symbolsrec_object_p): Likewise. + * elfcode.h (elf_object_p): Preserve and clear abfd section + information. Restore at error. -1999-04-04 Don Bowman +2000-09-26 Paul Sokolovsky - * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*. + * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory + is empty, make sure that its rva also 0. NT loader dislikes + having otherwise. -1999-04-04 Ian Lance Taylor +2000-09-26 Steve Ellcey - * dwarf1.c (parse_line_table): Remove unused locals last_pc and - last_line. - * elf-bfd.h (_bfd_elfcore_section_from_phdr): Declare. - * elf32-i386.c (elf_i386_gc_mark_hook): Add default case to - switch. - * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove unused - local i. - * syms.c (_bfd_stab_section_find_nearest_line): Remove unused - local val. + * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols + global by default. -1999-03-31 Nick Clifton +2000-09-21 Alan Modra - * config.bfd: Add support for arm-epoc-pe target. - * configure.in: Add support for arm-epoc-pe target. - * configure: Regenerate. - * targets.c: Add support for arm-epoc-pe target. - * coff-arm.c: Allow header files to override definition of - TARGET_UNDERSCORE and USER_LABEL_PREFIX. - * pe-arm.h: Allow previous header files to override definition of - TARGET_LITTLE_SYM and TARGET_BIG_SYM. - * pei-arm.h: Allow previous header files to override definition of - TARGET_LITTLE_SYM and TARGET_BIG_SYM. - * epoc-pe-arm.c: New file. Support arm-epoc-pe target. - * epoc-pei-arm.c: New file. Support arm-epoc-pei target. + * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in + currently unused RELATIVE_DYNAMIC_RELOCS code. + (hppa_discard_copies): Likewise. + (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct + comments. Don't check non-code output sections for stub grouping. -1999-03-30 Nick Clifton +2000-09-20 Alan Modra - * elf.c (elf_map_symbols): Handle the case where section - symbols are generated for content-less sections which are - not mapped to the output file. + * section.c (bfd_get_unique_section_name): Return NULL if + bfd_malloc fails. - * linker.c: Replace direct references to fields in BFD structure - with accessor macros. +2000-09-19 Michael Sokolov - * elflink.h: Replace direct references to fields in BFD structure - with accessor macros. + * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0 + instruction sequence to actually work. + (elf_m68k_finish_dynamic_sections): Change the patch-in offset + accordingly. -1999-03-25 Philip Blundell +2000-09-18 Alexandre Oliva - * config.bfd: Eliminate redundancy in checks for Linux/ARM. + * elf32-sh.c (sh_elf_relocate_section): Use + _bfd_final_link_relocate to apply the relocation against a section + symbol, when doing relocatable links. - * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into - account when adjusting section symbols during a partial link. +2000-09-18 Alan Modra -1999-03-24 Nick Clifton + * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section + to id_sec. + (stub_hash_newfunc): Here too. + (hppa_add_stub): And here. + (elf32_hppa_link_hash_table): Remove stub_section_created, + reloc_section_created, first_init_sec and first_fini_sec. Add + stub_group. + (elf32_hppa_link_hash_table_create): Init to suit. + (hppa_get_stub_entry): Add support for grouping stub sections. + (hppa_add_stub): Likewise. Remove sec_count param and init/fini + section code. Index stub vars by section->id. + (elf32_hppa_size_stubs): Likewise. Remove duplicated function + exit paths. Zap allocation of above removed vars. Refine + link-once test. - * coff-sparc.c (struct coff_reloc_map): Change type of field - 'bfd_reloc_val' to bfd_reloc_code_real_type. - * elf-m10200.c (struct mn10200_reloc_map): Ditto. - * elf-m10300.c (struct mn10300_reloc_map): Ditto. - * elf32-arc.c (struct arc_reloc_map): Ditto. - * elf32-d10v.c (struct d10v_reloc_map): Ditto. - * elf32-d30v.c (struct d30v_reloc_map): Ditto. - * elf32-fr30.c (struct fr30_reloc_map): Ditto. - * elf32-m32r.c (struct m32r_reloc_map): Ditto. - * elf32-sh.c (struct elf_reloc_map): Ditto. - * elf32-sparc.c (struct elf_reloc_map): Ditto. - * elf32-v850.c (struct v850_reloc_map): Ditto. - * elf64-sparc.c (struct elf_reloc_map): Ditto. - * elfarm-nabi.c (struct elf32_arm_reloc_map): Ditto. - * elfarm-oabi.c (struct elf32_arm_reloc_map): Ditto. + * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param. + * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. + (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table + rather than pointer to bfd_link_info. + (hppa_add_stub): Likewise. + (final_link_relocate): Likewise. -1999-03-17 Martin Hunt +2000-09-17 David Huggins-Daines - * syms.c (_bfd_stab_section_find_nearest_line): Changed this - function so source-level assembly works. If multiple N_SOs - are seen without and N_FUNs, create an indextable entry with - a NULL function name. + (elf32_hppa_size_stubs): Don't try to build stubs for discarded + link-once sections. -1999-03-16 Gavin Romig-Koch +2000-09-16 Alexandre Oliva - * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging - of certian similar cpus. + * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match + ld/emulparams/shelf.sh. -1999-03-16 Gavin Romig-Koch +2000-09-10 Michael Sokolov - * elf32-mips.c (_bfd_mips_elf_final_write_processing): - Add the 5000. Change the architecture for the 5400 to mips4. - (elf_mips_mach): Add r5000. + * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function. + * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration. + * bfd-in2.h: Regenerate. -1999-03-11 Doug Evans +2000-09-15 Kenneth Block + + * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs + LITUSE relocations incorrectly if -relax is specified on the ld + command line and the displacement field of the load or store + instruction is non-zero. (Patch by paul.winalski@compaq.com) + +2000-09-15 Alan Modra + + * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and + first_fini_sec here. + (elf32_hppa_size_stubs): Instead correctly find the first .init + and .fini section here. + +2000-09-15 David Huggins-Daines + + * elf32-hppa.c (clobber_millicode_symbols): New function. + (elf32_hppa_size_dynamic_sections): Call it. + +2000-09-14 Alan Modra + + * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call + packed. Add plabel, plt_abs packed booleans. + (hppa_link_hash_newfunc): Init new fields. + (PLABEL_PLT_ENTRY_SIZE): Define. + (hppa_stub_name): Use size_t len vars. + (hppa_add_stub): Likewise. + (elf32_hppa_build_stubs): Likewise. + (hppa_build_one_stub): Kill some compiler warnings. + (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs + if dynamic linking. Munge the local plt offsets into + local_got_refcounts. Set h->plabel for all global PLABELs. Use + size_t len vars. Add assert for plabel addend. + (elf32_hppa_gc_sweep_hook): Sweep local plt entries too. + (elf32_hppa_hide_symbol): New function. + (elf_backend_hide_symbol): Define. + (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries + with h->plabel set. Don't make plt entries to have dynamic syms + when they have been forced local. If plt entry is used by a + plabel, make it PLABEL_PLT_ENTRY_SIZE. + (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns. + Set up .plt offsets for local syms. + (elf32_hppa_relocate_section): Initialise plt entries for local + syms. Leave weak undefined plabels zero. Make global plabel + relocs against function symbol, and leave the addend zero. + Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs. + (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for + non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32 + relocs instead of SEGREL32 for dynamic got relocs. + (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry. + (elf_backend_got_header_size): Adjust. + (elf32_hppa_set_gp): Calculate an "ideal" LTP. + + * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define. + (hppa_type_of_stub): Use it instead of #if 0 + (hppa_discard_copies): Use it here too. + (elf32_hppa_size_dynamic_sections): And here. + + * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field. + (elf32_hppa_link_hash_table_create): And here. + (hppa_build_one_stub): And here. Instead keep track of stub + offset using _raw_size. + (elf32_hppa_size_stubs): Likewise. + (elf32_hppa_build_stubs): Likewise. + (hppa_size_one_stub): Likewise. Resize reloc section too. + + * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and + first_fini_sec handling. Don't search for reloc section or set + hplink->reloc_section_created here. + (elf32_hppa_size_stubs): Instead search for reloc sections, and + set reloc_section_created here. + (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT. + (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT + and DT_FINI. + (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI. + + * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)' + with `hplink->root.'. + (elf32_hppa_check_relocs): Likewise. + (elf32_hppa_gc_sweep_hook): Likewise. + (elf32_hppa_adjust_dynamic_symbol): Likewise. + (hppa_handle_PIC_calls): Likewise. + (elf32_hppa_size_dynamic_sections): Likewise. + (elf32_hppa_set_gp): Likewise. + (elf32_hppa_relocate_section): Likewise. + (elf32_hppa_finish_dynamic_symbol): Likewise. + (elf32_hppa_finish_dynamic_sections): Likewise. + + From David Huggins-Daines + * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for + defined weak symbols in shared links. + (final_link_relocate): Calls to defined weak symbols in shared + objects must go via import stubs, as the target might not be known + at link time. + +2000-09-14 Alexandre Oliva + + * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32, + R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE, + R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced + the original entries with EMPTY_HOWTOs, and added new ones to fill + in the gap. + (sh_elf_info_to_howto): Make sure the new gap isn't used. + (sh_elf_relocate_section): Likewise. + +2000-09-13 Anders Norlander + + * cpu-mips.c (arch_info_struct): Add mips:4K + * bfd-in2.h (bfd_mach_mips4K): New define. + * archures.c: Add bfd_mach_mips4K to comment. + * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return + E_MIPS_ARCH_2 for bfd_mach_mips4K. + +2000-09-13 Marco Franzen + + * som.c (som_write_symbol_strings): Do not used fixed buffers, + use size_t as a counter. + (som_write_space_strings): Similarly. + +2000-09-12 Jason Eckhardt + + * elf32-i860.c (elf32_i860_relocate_pc26): New function + and prototype. + (elf32_i860_relocate_section): Invoke new function from here. + +2000-09-11 Michael Sokolov + + * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names + static. + +2000-09-10 Michael Sokolov + + * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for + target section name instead of dumping core when the target symbol is + undefined. + +2000-09-09 Kazu Hirata + + * riscix.c: Remove DEFUN. + +2000-09-08 Nick Clifton - * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb. + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not + initialise flags in output bfd if the input bfd is the default + architecture with the default flags. -1999-03-11 Nick Clifton +2000-09-08 Kazu Hirata - * binary.c (binary_set_section_contents): Generate warning about - huge file offsets for any section that will occupy file space, not - just those that are loadable. + * archive.c: Fix formatting. + * coff-arm.c: Likewise. + * doc/chew.c: Likewise. -1999-02-24 Jim Blandy +2000-09-08 Alan Modra - * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes. + * section.c (bfd_get_unique_section_name): Put a dot before the + numeric suffix. -1999-02-22 Jim Lemke +2000-09-07 Kazu Hirata - * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0. + * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID. + * elf.c: Fix formatting. -Mon Feb 22 18:26:51 1999 Ian Lance Taylor +2000-09-07 Alexandre Oliva - * elf-bfd.h (ELF_LINK_HASH_REF_REGULAR_NONWEAK): Define. - * elflink.h: Revert all changes since Feb 16. Instead: - (elf_link_add_object_symbols): Set REF_REGULAR_NONWEAK flag if - appropriate. Copy it to version symbols. - (elf_fix_symbol_flags): Set REF_REGULAR_NONWEAK for non ELF - symbols if appropriate. - (elf_adjust_dynamic_symbol): Set REF_REGULAR_NONWEAK for weakdef - symbol if appropriate. - (elf_link_output_extsym): If symbol is marked as undefined, and - has no nonweak references, mark it as weak undefined. + * config.bfd (sh-*-linux*): Added. + * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New. + * targets.c: Declare them. + * elf32-sh-lin.c: New file. + * Makefile.am: Compile it. + * elf32-sh.c: Don't override defines from elf32-sh-lin.c. + * configure, Makefile.in: Rebuilt. -Fri Feb 19 16:01:12 1999 Ian Lance Taylor +2000-09-06 Geoffrey Keating - * elflink.h (elf_merge_symbol): When overriding a dynamic - definition with a weak undefined symbol, set NEEDS_PLT if it is a - function. - (elf_link_add_object_symbols): Don't copy the other field if we - are overridding. + * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss + pseduo-section when determining where the TOC ends. -Thu Feb 18 18:07:43 1999 Ian Lance Taylor + * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to + output x_tvndx as it is only two bytes wide. - * elflink.h (elf_merge_symbol): Do not merge any symbol from a - shared object with a weak undefined symbol. + * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute + reloc is 26 or 32 bits wide. -1999-02-18 Nick Clifton + * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant + for relocs that don't change anything. Also look at the full + 6 bits of bitsize. - * elfarm-nabi.c: Set partial_inplace back to false. +2000-09-06 Philip Blundell -1999-02-17 Nick Clifton + * config.bfd (arm*-*-uclinux*): New target. - * coff-arm.c (TARGET_UNDERSCORE): Re-enable. - (USER_LABEL_PREFIX): Set to "_". +2000-09-06 Alexandre Oliva - The following patches are from: Scott Bambrough - + * configure: Rebuilt with new libtool.m4. - * libaout.h (M_ARM6_NETBSD): Set to 143. +2000-09-06 Alan Modra - * reloc.c: Add ARM PIC relocs: BFD_RELOC_ARM_GOT12, - BFD_RELOC_ARM_GOT32, BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_COPY, - BFD_RELOC_ARM_GLOB_DAT, BFD_RELOC_ARM_PLT32, - BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC. + * section.c (bfd_get_unique_section_name): Avoid c++ reserved + word for variable name. * bfd-in2.h: Regenerate. - * elfarm-nabi.c (elf32_arm_howto_table): Set partial_inplace to - 'true' as REL relocs are now being used. Add new PIC relocs: - R_ARM_COPY, R_ARM_GLOB_DAT, R_ARM_JUMP_SLOT, R_ARM_RELATIVE, - R_ARM_GOTOFF, R_ARM_GOTPC, R_ARM_GOT32, R_ARM_PLT32. - - * elf32-arm.h (elf32_arm_merge_private_bfd_data): Check byte order - of targets. - (elf32_arm_final_link_relocate): Change parameters so that entire - reloc is passed. Add support for PIC relocs. - (elf32_arm_relocate_section): Pass entire reloc to - elf32_arm_final_link_relocate. - (elf32_arm_check_relocs): Handle new PIC relocs. - (elf32_arm_adjust_dynamic_symbol): New function. - (elf32_arm_size_dynamic_sections): New function. - (elf32_arm_discard_copies): New function. - (elf32_arm_finish_dynamic_symbol): New function. - (elf32_arm_finish_dynamic_sections): New function. - (ELF_MAXPAGE_SIZE): Define. - (bfd_elf32_bfd_reloc_type_lookup): Define. - (elf_backend_relocate_section): Define. - (elf_backend_adjust_dynamic_symbol): Define. - (elf_backend_create_dynamic_sections): Define. +2000-09-05 Nick Clifton + + * config.in: Regenerate. + * libbfd.h: Regenerate. + * po/bfd.pot: Regenerate. + * doc/bfdint.texi: Remove CVS date string - it foils compares with + local versions. + +2000-09-05 Steven Johnson + + * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry. + +2000-09-05 Alan Modra + + Shared library and PIC support. + * elf32-hppa.c (PLT_ENTRY_SIZE): New. + (GOT_ENTRY_SIZE): New. + (ELF_DYNAMIC_INTERPRETER): New. + (STUB_SUFFIX): Define. + (LONG_BRANCH_PIC_IN_SHLIB): Define. + (RELATIVE_DYNAMIC_RELOCS): Define. + (enum elf32_hppa_stub_type): New. + (struct elf32_hppa_stub_hash_entry): Rename offset to + stub_offset. Add a number of new fields. + (struct elf32_hppa_link_hash_entry): New. + (struct elf32_hppa_link_hash_table): Add numerous fields. Remove + global_value. + (elf32_hppa_hash_table): Rename to hppa_link_hash_table. + (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup. + (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init + new fields. + (hppa_link_hash_newfunc): New function. + (elf32_hppa_link_hash_table_create): Use above function. Init new + fields. + (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc + instead of addend, and remove sym_name from args. Don't use + symbol name for local syms, instead use sym index. + (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return + stub type rather than size. Pass in hash and handle import stub + case. Also pass in reloc instead of offset so we can calculate + PCREL22F and PCREL12F branches properly. + (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build + import and export stubs too. + (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle + import and export stub sizing. + (elf32_hppa_check_relocs): New function. + (elf32_hppa_adjust_dynamic_symbol): New function. + (hppa_discard_copies): New function. + (elf32_hppa_size_dynamic_sections): New function. + (elf_backend_size_dynamic_sections): Define. + (elf32_hppa_finish_dynamic_symbol): New function. (elf_backend_finish_dynamic_symbol): Define. + (elf32_hppa_size_stubs): Stash params in link hash table, and move + some local vars into the link hash table too. For shared links, + trundle over function syms, generating export stubs. Handle + PCREL22F branches. Break out stub creation code from here.. + (hppa_add_stub): .. to here. New function. + (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't + call the bfd linker. Use elf_gp to record global pointer. + Calculate a value from sections if $global$ is missing. + (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link. + (elf32_hppa_gc_mark_hook): New function. + (elf_backend_gc_mark_hook): Define. + (elf32_hppa_gc_sweep_hook): New function. + (elf_backend_gc_sweep_hook): Define. + (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate. + Add rel to args, and remove howto, input_bfd, offset, addend, + sym_name as we can recalculate these locally. Handle calls to + dynamic objects, extra PIC relocs, PCREL22F branches. Change + handling of undefined weak syms. Check that stubs are in range. + Only look for import stubs on PCREL17F and PCREL22F relocs. Add + message on hitting a DPREL21L reloc that needs fixing. Subtract + off PC for PCREL14F. Break out code that does a stub lookup from + here.. + (hppa_get_stub_entry): ..to here. New function. + (elf32_hppa_relocate_insn): Merge into final_link_relocate. + (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic + relocs, etc. etc. + (elf32_hppa_finish_dynamic_sections): New function. (elf_backend_finish_dynamic_sections): Define. - (elf_backend_size_dynamic_sections): Define. - (elf_backend_plt_readonly): Define. + (elf_backend_final_write_processing) Define. + (hppa_handle_PIC_calls): New function. + (elf32_hppa_build_stubs): Call it. Pass link_info to + hppa_build_one_stub. + (elf32_hppa_create_dynamic_sections): New function + to create .plt and .got then set .plt flags correctly. + (elf_backend_create_dynamic_sections): Define. + (elf32_hppa_object_p): New function. + (elf_backend_object_p): Define. + (elf32_hppa_elf_get_symbol_type): New function. + (elf_backend_get_symbol_type): Define. + (elf_backend_can_gc_sections): Define. (elf_backend_want_got_plt): Define. + (elf_backend_plt_alignment): Set to 2. + (elf_backend_plt_readonly): Define. (elf_backend_want_plt_sym): Define. + (elf_backend_got_header_size): Reserve one entry. -Wed Feb 17 12:02:26 1999 Stan Cox + * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd. + (elf32_hppa_size_stubs): Pass in multi_subspace. + (elf32_hppa_set_gp): Declare. - * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Make reginfo - sections SEC_LINK_ONCE and SEC_LINK_DUPLICATES_SAME_SIZE. - (_bfd_mips_elf_fake_sections): Likewise. + * section.c (SEC_HAS_GOT_REF): Define new flag for asection. + (bfd_get_unique_section_name): New function. + * bfd_in2.h: Regenerate. -Wed Feb 17 12:07:23 1999 Andreas Schwab + * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F. + (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc + comment. - * elfarm-oabi.c (bfd_elf32_arm_allocate_interworking_sections, - bfd_elf32_arm_get_bfd_for_interworking, - bfd_elf32_arm_process_before_allocation): Define to avoid clash - with elfarm-nabi.c. - - * elf32-arm.h: Don't declare elf32_arm_info_to_howto. - (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub, - elf32_arm_find_nearest_line): Make them static. - -Tue Feb 16 22:44:37 1999 Ian Lance Taylor - - * elflink.h (elf_merge_symbol): Add pflags parameter. Change all - callers. Do not merge a definition from a shared object with a - weak undefined symbol. - (elf_link_add_object_symbols): Do not change the symbol type or - size if the old symbol overrides the new one. - -1999-02-08 Nick Clifton - - * config.bfd: Add support for strongarm target. - -Mon Feb 8 11:18:14 1999 Andreas Schwab - - * elf32-m68k.c (reloc_map): Use the correct types for the struct - fields instead of unsigned char. - -Fri Feb 5 00:22:36 1999 Ian Lance Taylor - - * Makefile.am: Rebuild dependencies. - * Makefile.in: Rebuild. - -Thu Feb 4 22:30:13 1999 Ian Lance Taylor - - * configure.in: Change AC_PREREQ to 2.13. Remove AM_CYGWIN32. - Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to - AC_PROG_INSTALL. Add comments to uses of AC_DEFINE. - * acinclude.m4: Add comments to uses of AC_DEFINE. - * acconfig.h: Remove. - * configure: Rebuild with current autoconf/automake. - * aclocal.m4: Likewise. - * config.in: Likewise. - * Makefile.in: Likewise. + From David Huggins-Daines + * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning. + (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx. + (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has + been updated in finish_dynamic_symbol before modifying function + symbol. -1999-02-04 DJ Delorie + * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of + eight entries. Replace NULL with bfd_elf_generic_reloc. Add + R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F. + (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some + comments. Handle format == 12 for R_HPPA_PCREL_CALL. + (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F. + (elf_hppa_relocate_insn): Likewise. Reformat some comments. + (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32. - * libbfd.c (real_read): don't call fread for zero bytes. This - covers up a bug (or misuse of bfd) that's exposed by Solaris. + From David Huggins-Daines + * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF + style of local labels as well. -Thu Feb 4 12:38:10 1999 Stan Cox +2000-09-03 Philip Blundell - * elf32-mips.c (mips_elf_relocate_section): Insure that the target - of a jump is in the current 256 MB region. + * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate + references to undefined symbols in debugging sections. -Thu Feb 4 12:15:38 1999 Ian Lance Taylor +2000-09-02 H.J. Lu - * format.c (bfd_check_format_matches): Change last patch to only - take effect for the binary target. + * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT, + BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, + BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH + section. -Wed Feb 3 19:40:12 1999 Ian Lance Taylor +2000-09-02 Jason Eckhardt - * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR. + * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro. + (elf32_i860_is_local_label_name): New function and prototype. -Wed Feb 3 15:02:44 1999 Catherine Moore +2000-09-02 Nick Clifton - * elf32-fr30.c (fr30_elf_check_relocs): New routine. + * configure.in: Increase version number to 2.10.91. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * po/bfd.pot: Regenerate. -Tue Feb 2 21:38:28 1999 Ian Lance Taylor +2000-09-02 Daniel Berlin - * format.c (bfd_check_format_matches): If the target was - previously specified, don't check other targets when checking for - an archive file. + * elf.c (_bfd_elf_make_section_from_shdr): Add + .gnu.linkobce.wi. to the list of debug section names. -Tue Feb 2 18:16:43 1999 Catherine Moore +2000-09-02 Nick Clifton - * elf32-arm.h (elf32_arm_reloc_map): Removed. - (elf32_arm_reloc_type_lookup): Removed - * elfarm-nabi.c (elf32_arm_reloc_map): New. - (elf32_arm_reloc_type_lookup): New. - * elfarm-oabi.c (elf32_arm_reloc_map): New. - (elf32_arm_reloc_type_lookup): New. + * dwarf2.c (find_debug_info): New function: Locate a section + containing dwarf2 debug information. + (bfd_dwarf2_find_nearest_line): Find all sections containing + debug information and include them in the stash. -Mon Feb 1 19:49:21 1999 Catherine Moore +2000-09-01 Niibe Yutaka , Kaz Kojima , Alexandre Oliva - * elfarm-nabi.c: Renamed from elf32-arm-newabi.c. - * elfarm-oabi.c: Renamed from elf32-arm-oldabi.c - * Makefile.am: Use new files. - * Makefile.in: Regenerate. - * configure.in: Use new files. - * configure: Regenerate. + * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT, + R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New. + (sh_reloc_map): Add new relocs. + (sh_elf_check_relocs, sh_elf_link_hash_newfunc, + sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol, + sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol, + sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New + functions. + (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define. + (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le, + elf_sh_plt_entry_be, elf_sh_plt_entry_le, + elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le): + New array constants. + (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry): + New variables. + (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset, + elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset, + elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset, + elf_sh_plt_reloc_offset): Define. + (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry, + elf_sh_link_hash_table): New structs. + (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros. + (sh_elf_relocate_section, sh_elf_check_relocs): Handle new + relocation types. + (elf_backend_create_dynamic_sections, + bfd_elf32_bfd_link_hash_table_create, + elf_backend_adjust_dynamic_symbol, + elf_backend_size_dynamic_sections, + elf_backend_finish_dynamic_symbol, + elf_backend_finish_dynamic_sections, elf_backend_want_got_plt, + elf_backend_plt_readonly, elf_backend_want_plt_sym, + elf_backend_got_header_size, elf_backend_plt_header_size): + Define. + * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT, + BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC): + New relocs. + * bfd-in2.h, libbfd.h: Rebuilt. -1999-02-01 Nick Clifton +2000-09-01 Alan Modra - * elf32-fr30.c (fr30_elf_gc_mark_hook): New function. - (fr30_elf_gc_sweep_hook): New function. - (elf_backend_can_gc_sections): Define. + * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27 + change. -Mon Feb 1 12:21:47 1999 Catherine Moore +2000-08-31 J"orn Rennecke - * targets.c (bfd_target_vector): Add bfd_elf32_littlearm_oabi_vec - and bfd_elf32_bigarm_oabi_vec. + * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags + not initialized, set them to indicate the SH1 instruction set. -Mon Feb 1 11:46:31 1999 Catherine Moore +2000-08-31 Alexandre Oliva - * Makefile.am (elf32-arm-oldabi.lo): New. - (elf32-arm-newabi.lo): New. - * Makefile.in: Regenerate. - * config.bfd (thumb-*-elf): Remove definition of targ_underscore. - (arm-*-elf): Likewise. - (arm-*-oabi): New. - (thumb-*-oabi): New. - * configure: Regenerate. - * configure.in (bfd_elf32_littlearm_oabi_vec): New. - (bfd_elf32_bigarm_oabi_vec): New. - * elf32-arm-newabi.c: New. - * elf32-arm-oldabi.c: New. - * elf32-arm.c: Removed. - * elf32-arm.h: New. + * acinclude.m4: Include libtool and gettext macros from the + top level. + * aclocal.m4, configure: Rebuilt. -Mon Feb 1 11:52:12 1999 Frank Ch. Eigler +2000-08-29 Michael Snyder - * binary.c (binary_set_section_contents): Omit warnings for - unloadable sections. + * elf.c: Eliminate references to __sparcv9 macro; replace with + autoconf variables HAVE_PSINFO32_T etc. + * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T, + HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO. + * config.in: Ditto. + * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can + detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto. + * aclocal.m4: Ditto. + * configure: Regenerate. -1999-01-31 Michael Meissner +2000-08-27 Alan Modra - * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to - powerpc{,le}-*-eabi. + * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied + for any shared link, not just shared -Bsymbolic. + (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on + any shared link, and pass link info to it. + (elf_i386_size_dynamic_sections): Update comment. + (elf_i386_discard_copies): Modify to discard relocs for symbols + that have been forced local. + (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols + that have been forced local. -1999-01-29 Nick Clifton +2000-08-24 Denis Chertykov & Nick Clifton - * dwarf2.c (read_unsigned_leb128): Remove unused variables. - * dwarf2.c (read_signed_leb128): Remove unused variables. + * elflink.h (elf_link_add_object_symbols): Allow common + symbols to have an alignment of 1 if explicitly requested, and + not overridden by other definitions. -Fri Jan 29 00:47:21 1999 H.J. Lu +2000-08-22 Doug Kwan - * elf.c (assign_file_positions_for_segments): Only adjust - p_align when needed. + * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo. + * coffcode.h (coff_set_flags): Add detection of w65 architecture. -Thu Jan 28 20:05:22 1999 Ian Lance Taylor +2000-08-22 H.J. Lu - * binary.c (binary_set_section_contents): Don't return early for a - non-loadable section, in case the first section is non-loadable. - Don't set the low lma for a SEC_NEVER_LOAD section. From Maciej - W. Rozycki . + * elf-bfd.h (elf_link_hash_table): Add runpath. -1999-01-28 Nick Clifton + * bfd-in.h (bfd_elf_get_runpath_list): New prototype. + * bfd-in2.h: Rebuilt. - * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and - R_FR30_GNU_VTENTRY relocs. + * elf.c (_bfd_elf_link_hash_table_init): Initialize the + "runpath" field to NULL. + (bfd_elf_get_runpath_list): New function. -Thu Jan 28 11:08:16 1999 Catherine Moore + * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and + DT_RUNPATH entries. - * elflink.h (elf_link_output_sym): Zero syms which are - part of sections which have been excluded. +2000-08-22 Alexandre Oliva -Wed Jan 27 13:35:35 1999 Stan Cox + * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W, + R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them + explicitly. Improve validation of r_type. - * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed F_PIC - to F_PIC_INT. - * coffcode.h (coff_set_arch_mach_hook): Removed F_ARM_2a and - F_ARM_3M labels. Changed F_PIC to F_PIC_INT. +2000-08-21 H.J. Lu -1999-01-27 Nick Clifton + * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the + dynamic allocated content space. Add a comment to remind us that + one day this ought to be fixed. + * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. + * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise. + * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise. - * elf32-fr30.c (fr30_elf_howto_table): Fix name of R_FR30_48 - relocation. - (fr30_final_link_relocate): Use computed value as result of - relocation. +2000-08-21 Jason Eckhardt -1999-01-26 Frank Ch. Eigler + * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate + field with the newly relocated value instead of adding it to the + existing immediate field. + (elf32_i860_relocate_splitn): Likewise. + (elf32_i860_relocate_highadj): Likewise. - * binary.c (binary_set_section_contents): Emit warning for - huge file offsets due to widely-dispersed section LMAs. +2000-08-16 Jason Eckhardt -Mon Jan 18 03:35:35 1999 Ian Lance Taylor + * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it + was previously just a stub). - * elf.c (assign_file_positions_for_segments): If not D_PAGED, - align first section to largest section alignment, not first - section alignment. +2000-08-16 Alexandre Oliva -1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com) + * elflink.c (_bfd_elf_create_got_section): Don't abort(). + Formatting fixes. + (_bfd_elf_create_dynamic_sections): Likewise. - * configure.in: Require autoconf 2.12.1 or higher. +2000-08-16 Andrew Macleod -Tue Dec 22 15:21:41 1998 Catherine Moore + * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address + for undefined symbols to be the beginning of the section. - * archures.c (bfd_mach_i386_i386_intel_syntax): Define. - * bfd-in2.h: Likewise. - * cpu-i386.c (bfd_i386_arch_intel_syntax): New. + * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate + four extra entries at the beginning of the .rela.plt section. + (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt + section to account for the four reserved entries in the .plt section. -1998-12-16 Gavin Romig-Koch +2000-08-15 Geoffrey Keating - * archures.c,bfd-in2.h (bfd_mach_mips4111): New. - * cpu-mips.c: Add support for and independent 4111. - * elf32-mips.c (elf_mips_mach): E_MIPS_MACH_4111 -> bfd_mach_mips4111. - (_bfd_mips_elf_final_write_processing): - bfd_mach_mips4111 -> E_MIPS_ARCH_3 | E_MIPS_MACH_4111. + * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0 + to the list of NOPs we recognize after a branch-and-link. + Use the ori NOP when one is needed. -1998-12-15 Gavin Romig-Koch + * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation + for large archives. - * elf32-mips.c (elf_mips_abi_name): New. - (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags. +2000-08-14 Jim Wilson -1998-12-12 Gavin Romig-Koch + * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle + EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP. + (elf64_ia64_print_private_bfd_data): Likewise. Also handle + EF_IA_64_ABSOLUTE. - * elf32-mips.c (_bfd_mips_elf_final_write_processing): - Handle bfd_mach_mips4300. +2000-08-11 Alexandre Oliva -1998-12-11 Ulrich Drepper + * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static. - * elf32-i386.c: Remove leaked development code from patch - 1998-12-10 by Richard Henderson. +2000-08-10 Jason Eckhardt -1998-12-10 Richard Henderson + * elf32-i860.c (elf32_i860_relocate_section): New function. + (i860_final_link_relocate): New function. + (elf32_i860_relocate_splitn): New function. + (elf32_i860_relocate_pc16): New function. + (elf32_i860_relocate_highadj): New function. + (elf32_i860_howto): Minor adjustments to some relocations. + (elf_info_to_howto_rel): Define. + (elf_backend_relocate_section): Define. - * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations - in debug sections for symbol defined externally. +2000-08-10 Nick Clifton -Thu Dec 10 10:58:38 1998 Andreas Schwab + * elf32-arm.h: Fix formatting. - * targets.c (bfd_target_vector): Remove duplicate entry for - tekhex_vec. +2000-08-10 Bernd Schmidt -1998-12-09 Nick Clifton + * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static. - * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0 - since we are using RELAs. +2000-08-08 Jason Eckhardt -Tue Dec 8 22:15:48 1998 Ian Lance Taylor + * elf32-i860.c (elf32_i860_howto_table): Updated some fields. - SCO Open Server Release 5 core file support, from Jouke Numan - : - * sco5-core.c: New file. - * configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo. - (sco5-core.lo): Define SCO5_CORE in COREFLAG. - * Makefile.am: Rebuild dependencies. - (OPTIONAL_BACKENDS): Add sco5-core.lo. - (OPTIONAL_BACKENDS_CFILES): Add sco5-core.c. - * bfd.c (struct _bfd): Add sco5_core_data field to tdata. - * targets.c (sco5_core_vec): Add to target list if SCO5_CORE. - * bfd-in2.h, configure, Makefile.in: Rebuild. - -Tue Dec 8 19:38:42 1998 Mark Klein - - * config.bfd (hppa*-*-mpeix*): New target. - * configure.in: Add AC_HEADER_DIRENT. - (hppa*-*-mpeix*): New target. - * configure.host (hppa*-*-mpeix*): New host. - * hpux-core.c: Check HOST_HPPAMPEIX. Use HAVE_DIRENT_H and - friends rather than just including . - * som.h (struct som_symbol): Add hppa_priv_level and apto - tc_data. Change all users. - (struct somdata): Add comp_unit field. - (obj_som_compilation_unit): Define. - (bfd_som_attach_compilation_unix): Declare. - * som.c: Check HOST_HPPAMPEIX. - (struct som_misc_symbol_info): Add new field priv_level. - (som_object_setup): Add current_offset parameter. Change all - callers. - (setup_sections): Likewise. - (som_object_p): For EXECLIBMAGIC, read the lst header. - (som_write_symbol_strings): Add compilation_unit parameter. - Change all callers. - (som_finish_writing): Write out compilation_unit. - (som_bfd_derive_misc_symbol_info): Set priv_level. - (som_build_and_write_symbol_table): Set xleast field to 3. - (som_slurp_symbol_table): Set symbol priv_level. - (bfd_som_attach_compilation_unit): New function. - (som_bfd_ar_write_symbol_stuff): Set xleast field to 3. Set - priv_level into symbol_value. - * configure, config.in: Rebuild. - -Tue Dec 8 16:21:35 1998 Ian Lance Taylor - - * hpux-core.c (hpux_core_core_file_p): Change call to nonexistent - warning function to call _bfd_error_handler instead. - - * libbfd.c (COERCE32): Cast through unsigned long and long to - avoid bug in old version of gcc. - - * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove. - (elf_backend_additional_program_headers): Don't define. - -1998-12-08 Nick Clifton - - * elf32-fr30.c (fr30_final_link_relocate): Fix PC relative - relocations to include offset of 2 included in the insns, and the - offset of the relocs within the section. - -Wed Dec 2 15:03:59 1998 David Taylor - - The following changes were made by David Taylor - , Edith Epstein - , Jim Blandy - , and Elena Zannoni - as part of the project to merge in - changes originally made by HP; HP did not create ChangeLog - entries. +2000-08-07 Kazu Hirata - * aclocal.m4, configure, Makefile.in: Rebuilt using latest - automake macro library. - - * hpux-core.c (hpux_core_core_file_p): this function now - understands HPUX 10.30 thread info. Yes, the thread stacks can be - found in the corefile! Also, in hpux_core_core_file_p, if we - encounter a section with an unknown type, don't punt. Instead, - just skip it. Also, count the number of sections of known type - that we encounter. If we encounter at least one good one, then - we'll declare that the file is a core file. If we encounter any - unknown ones but some known ones, then we'll issue a warning (but - still declare it to be a core file). Also, correctly decide when a - file is not a core. - (PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined. - (CORE_ANON_SHMEM): define if not defined. - (hpux_core_struct): add members lwpid and user_tid. - (core_kernel_thread_id, core_user_thread_id): new macros. - (make_bfd_asection): use bfd_alloc to allocate room for a copy of - the name before storing it in the bfd. - (hpux_core_core_file_p): handle threads. - - * libhppa.h (GET_FIELD): protect against redefinition. - (HPPA_WIDE): define. - (GET_FIELD): define. - (GET_BIT): define. - (MASK): define. - (CATENATE): define. - (ELEVEN): define. - (sign_extend): redefine. - (assemble_6): define. - (assemble_12): rewrite. - (assemble_16): define. - (assemble_16a): define. - (assemble_17): rewrite. - (assemble_22): define. - -1998-12-07 Nick Clifton - - * elf32-fr30.c (fr30_final_link_relocate): Using signed - relocations for signed values. - -Sun Dec 6 16:30:33 1998 Ian Lance Taylor - - * mipsbsd.c (MY(set_arch_mach)): Make static. - * aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use - bfd_mach_mips* macros rather than simple numbers. - - COFF weak symbol support, based on patches from Mark Elbrecht - : - * coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT. - * coffgen.c (coff_renumber_symbols): Handle weak symbols. - (coff_write_alien_symbol): Likewise. - * cofflink.c (coff_link_check_ar_symbols): Likewise. - (coff_link_add_symbols): Likewise. - (_bfd_coff_link_input_bfd): Likewise. - (_bfd_coff_write_global_sym): Likewise. - - * elf.c (copy_private_bfd_data): Always initialize the - includes_phdrs field. - - * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF - file defines a symbol first mentioned in an ELF file. - - * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if - possible, rather than only if BFD64. - * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT, - not __GNUC__. - * bfd-in2.h: Rebuild. + * ieee.c (ieee_write_debug_part): Rewrite a comment. + * elf64-ia64.c: Fix a typo. - * srec.c (srec_set_section_contents): Correct test to avoid - switching to 4 byte addresses after seeing a second section which - requires 3 byte addresses. From Joel Schantz - . +2000-08-05 Jason Eckhardt - * config.bfd (m68*-*-gnu*): New target. From Aymeric Vincent - . + * elf32-i860 (elf32_i860_howto_table): New structure. + (lookup_howto): New function. + (elf32_i860_reloc_type_lookup): New function. + (elf32_i860_info_to_howto_rela): New function. + (elf_code_to_howto_index): New structure. + (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela. + (bfd_elf32_bfd_reloc_type_lookup): Re-define as + elf32_i860_reloc_type_lookup. -1998-12-04 Jim Blandy +2000-08-04 Rodney Brown - * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Fix logic to - decide whether the output file is -mrelocatable-lib, - -mrelocatable, or neither. (gdb.base/nodebug.exp) + * som.c (struct fixup_format): Constify `format'. + (som_hppa_howto_table): Use SOM_HOWTO macro. + (try_prev_fixup, hppa_som_reloc): Decorate unused parameter. + (som_bfd_reloc_type_lookup): Likewise. + (compare_subspaces): Remove unused `count1', `count2'. + (som_begin_writing): Remove unused `total_reloc_size'. + (som_bfd_derive_misc_symbol_info): Decorate unused parameter. + (som_print_symbol, som_bfd_is_local_label_name): Likewise. + (som_set_reloc_info): Constify `cp'. Remove unused `addend'. + (som_find_nearest_line): Decorate unused parameter(s). + (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise. + (som_bfd_link_split_section): Likewise. -1998-12-03 Nick Clifton +2000-08-03 Nick Clifton - * elf32-fr30.c: Add support for R_FR30_48 reloc. - * reloc.c: Add BFD_RELOC_FR30_48 relocation. + * section.c: Restore backed out code. + * elf.c: Restore backed out code. + (copy_private_bfd_data): Fix bug preventing stipped dynamic + binaries from working. * bfd-in2.h: Regenerate. - * libbfd.h: Regenerate - -Wed Dec 2 00:58:37 1998 Ian Lance Taylor - - * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to - link against a dynamic symbol with no type or size. - -1998-12-01 Ulrich Drepper - - * elf32-i386.c (i386_check_relocs) [R_386_32]: Don't emit - relocation for section which does not get loaded. - (elf_i386_relocate_section) [R_386_32]: Likewise. - -Tue Dec 1 11:33:33 1998 Jim Wilson - - * coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size, - reloc_count and i long instead of unsigned long. Handle error - return from bfd_canonicalize_reloc. - -1998-12-01 Nick Clifton - - * elf32-v850.c (v850_elf_relocate_section): Detect the absence of - a hash table. - -Mon Nov 30 15:28:09 1998 J"orn Rennecke - - * elf32-sh.c (elf/sh.h): Include. - sh_reloc_type: Delete. Changed all references to elf_sh_reloc_type. - (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8. - (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8. - (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8. - * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h. - -Fri Nov 27 17:51:38 1998 Geoff Keating - - * elflink.h (compute_bucket_count): Don't allow minsize==0, it - causes division by zero later on. -Thu Nov 26 11:19:35 1998 Dave Brolley +2000-08-03 H.J. Lu - * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not - needed. + * section.c: Back out the change made by Nick Clifton + on 2000-07-31. It breaks stripping dynamic + binaries. + * bfd-in2.h: Likewise. + * elf.c: Likewise. -1998-11-25 DJ Delorie +2000-08-03 Alexandre Oliva - * coff-i386.c (i3coff_object_p): Remove hack. Use new emulation - hook now. + * elf32-sh.c (sh_elf_reloc_loop): Warning removal. -Tue Nov 24 10:25:27 1998 Nick Clifton +2000-07-31 Jason Eckhardt - * elf32-fr30.c (fr30_elf_relocate_section): Call - fr30_final_link_relocate. - (fr30_final_link_relocate): New function: Handle I20 and I32 - relocs. - (fr30_elf_i32_reloc): New function: Handle I32 relocs. - (fr30_elf_pc9_reloc): New function: Handle 9_PCREL relocs. - (fr30_elf_pc12_reloc): New function: Handle 12_PCREL relocs. + * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860. + * bfd-in2.h, libbfd.h: Regenerate. - * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc - chain to empty. +2000-07-31 Nick Clifton - The following changes are based on a patch submitted by Gianluca - Moro : + * section.c (struct sec): Add new boolean field 'segment_mark'. + (STD_SECTION): Initialise new field to zero. - (v850_elf_perform_relocation): Only update a hi16s reloc if it has - not already been updated. - (find_remembered_hi16s_reloc): New parameter 'already_found' - returns state of remembered hi16s reloc. - (remember_hi16s_reloc): Set 'found' field to false. - (hi16s_location): Add 'found' field. - -1998-11-23 DJ Delorie - - * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants - to see .DLL files as unrecognized. - (i3coff_object_p): Sorry, had to hack it to not recognize these - files (pei-i386) on request. - -1998-11-23 DJ Delorie - - * opncls.c (bfd_make_readable): need more cleanup for symbols and - relents. Call bfd_check_format to reinitialize. - -Fri Nov 20 14:21:36 1998 Nick Clifton - - * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious - warnings. - -Thu Nov 19 14:42:15 1998 Geoffrey Noer - - * aclocal.m4: regenerate - * configure: regenerate - -Tue Nov 17 20:23:35 1998 Richard Henderson - - * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size. - * elf.c (_bfd_elf_link_hash_newfunc): Clear it. - * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and - respect it as an upper bound on what memory to reference. - (elf_gc_smash_unused_vtentry_relocs): Likewise. - (elf_gc_record_vtentry): Handle as-yet undefined vtables. Set and - update vtable_entries_size appropriately. - -Tue Nov 17 15:28:31 1998 Nick Clifton + * bfd-in2.h: Regenerate. - * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold - reloc number. + * elf.c (copy_private_bfd_data): Reorganise section to segment + mapping to cope with moved sections requiring new segments, + and overlapping segments. + (SEGMENT_END): New macro: Return the end address of a segment. + (IS_CONTAINED_BY_VMA): New macro: Determine if a segment + contains a section by comparing their VMA addresses. + (IS_CONTAINED_BY_LMA): New macro: Determine if a segment + contains a section by comparing their LMA addresses. + (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a + section should be included in a segment. + (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment + follows another in memory. + (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two + segments overlap. + +2000-07-22 Jason Eckhardt + + * cpu-i860.c: Added comments. + + * elf32-i860.c (TARGET_LITTLE_SYM): Defined to + bfd_elf32_i860_little_vec. + (TARGET_LITTLE_NAME): Defined to "elf32-i860-little". + (ELF_MAXPAGESIZE): Changed to 4096. + + * targets.c (bfd_elf32_i860_little_vec): Declaration of + new target. + (bfd_target_vector): Added bfd_elf32_i860_little_vec. + + * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added + config for little endian elf32 i860. + (targ_defvec): Define for the new config above + as "bfd_elf32_i860_little_vec". + (targ_selvecs): Define for the new config above + as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec" + + * configure.in (bfd_elf32_i860_little_vec): Added recognition + of new target vec. -Mon Nov 16 22:19:21 1998 DJ Delorie + * configure: Regenerated. - * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY - bfds; they have no "file" so we fake it. - * bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen) - * libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by - resizing the memory buffer. - * opncls.c (bfd_make_writable): New function; lets you write a - bfd_create'd bfd to an in-memory buffer. - (bfd_make_readable): New function; lets you read back that buffer - as if it were from bfd_openr. Used to build generated archive - members (winsup's ld's dlltool) +2000-07-27 H.J. Lu -Mon Nov 16 19:15:19 1998 Dave Brolley + * elflink.h (elf_merge_symbol): Take one more argument, + dt_needed, to indicate if the symbol comes from a DT_NEEDED + entry. Don't overide the existing weak definition if dt_needed + is true. + (elf_link_add_object_symbols): Pass dt_needed to + elf_merge_symbol (). - * po/bfd.pot: Regenerated. +2000-07-27 Nick Clifton -Mon Nov 16 10:57:06 1998 Nick Clifton + * elflink.h (elf_link_size_reloc_section): Zeroes the section's + allocated contents. - * elf32-v850.c (hi16s_location): Replaced fixed size array with - linked list. +2000-07-25 Geoffrey Keating -Sun Nov 15 20:28:25 1998 Richard Henderson + * configure.host (*-*-aix*): AIX has 'long long' always. - * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper - element of the gotentry list for local symbols too. - (elf64_alpha_relocate_section): Unify local and global handling. - Assert that gotent->use_count > 0. + * coff-rs6000.c (xcoff_write_one_armap_big): New procedure. + (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps. + (xcoff_write_archive_contents_big): Don't update the offset + of the symbol table, xcoff_write_armap will do it. -Sat Nov 14 15:16:01 1998 Ian Lance Taylor +2000-07-23 Ulf Carlsson - * configure.in (vms_alpha_vec): Rename from evax_alpha_vec, and - update for file name changes of July 2, 1998. - (vms_vax_vec): New. - * configure: Rebuild. + * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead + of dynobj for SGI_COMPAT checks. -Thu Nov 12 19:19:54 1998 Dave Brolley +2000-07-21 Michael Sokolov - * po/bfd.pot: Regenerated. + * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function. + * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration. + * bfd-in2.h: Regenerate. -Tue Nov 10 16:17:06 1998 Geoffrey Noer +2000-07-21 Nick Clifton - * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*. - * aclocal.m4, configure: regenerate + * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of + range symbol indices in relocs and issue an error message. -Tue Nov 10 15:13:59 1998 Nick Clifton +2000-07-20 H.J. Lu - * elf.c (prep_headers): Add support for bfd_arch_fr30. + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check + info->new_dtags when setting DT_FLAGS_1. It will only be set + by the new linker options. It shouldn't break anything. -Tue Nov 10 13:37:36 1998 Felix Lee +2000-07-20 H.J. Lu - * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE, - BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): didn't define macro when value - was cached. - * aclocal.m4, configure: regenerated. + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1 + only if info->new_dtags is true. -Tue Nov 10 14:31:01 1998 Catherine Moore +2000-07-20 H.J. Lu - * elf32-d10v.c (reloc_type): Add R_D10V_GNU_VTINHERIT and - R_D10V_GNU_VTENTRY relocs. - (elf_d10v_howto_table): Likewise. - (d10v_reloc_map d10v_reloc_map): Likewise. - (elf32_d10v_gc_mark_hook): New. - (elf32_d10v_gc_sweep_hook): New. - (elf32_d10v_check_relocs): New. - (elf32_d10v_relocate_section): New. - (elf_backend_relocate_section): Define. - (elf_backend_can_gc_sections): Define. + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set + DT_RUNPATH and DT_FLAGS only if info->new_dtags is true. -Sat Nov 7 18:07:51 1998 Peter Schauer +2000-07-20 Hans-Peter Nilsson - * Makefile.am (BFD32_BACKENDS): Move vms files here... - (BFD64_BACKENDS): ...from here. - (BFD32_BACKENDS_CFILES): Move vms files here... - (BFD64_BACKENDS_CFILES): ...from here. + * Makefile.am (ALL_MACHINES): Add cpu-cris.lo. + (ALL_MACHINES_CFILES): Add cpu-cris.c. + (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo. + (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c. + (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules. * Makefile.in: Rebuild. - -Wed Nov 4 15:58:48 1998 Nick Clifton - - * Makefile.am: Add FR30 target. - * Makefile.in: Add FR30 target. - * archures.c: Add support for FR30. - * config.bfd: Add support for FR30. - * configure.in: Add support for FR30. - * reloc.c: Add support for FR30 relocations. - * targets.c: Add support for FR30 relocations. - * bfd-in2.h: Regenerate. - * configure: Regenerate. - * libbfd.h: Regenerate. - * cpu-fr30.c: New file. - * elf32-fr30.c: New file. - -Mon Nov 2 14:59:33 1998 Geoffrey Noer - - * configure.in: detect cygwin* instead of cygwin32* - * configure: regenerate - -Sun Nov 1 19:32:28 1998 Jeffrey A Law (law@cygnus.com) - - * elf-m10300.c (mn10300_elf_relax_section): Do not use alloca, - use bfd_malloc and free instead and check return value from bfd_malloc. - -Sun Nov 1 16:20:35 1998 Ian Lance Taylor - - * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare. + * aclocal.m4: Rebuild. + * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris. + * archures.c (enum bfd_architecture): Add bfd_arch_cris. + (bfd_cris_arch): Declare. + (bfd_archures_list): Add bfd_cris_arch. + * bfd-in2.h: Rebuild. + * config.bfd: (cris-*-*): New target. + * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors. + * configure: Rebuild. + * elf.c (prep_headers): Add bfd_arch_cris. * libbfd.h: Rebuild. + * libaout.h (enum machine_type): Add M_CRIS. + * reloc.c: Add CRIS relocations. + * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare. + (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec. + * cpu-cris.c, aout-cris.c, elf32-cris.c: New files. + * po/POTFILES.in, po/bfd.pot: Regenerate. + +2000-07-19 H.J. Lu + + * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set + DF_TEXTREL if DT_TEXTREL is set. + * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise. + * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise. + * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. + * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise. + * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. + * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise. + * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. + * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise. + * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise. + * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise. - * elf32-mips.c (mips_elf_dynsym_sec_names): Comment out. - (SIZEOF_MIPS_DYNSYM_SECNAMES): Likewise. - (MIPS_TEXT_DYNSYM_SECN): Likewise. - (_bfd_mips_elf_fake_sections): Don't set sh_info field of a .hash - section. - (struct mips_elf_link_hash_table): Remove dynsym_sec_strindex - field. - (mips_elf_link_hash_table_create): Don't initialize - dynsym_sec_strindex. - (mips_elf_gc_mark_hook): Add default case to avoid warning. - (mips_elf_size_dynamic_sections): Generate a section symbol for - every output section. - (mips_elf_finish_dynamic_sections): Count all sections for - DT_MIPS_UNREFEXTNO. - (mips_elf_finish_dynamic_sections): Use dynamic symbols for all - output sections. - -Sun Nov 1 12:46:53 1998 Geoff Keating - - * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Allocate two slots - for later PLT entries in large PLTs. - (ppc_elf_finish_dynamic_symbol): Allow for the extra slots. - -Sat Oct 31 20:10:09 1998 Jeffrey A Law (law@cygnus.com) - - * elf32-ppc.c (ppc_elf_reload_section): Fix typo. - -1998-10-26 15:58 Ulrich Drepper - - * elf-bfd.h (struct elf_link_hash_entry): Add new field elf_hash_value. - * elflink.h (elf_collect_hash_codes): New function. This function is - called for each exported symbol and we compute the ELF hash value for - it. - (compute_bucket_value): New function. It is called from - size_dynamic_sections to determine the hash table size. When we are - optimizing a better, but slower, algorithm is used. - (size_dynamic_sections): Call compute_bucket_value. - - * elf.c (bfd_elf_hash): Optimize the hash function a bit. - -Mon Oct 19 20:03:21 1998 Catherine Moore - - * elf32-sh.c: Add HOWTO entries for R_SH_GNU_VTINHERIT and - R_SH_GNU_VTENTRY. - (sh_elf_gc_mark_hook): New. - (sh_elf_gc_sweep_hook): New. - (sh_elf_check_relocs): New. - (elf_backend_can_gc_sections): Define. - -Mon Oct 19 16:57:05 1998 Felix Lee - - * acinclude.m4: undo previous gettext change - * aclocal.m4: rebuild with right version of aclocal. - -Mon Oct 19 01:47:21 1998 Felix Lee - - * acinclude.m4, aclocal.m4: move gettext-related fragments from - aclocal.m4 to acinclude.m4, so they don't get lost. - - * elfcore.h: rewrite for better corefile support. - * elf.c (elfcore_*): new functions. - * elf-bfd.h (elf_obj_tdata): new structure members. - * acconfig.h, acinclude.m4, configure.in: add feature-tests for - flavor of procfs. - * aclocal.m4, config.in, configure, Makefile.in: regenerated. - -Fri Oct 16 14:07:45 1998 Catherine Moore - - * elf32-m32r.c: Add HOWTO entries for R_M32R_GNU_VTINHERIT - and R_M32R_GNU_VTENTRY. - (elf_backend_can_gc_sections): Define. - (m32r_elf_check_relocs): New. - (m32r_elf_gc_mark_hook): New. - (m32r_elf_gc_sweep_hook): New. - (m32r_elf_relocate_section): Handle VT relocs. - -Mon Oct 12 14:18:40 1998 Nick Clifton - - * coff-arm.c (arm_relocate_section): Remove redundant test. - - * bfd-in2.h (struct reloc_howto_struct): Improve comment to make - cleat that the 'bitsize' field is the size of the bitfield AFTER - relocation not before. - - * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield. - - * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo - relocs. - -Tue Oct 6 09:20:44 1998 Catherine Moore - - * elf32-sparc.c: Add HOWTO entries for R_SPARC_GNU_VTINHERIT and - R_SPARC_GNU_VTENTRY. - (elf32_sparc_check_relocs): Handle them. - (elf32_sparc_reloc_type_lookup): Likewise. - (elf32_sparc_relocate_section): Likewise. - (elf32_sparc_gc_mark_hook): New. - (elf32_sparc_gc_sweep_hook): New. - -Mon Oct 5 14:55:30 1998 Jeffrey A Law (law@cygnus.com) - - * som.c (som_finish_writing): Perform some sanity checks when - writing an executable or shared library. - -Mon Oct 5 12:02:31 1998 Gavin Romig-Koch - - * dwarf1.c : New file. Adds _bfd_dwarf1_find_nearest_line. - * configure.in (elf): Add dwarf1.lo. - * elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info. - * elf.c (_bfd_elf_find_nearest_line): Add call to - _bfd_dwarf1_find_nearest_line. - * elf32-mips.c (_bfd_mips_elf_find_nearest_line): - Add call to _bfd_dwarf1_find_nearest_line. - * configure: Rebuilt. - -Mon Oct 5 10:06:22 1998 Catherine Moore - - * elflink.h (elf_gc_sections): Do not allow garbage - collection if dynamic sections have been created. - -Mon Oct 5 09:07:37 1998 Catherine Moore - - * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and - R_V850_GNU_VTENTRY. - (v850_elf_check_relocs): Handle VTINHERIT and VTENTRY relocs. - (v850_elf_perform_relocation): Likewise. - (v850_elf_final_link_relocate): Likewise. - (v850_elf_relocate_section): Likewise. - (v850_elf_gc_sweep_hook): New routine. - (v850_elf_gc_mark_hook): New routine. - (elf_backend_can_gc_sections): Define. - -Mon Oct 5 09:04:25 1998 Catherine Moore - - * elf32-m68k.c (elf_m68k_gc_sweep_hook): Don't assume - that dynobj exists. - -Sun Oct 4 23:29:34 1998 David Edelsohn - - * rs6000-core.c (rs6000coff_core_file_matches_executable_p): - Declare size as bfd_size_type. - (rs6000coff_get_section_contents): Declare count as bfd_size_type. - -Sun Oct 4 20:38:29 1998 Jeffrey A Law (law@cygnus.com) - - * cpu-hppa.c (bfd_hppa20_arch): Define. Link it into the bfd_hppa_arch - structure. - * som.c (CPU_PA_RISC2_0): Define. - (_PA_RISC2_0_ID): Likewise. - (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed. - -Sun Oct 4 21:19:09 1998 Ian Lance Taylor - - * elflink.h (elf_link_add_object_symbols): When a versioned symbol - has a base which is already defined, only add the referenced - symbol to the dynamic symbol table if it is defined or referenced - by a regular file. - - * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs - correctly. - -1998-09-27 Andreas Schwab - - * elflink.h (elf_link_add_object_symbols): Undo last change. - -Wed Sep 23 16:09:31 1998 Richard Henderson - - * elflink.h (elf_link_add_object_symbols): Don't record a dynamic - symbol for the indirect alias to a versioned symbol. - -Mon Sep 21 12:15:22 1998 Catherine Moore - - * elf32-i386.c (elf32_i386_vtinherit_howto): New. - (elf32_i386_vtentry_howto): New. - (elf_i386_reloc_type_lookup): Return elf32_i386_vtentry_howto - or elf32_i386_vtinherit_howto on lookup. - -Sun Sep 20 00:48:07 1998 Andreas Schwab - - * elf32-m68k.c: Include "elf/m68k.h". Remove definition of enum - reloc_type. Rename R_68K__max to R_68K_max. - (howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY - reloc. - -Sun Sep 20 00:09:25 1998 Chris Torek - - * libbfd.c (bfd_getb32): Rewrite expression to get better code. - (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise. - - * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not - after. - -Sat Sep 19 22:42:23 1998 Doug Rabson - - * elflink.h (elf_link_add_object_symbols): Ensure that the warning - message has a null byte terminator. - -Fri Sep 18 14:35:29 1998 Nick Clifton - - * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of - word subject to R_V850_32 relocation. - -Thu Sep 17 17:20:36 1998 Nick Clifton - - * dwarf2.c: Add comment describing problem computing line numbers - for undefined symbols at link time. - -Thu Sep 17 16:03:28 1998 Richard Henderson - - * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't - transform a defweak into a plt entry. - (elf64_alpha_calc_dynrel_sizes): Allow room for secondary - plt entry references to receive a RELATIVE reloc. - (elf64_alpha_finish_dynamic_symbol): Fill them in. - (elf64_alpha_relocate_section): Assert we don't overrun - the allocated relocation space. - -Wed Sep 16 18:03:13 1998 Nick Clifton - - * elf.c (swap_out_syms): Always treat section symbols as - special, even if they are attached to a common section. - -Wed Sep 16 10:34:13 1998 Nick Clifton - - * elf32-v850.c (v850_elf_symbol_processing): Move symbols in - sections with v850 common section attributes into named v850 - common sections. - (v850_elf_add_symbol_hook): Move symbols in sections with v850 - common section attributes into named v850 common sections. + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also + set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if + DT_RPATH is set. + Set the DT_FLAGS and DT_FLAGS_1 entries if necessary. -Wed Sep 16 11:26:49 CDT 1998 Catherine Moore +2000-07-19 H.J. Lu - * elf32-arm.c (elf32_arm_gc_mark_hook): Remove print - statement. + * bfd-in.h (bfd_elf_set_dt_needed_soname): New. + * bfd-in2.h: Rebuild. -1998-09-15 Geoff Keating + * elf-bfd.h (elf_obj_tdata): Add dt_soname. + (elf_dt_soname): New. - * elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset - part of Vladimir's change of 1998-08-19. Make a R_PPC_SDAREL16 - reloc to the wrong section a warning, not an error. .dynsbss - is not an output section, so there is no need to check for it. + * elf.c (bfd_elf_set_dt_needed_soname): New. -Tue Sep 15 12:40:05 1998 Catherine Moore + * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED + entry if the shared object loaded by DT_NEEDED is used to + resolve the reference in a regular object. - * elf-bfd.h: Add argument to elf_backend_get_symbol_type. +2000-07-19 H.J. Lu -Tue Sep 15 08:34:40 1998 Catherine Moore + * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG, + DT_DEPAUDIT and DT_AUDIT as strings. - * elf.c (swap_out_syms): Pass type to elf_backend_get_symbol_type. - * elf32-arm.c: Add HOWTO entries for R_ARM_GNU_VTINHERIT and - R_ARM_GNU_VTENTRY. - (elf32_arm_gc_mark_hook): New. - (elf32_arm_gc_sweep_hook): New. - (elf32_arm_check_relocs): New. - (elf32_arm_final_link_relocate): Handle VTINHERIT and VTENTRY - relocations. - (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY - relocations. +2000-07-19 Nick Clifton -1998-09-10 Geoff Keating + * format.c: Fix formatting. - * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL, - assume there is no PLT or GOT. +2000-07-19 H.J. Lu -Wed Sep 9 14:24:12 1998 Nick Clifton + * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM. - * elf32-arm.c (elf32_arm_find_nearest_line): New function: just - like _elf_bfd_find_nearest_line() except that STT_ARM_TFUNC is - also accepted as a function symbol type. +2000-07-19 H.J. Lu -Mon Sep 7 13:24:03 1998 Peter Schauer + * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW, + DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ, + DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ, + DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1, + DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT, + DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT, + DT_FLAGS_1, DT_USED and DT_CHECKSUM. - * rs6000-core.c (_LONG_LONG): Define for AIX 4.x only. +2000-07-18 Andrew Cagney -Sat Sep 5 20:40:18 1998 Ian Lance Taylor + * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move + renamed functions from here... + (assign_section_numbers): Use renamed functions. + (prep_headers): Use renamed functions. - * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to - match definition of _bfd_gc_sections field. - * libbfd.h: Rebuild. + * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here. + * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update. + * bfd-in2.h: Regenerate. -Fri Sep 4 13:54:23 1998 David Miller +2000-07-18 Ulf Carlsson + + * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add + parenthesis in if statement. + +2000-07-17 Koundinya K + + Enable the support for Traditional MIPS. + * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand + return ict_none appropriately for traditional mips targets. + (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips. + (STUB_MOVE): Conditionalize for traditonal mips. + (STUB_LI16): Likewise. + (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making + room for RTPROC header. + (_bfd_mips_elf_modify_segment_map): For a normal mips executable set + the permission for the PT_DYNAMIC as read, write and execute. + (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING + for traditonal mips. + (_bfd_mips_elf_create_dynamic_sections): Add the symbol + _DYNAMIC_LINKING for traditonal mips. + (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP + in case of traditonal mips. + (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT + entry is required. For a function if PLT is not required then set the + corresponding hash table entry to 0. + (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for + traditonal mips. + (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a + shared object set the value to 0. + (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol + _DYNAMIC_LINKING for traditonal mips. + (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP + for traditonal mips. + +2000-07-15 H.J. Lu + + * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL. + +2000-07-12 Charles Wilson + + * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing + out a structure that is BFD_IN_MEMORY. + +2000-07-11 Alan Modra + + * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of + bfd pointer. Print section id instead of bfd pointer for local + syms. Prefix addend with `+' for global syms as well as local. + Correct calculation of name component lengths. + (elf64_hppa_check_relocs): Update call to get_dyn_name. + + From David Huggins-Daines + * elf-hppa.h (elf_hppa_relocate_section): Update calls here too. + * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings. + (elf64_hppa_modify_segment_map): Likewise. + +2000-07-11 Andrew Cagney + + * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA + addresses to be "naturally" sign extended. Return -1 if unknown. + * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration. + * bfd-in2.h: Regenerate. - * elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust - the addend of a dynamic relocation referencing a section. - * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset. +2000-07-11 Andrew Cagney + + * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32 + and ECOF_SIGNED_64 to list ways to extract an offset. + (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in, + ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out): + Update. + * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64. + * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32. + +2000-07-11 Andrew Cagney + + * elfcode.h (elf_object_p): Use bfd_set_start_address and not + bfd_get_start_address. + (elf_swap_ehdr_in): Sign extend e_entry when applicable. + (elf_swap_ehdr_out): Ditto. + +2000-07-10 Alexander Aganichev + + * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for + compatibility with older binutils. + +2000-07-10 Alan Modra + + * section.c (bfd_make_section_anyway): Start section_id at 0x10. + (STD_SECTION): Avoid negative ids, instead use 0 to 3. + + From Ryan Bradetich + * dwarf1.c (parse_die): Cure signed/unsigned char warnings. + (parse_line_table): Ditto. + (_bfd_dwarf1_find_nearest_line): Ditto. + * syms.c (cmpindexentry): Remove extra `*' from params. + +2000-07-09 Koundinya K + + * elf32-mips.c (sort_dynamic_relocs): New Function. + (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs + via qsort to sort the dynamic relocations in increasing r_symndx + value. + +2000-07-09 Alan Modra + + * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add + ATTRIBUTE_UNUSED to unused args. + (get_opd): Likewise. + (get_plt): Likewise. + (get_dlt): Likewise. + (get_stub): Likewise. + (elf64_hppa_adjust_dynamic_symbol): Likewise. + (elf64_hppa_link_output_symbol_hook): Likewise. + (elf64_hppa_check_relocs): Delete unused var. + (elf64_hppa_size_dynamic_sections): Likewise. + (elf64_hppa_finalize_opd): Likewise. + (elf64_hppa_finalize_dynreloc): Likewise. + (elf64_hppa_modify_segment_map): Likewise. + (elf64_hppa_finish_dynamic_sections): Likewise. + + * elf-hppa.h (elf_hppa_final_write_processing): Add + ATTRIBUTE_UNUSED to unused args. + (elf_hppa_final_link_relocate): Likewise. + (elf_hppa_record_segment_addrs): Add paretheses. + (elf_hppa_relocate_section): Constify dyn_name. + + From David Huggins-Daines + * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and + rearrange case statement so that it gets preferred to 32-bit ones. + + * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use + asection->id instead of address of asection structure. + (elf32_hppa_size_stubs): Likewise. + + * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section + for .init* and .fini*. + + * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers + and addends used in stub names to 32 bits. + (elf32_hppa_size_stubs): Likewise. + + * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend + twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32, + not bfd_put_64. Fix minor comment typo and formatting. + + Changes to create multiple linker stubs, positioned immediately + before the section where they are required. + * elf32-hppa.c: Don't include hppa_stubs.h. + (elf32_hppa_stub_hash_entry): Add a pointer to the stub section. + (elf32_hppa_stub_hash_table): Delete. + (elf32_hppa_link_hash_entry): Delete. + (elf32_hppa_link_hash_table): Use plain bfd_hash_table for + stub_hash_table, and store the struct here rather than a pointer. + Delete output_symbol_count. Add offset array. Change + global_value to a bfd_vma. + (elf32_hppa_stub_hash_lookup): Use table instead of table->root. + (elf32_hppa_stub_hash_traverse): Delete. + (elf32_hppa_name_of_stub): Delete. + (elf32_hppa_link_hash_lookup): Delete. + (elf32_hppa_link_hash_traverse): Delete. + (elf32_hppa_stub_hash_table_init): Delete. + (elf32_hppa_size_of_stub): Pass input section and offset rather + than location and calculate location here. Don't pass name as all + stubs are now the same size. + (elf32_hppa_stub_hash_newfunc): Init new fields. + (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table + too. + (elf32_hppa_bfd_final_link_relocate): Cast enums to int before + comparing against ints. Rewrite stub handling code. + (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned. + Case enums to int before comparing against ints. Remove + bfd_reloc_dangerous case. + (elf32_hppa_build_one_stub): Rewrite. + (elf32_hppa_size_one_stub): New function. + (elf32_hppa_build_stubs): Rewrite. + (elf32_hppa_size_stubs): Pass in linker call-back functions. + Rewrite stub-handling specific code. + + * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype. + + * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo. + + * hppa_stubs.h: Delete. + * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h + (elf32-hppa.lo): Remove hppa_stubs.h from dependencies. + * Makefile.in: Regenerate. -Thu Sep 3 17:28:50 1998 Richard Henderson + * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and + e_nlrsel. + + * libhppa.h (hppa_field_adjust): Correct e_nsel case. + + * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset + and section name for bfd_reloc_notsupported error message. + (elf32_hppa_bfd_final_link_relocate): Print reasons for returning + bfd_reloc_notsupported. + (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd. + + * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle + undefined weak symbols for all relocs. + (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch + offsets are relative to one past the delay slot. + (elf32_hppa_size_stubs): Account for reloc addend when calculating + branch destination. Put addend into stub name too. + (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and + adjust by 8 when deciding whether a linker stub is needed. Put + addend into stub name as for above. + + * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on + various args and vars. + (elf32_hppa_bfd_final_link_relocate): Here too. + (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for + inner block var to avoid shadowing. + + * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg + unsigned. + * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto. + * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto. + (elf_hppa_fake_sections): Rename local var to avoid shadowing. + + * libhppa.h: Change practically all unsigned ints to plain ints. + Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for + prototypes. + + From Ryan Bradetich + * libhppa.h (hppa_opcode_type): New enum to replace #define's. + * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to + suit above. + From David Huggins-Daines + * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants + to the new OP_* ones. + + * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on + error exit. Bail out earlier on plabel relocs that we aren't + interested in. Don't tell elf32_hppa_stub_hash_lookup to copy + string, and then don't free our copy. + (elf32_hppa_build_one_stub): Make insn unsigned int. + + * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only + available with BL, not BE and BLE. + + * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example + code for elf arg relocs. + (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local + argument with elf_link_hash_entry h. Handle undefined weak + symbols. Move $global$ lookup from here... + (elf32_hppa_relocate_section): ...to here. Return correct error + message for non-handled relocs. + (elf32_hppa_size_of_stub): Correctly test branch range. Previous + wrong test was -0x3ffff to +0x40000. + + * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R, + R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches; + Handle them as such. + (elf_hppa_relocate_insn): Fix a typo. + + * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete. + (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a, + assemble_17, assemble_21): Delete. + Supply defines for all 64 possible opcodes. + (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode + formats. Handle COMICLR. + (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11, + -10, -16, 16, 22. + + * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite. + (elf32_hppa_bfd_final_link_relocate): Major rewrite. + (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls + to suit. + (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all + the local syms - did this code get deleted accidentally? Ignore + undefined and undefweak syms. + + * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost + block. Use it instead of elf64_hppa_hash_table (info). + (elf_hppa_final_link_relocate): Use hppa_info instead of + elf64_hppa_hash_table (info). + + * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16, + re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn. + (hppa_rebuild_insn): Mask immediate bits here instead. + * elf-hppa.h (elf_hppa_relocate_insn): Mask here too. + +2000-07-08 Alan Modra + + * section.c (struct sec): Add id field. Tidy comment formatting. + (bfd_make_section_anyway): Set id. + (STD_SECTION): Init id too. + Change CONST to const throughout. + * archures.c (bfd_arch_info): Tidy comment. + (bfd_arch_list): Change a CONST to const. + * libbfd-in.h: Tidy comments and replace CONST with const. + * elf-bfd.h: Likewise. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + * libcoff.h: Regenerate. - * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the - bed has a size_dynamic_sections routine before trying to use it. +2000-07-07 DJ Delorie -Mon Aug 31 14:49:22 1998 Richard Henderson + * archive.c (_bfd_write_archive_contents): Add an informative + comment. - * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use - _bfd_elf_rel_vtable_reloc_fn. +2000-07-06 Kazu Hirata -Mon Aug 31 10:23:40 1998 Catherine Moore + * srec.c: Fix formatting. - * Makefile.am: Add elf32-arm.c. - * Makefile.in: Rebuild. - * elf-bfd.h: Add elf_backend_get_symbol_type. - * elf.c (swap_out_syms): If defined, call - elf_backend_get_symbol_type. - * elf32-arm.c: Define elf_backend_get_symbol_type. - (elf32_arm_get_symbol-type): New routine. - (record_thumb_to_arm_glue): Change to use STT_ARM_TFUNC. - (bfd_elf32_arm_process_before_allocation): Change to - check for STT_ARM_TFUNC. - (elf32_arm_final_link_relocate): Likewise. - * elfxx-target.h: Add elf_backend_get_symbol_type. +2000-06-05 DJ Delorie -Fri Aug 28 19:44:07 1998 Richard Henderson + * MAINTAINERS: new - * archures.c (bfd_mach_alpha_ev[456]): New. - * cpu-alpha.c: Rework to match these types. - * bfd-in2.h: Rebuild. +2000-07-04 Alexandre Oliva -Fri Aug 28 19:38:53 1998 Richard Henderson + * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol + value of PC-relative offsets. - * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare. - * elf.c (_bfd_elf_rel_vtable_reloc_fn): New. +2000-07-03 Jim Wilson - * elf32-i386.c (elf_howto_table): Add vtable relocs. - (elf_i386_reloc_type_lookup): Recognize them. - (elf_i386_check_relocs): Pass them off to generic code. - (elf_i386_relocate_section): Ignore them. - (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New. - (elf_backend_can_gc_sections): True. + * elf64-alpha.c (alpha_elf_size_info): New. + (elf_backend_size_info): Define to alpha_elf_size_info. + * elfcode.h (elf_size_info): Change hash bucket size to 4. -Thu Aug 20 15:03:45 1998 Nick Clifton +2000-07-03 Ulf Carlsson - * elf32-arm.c (elf32_thumb_to_arm_stub): Check sym_sec is not NULL - before looking at owner field. - (elf32_arm_to_thumb_stub): Ditto. - (elf32_arm_relocate_section): Compute name before calling - elf32_arm_final_link_relocate(). + * elf32-mips.c: Include elf32-target.h again for the traditional + MIPS targets. -Thu Aug 20 11:30:17 1998 Michael Snyder +2000-07-03 Marek Michalkiewicz - * elf.c: comment and formatting cleanups. - * elfcore.h: ditto. + * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup): + Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings. + (avr_info_to_howto_rela): Likewise. + (elf32_avr_gc_mark_hook): Likewise. + (elf32_avr_gc_sweep_hook): Likewise. + (elf32_avr_relocate_section): Likewise. -Wed Aug 19 15:43:26 1998 Michael Snyder +2000-07-03 Mark Elbrecht - * elfcode.h (elf_object_p): Reject files of header type ET_CORE - (core files are treated differently than object files). - * elf-bfd.h (_bfd_elf_write_corefile_contents, - bfd_elf_mkcorefile): declare. - * elfxx-target.h (_bfd_elf_write_corefile_contents, - bfd_elf_mkcorefile): add to bfd_target vector. - * elfcore.h (elf_core_file_p): save the program header table, - and set the bfd architecture from the elf file header. - * elf.c (bfd_elf_mkcorefile): new function. - (_bfd_elf_write_corefile_contents): new function. - (assign_file_positions_for_segments): add cases for handling - PT_NOTE segments. (assign_file_positions_except_relocs): - core files should be handled the same as exec files. - (prep_headers): identify core files as type ET_CORE. - (copy_private_bfd_data): identify the sections belonging to - the PT_NOTE segment. + * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into + an external symbol for a non-shared, non-relocatable link. - * elf32-sparc.c (elf32_sparc_final_write_processing): - add break statement to default case. +2000-07-03 Nick Clifton -1998-08-19 Vladimir N. Makarov + * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol + is an external symbol. + (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak + external symbol. - * elf32-ppc.c (ppc_elf_relocate_section): Check that output - section (not input) will be in sections ".sbss", ".sbss2", - ".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL, - R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA. In all these cases also ignore - output_offset for correct evaluation of addend. +2000-07-03 Kazu Hirata -Tue Aug 18 11:48:12 1998 Catherine Moore + * reloc16.c: Fix formatting. - * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking, - elf32_arm_allocate_interworking_sections and - elf32_arm_process_before_allocation. +2000-07-01 Koundinya K -Tue Aug 18 11:46:00 1998 Nick Clifton + * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4* + to add a new target for traditional mips i.e + bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec. + * configure.in: Likewise. + * configure: Rebuild. + * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in + bfd_target_vector. + (bfd_elf32_tradlittlemips_vec): Likewise. + * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test + to see that elfNN_bed does not get redefined even if the target file + is included twice for a chip. See elf32-mips.c. - * bfd-in.h: Ammend prototype for - elf32_arm_process_before_allocation to remove surplus third - argument. +2000-07-01 Alan Modra - * bfd-in2.h: Regenerate. + * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed + (CLEANFILES): Add DEPA. + * Makefile.in: Regenerate. -Sat Aug 15 20:55:08 1998 Richard Henderson +2000-06-30 DJ Delorie - * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols. + * peicode.h (coff_swap_filehdr_in): can't use e_magic because we + can't assume the PE header is at 0x80. -Fri Aug 14 09:12:28 1998 Stan Cox +2000-06-29 Mark Elbrecht - * aoutx.h (aout_link_input_section_ext): Use the relocation already - calculated for RELOC_SPARC_REV32 case. + * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH. -Thu Aug 13 14:02:02 1998 Catherine Moore +2000-06-28 Mark Elbrecht - * bfd-in.h: Add prototypes for elf32_arm_get_bfd_for_interworking, - elf32_arm_allocate_interworking_sections and - elf32_arm_process_before_allocation. - * bfd-in2.h: Regenerated. - * elf32-arm.c Define elf32_arm_link_hash_table. - (insert_thumb_branch): New routine. - (find_thumb_glue): New routine. - (find_arm_glue): New routine. - (record_arm_to_thumb_glue): New routine. - (record_thumb_to_arm_glue): New routine. - (elf32_arm_link_hash_table_create): New routine. - (elf32_arm_get_bfd_for_interworking): New routine. - (elf32_arm_allocate_interworking_sections) New routine. - (elf32_arm_process_before_allocation) New routine. - (elf32_thumb_to_arm_stub): New routine. - (elf32_arm_to_thumb_stub): New routine. - (elf32_print_private_bfd_data): Fix typo. - (elf32_arm_final_link_relocate): Add argument sym_sec. - Check for branches to thumb symbols in case R_ARM_PC24. - Check for branches to arm symbols in case R_ARM_THM_PC22. - (elf32_arm_relocate_section): Pass symbol section to - elf32_arm_final_link_relocate. + * go32stub.h: Update stub. -Wed Aug 12 19:00:39 1998 Geoff Keating +2000-06-26 Marek Michalkiewicz - * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT - entries unless the symbol is defined in the executable; in - particular, undefined weak symbols get a PLT entry. + * archures.c (bfd_mach_avr5): Define. + * bfd-in2.h (bfd_mach_avr5): Define. + * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to + bfd_mach_avr5, add bfd_mach_avr4. Update comments. + (compatible): Update comment. Add missing test. + * elf32-avr.c (avr_final_link_relocate): Support 8K wrap + for avr2 and avr4. Simplify 8K wrap code. + (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5. + (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5. -Wed Aug 12 14:48:33 1998 Ian Lance Taylor +2000-06-26 Kazu Hirata - * libaout.h: Remove nested comment to avoid warning. + * coff-h8300.c: Fix formatting. + * cpu-h8300.c: Likewise. -Wed Aug 12 08:10:11 1998 Catherine Moore +2000-06-24 Alexandre Oliva - * elf32-arm.c (elf32_arm_final_link_relocate): Rework - R_ARM_PC24 relocation. + * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)' + for local symbols whose names are unknown. -Tue Aug 11 14:42:26 1998 Catherine Moore +2000-06-22 Alan Modra - * elf32-arm.c (elf32_arm_final_link_relocate): Remove unused - argument is_local. Add argument sym_flags. Check sym_flags - in R_ARM_ABS32 case. Include addend for R_ARM_THM_PC22 case. - (elf32_arm_relocate_section): Don't pass local sym and pass - sym_flags to elf32_arm_final_link_relocate. + * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we + find one. + * Makefile.in: Regenerate. + * doc/Makefile.in: Regenerate. -Mon Aug 10 20:38:39 1998 Richard Henderson +2000-06-20 H.J. Lu - * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change - to not count too few relocs for dynamicly linked executables. + * Makefile.am: Rebuild dependency. + * Makefile.in: Rebuild. -Mon Aug 10 15:35:34 1998 Richard Henderson +2000-06-20 Maciej W. Rozycki - * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Never consider - symbols without a dynamic index dynamic. Consider all weak - symbols dynamic. - (elf64_alpha_strip_section_from_output): Don't assume 1-1 - correspondance between input and output sections. + * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function. + (elf_backend_copy_indirect_symbol): Map to the new function. -Mon Aug 10 15:31:39 1998 Andreas Schwab +2000-06-20 Alan Modra - * elflink.h (elf_gc_common_finalize_got_offsets): For backends - that use a .got.plt section start the got offset at zero. + * archive.c (normalize): Correct pointer comparison when checking + for backslashes. + (bfd_bsd_truncate_arname): Likewise. + (bfd_gnu_truncate_arname): Likewise. -Mon Aug 10 17:31:21 1998 Ian Lance Taylor +2000-06-20 Ulf Carlsson - * ieee.c (ieee_write_processor): Correct the processor ID written - out for bfd_arch_m68k, accommodating change of March 25. + * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual + sections elf_{text,data}_{section,symbol}. + * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove. + (_bfd_mips_elf_hide_symbol): New function. + (elf_backend_hide_symbol): Map to the new function. + (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD + definitions of mips_elf_{text,data}_{section,symbol}. + (mips_elf_local_relocation_p): Try to find the direct symbol + based on new check_forced argument. + (mips_elf_calculate_relocation): Use new version of + mips_elf_local_relocation_p. + (mips_elf_relocate_section): Likewise. + (_bfd_mips_elf_relocate_section): Likewise. + (mips_elf_sort_hash_table): Only assert that have enough GOT + space. + (mips_elf_got16_entry): Match all 32 bits to the existing GOT + entry if the relocation based on the new external argument. + (mips_elf_create_dynamic_relocation): Assert that we have a + section contents allocated where we can swap out the dynamic + relocations. + (mips_elf_calculate_relocation): Find the real hash-table entry + correctly by using h->root.root.type. Only create a dynamic + relocation entry if the symbol is defined in a shared library. + Create an external GOT entry for the GOT16 relocation if the + symbol was forced local. + (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a + dynamic index if the symbol was forced local. + +2000-06-20 Maciej W. Rozycki + + * elf32-mips.c: Fix typos in comments. + +2000-06-19 Mark Kettenis + + * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef + CORE_VERSION_1. + +2000-06-18 Stephane Carrez + + * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild. + * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS, + BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files. + * configure.in (bfd_elf32_m68hc12_vec): Recognize. + (bfd_elf32_m68hc11_vec): Likewise. + * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11. + Supports 68hc11 & 68hc12 at the same time. + * targets.c (bfd_elf32_m68hc12_vec): Declare and put in + bfd_target_vector. + (bfd_elf32_m68hc11_vec): Likewise. + * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11. + * archures.c (bfd_m68hc12_arch): Define and register in global list + (bfd_m68hc11_arch): Likewise. + * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8, + BFD_RELOC_M68HC11_3B): Define. + * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support. + * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support. + +2000-06-18 Ulf Carlsson + + * elf_bfd.h (struct elf_backend_data): Add info argument to + elf_backend_hide_symbol. + (_bfd_elf_link_hash_hide_symbol): Likewise. + * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise. + * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise. + * elflink.h (elf_link_add_object_symbols): Likewise. + (elf_link_assign_sym_version): Likewise. -Sun Aug 9 20:55:44 1998 Catherine Moore +2000-06-18 H.J. Lu - * elf32-arm.c (elf32_arm_final_link_relocate): Rework - R_ARM_THM_RPC22 relocations. + * coff-i386.c (coff_i386_reloc): Don't return in case of + output_bfd == (bfd *) NULL if COFF_WITH_PE is defined. + Compensate PE relocations when linking with non-PE object + files to generate a non-PE executable. -Sat Aug 8 15:15:30 1998 Richard Henderson +2000-06-17 Ulf Carlsson - * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols - are always dynamic. - (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE - .got relocs in -Bsymbolic shared objects. + * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write + GOT entries if we're doing a static link or -Bsymbolic link. -Wed Aug 5 15:48:08 1998 Nick Clifton +2000-06-15 Ulf Carlsson - * elf32-arm.c: Add private flags to ELF header. - (elf32_arm_print_private_bfd_data): New Function. - (elf32_arm_set_private_flags): New Function. - (elf32_arm_copy_private_flags): New Function. - (elf32_arm_merge_private_bfd_data): New Function. + * elflink.h (elf_link_adjust_relocs): Check for and call backend + specifific swap_reloc_{in,out} and swap_reloca_{in,out} if + available. + (elf_link_output_relocs): Likewise. + (elf_reloc_link_order): Likewise. -Mon Aug 3 17:10:15 1998 Ian Lance Taylor +2000-06-16 Nicholas Duffek - * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against - a local symbol. - (elf32_sparc_relocate_section): Likewise. + * archures.c (enum bfd_architecture): #define constants for + PowerPc and RS6000 machine numbers. + * bfd-in2.h: Regenerate. + * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch + to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc + and RS6000 machine numbers using #defined constants from + archures.c. + * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000 + machine numbers using #defined constants from archures.c. Add + entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify + 64-bit words in 620 entry. + * cpu-rs6000.c (arch_info_struct): Create with entries for RS1, + RSC, and RS2. + (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k). + +2000-06-16 Nicholas Duffek + + * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64. + * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field. + * libcoff.h (struct xcoff_tdata): Define xcoff64 field. + +2000-06-16 Nicholas Duffek + + * bfd-in.h (bfd_family_coff): Define. + * bfd-in2.h: Regenerate. + * coffgen.c (coff_count_linenumbers, coff_symbol_from, + coff_find_nearest_line): Check COFFness using bfd_family_coff() + instead of bfd_target_coff_flavour. + * cofflink.c (_bfd_coff_final_link): Likewise. + * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to + exclude XCOFF files. + * reloc.c (bfd_perform_relocation, bfd_install_relocation): + Likewise. + * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour. + * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour. + * xcofflink.c (XCOFF_XVECP): Delete. + (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol, + bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc, + bfd_xcoff_record_link_assignment, + bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with + check for bfd_target_xcoff_flavour. -Sun Aug 2 03:19:23 1998 Richard Henderson +2000-06-16 Nicholas Duffek - * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL. Create the - .got if any relocation referrs to _GLOBAL_OFFSET_TABLE_. - (ppc_elf_relocate_section): Pull sgot and splt search to the start - of the function. Recognize no .plt as static linking. + * rs6000-core.c: Support 64-bit core files, support pre-4.3 core + files on AIX 4.3. + (read_hdr): New function. + (rs6000coff_core_p): Store mstsave or __context64 struct instead + of trying to extract individual registers. Set abfd->arch_info + to match the architecture that created the core file. + (rs6000coff_get_section_contents): Delete. + * xcoff-target.h (rs6000coff_get_section_contents): Delete. -1998-08-01 Ulrich Drepper +2000-06-14 H.J. Lu - * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass - ".liblist" string through gettext. + * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec) + is NULL. -Fri Jul 31 16:38:14 1998 Catherine Moore +2000-06-13 H.J. Lu - * Makefile.am: Add support for elf32-arm.lo. - * Makefile.in: Rebuild. - * config.bfd (arm-*-elf): Define targ_defvec and targ_selvecs. - (thumb-*-elf): Define targ_defvec and targ_selvecs. - * configure.in: Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec. * configure: Regenerate. - * elf.c: (prep_headers): Support arch_type of EM_ARM. - * targets.c: Support new targets bfd_elf32_bigarm_vec and - bfd_target bfd_elf32_littlearm_vec. - * elf32-arm.c: New file. -Tue Jun 28 19:05:28 1998 Stan Cox +2000-06-13 J"orn Rennecke - * libaout.h (M_SPARCLITE_LE): New machine. - * sunos.c (MACHTYPE_OK): Add machine M_SPARCLITE_LE. - * aoutf1.h (sunos_set_arch_mach): Add machine M_SPARCLITE_LE. - (sunos_write_object_contents): Add machine bfd_mach_sparc_sparclite_le - * aoutx.h (howto_table_ext): Add relocation R_SPARC_REV32. - (NAME(aout,machine_type)) Add machine bfd_mach_sparc_sparclite_le - (aout_link_input_section_ext): Add RELOC_SPARC_REV32 support. - * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map, - elf32_sparc_relocate_section): Rename R_SPARC_32LE to be R_SPARC_REV32 - * libbfd.h (bfd_reloc_code_real_names): Rename BFD_RELOC_SPARC_32LE to - be BFD_RELOC_SPARC_REV32. - * reloc.c: Ditto. - * config.bfd (sparc86x-*-aout): New + * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of + armpei_little_vec. -Fri Jul 24 13:54:19 1998 Nick Clifton +2000-06-08 David O'Brien - * linker.c (_bfd_generic_final_link): Allocate NULL symbol before - actually mapping the output sections. + * configure.in (VERSION): Update to show this is the CVS mainline. -Fri Jul 24 11:24:29 1998 Jeffrey A Law (law@cygnus.com) +2000-06-07 Alan Modra + * elf32-d10v.c: Include elf/d10v.h + (enum reloc_type): Delete. + * elf32-d30v.c: Include elf/d30v.h + (enum reloc_type): Delete. - * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry. - (mn10300_elf_reloc_map): Similarly. - (mn10300_elf_final_link_relocate): Handle R_MN10300_24. - -Fri Jul 24 12:36:04 1998 Ian Lance Taylor + * Makefile.am: Run "make dep-am" to regenerate dependencies. + * Makefile.in: Regenerate. - * elf32-mips.c (elf_mips_howto_table): Add reloc types used on - Irix 6. - (bfd_elf32_bfd_reloc_type_lookup): Add default case. - * elf64-mips.c: Replace all uses of mips_elf64_reloc_type with - elf_mips_reloc_type defined in elf/mips.h. + * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs. + (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and + move HOWTOs into elf_howto_table. + (R_386_standard, R_386_ext_offset): Define. + (R_386_ext, R_386_vt_offset, R_386_vt): Define. + (elf_i386_reloc_type_lookup): Modify calculation of index into + elf_howto_table since we've removed the padding. + (elf_i386_info_to_howto_rel): Likewise. + (elf_i386_relocate_section): Likewise. -1998-07-24 Ulrich Drepper +2000-06-06 Michael Snyder - * elf64-mips.c: Remove reloc_type definition completely. It's now - in elf/mips.h. + * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t. -Thu Jul 23 13:33:19 1998 Doug Evans +2000-06-05 H.J. Lu - * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations - as they are defined in elf/mips.h now. + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag + an error when seeing an undefined symbol with hidden/internal + attribute. It is handled in *_relocate_section (). -Thu Jul 23 11:29:43 1998 Jeffrey A Law (law@cygnus.com) +2000-06-05 H.J. Lu + * elflink.h (elf_fix_symbol_flags): Follow the link for the + indirect symbol for the ELF_LINK_NON_ELF bit. + (elf_link_output_extsym): Don't output the indirect symbol even + if the ELF_LINK_NON_ELF bit is set. - * Re-add lost change: - * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field - "movm_stack_size". - (mn10300_elf_relax_section): Include stack space for register saves - in the imm8 field of a "call" instruction. - (compute_function_info): Determine how much stack is allocated by - the movm instruction. Fix typo. - (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size. +2000-06-01 J.T. Conklin -Thu Jul 23 11:38:05 1998 Ian Lance Taylor + * config.bfd (i[3456]86-*-netbsdelf*): New target. + (i[3456]86-*-netbsdaout*): New target. + (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs. + (i[3456]86-*-openbsd*): Likewise. - * elf32-sparc.c (elf_backend_got_header_size): Define as 4. - * elf64-sparc.c (elf_backend_got_header_size): Define as 8. +2000-05-30 Andrew Cagney -1998-07-22 Ulrich Drepper + * trad-core.c: From hpux-core.c, include or + when possible. - * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type. +2000-05-31 Nick Clifton -Wed Jul 22 16:27:18 1998 Nick Clifton + * opintl.h (_(String)): Explain why dgettext is used instead + of gettext. - * elf32-hppa.h: Let ELF header define the enum containing the - external reloc numbers. - * elf32-i386.h: Likewise. +2000-05-31 Ulrich Drepper -1998-07-22 14:57 Ulrich Drepper + * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version + definitions. We must not assume they are sorted in the file + according to their index numbers. - * elf-m10300.c: Let ELF header now define the macros to get the enum. - * elf32-mips.c: Likewise. - * elf32-ppc.c: Likewise. +2000-05-31 Alan Modra -Wed Jul 22 13:53:52 1998 Nick Clifton + * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field + selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and + R_PARISC_DIR17F are for absolute branches; Handle them as such. - * bfd-in2.h: Change type of 'class' parameter to 'unsigned int' in - bfd_coff_set_symbol_class(), in order to avoid K&R compatability - prblems. - * bfd-in.h: Regenerate. - * coffgen.c (bfd_coff_set_symbol_class): Change type of 'class' - parameter to 'unsigned int' to avoid K&R compatability problems. +2000-05-30 Nick Clifton -Wed Jul 22 16:43:24 1998 Ian Lance Taylor + * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB, + 80960CA, 80960MC as valid machine names. - * ieee.c (ieee_find_nearest_line): Change filename_ptr and - functionname_ptr to be const. Change line_ptr to be unsigned. +2000-05-30 H.J. Lu - * coffcode.h (coff_link_output_has_begun): Simplify handling when - macro is not defined. Change second parameter from bfd_link_info - to coff_final_link_info. Add prototype. - (coff_final_link_postscript): Simplify handling when macro is not - defined. Add prototype. + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the + visibility bits if the symbol is undefined. Correctly handle + weak undefined symbols with hidden and internal attributes. -1998-07-22 13:08 Ulrich Drepper + * elflink.h (elf_link_add_object_symbols): Always turn the + symbol into local if it has the hidden or internal attribute. - * elf-mn10300.c: Before include system specific ELF header define - START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS. - * elf32-mips.c: Likewise. - * elf32-ppc.c: Likewise. +2000-05-29 Philip Blundell -Wed Jul 22 13:46:51 1998 Ian Lance Taylor + * ppcboot.c: Add packed attribute if compiling with GCC. - * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c - temporary patch over to elf64-mips.c as well. +2000-05-29 Anatoly Vorobey -1998-07-21 Ulrich Drepper + * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal. - * elf32-mips.c (reloc_type): Temporarily disable definition of - standard relocation since they are now defined in elf/mips.h. +2000-05-26 Michael Snyder -Tue Jul 21 09:47:00 1998 Catherine Moore + * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus, + elfcore_grok_psinfo): Add code to allow debugging a 32-bit + corefile on a 64-bit (Sparc Solaris) host. Also clean up + a few old comments. - * elf-m10200.c (mn10200_elf_final_link_relocate): - Modify range test for case R_MN10200_8. +2000-05-26 Alan Modra - * elf-m10300.c (mn10300_elf_final_link_relocate): - Modify range test for case R_MN10300_8. + * Makefile.am: Update dependencies with "make dep-am" + * Makefile.in: Regenerate. -Mon Jul 20 18:50:54 1998 Richard Henderson + * sysdep.h (gettext, dgettext, dcgettext, textdomain, + bindtextdomain): Replace defines with those from intl/libgettext.h + to quieten gcc warnings. - * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size. - * elf32-i386.c (elf_backend_got_header_size): Define. - (elf_backend_plt_header_size): Define. - * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise. - * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise. - * elfxx-target.h: Provide a default of zero. - * elflink.c (_bfd_elf_create_got_section): Use got_header_size. - * elflink.h (elf_gc_common_finalize_got_offsets): Likewise. +2000-05-26 Eli Zaretskii - * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT - entry from an executable, even if the plt refcount goes to 0. + * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH. -Mon Jul 20 12:47:26 1998 Andreas Schwab + * archive.c (normalize, bfd_bsd_truncate_arname, + bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support + file names with backslashes. - * aoutx.h (NAME(aout,find_nearest_line)): Also remember the - directory name at the line number. + * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file + before opening it. - * elf.c (_bfd_elf_find_nearest_line): Also consider symbols - with an unspecified type. + * sysdep.h: Include filenames.h. -Wed Jul 15 11:20:01 1998 Ian Lance Taylor +2000-05-26 Alan Modra - * sunos.c: Add undef of valid to avoid problem on SunOS. + * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777. -Tue Jul 14 15:30:59 1998 Richard Henderson +2000-05-26 Jakub Jelinek - * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize. + * elf64-sparc.c (sparc64_elf_relax_section): New. + (sparc64_elf_relocate_section): Optimize tail call into branch always + if possible. + * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. + (elf32_sparc_relax_section): New. -Tue Jul 14 11:22:21 1998 Andreas Schwab +2000-05-26 Jakub Jelinek - * elf32-m68k.c (elf_m68k_check_relocs): Also reference count - R_68K_PCxx and R_68K_xx relocations. Make sure that - ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference. - (elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and - R_68K_xx relocations. - (elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol - that has no plt entry. - (elf_m68k_relocate_section): Ignore the plt offset in a static - link. - * elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for - an ignored symbol. - (elf_gc_common_finalize_got_offsets): Set the got offsets also in - a static link. + * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters. + Remove unusued variables. + (sparc64_elf_relocate_section): Change r_symndx type to unsigned long. + (sparc64_elf_merge_private_bfd_data): Fix shared library case from + previous fix, so that shared libs really don't influence targets + extension mask and memory model. - * elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc - types. - (howto_table, reloc_map): Add entries for them. - (elf_m68k_check_relocs): Handle them. Implement reference - counting for got and plt entries. - (elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions. - (elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt - symbols. - (rtype_to_howto_rel, elf_info_to_howto_rel): Delete. - (elf_m68k_relocate_section): Handle the new reloc types. - (bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook, - elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define. - * elflink.h (elf_link_add_object_symbols): When creating an - indirect reference for symbol versioning also copy the plt - offset. - (elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT - flag also reset the plt offset. - (elf_link_assign_sym_version): Likewise. - (elf_gc_common_finalize_got_offsets): Increment the got offset by - the size of the entry in bytes. - (elf_gc_allocate_got_offsets): Likewise. +2000-05-23 H.J. Lu -Tue Jul 14 11:18:14 1998 Ian Lance Taylor + * elf64-alpha.c (elf64_alpha_relocate_section): Check + h->root.other not h->other. + * elf32-mips.c (mips_elf_calculate_relocation): Likewise. - * elflink.h (elf_gc_sections): Return true rather than falling off - the bottom. + * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo. - * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not - xmalloc. +2000-05-23 H.J. Lu -Mon Jul 13 11:06:31 1998 Nick Clifton + * elf32-i386.c (elf_i386_relocate_section): Don't allow the + undefined symbol with the non-default visibility attributes. + * elf-hppa.h (elf_hppa_relocate_section): Likewise. + * elf32-arm.h (elf32_arm_relocate_section): Likewise. + * elf32-i370.c (i370_elf_relocate_section): Likewise. + * elf32-m68k.c (elf_m68k_relocate_section): Likewise. + * elf32-mcore.c (mcore_elf_relocate_section): Likewise. + * elf32-mips.c (mips_elf_calculate_relocation): Likewise. + * elf32-ppc.c (ppc_elf_relocate_section): Likewise. + * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. + * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. + * elf64-ia64.c (elf64_ia64_relocate_section): Likewise. + * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - * coff-arm.c: Supress definition of TARGET_UNDERSCORE and add a - comment describing when it should be enabled. - Changed definition of USER_LABEL_PREFIX to "", to fall into line - with GCC sources. +2000-05-22 Richard Henderson -Mon Jul 13 13:06:54 1998 Ian Lance Taylor + * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI, + PCREL22, PCREL64I. Zero size of special relocs. + (elf64_ia64_reloc_type_lookup): Likewise. + (USE_BRL, oor_brl, oor_ip): New. + (elf64_ia64_relax_section): New. + (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I. + (elf64_ia64_install_value): Likewise, plus PCREL21BI. + (elf64_ia64_relocate_section): Likewise. + (bfd_elf64_bfd_relax_section): New. + * reloc.c (BFD_RELOC_IA64_PCREL21BI): New. + (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New. + * bfd-in2.h, libbfd.h: Regenerate. - * ieee.c (ieee_slurp_external_symbols): Handle call optimization - information ATN records. +2000-05-22 Nick Clifton -Fri Jul 10 16:31:06 1998 Ian Lance Taylor + * configure.in : Add peigen.lo to MIPS PE targets. + * configure: Regenerate. - * ieee.c (ieee_slurp_external_symbols): Select an appropriate - section for an absolute symbol in a fully linked file. Based on - patch from Christian Holland . +2000-05-22 Momchil Velikov -Wed Jul 8 11:29:56 1998 Manfred Hollstein + * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess + only if it is known for both input and output bfds. Separate + error message strings as in some languages, it may be necessary + to change more than one place in the string to change between + 'big' and 'little'. - * coff-m88k.c (m88k_special_reloc): Don't lose the information - that a symbol is undefined. + * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline + endianess checks, call _bfd_generic_verify_endian_match() instead. -Tue Jul 7 21:47:02 1998 Jeffrey A Law (law@cygnus.com) + * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise. - * som.c (som_bfd_gc_sections): Define. + * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise. -Mon Jul 6 11:35:50 1998 Nick Clifton + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify + endianess before checking bfd flavours. - * coff-arm.c (aoutarm_std_reloc_howto): Do not complain about - overflows in ARM_26D patches, since they have already been - implmented. Patch submitted by Dr. R.J. Black +2000-05-22 H.J. Lu -Sat Jul 4 12:25:36 1998 Ian Lance Taylor + * elflink.h (elf_link_output_extsym): Clear the visibility + field for symbols not defined locally. - * coffcode.h (coff_write_object_contents): If we have any long - section names, call coff_write_symbols even if there are no - symbols. +2000-05-18 Alan Modra -Fri Jul 3 13:11:35 1998 Ian Lance Taylor - - * elf.c (copy_private_bfd_data): Only set phdr_included once for a - PT_LOAD segment, rather than only setting it once for the entire - file. - - * elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA, - rather than ignoring every phdr with a p_paddr of 0, ignore all - the phdrs if they all have a p_paddr of 0. - - * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr - section was discarded from the link. - -Fri Jul 3 14:39:05 1998 J"orn Rennecke - - * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number. - -Fri Jul 3 14:35:48 1998 J"orn Rennecke - - * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with - floating point operations. - -Thu Jul 2 18:37:25 1998 Ian Lance Taylor - - * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global - function symbols. - -Thu Jul 2 14:59:42 1998 Klaus Kaempf - - Merge of vax/vms (read-only) support - * configure.com: Support Vax target. - * makefile.vms: Support Vax target. - * vms.h: Renamed from evax.h, merged vax/vms (read-only) support. - * vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only) - support. - * vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only) - support. - * vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only) - support. - * vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only) - support. - * vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only) - support. - * libbfd.c (real_read): Use unbuffered read on VMS/Vax. - * targets.c (bfd_target_ovax_flavour): New flavour. - (vms_alpha_vec): Renamed from evax_alpha_vec. - (vms_vax_vec): New. - (target_vector): Update accordingly. - * config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not - evax_alpha_vec. - (vax*-*-*vms*): New target. - * Makefile.am: Update for renamed files. Rebuild dependencies. - * bfd-in2.h: Rebuild. - * configure.in, Makefile.in, aclocal.m4: Rebuild. - -Thu Jul 2 13:31:55 1998 Ian Lance Taylor - - Based on patch from Matt Semersky : - * linker.c (_bfd_generic_final_link): Force a trailing NULL - pointer on abfd->outsymbols. - (generic_add_output_symbol): Handle NULL sym parameter. - -Wed Jul 1 17:05:53 1998 Nick Clifton - - * elf.c (copy_private_bfd_data): Add support for changing VMA or - LMA of sections. - -Wed Jul 1 16:58:50 1998 Ian Lance Taylor - - * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons - when handling 32 bit immediate relocs. - * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise. - -Tue Jun 30 09:55:03 1998 Jeffrey A Law (law@cygnus.com) - - * section.c (STD_SECTION): Account for recently added gc_mark - field in struct asection. - - * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function. - (bfd_elf32_bfd_merge_private_bfd_data): Define. - -Thu Jun 25 18:31:41 1998 Richard Henderson - - ELF Section-level Garbage Collection: - * bfd.c (bfd_gc_sections): New. - * aout-adobe.c: Hook to default implementation. - * aout-target.h, aout-tic30.c, binary.c, bout.c: Likewise. - * coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h: Likewise. - * evax-alpha.c, i386msdos.c, i386os9k.c, ieee.c: Likewise. - * ihex.c, nlm-target.h, oasys.c, ppcboot.c, srec.c: Likewise. - * tekhex.c, versados.c: Likewise. - * libbfd-in.h (_bfd_nolink_bfd_gc_sections): New. - * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_gc_sections. - - * reloc.c (BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY): New. - (bfd_generic_gc_sections): New. - * section.c (SEC_KEEP): New. - (asection): Add gc_mark member. - - * elfcode.h (elf_gc*): New name remappings. - * elflink.h (elf_link_input_bfd): Don't set contents on stabs - sections to be excluded. - (elf_gc_mark, elf_gc_sweep, elf_gc_sweep_symbol): New. - (elf_gc_propogate_vtable_entries_used): New. - (elf_gc_smash_unused_vtentry_relocs): New. - (elf_gc_sections, elf_gc_record_vtinherit, elf_gc_record_vtentry): New. - (elf_gc_common_finalize_got_offsets): New. - (elf_gc_allocate_got_offsets, elf_gc_common_final_link): New. - * elfxx-target.h: Add and default gc hooks. - - * elf-bfd.h (struct elf_link_hash_entry): Swap got_offset/plt_offset - for unions. - (struct elf_obj_tdata): Likewise for local_got_offsets. - * elf.c, elf-i386.c, elf32-m68k.c, elf32-mips.c: Update all uses. - * elf32-ppc.c, elf32-sparc.c, elf64-alpha.c: Likewise. - * elf64-sparc.c, elflink.h: Likewise. - - * elf-bfd.h (struct elf_link_hash_entry): Add vtable members. - (ELF_LINK_HASH_MARK): Define. - (struct elf_backend_data): Add GC hooks. - * elf.c (_bfd_elf_link_hash_newfunc): Zero vtable members. - - * elf-m10300.c (mn10300_elf_check_relocs): New. - (mn10300_elf_gc_mark_hook): New. - (R_MN10300_GNU_VTINHERIT, R_MN10300_GNU_VTENTRY): New. - (elf_mn10300_howto, mn10300_reloc_map): Handle them. - (mn10300_elf_final_link_relocate): Likewise. - (mn10300_elf_relocate_section): Likewise. - (elf_backend_can_gc_sections): Define. - * elf32-mips.c (R_MIPS_GNU_VTINHERIT, R_MIPS_GNU_VTENTRY): New. - (elf_mips_gnu_vtinherit_howto, elf_mips_gnu_vtentry_howto): New. - (bfd_elf32_bfd_reloc_type_lookup): Handle them. - (mips_info_to_howto_rel): Likewise. - (mips_elf_relocate_section): Likewise. - (mips_elf_check_relocs): Likewise. - (mips_elf_gc_mark_hook, mips_elf_gc_sweep_hook): New. - (elf_backend_can_gc_sections): Define. - * elf32-ppc.c (R_PPC_GNU_VTINHERIT, R_PPC_GNU_VTENTRY): New. - (ppc_elf_howto_raw): Handle them. - (ppc_elf_reloc_type_lookup): Likewise. - (ppc_elf_relocate_section): Likewise. - (ppc_elf_check_relocs): Reference count .got and .plt entries. - Handle new vtable relocs. - (ppc_elf_adjust_dynamic_symbol): Recognize unused .plt entries. - (ppc_elf_gc_mark_hook, ppc_elf_gc_sweep_hook): New. - (elf_backend_can_gc_sections): Define. + * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16, + re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn. + (hppa_rebuild_insn): Mask immediate bits here instead. + * elf-hppa.h (elf_hppa_relocate_insn): Mask here too. -Fri Jun 26 10:48:23 1998 Jeffrey A Law (law@cygnus.com) +2000-05-18 Momchil Velikov - * archures.c (bfd_mach_mn10300): Define. - * elf-m10300.c: Include elf/mn10300.h - (elf_mn10300_mach): New function. - (_bfd_mn10300_elf_final_write_processing): Likewise. - (_bfd_mn10300_elf_object_p): Likewise. - (elf_backendfinal_write_processing): Define. - (elf_backend_object_p): Likewise. + * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting + relocs for an executable, ensure that they are virtual addresses. -Thu Jun 25 18:31:08 1998 Nick Clifton +2000-05-18 Jeffrey A Law (law@cygnus.com) - * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S - relocation. + * config.bfd (hppa*64*-*-hpux11*): New target triplet. -Wed Jun 24 17:17:57 1998 Ian Lance Taylor +2000-05-17 S. Bharadwaj Yadavalli + Rick Gorton - * elflink.h (elf_bfd_final_link): Loop over input_bfds using the - link_next field, not the next field. + * elflink.h: Add emitrelocations support: when enabled, relocation + information and relocation sections are put into final output + executables. If the emitrelocations flag is set, do the following: + (elf_bfd_final_link): Emit relocation sections. + (elf_link_input_bfd): Compute relocation section contents. + (elf_gc_sections): Don't clean relocation sections. -Sun Jun 21 19:38:39 1998 Ian Lance Taylor +2000-05-16 Catherine Moore - * elf.c (map_sections_to_segments): Check the section address - against the phdr size both with and without a modulo of - maxpagesize. + * som.c (som_decode_symclass): Recognize weak symbols. -Fri Jun 19 17:08:18 1998 Ian Lance Taylor +2000-05-16 Szabolcs Szakacsits - * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a - linker created empty input section if the output section has the - same name. + * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that + read idata section only from dataoff. + (pe_print_edata): Correctly check for valid eat_member. - * elflink.h (elf_link_output_extsym): Print an error message if - _bfd_elf_section_from_bfd_section fails. +2000-05-16 J"orn Rennecke - * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on - failure. + * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8. -Tue Jun 16 11:55:55 1998 Ian Lance Taylor +2000-05-14 Philip Blundell - * elf.c (copy_private_bfd_data): Improve handling of Solaris - native linker output. Avoid putting an empty section in more than - one segment. + * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets. -Fri Jun 12 13:30:17 1998 Tom Tromey +2000-05-12 Alan Modra - * po/Make-in (all-yes): If maintainer mode, depend on .pot file. - ($(PACKAGE).pot): Unconditionally depend on POTFILES. + * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec -Fri Jun 12 13:34:02 1998 Doug Evans + * peigen.c (pe_print_idata): Look for .idata section and print + info even if data directory has zero entries. Read idata section + starting from dataoff, and adjust all data offsets to suit. Cast + all bfd_vma vars to unsigned long before passing to fprintf. + * peigen.c (pe_print_edata): Similarly, look for .edata section + and print info even if data directory has zero entries. Cast + all bfd_vma vars to unsigned long before passing to fprintf. - * elf.c (swap_out_syms): New arg relocatable_p. - Don't add section VMA to symbols for relocatable output. - (_bfd_elf_compute_section_file_positions): Update call to - swap_out_syms. + From Szabolcs Szakacsits + * peigen.c (pe_print_idata): Use bfd_section_size rather than data + directory size which may be bogus. + * peigen.c (pe_print_edata): Similarly. -Mon Jun 8 15:20:57 1998 Nick Clifton +2000-05-09 Alan Modra - * elf32-v850.c (v850_elf_perform_relocation): Make comparisons - against 'addend' be signed rather than unsigned. + * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela + section is empty. + (copy_private_bfd_data): Allow for space possibly taken up by elf + headers when calculating segment physical address from lma. -Sat Jun 6 00:31:21 1998 Nick Clifton +2000-05-08 Alan Modra - * elf32-m32r.c: Add prototyps for static functions. + * versados.c (versados_scan): Init stringlen and pass_2_done. - * coff-arm.c: Add prototypes for static functions. + * trad-core.c (trad_unix_core_file_p): Return + bfd_error_wrong_format rather than bfd_error_file_truncated. -Fri Jun 5 17:21:51 1998 Nick Clifton + * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to + add_data_entry. DataDirectory virtual address is relative. + (pe_print_idata): Account for relative DataDirectory virtual + addresses. Don't trash datasize inside POWERPC_LE_PE code. + (pe_print_edata): Similarly. - * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the - LMA is used to order sections in a segment. + From Szabolcs Szakacsits + * peigen.c (dir_names): Add Delay Import Directory. + (pe_print_idata): Always search for bfd section containing + idata address rather than looking up section name. Print this + section name rather than .idata. + (pe_print_edata): Similarly. Also print some fields as %08lx. + (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as + Win32Version. - * elf32-v850.c: Add prototypes for static functions. - Change type of addend parameter to bfd_vma in various functions. +2000-05-05 Clinton Popetz -Fri Jun 5 18:09:58 1998 Ian Lance Taylor + * xcoff.h: Rename to xcoff-target.h + * Makefile.am: Change all instances of xcoff.h to xcoff-target.h + * coff-rs6000.c: Ditto. + * coff64-rs6000.c: Ditto. + * coff-pmac.c: Ditto. + * Makefile.in: Regenerate. - * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use - complain_overflow_signed instead of complain_overflow_bitfield. +2000-05-05 Clinton Popetz -Fri Jun 5 15:11:11 1998 Andreas Schwab + * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): + Change U802TOC64MAGIC to U803XTOCMAGIC. - * elf.c (elf_map_symbols): Don't add section VMA to symbol value - when comparing against 0. +2000-05-04 Michael Snyder -Wed Jun 3 17:52:49 1998 Ian Lance Taylor + * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1. + * bfd-in.h: Prototype bfd_elf_get_arch_size. + * bfd-in2.h: Prototype bfd_elf_get_arch_size. - * Makefile.am (config.status): New target. - * Makefile.in: Rebuild. +2000-05-04 Alan Modra -Wed Jun 3 12:18:24 1998 Stan Cox + * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma. - * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an - error if previous object endianness doesn't match current object. +2000-05-03 Martin v. Löwis -Tue Jun 2 17:50:59 1998 Nick Clifton + * elflink.h (elf_link_add_object_symbols): Reset dynindx for + hidden and internal symbols. + (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with + visibility. + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not + assign a PLT or GOT entry to symbols with hidden and + internal visibility. - * elf32-v850.c (v850_elf_print_private_bfd_data): Call - _bfd_elf_print_private)bfd_data (). +2000-05-03 Mark Elbrecht -Tue Jun 2 15:29:35 1998 Ian Lance Taylor + * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for + the .bss section. + * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise. - * elflink.h (elf_merge_symbol): Don't always set type_change_ok - and size_change_ok. - (elf_link_add_object_symbols): Set type_change_ok and - size_change_ok before calling elf_merge_symbol. +2000-05-02 H.J. Lu - * elf32-mips.c (mips_elf_relocate_section): If we issue an - undefined symbol error, don't also issue an overflow error. + * elf.c (prep_headers): Use ELFOSABI_NONE instead of + ELFOSABI_SYSV. -Tue Jun 2 13:51:00 1998 Geoff Keating +2000-05-02 Alan Modra - * elf32-ppc.c (ppc_elf_relocate_section): The target of an - R_PPC_LOCAL24PC relocation should be local; if not, print an error - message instead of crashing. + * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec. + * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate + dependencies. + * Makefile.in: Regenerate. -Mon Jun 1 18:23:12 1998 Yuli Barcohen +2000-05-01 Jim Wilson - * archures.c (bfd_mach_cpu32): Define. - (bfd_default_scan): Add case for 68060. Fix 68332 case to use - bfd_mach_cpu32. - * cpu-m68k.c (arch_info_struct): Add m68k:cpu32. - * ieee.c: Include . - (ieee_object_p): Parse out process ID string to make it more - likely to be acceptable for bfd_scan_arch. - * bfd-in2.h: Rebuild. + * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo. + (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c. + (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo. + (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c. + * Makefile.in: Rebuild. -Mon Jun 1 11:12:02 1998 Nick Clifton +2000-05-02 Alan Modra + + * config.bfd: Re-enable elf32-hppa. It now compiles, even if it + doesn't work very well. + + * elf-hppa.h (elf_hppa_internal_shdr): Define. + (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr. + Set hdr->s_type to 1 if ARCH_SIZE == 32. + (_bfd_elf_hppa_gen_reloc_type): Add prototype. + (elf_hppa_info_to_howto): Likewise. + (elf_hppa_info_to_howto_rel): Likewise. + (elf_hppa_reloc_type_lookup): Likewise. + (elf_hppa_is_local_label_name): Likewise. + (elf_hppa_fake_sections): Likewise. + (elf_hppa_final_write_processing): Likewise. + (elf_hppa_howto_table): Fully initialise all entries. + (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args. + (elf_hppa_info_to_howto): Likewise. + (elf_hppa_info_to_howto_rel): Likewise. + (elf_hppa_reloc_type_lookup): Likewise. + (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook, + elf_hppa_unmark_useless_dynamic_symbols, + elf_hppa_remark_useless_dynamic_symbols, + elf_hppa_record_segment_addrs, elf_hppa_final_link, + elf_hppa_relocate_section, elf_hppa_final_link_relocate, + elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until + elf32-hppa.c mess is cleaned up. + (elf_hppa_final_link_relocate): Make insn and r_type unsigned + int. Delete r_field. In case R_PARISC_PCREL21L, don't set + r_field then call hppa_field_adjust inline func with variable + r_field arg, instead call hppa_field_adjust with fixed arg. + In case R_PARISC_PCREL22F, don't set r_field. + (elf_hppa_relocate_insn): Change args and return type to unsigned + int. Call re_assemble_* funcs to do the work. + + * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when + sign extending. + + * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign + extending. + (sign_extend): Mask first before sign extending. + (low_sign_extend): Rewrite without condition expression. + (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16, + dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete. + (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a, + assemble_17, assemble_21, sign_unext, low_sign_unext): Return + result as function return value rather than through pointer arg. + Accept unsigned int args, and return unsigned int. + (re_assemble_3): New. Combines function of dis_assemble_3 with + re-assembly of opcode and immediate. + (re_assemble_12): Likewise. + (re_assemble_16): Likewise. + (re_assemble_17): Likewise. + (re_assemble_21): Likewise. + (re_assemble_22): Likewise. + (hppa_field_adjust): Rewrite and document, paying attention to + size of types and signed/unsigned issues. + (get_opcode): Shift before masking. + (FDLW): Rename to FLDW. + (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt. + (hppa_rebuild_insn): Change args and return value to unsigned + int. Make use of re_assemble_*. Correct case 11. + + * dep-in.sed: Handle ../opcodes/. + * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h, + elf64-hppa.h, hppa_stubs.h, xcoff.h. + (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c. + Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo, + elfarm-nabi.lo dependencies outside of auto-dependency area. + Regenerate dependencies. + * Makefile.in: Regenerate. - * elf32-m32r.c (m32r_elf_print_private_bfd_data): Also call - _bfd_elf_print_private_bfd_data() so that the program header will - be displayed. + * configure.in (TRAD_HEADER): Test non-null before + AC_DEFINE_UNQUOTED. + * configure: Regenerate. -Mon Jun 1 12:14:28 1998 Ian Lance Taylor + * reloc.c: Fix mis-spelling in comment. - * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than - 0x68. Reindent. Add some comments. +2000-05-01 Alan Modra -Fri May 29 09:58:08 1998 Nick Clifton + * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change. + * vms.c (vms_openr_next_archived_file): Return NULL. - * elf.c (copy_private_bfd_data): Adjust physical address of - segment in output BFD to contain LMAs of its sections. +2000-04-28 Clinton Popetz -Tue May 26 19:37:47 1998 Stan Cox + * coffcode.h Copy changes mistakenly done to libcoff.h in + 4/24/2000 patch. - * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map, - elf32_sparc_relocate_section): Added R_SPARC_32LE for little - endian data 32 bit relocations. - (elf32_sparc_merge_private_bfd_data): Check if linking little - endian objects with big endian objects. - (elf32_sparc_object_p): Set bfd_mach_sparc_sparclite_le. - (elf32_sparc_final_write_processing): Set EF_SPARC_LEDATA in e_flags. - * libbfd.h (bfd_reloc_code_real_names): Added BFD_RELOC_SPARC_32LE. - * reloc.c: Same. - * cpu-sparc.c (arch_info_struct): Added sparc:sparclite_le - * archures.c (bfd_mach_sparc_sparclite_le): New. - * bfd-in2.h (BFD_RELOC_SPARC_32LE, bfd_mach_sparc_sparclite_le): New. +2000-04-29 Andreas Jaeger -Thu May 21 16:59:28 1998 Nick Clifton + * libbfd-in.h: Correctly check GCC version. + * bfd-in.h: Likewise. + * libhppa.h: Likewise. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. - * peicode.h (add_data_entry): Fix precedence of operators in if () - statement. +2000-04-28 Clinton Popetz -Tue May 19 18:41:19 1998 Ian Lance Taylor + * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add + coffdu-rs6000.{lo,c}. + (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency + on xcoff.h + * Makefile.in: Regenerate. + * xcoff.h: New file. + * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c. + * coff-rs6000.c: Move all declarations and defines that are + common to the xcoff backends into xcoff.h + * coff64-rs6000.c: Ditto, - * bfd-in.h: Move over patch to bfd-in2.h. +2000-04-28 Clinton Popetz - * reloc.c (bfd_check_overflow): Add casts before shifts which may - not fit in 32 bits. - (_bfd_relocate_contents): Likewise. + * coff-mips.c (mips_ecoff_backend_data): Add initialization of + _bfd_coff_force_symnames in strings and + _bfd_coff_debug_string_prefix_length to their default values. + * coff-sh.c: (bfd_coff_small_swap_table): Ditto. -Mon May 18 14:44:15 1998 Nick Clifton +2000-04-28 Clinton Popetz - * peicode.h (add_data_entry): If the section has no private data - then do not create a Data Dictionary entry for it. + * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of + _bfd_coff_force_symnames in strings and + _bfd_coff_debug_string_prefix_length to their default values. -Mon May 18 00:09:28 1998 Richard Henderson +2000-04-27 Alan Modra - * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes. - (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots, - elf64_alpha_size_got_sections): Rewrite, handling multiple got - subsections during relaxation more correctly. + * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL. + Check local_got_refcounts before dereferencing. -Thu May 14 14:22:58 1998 Nick Clifton + * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL + before deciding we don't need R_PPC_PLT32 relocation. + (ppc_elf_gc_sweep_hook): Check local_got_refcounts before + dereferencing. - * bfd-in2.h: Add new prototype: bfd_coff_set_symbol_class (). - Add extra argument to bfd_arm_process_before_allocation (). - * bfd-in.h: Reflect changes made in bfd-in2.h. - * coffgen.c (bfd_coff_set_symbol_class): New function. Set the - coff class of a BFD symbol. - * coff-arm.c: Add support for interworking between Thumb code and - non-interworking aware ARM code. + * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment. -Sun May 10 22:33:59 1998 Jeffrey A Law (law@cygnus.com) + * elf32-i386.c (elf_i386_check_relocs): Reference count .got and + .plt entries. + (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries. + (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries. + (elf_i386_relocate_section): Allow for .plt to go missing. + (elf_i386_finish_dynamic_symbol): Use same test to decide if we + can use a relative reloc for got as elf_i386_relocate_section. + (bfd_elf32_bfd_final_link): Define to use gc form of final link. - * po/Make-in (install-info): New target. +2000-04-26 Clinton Popetz -Thu May 7 17:40:56 1998 Ian Lance Taylor + * config.bfd: Remove extraneous bfd_powerpc_64_arch. - * filemode.c: Remove; not used. +2000-04-24 Clinton Popetz - If sysdep.h includes a header file, don't include it again: - * aix386-core.c: Don't include , , or - . - * aoutx.h: Don't include . Use "sysdep.h" rather than - . - * archive.c: Don't include or . - * evax-alpha.c; Don't include . - * evax-egsd.c: Likewise. - * evax-etir.c: Likewise. - * evax-misc.c: Likewise. - * evax-emh.c: Likewise. Also, don't include . - * hppabsd-core.c: Don't include , , or - . - * hpux-core.c: Likewise. - * netbsd-core.c: Likewise. - * som.c: Likewise. - * libbfd.c: Don't include . - * nlmcode.h: Don't include . - * osf-core.c: Don't include or . - * ptrace-core.c: Don't include , , - , or . - * trad-core.c: Don't include or . + * Makefile.am (coff64-rs6000.lo): New rule. + * Makefile.in: Regenerate. + * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data, + xcoff_is_local_label_name, xcoff_rtype2howto, + xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p, + xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap, + xcoff_write_archive_contents): No longer static, and prefix with _bfd_. + (NO_COFF_SYMBOLS): Define. + (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in, + xcoff64_swap_aux_out): New functions; handle xcoff symbol tables + internally. + (MINUS_ONE): New macro. + (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS + relocation. + (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in, + coff_SWAP_aux_out): Map to the new functions. + * coff64-rs6000.c: New file. + * libcoff.h (bfd_coff_backend_data): Add new fields + _bfd_coff_force_symnames_in_strings and + _bfd_coff_debug_string_prefix_length. + (bfd_coff_force_symnames_in_strings, + bfd_coff_debug_string_prefix_length): New macros for above fields. + * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic. + Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead + of using coff_swap_sym_in directly. + (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64. + (coff_set_flags) Set magic for XCOFF64. + (coff_compute_section_file_positions): Add symbol name length to + string section length if bfd_coff_debug_string_prefix_length is + true. + (coff_write_object_contents): Don't do reloc overflow for XCOFF64. + (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of + using coff_swap_lineno_in directly. + (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings + and _bfd_coff_debug_string_prefix_length fields. + * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force + symbol names into strings table when + bfd_coff_force_symnames_in_strings is true. + * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR, + SET_RELOC_VADDR): New macros. + (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros. + (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C + code. + (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64 + changes within RS6000COFF_C specific code. + (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC, + MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO. + * reloc.c (bfd_perform_relocation, bfd_install_relocation): + Extend existing hack on target name. + * xcofflink.c (XCOFF_XVECP): Extend existing hack on + target name. + * coff-tic54x.c (ticof): Keep up to date with new fields + in bfd_coff_backend_data. + * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define + targ_selvecs to include rs6000coff64_vec for rs6000. + * configure.in: Add rs6000coff64_vec case. + * cpu-powerpc.c: New bfd_arch_info_type. + +2000-04-24 Jeffrey A Law (law@cygnus.com) + + * config.bfd: Only disable elf32-hppa vectors, not all of the + BSD and OSF configuration support. Provide (disabled) clauses + for PA64 support. + * configure.in: Add clause for PA64 support. + * configure: Rebuilt. -Thu May 7 13:12:50 1998 Klaus Kaempf + * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec. + (bfd_elf64_hppa_vec): Declare. - * configure.com: If the version number can not be found in - configure.in, set it to "unknown" rather than "2.8.1". + * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo + (BFD64_BACKENDS_CFILES): Add elf64-hppa.c + (elf64-hppa.lo): Add dependencies. + * Makefile.in: Rebuilt. -Wed May 6 09:46:05 1998 Gavin Koch + * elf64-hppa.c, elf64-hppa.h: New files with PA64 support. - * elf32-mips.c (elf_mips_mach): New. - (_bfd_mips_elf_object_p): Use elf_mips_mach. - (_bfd_mips_elf_final_write_processing): Use the names - of machines, rather than the numbers. Set both the ARCH - and MACH in e_flags. Handle a few more specific machines. - (_bfd_mips_elf_merge_private_bfd_data): Merge both - EF_MIPS_ARCH and EF_MIPS_MACH. +2000-04-24 Jason Eckhardt -Tue May 5 21:01:53 1998 Richard Henderson + * libhppa.h (dis_assemble_16): New function. + (pa_arch): Added pa20w element. - * syms.c (bfd_is_local_label): Revert last change. - * srec.c (srec_write_symbols): Discard debugging symbols. +2000-04-24 Ulrich Drepper -Tue May 5 23:36:06 1998 Ian Lance Taylor + * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs, + bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and + bfd_elf64_slurp_reloc_table. - * som.c: Include . - * som.h: Don't include sysdep.h. + * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New + definitions to get external names. + (elf_write_relocs): Renamed from write_relocs and make global. + (elf_slurp_reloc_table): Make global. + (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs. -Tue May 5 18:29:24 1998 Tom Tromey + * archive.c (hpux_uid_gid_encode): New function. + (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is + defined and the ID is greater than 99999. + (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode + special uid/gid fields into 32 bit values. - * libbfd.h: Rebuilt. - * libbfd-in.h: Removed gettext includes and defines. - * sysdep.h: Moved gettext-related includes and defines here. +2000-04-21 Matthew Green -Tue May 5 16:47:54 1998 Richard Henderson + * config.bfd: Add NetBSD/sparc64 support. - * srec.c (srec_write_symbols): Use bfd_is_local_label rather than - an ad-hoc test. Kill bogus #if 0 code. - * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local. +Fri Apr 21 13:20:53 2000 Richard Henderson + David Mosberger + Timothy Wall + Jim Wilson -Mon May 4 16:10:33 1998 Ian Lance Taylor + * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo. + (ALL_MACHINES_CFILES): Add cpu-ia64.c. + (BFD64_BACKENDS): Add elf64-ia64.lo. + (BFD64_BACKENDS_CFILES): Add elf64-ia64.c. + (cpu-ia64.lo, elf64-ia64.lo): New rules. + * Makefile.in: Rebuild. + * archures.c (enum bfd_architecture): Add bfd_arch_ia64. + (bfd_ia64_arch): Declare. + (bfd_archures_list): Add bfd_ia64_arch. + * bfd-in2.h: Rebuild. + * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets. + * configure: Rebuild. + * configure.host: (ia64-*-linux*): New host. + * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec, + bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors. + * elf.c (prep_headers): Add bfd_arch_ia64. + * libbfd.h: Rebuild. + * reloc.c: Add IA-64 relocations. + * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec): + Declare. + (bfd_target_vect): Add bfd_elf64_ia64_little_vec. + * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files. - * sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address - when generating a normal executable for a symbol defined in a - regular file. When copying a reloc into the output file, adjust - the addend for a PC relative reloc against a global symbol. +2000-04-21 Richard Henderson -Mon May 4 10:08:18 1998 Tom Tromey + * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section + contents when performing a partial link. + (bfd_elf_d30v_reloc_21): Likewise. - * libbfd.h: Rebuilt. - * libbfd-in.h (_): Define as dgettext. +2000-04-20 H.J. Lu -Mon May 4 11:02:23 1998 Ian Lance Taylor + * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10 + patch to symbols defined by a shared object. + * elf32-ppc.c (ppc_elf_relocate_section): Similarly. - * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma, - not signed. - * peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS - when declaring parameter types. - (pe_saved_coff_bfd_copy_private_bfd_data): Likewise. +2000-04-19 Michael Sokolov -Wed Apr 29 15:35:03 1998 Ian Lance Taylor + K&R compiler fixes. + * dwarf2.c (concat_filename): Avoid string literal concatenation. + * ieee.c (ieee_get_symtab): Don't initialise union in struct. - * config.bfd: If we include any ELF targets in targ_defvec and/or - targ_selvecs, then add the generic ELF targets to targ_selvecs. - * elf32-gen.c (dummy): New static const variable. - (elf_generic_info_to_howto): New static function. - (elf_generic_info_to_howto_rel): New static function. - (elf_info_to_howto): Define as elf_generic_info_to_howto. - (elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel. - * elf64-gen.c: Same changes as elf32-gen.c. - * elfcode.h (elf_object_p): For the generic target, ignore a - failure of bfd_default_set_arch_mach. Fix indentation a bit. +Mon Apr 17 19:14:36 2000 David Mosberger -Tue Apr 28 20:05:52 1998 Ian Lance Taylor + * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo. + (BFD64_BACKENDS_CFILES): Mention coff-ia64.c + (coff-ia64.lo): Add dependency. + * Makefile.in: Regenerate. + * coff-ia64.c: New file. + * efi-app-ia32.c: Ditto. + * efi-app-ia64.c: Ditto. + * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC. + (coff_set_flags): Ditto. + (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC. + * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec. + * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec. + * configure: Regenerate. + * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro. + (PUT_OPTHDR_IMAGE_BASE): Ditto. + (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto. + (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto. + (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto. + (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto. + (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto. + (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto. + (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto. + (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto. + (GET_PDATA_ENTRY): Ditto. + * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read + data_start. Use above macros to read fields that are 64 bit wide for + COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits. + (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force + FileAlignment and SectionAlignment to minimum alignment if they + are zero. + (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set + Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM. + (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start. + Use above macros to write fields that are 64 bit wide for + COFF_WITH_PEP64. + (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64, + 5*4 otherwise. This should be right for IA-32 and IA-64, but may + be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded + value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print + begin address, end address, and unwind info address only. Use + GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to + print addresses. + (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and + HIGH3ADJ relocation names. + (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form. + * targets.c: Declare bfd_efi_app_ia32_vec and + bfd_efi_app_ia64_vec. + (bfd_target_vector): Mention bfd_efi_app_ia32_vec and + bfd_efi_app_ia64_vec. + +2000-04-17 Timothy Wall + + * bfd-in2.h: Add prototypes for tic54x load page access. + * bfd-in.h: Regenerate. + * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown + in customized _set_arch_mach function. + * coffcode.h (coff_set_alignment_hook): Set section load page if + the appropriate macro is defined. + (write_object_contents): Read section load page. - * configure.in (WIN32LIBADD): Add -lintl on cygwin32. - * configure: Rebuild. +2000-04-13 Alan Modra -Tue Apr 28 12:16:57 1998 Jason Molenda (crash@bugshack.cygnus.com) + * elf32-hppa.h: Update copyright date. - * config.bfd: Update OSR5/Unixware patterns. + * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix. + * elf32-mips.c (_bfd_mips_elf_relocate_section): And here. -Mon Apr 27 18:02:24 1998 Richard Henderson + * elf32-d30v.c (MAX32): Don't use LL suffix. + (MIN32): Define in terms of MAX32. + (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma. - * elf.c (assign_file_positions_for_segments): Allow for holes - between sections added by a link script. + * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise + expression. -Mon Apr 27 11:49:55 1998 Ian Lance Taylor + * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants. - * configure.in: Change version number to 2.9.4 - * configure: Rebuild. +2000-04-12 Alan Modra - Based on patch from H.J. Lu : - * elf.c (bfd_elf_get_bfd_needed_list): New function. - * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare. - * bfd-in2.h: Rebuild. + * dep-in.sed: Match space before file name, not after. + * Makefile.am: Regenerate dependencies. + * Makefile.in: Regenerate. -Sat Apr 25 20:07:53 1998 Richard Henderson + * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield + case, allow address wrap-around stupidly removed 2000-03-17. Sign + extend without an if statement. - * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other. - Change all users. +2000-04-11 Alan Modra -Sat Apr 25 18:29:07 1998 Richard Henderson + * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using + signed quantites. + * elf32-mips.c (gprel16_with_gp): Likewise. + * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range + here using -0x40000, not (int)0xfffc0000. + (elf32_hppa_size_of_stub): Likewise. - * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members. - (elf64_alpha_relax_section): Fill them in. - (elf64_alpha_relax_opt_call): Implement more than a stub. - (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default - alignment on .scommon. - (elf64_alpha_merge_gots): Merge use counts as well. +2000-04-11 Timothy Wall -Sat Apr 25 14:07:29 1998 Richard Henderson + * coff-tic54x.c: Now builds with all targets. + * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies. + * Makefile.in: Regenerate. + * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on + unitialized variable. - * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section - for calculating a local symbol's address. - (elf64_alpha_calc_got_offsets): Skip entries with 0 use count. - Set the .got's cooked size as well as the raw size. +Fri Apr 7 15:56:57 2000 Andrew Cagney -Fri Apr 24 09:16:00 1998 Nick Clifton + * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add + --enable-build-warnings option. + * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions. + * Makefile.in, configure: Re-generate. - * elf32-v850.c (v850_elf_print_private_bfd_data): Add - internationalisation of printed information. +2000-04-07 Nick Clifton - * coff-arm.c (coff_arm_print_private_bfd_data): Add - internationalisation of printed information. + * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and + BFD_RELOC_THUMB_PCREL_BLX. -Fri Apr 24 12:09:18 1998 Ian Lance Taylor + * elf32-arm.h (elf32_arm_final_link_relocate): Handle + R_ARM_XPC25 and R_ARM_THM_PC22. - * syms.c (struct indexentry): Change directory_name, file_name, - and function_name fields to char *. - (struct stab_find_info): Change cached_file_name field to char *. + * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of + R_ARM_XPC25 and R_ARM_THM_XPC22. + (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to + R_ARM_[XPC25|THM_XPC22]. -Thu Apr 23 08:13:04 1998 Nick Clifton + * elfarm-oabi.c: Define OLD_ARM_ABI and change include from + elf/arm-oabi.h to elf/arm.h - * peicode.h (dir_names): Add missing N_() macros to dir_names array. + * Makefile.am: Fix dependency for elfarm-oabi.c + * Makefile.in: Regenerate. -Wed Apr 22 13:06:15 1998 Tom Tromey + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. - * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). +2000-04-06 Michael Snyder -Wed Apr 22 17:48:48 1998 Ian Lance Taylor + * elfcore.h (elf_core_file_p): preserve value of tdata at entry, + and restore it on failure. Release newly allocated tdata on + failure. - * Makefile.am (install-data-local): Make $(includedir). - * Makefile.in: Rebuild. +Fri Apr 7 11:33:47 2000 Jim Wilson -Wed Apr 22 13:06:15 1998 Tom Tromey + * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size. + (decode_line_info): Set it. Report error if unit->line_offset is + equal to or larger than it. - * libbfd-in.h: Use `gettext' and not `dgettext' for now. +2000-04-07 Timothy Wall -Wed Apr 22 12:53:40 1998 Ian Lance Taylor + * targets.c: Added vecs for tic54x. + * reloc.c: Added relocs for tic54x. + * libbfd.h: Regenerated. + * configure: Add TI COFF vecs for tic54x. + * configure.in: Ditto. + * config.bfd (targ_cpu): Recognize new tic54x target. + * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling. + * bfd-in2.h: Add tic54x target and relocations. + * Makefile.am, Makefile.in: Add tic54x target. + * archures.c (bfd_archures_list): Add tic54x target. + * coff-tic54x.c: New. + * cpu-tic54x.c: New. + +2000-04-06 Michael Snyder + + * elfcore.h (elf_core_file_p): call backend_object_p which + thereby gets an opportunity to update the arch/machine type. + +2000-04-06 Timothy Wall + + * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage + class. Handle SEC_CLINK and SEC_BLOCK flags. + * section.c: Add SEC_CLINK and SEC_BLOCK flags. + * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags. + +2000-04-06 Nick Clifton + + * elf32-arm.h (elf32_arm_set_private_flags): Only check for + EF_INTERWORK if this is an unknown EABI. + (elf32_arm_merge_private_bfd_data): Check EABI version + numbers. Only check EF_xxx flags if the EABI version number + is unknown. + (elf32_arm_check_private_bfd_data): Only check EF_xxx flags + if the EABI version number is unknown. + (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags + if the EABI version number is unknown. + +Wed Apr 5 22:04:20 2000 J"orn Rennecke + + * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and + BFD_RELOC_SH_LOOP_END. + * elf32-sh.c (sh_elf_howto_tab): Change special_func to + sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore. + Add entries for R_SH_LOOP_START and R_SH_LOOP_END. + (sh_elf_reloc_loop): New function. + (sh_elf_reloc): No need to test for always-to-be-ignored relocs + any more. + (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}. + (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}. + * bfd-in2.h, libbfd.h: Regenerate. - * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl. - * Makefile.in: Rebuild. +2000-04-04 Alan Modra - * bfd-in2.h: Rebuild for Nick's changes. + * po/bfd.pot: Regenerate. -Tue Apr 21 23:11:51 1998 Richard Henderson + * Makefile.am: Remove extraneous mkdep comment. + (MKDEP): Use gcc -MM rather than mkdep. + (DEP): Quote when passing vars to sub-make. Add warning + message to end. + (DEP1): Rewrite for "gcc -MM". + (CLEANFILES): Add DEP2. + Update dependencies. + * Makefile.in: Regenerate. - * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last - change wrt length == max_namelen. +2000-04-03 Kevin Buettner -Tue Apr 21 21:19:36 1998 Tom Tromey + * configure.in: Added corefile support for AIX 4.3. In particular, + AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when + compiling rs6000-core.c. + * configure: Regenerated. - * Many files: Added gettext invocations around user-visible - strings. - * libbfd-in.h: Added gettext includes and defines. - * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, - HAVE_LC_MESSAGES): Define. - * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and - po/Makefile. - * Makefile.am (SUBDIRS): Added po. - (POTFILES): New macro. - (po/POTFILES.in): New target. - (SOURCE_HFILES): New macro. - (HFILES): Use it. - * po/Make-in, po/POTFILES.in, po/bfd.pot: New files. - -Tue Apr 21 13:38:18 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) - - * elfcore.h (bfd_prstatus): Copy core_prstatus from the first - NT_PRSTATUS note section encountered, it contains the status of - the currently executing thread when the core file was written. - -Tue Apr 21 10:00:12 1998 Nick Clifton - - * libcoff.h: Add extra parameter to - bfd_coff_link_output_has_begun overrideable function. - * cofflink.c: Pass extra parameter to - bfd_coff_link_output_has_begun function. - * bfd-in.h: Add prototypes for exported ARM interworking - functions. - * peicode.h: ARM specific code reorganised to conform to BFD - coding conventions. - * coffcode.h: ARM specific code reorganised to conform to BFD - coding conventions. - * coff-arm.c: Code reorganised to conform to the BFD coding - conventions. Global variables have been moved into an ARM - specific hash table structure and a new function: - bfd_arm_get_bfd_for_interworking() has been created which is - called from the linker scripts. +2000-04-03 H.J. Lu -Tue Apr 21 00:11:51 1998 Richard Henderson + * cache.c (bfd_open_file): Unlink the output file only if + it has non-zero size. - * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test. +2000-04-01 Ken Block USG - * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from - elf64_alpha_relax_find_reloc_ofs. Changed all callers. - (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss. - (elf64_alpha_size_got_sections): Don't merge .got sections twice. + * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit + relative relocations for non-loaded sections in shared objects. + (elf64_alpha_check_relocs): Similarly. -Sat Apr 18 01:21:04 1998 Stan Cox +Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson - * config.bfd: Added sparc86x support. + * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and + BFD_RELOC_16 to switch for extended relocs. + (MY_swap_ext_reloc_in): New. + (MY_swap_ext_reloc_out): New. + (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather + than NAME(aout,swap_ext_reloc_in) for extended relocs. + (NAME(aout,squirt_out_relocs)): Similarly use + MY_swap_ext_reloc_out. + (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined. -Fri Apr 17 22:29:04 1998 Ian Lance Taylor +2000-04-03 Kazu Hirata - * elf32-mips.c (mips_elf_relocate_section): Do not complain about - an out of range pc-relative jump/call to an undefined weak symbol. + * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to + the R_PCRWORD_B case. -Thu Apr 16 13:49:00 1998 Richard Henderson +2000-03-31 Thomas de Lellis - * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp - comparisons signed. + * srec.c : Set CHUNK size to 16 bytes to prevent download failures + on some targets. + * ihex.c : Ditto. -Thu Apr 16 11:43:33 1998 Ian Lance Taylor +Wed Mar 30 15:28:00 2000 Donald Lindsay - * archive.c (bfd_generic_archive_p): If a slurp subroutine returns - an error other than bfd_error_system_call, set the error to - bfd_error_wrong_format. + * elf32-m32r.c (m32r_elf_generic_reloc): new function. All + HOWTO references to bfd_elf_generic_reloc, that have + partial_inplace == true, now use the new function. The function + is based on the recent rewrite of m32r_elf_lo16_reloc(), and + extends its fixes to the R_M32R_{16,24,32} relocs. + The new logic in m32r_elf_lo16_reloc() has been removed, and + it instead calls the new routine to obtain that functionality. - * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add - bfd_elf32_powerpcle_vec. +2000-03-27 Alan Modra - * elf.c (copy_private_bfd_data): If all the p_paddr fields in the - program segments are zero, don't set p_paddr_valid. + * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook, + elf32_avr_check_relocs, avr_final_link_relocate, + elf32_avr_relocate_section, bfd_elf_avr_final_write_processing, + elf32_avr_object_p): Add prototypes. + (elf32_avr_gc_mark_hook): Add default for h->root.type. + (bfd_elf_avr_final_write_processing): Make static. -Wed Apr 15 22:15:16 1998 Richard Henderson +2000-03-27 Denis Chertykov - * elf64-alpha.c: Initial implementation of relaxation -- - (struct alpha_elf_link_hash_entry): Add use_count member. - (elf64_alpha_check_relocs): Initialize and increment it. - (elf64_alpha_can_merge_gots): Check it when considering merging. - (elf64_alpha_merge_gots): Drop entries with zero use. - (elf64_alpha_calc_got_offsets_for_symbol): Likewise. - (elf64_alpha_always_size_sections): Split out got sizing ... - (elf64_alpha_size_got_sections): ... here. New function. - (elf64_alpha_relax_find_reloc_ofs): New function. - (elf64_alpha_relax_with_lituse): Likewise. - (elf64_alpha_relax_without_lituse): Likewise. - (elf64_alpha_relax_opt_call): Likewise. - (elf64_alpha_relax_section): Likewise. - (elf64_alpha_add_symbol_hook): Likewise. - (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16. - (elf64_alpha_relocate_section): Likewise. - (bfd_elf64_bfd_relax_section): Define. - (elf_backend_add_symbol_hook): Likewise. + * cpu-avr.c: New file. BFD support routines for AVR architecture. + * archures.c (bfd_architecture): Add AVR architecture. + (bfd_archures_list): Add reference to AVR architecture info. + * elf.c (prep_headers): Handle bfd_arch_avr. + * reloc.c: Add various AVR relocation enums. + * targets.c (bfd_elf32_avr_vec): Declare and add to target vector + list. + * Makefile.am: Add support for AVR elf. + * configure.in: Likewise. + * config.bfd: Likewise. + * Makefile.in: Regenerate. + * configure: This too. + * bfd-in2.h: And this. + * libbfd.h: And this. -Wed Apr 15 16:08:46 1998 Richard Henderson +2000-03-24 H.J. Lu - * elf.c (prep_headers): Use new EM_SPARCV9 symbol. - * elf64-sparc.c (ELF_MACHINE_CODE): Likewise. - (ELF_MACHINE_ALT1): New. Set to EM_OLD_SPARC64. + * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype. + (elf64_alpha_find_reloc_at_ofs): Likewise. -Wed Apr 15 11:34:33 1998 Ian Lance Taylor +2000-03-17 Alan Modra - * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32. - * configure: Rebuild. + * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield, + flag an overflow if the bitfield is outside -2**n to 2**n-1. The + allowable range used to be -2**(n-1) to 2**n-1. + * reloc.c (_bfd_relocate_contents): Same here. Also replace + "boolean overflow" with "bfd_reloc_status_type flag". -Mon Apr 13 16:46:27 1998 Ian Lance Taylor +2000-03-14 Doug Evans - * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@. - (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@. - * configure.in: Define and substitute WIN32LDFLAGS and - WIN32LIBADD. - * aclocal.m4: Rebuild with new libtool. - * configure, Makefile.in: Rebuild. + * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite. -Fri Apr 10 13:44:27 1998 Ian Lance Taylor +2000-03-14 Kazu Hirata - * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol - before any other symbols in the same section. + * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number + of shrinks properly, including the last reloc. -Wed Apr 8 14:50:23 1998 Michael Meissner +2000-03-13 Kazu Hirata - * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF - systems. + * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity + check for R_MOVL2. -Tue Apr 7 16:25:31 1998 Gavin Romig-Koch +2000-03-11 Alan Modra - * dwarf2.c (comp_unit): Move it earlier in the source. Add - addr_size. - (read_address): Replace 'bdf*' argument with 'comp_unit*' argument. - Use addr_size for address size, rather than sizeof(bfd_vma). - (read_attribute): Replace bdf* argument with 'comp_unit*' argument. - Fix call to read_address. - (decode_line_info): Replace bdf* argument with 'comp_unit*' argument. - Scrap other unneeded arguments. Fix call to read_address. - (scan_unit_for_functions): Fix call to read_attribute. - (parse_comp_unit): We now handle more values for addr_size. - Set addr_size in unit. Fix call to read_attribute and - decode_line_info. + * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on + a format mismatch rather than an "error" from bfd_read such as + bfd_error_file_truncated. -Tue Apr 7 15:44:47 1998 Gavin Romig-Koch +2000-03-10 Geoff Keating - * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null. + * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper + sign-extension and big-endian compensation for + R_MIPS_64 even in ld -r. -Tue Apr 7 12:35:18 1998 Ian Lance Taylor +2000-03-10 Geoffrey Keating - * archures.c (bfd_default_scan): Add m68k cases back to default - switch, reverting patch of March 25, since IEEE support depends - upon them. + * elf32-mips.c (mips_elf_next_relocation): Rename from + mips_elf_next_lo16_relocation, and generalize to look + for any relocation type. + (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset. + (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16. + (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16. + (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2. + (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64. + (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32. + (bfd_elf32_bfd_reloc_type_lookup): Add new relocs. + (mips_rtype_to_howto): Likewise. + (mips_elf_calculate_relocation): Handle new relocs. + (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs + are paired. The addend for R_MIPS_GNU_REL16_S2 + is shifted right two bits. -Mon Apr 6 14:06:40 1998 Ian Lance Taylor +2000-03-10 Alan Modra - * Makefile.am (diststuff): New target. - * Makefile.in: Rebuild. + * reloc.c (bfd_perform_relocation): Undo emacs formatting of + comment, and ensure it doesn't happen again. + (bfd_install_relocation): Same here. + (_bfd_relocate_contents): Don't bother assigning unused signmask + shift result. Fix typos in comments. + Remove trailing whitespace throughout file. -Sun Apr 5 16:21:44 1998 Jeffrey A Law (law@cygnus.com) +2000-03-07 Doug Evans - * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of - som_offset when we have an extended name table. + * reloc.c (reloc_howto_struct): Fix partial_inplace comment. + * bfd-in2.h: Rebuild. -Sun Apr 5 16:04:39 1998 H.J. Lu +2000-03-06 Nick Clifton - * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before - trying to copy it. - * Makefile.in: Rebuild. + * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and + sym_ptr_ptr fields. + (SIZEOF_ILF_SYM_PTR_TABLE): Define. + (SIZEOF_ILF_STRINGS): Redefine. + (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol + relative reloc, as opposed to a section relative reloc. + (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT + not C_LABEL. + Add length of symbol's prefix to string pointer. + Store a pointer to the symbol in the symbol pointer table. + (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7. + Initialise the symbol pointer table. + Store the hint in the Hint/Name table. + Make the jump reloc be symbol realtive, not section relative. + Create an import symbol for imported code. -Fri Apr 3 11:09:42 1998 Andreas Schwab +2000-03-06 Catherine Moore - * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section - symbols when creating a shared library. - (elf_m68k_adjust_dynindx): New function, used by above code. - (elf_m68k_finish_dynamic_sections): Initialize the section - symbols. - (elf_m68k_relocate_section): Change abort to BFD_ASSERT. + * elf.c (swap_out_syms): Check for null type_ptr. -Wed Apr 1 16:04:02 1998 Nick Clifton +2000-03-01 Hans-Peter Nilsson - * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant - value 11. + * aout-target.h (MY(write_object_contents)): Remove unused + and unusable "#if CHOOSE_RELOC_SIZE". + * pc532-mach.c (MY(write_object_contents)): Ditto. + * netbsd.h (MY(write_object_contents)): Ditto. + * hp300hpux.c (MY(write_object_contents)): Ditto. + * freebsd.h (MY(write_object_contents)): Ditto. + * aout-tic30.c (tic30_aout_write_object_contents): Ditto. -Wed Apr 1 13:36:58 1998 Andreas Schwab +2000-02-29 H.J. Lu - * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix - assertion. + * peicode.h (jtab): Make it static. -Tue Mar 31 00:12:12 1998 Jeffrey A Law (law@cygnus.com) + * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is + defined and COFF_IMAGE_WITH_PE is not defined. + (_bfd_sh_align_load_span): Defined as sh_align_load_span if + COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined. - * elf-m10300.c (mn10300_elf_relax_section): Correctly handle - absolute symbols. +2000-03-01 Nick Clifton -Mon Mar 30 12:46:15 1998 Ian Lance Taylor + * coff-arm.c (bfd_arm_process_before_allocation): Make + 'symndx' signed to prevent compile time warning. - * configure.in: Set version to 2.9.1. - * configure: Rebuild. + * coff-mcore.c: Remove unused prototype for pe_object_p. - * Branched binutils 2.9. + * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static + functions that are not used when COFF_IMAGE_WITH_PE is + defined. + (struct sh_opcode): Change type of 'flags' field to unsigned + long so that it can hold the USESAS flag. -Mon Mar 30 12:20:50 1998 Brent Baccala + * coffcode.h (styp_to_sec_flags): Initialise 'target_name'. - * syms.c (ENABLE_CACHING): Define. - (struct indexentry): Define. - (struct stab_cache): Remove. - (cmpindexentry): New static function. - (struct stab_find_info): Add new fields: indextable, - indextablesize, cached_indexentry, cached_offset, cached_stab, and - cached_file_name. Remove fields: file_cache, function_cache, and - line_cache. - (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted - index table and search it. + * elf-m10300.c (mn10300_elf_relax_section): Initialise + 'sym_sec'. -Mon Mar 30 10:39:34 1998 Ian Lance Taylor + * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function + parameters. + Remove unusued variables and code. + (elf_backend_add_symbol_hook): Fix prototype. - * elf.c (_bfd_elf_copy_private_section_data): Call - copy_private_bfd_data once we've seen the last SEC_ALLOC section. + * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and + 'srelgot'. - * cpu-mips.c: Remove trailing comma at end of enumeration list. + * elf32-mcore.c (mcore_elf_relocate_section): Initialise + 'oldinst'. -Sat Mar 28 16:33:02 1998 Ian Lance Taylor + * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function + parameters. + Remove unusued variables and code. + (elf_backend_add_symbol_hook): Fix prototype. - * coff-arm.c: Define all globally visible variables and functions - only when COFF_WITH_PE is not defined. - * configure.in (armpe_little_vec, armpe_big_vec): Add - coff-arm.lo. - * configure: Rebuild. + * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'. -Fri Mar 27 16:06:02 1998 Ian Lance Taylor + * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED + to unused function parameter. - Fix some gcc -Wall warnings: - * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings. - * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise. - * archures.c (bfd_default_scan): Likewise. - * bfd.c (bfd_scan_vma): Likewise. - * binary.c (mangle_name): Likewise - * coff-arm.c (aoutarm_fix_pcrel_26): Likewise. - * coff-sh.c (sh_relocate_section): Likewise. - * coff-stgo32.c (create_go32_stub): Likewise. - * coffcode.h (coff_slurp_line_table): Likewise. - * ecoff.c (_bfd_ecoff_write_armap): Likewise. - * elf.c (_bfd_elf_make_section_from_shdr): Likewise. - (assign_file_positions_for_segments): Likewise. - * elf32-mips.c (mips_elf_relocate_section): Likewise. - * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. - * oasys.c (oasys_write_sections): Likewise. - * ppcboot.c (ppcboot_object_p): Likewise. - (mangle_name): Likewise. - * riscix.c (riscix_fix_pcrel_26): Likewise. - * srec.c (srec_scan): Likewise. - * stabs.c (_bfd_write_section_stabs): Likewise. - * sunos.c (sunos_add_dynamic_symbols): Likewise. - * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to - switch. Declare parameters for function pointers. - * archures.c (bfd_default_scan): Add braces to avoid ambiguous if - warning. - * elf.c (elf_sort_sections): Likewise. - * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation. - Add default cases to switches. - (coff_arm_relocate_section): Remove unused local variables. - Always set rstat. - (coff_arm_bfd_set_private_flags): Change flag variable to type - flagword. - * coff-mips.c (mips_relocate_section): Initialize use_lo. - * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int. - (dump_toc): Change cat to const, and initialize it. - * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff. - * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise. - (sh_elf_relocate_section): Initialize r_symndx. - * coffcode.h (coff_compute_section_file_positions): Only declare - old_sofar if ALIGN_SECTIONS_IN_FILE. - (coff_write_object_contents): Initialize csym. - * coffgen.c (coff_pointerize_aux): Make type and class unsigned. - * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to - switch. - * dwarf2.c: Include libiberty.h. - (read_2_signed_bytes, read_4_signed_bytes): Comment out. - (decode_line_info): Remove unused local variables. - * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise. - (m32r_elf_relocate_section): Likewise. - * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise. - (v850_elf_reloc): Likewise. - * elf-bfd.h (elf_linker_section_t): Make alignment unsigned. - (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned. - * elf.c (assign_file_positions_for_segments): Always set adjust. - * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr. Fully - parenthesize expression. - * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h. - (m32r_elf_object_p): Return a value. - (m32r_elf_print_private_bfd_data): Change fprintf format string. - * elf32-mips.c (mips_elf_final_link): Initialize last. - (mips_elf_finish_dynamic_sections): Initialize last and dindx. - * elf32-v850.c (v850_elf_object_p): Return a value. - (v850_elf_print_private_bfd_data): Change fprintf format string. - * elfcode.h (elf_slurp_symbol_table): Change symcount and i to - unsigned long. - * elflink.h (elf_link_add_object_symbols): Change vernum to - unsigned int, and initialize it. Change fprintf format string. - (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type - when setting or comparing to soname_indx. - (elf_create_pointer_linker_section): Change num_symbols to - unsigned int. - * libcoff-in.h (coff_data_type): Change flags to flagword. - * peicode.h (pe_print_idata): Initialize idx. Change j to - bfd_size_type. Initialize hint_member. Remove useless test to - time_stamp. - (pe_print_edata): Change num_functions and num_names in struct - EDT_type to unsigned long. Remove cast. Change fprintf format - string. - * ppcboot.c (ppcboot_object_p): Change i to size_t. - * reloc.c (bfd_get_reloc_size): Change return type to unsigned - int. - * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to - int *. Update uses. Change j to long. - * bfd-in2.h, libcoff.h: Rebuild. - -Fri Mar 27 10:10:46 1998 Catherine Moore - - * elf32-v850.c Remove definition of USE_REL. - (v850_elf_info_to_howto_rela): New function. - (v850_elf_perform_relocation): Renamed from - v850_elf_store_addend_in_insn. Removed replace argument. - (v850_elf_reloc): store the relocation in the addend field instead - of the insn. - (v850_elf_final_link_relocate): Now calls - v850_elf_perform_relocation. - (v850_elf_relocate_section): Remove code to generate REL - relocations. + * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function + parameters. + Use EMPTY_HOWTO to initialise empty howto slots. + Remove unused variables. -Thu Mar 26 13:32:17 1998 Ian Lance Taylor + * peicode.h (pe_ILF_build_a_bfd): Initialise id6. - * coffcode.h (coff_new_section_hook): Set the type and storage - class in the native symbol information allocated for a new section - symbol. +2000-03-01 H.J. Lu -Thu Mar 26 10:13:41 1998 Nick Clifton + * aoutx.h (aout_link_input_section_std): Pass "true" to + the undefined_symbol callback. + (aout_link_input_section_ext): Likewise. + * bout.c (get_value): Likewise. + * coff-a29k.c (coff_a29k_relocate_section): Likewise. + * coff-alpha.c (alpha_ecoff_get_relocated_section_conten): + Likewise. + (alpha_relocate_section): Likewise. + * coff-arm.c (coff_arm_relocate_section): Likewise. + * coff-i960.c (coff_i960_relocate_section): Likewise. + * coff-mcore.c (coff_mcore_relocate_section): Likewise. + * coff-mips.c (mips_relocate_section): Likewise. + * coff-ppc.c (coff_ppc_relocate_section): Likewise. + * coff-sh.c (sh_relocate_section): Likewise. + * coff-tic80.c (coff_tic80_relocate_section): Likewise. + * cofflink.c (_bfd_coff_generic_relocate_section): Likewise. + * elf-m10200.c (mn10200_elf_relocate_section): Likewise. + * elf-m10300.c (mn10300_elf_relocate_section): Likewise. + * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. + * elf32-fr30.c (fr30_elf_relocate_section): Likewise. + * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. + * elf32-i370.c (i370_elf_relocate_section): Likewise. + * elf32-m32r.c (m32r_elf_relocate_section): Likewise. + * elf32-mcore.c (mcore_elf_relocate_section): Likewise. + * elf32-sh.c (sh_elf_relocate_section): Likewise. + * elf32-v850.c (v850_elf_relocate_section): Likewise. + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise. + * elflink.h (elf_link_output_extsym): Likewise. + * pe-mips.c (coff_pe_mips_relocate_section): Likewise. + * reloc.c (bfd_generic_get_relocated_section_conten): Likewise. + * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise. - * peicode.h: Chain together calls to - coff_bfd_copy_private_bfd_data and - coff_bfd_print_private_bfd_data. + * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the + undefined_symbol callback when building shared library with + -Bsymbolic and undefined symbols are allowed. Otherwise, pass + "true". + * elf32-arm.h (elf32_arm_relocate_section): Likewise. + * elf32-i386.c (elf_i386_relocate_section): Likewise. + * elf32-m68k.c (elf_m68k_relocate_section): Likewise. + * elf32-mips.c (mips_elf_calculate_relocation): Likewise. + (elf32_mips_get_relocated_section_content): Likewise. + * elf32-ppc.c (ppc_elf_relocate_section): Likewise. + * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. + * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. + * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - * coff-arm.c: Add prototypes for - coff_arm_bfd_print_private_bfd_data and - coff_arm_bfd_copy_private_bfd_data. +2000-02-28 Nick Clifton -Wed Mar 25 15:45:55 1998 Nick Clifton + * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects. + * Makefile.in: Regenerate. - * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE - build. + * configure.in: Add support for mips and sh pe vectors. + * configure: regenerate. - * peicode.h: Call arm-coff private data functions after handling - pe private data. + * config.bfd: Add support for arm-wince, mips-pe and sh-pe + targets. - * coff-arm.c: Turn statics into globals so that they can be shared - both pe and pei backends. + * targets.c: Add mips and sh pe vectors. -Wed Mar 25 15:19:38 1998 Ian Lance Taylor + * libpei.h (coff_final_link_postscript): Only define if not + already defined. - * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than - plain numbers. - (sunos_write_object_contents): Likewise. - * aoutx.h (NAME(aout,machine_type)): Likewise. - * coffcode.h (coff_set_arch_mach_hook): Likewise. + * coffcode.h: Add support for WinCE magic numbers. -Wed Mar 25 13:59:24 1998 Andreas Schwab + * peigen.c (pe_print_reloc): Update comment and rearrange + appending of newline character. - * archures.c (bfd_mach_m68*): Add definitions for various m68k - variants. - (bfd_default_scan): Remove m68k special cases. - * bfd-in2.h: Rebuild. - * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather - than plain numbers. - * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise. - * cpu-m68k.c (arch_info_struct): Likewise. Add entry for - m68k:68000. - (bfd_m68k_arch): Set mach field to zero to signal no explicit - selection, change printable_name to just "m68k" and make that the - default instead of m68k:68020. + * peicode.h: Add support for Image Library Format. + (pe_ILF_vars): Structure containing data used by ILF code. + (pe_ILF_make_a_section): New function. Create a section based + on ILF data. + (pe_ILF_make_a_reloc): New function. Create a reloc based on + ILF data. + (pe_ILF_make_a_symbol): New function. Create a symbol based + on ILF data. + (pe_ILF_save_relocs): New function. Store the relocs created + by pe_ILF_make_a_reloc in a section. + (pe_ILF_build_a_bfd): New function. Create a BFD describing + an ILF object. + (pe_ILF_object_p): New function. Return a bfd_target pointer + for an ILF object. + (pe_bfd_object_p): If an ILF object is detected call + pe_ILF_object_p on it. - * aout-tic30.c (NAME): Define this to avoid multiple definitions - from aoutx.h. - (MY_get_section_contents): Define as aout_32_get_section_contents - rather than NAME(aout,get_section_contents). + * coff-arm.c: Add support for WinCE relocs which are different + from normal ARM COFF relocs. + * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target. - * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast. + * coff-sh.c: Add support for sh-pe target. + * pe-sh.c: New file. Support code for sh-pe target. + * pei-sh.c: New file. Support code for sh-pe target. - * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha - and call bfd_default_set_arch_mach to do the real work. + * pe-mips.c: New file. Support code for mips-pe target. + * pei-mips.c: New file. Support code for mips-pe target. -Wed Mar 25 10:41:35 1998 Richard Henderson +2000-02-27 Jakub Jelinek - * bout.c (BALX): Include return register g14 as part of the insn. - (BALX_MASK): New. - (calljx_callback): Use it. + * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump + architecture if the object causing the bump is dynamic. + * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise, + and also don't it for memory ordering. + (sparc64_elf_write_relocs): Take src_rela out of the loop. -Wed Mar 25 11:19:28 1998 Ian Lance Taylor +2000-02-27 Ian Lance Taylor - * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma. - * libbfd.h: Rebuild. + * dwarf2.c (read_abbrevs): Use _raw_size directly rather than + calling bfd_get_section_size_before_reloc. + (decode_line_info): Likewise. + (_bfd_dwarf2_find_nearest_line): Likewise. - * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change - byte_count to unsigned int. - (mn10300_elf_relax_section): Initialize internal_relocs. Remove - unused local variables. +2000-02-27 Eli Zaretskii - * evax-alpha.c (evax_close_and_cleanup): Remove unused local - variables er and er1. + * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the + name of the libtool directory. + * Makefile.in: Rebuild. - * cpu-v850.c: Include . - (scan): Case isdigit argument to unsigned char. +Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com) - From Yan Meroth : - * ihex.c (ihex_scan): Add extbase variable so that getting an - extended linear address record does not ignore any previous - extended address. - (ihex_write_object_contents): When writing out an extended linear - address record, zero out any previous extended address. + * som.c (SOM_HOWTO): Define. + (som_hppa_howto_table): Use it. -Tue Mar 24 16:09:43 1998 Manfred Hollstein +2000-02-25 Alexandre Oliva - * ieee.c (do_one): Check section before dereferencing it. - (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr. - (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive. + * config.bfd: Enable 64 bit support for GNU/Linux/sparc. -Mon Mar 23 18:51:47 1998 Joel Sherrill + * config.bfd: Enable 64 bit support for Solaris7+/sparc. - * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF. +2000-02-24 Catherine Moore -Mon Mar 23 14:23:36 1998 Nick Clifton + * som.c (som_misc_symbol_info): Add field + secondary_def. + (som_bfd_derive_misc_symbol_info): Initialize + secondary_def. + (som_build_and_write_symbol_table): Keep track + of secondary_def field. + (som_slurp_symbol_table): Set BSF_WEAK symbol flag + if secondary_def field is set. + (som_bfd_ar_write_symbol_stuff): Initialize + secondary_def. - * coff-arm.c: Add interworking functions to pe backends. +2000-02-23 Stephane Carrez -Fri Mar 20 18:47:20 1998 Ian Lance Taylor + * dwarf2.c (read_address): Read 16-bits addresses. + (parse_comp_unit): Accept addr_size == 2. - * configure.in: Use AM_DISABLE_SHARED. - * aclocal.m4, configure: Rebuild with libtool 1.2. +2000-02-23 Alan Modra -Fri Mar 20 11:25:41 1998 Nick Clifton + * bfd-in.h: Update copyright date. - * coff-arm.c (coff_arm_relocate_section): Better error messages - when interowrking conflucts occur. Courtesy of Jonathan Walton - and Tony Thompson. - (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted - relocations. Patch courtesy of Jonathan Walton and Tony - Thompson. +2000-02-23 Linas Vepstas -Fri Mar 20 02:26:43 1998 Richard Henderson + * cpu-i370.c: New file. + * elf32-i370.c: New file. + * archures.c (enum bfd_architecture): Add bfd_arch_i370. + (bfd_i370_arch): New. + (bfd_archures_list): Add bfd_i370_arch. + * elf.c (prep_headers): Add bfd_arch_i370. + * Makefile.am: Add support for IBM 370 elf. + * config.bfd: Likewise. + * configure.in: Likewise. + * libbfd.h (bfd_reloc_code_real_names): Likewise. + * reloc.c (bfd_reloc_code_type): Likewise. + * targets.c: Likewise. - * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert - part of Feb 22 change controling when to override the existing - symbol with the .plt entry. + * Makefile.in: Regenerate. + * configure: Regenerate. + * bfd-in2.h: Regenerate. -Wed Mar 18 09:26:25 1998 Nick Clifton +2000-02-22 Ian Lance Taylor - * config.bfd (targ_cpu): Add thumb-pe target. + * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for + invalid relocation types, and change them to R_386_NONE. - * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external - functions in PE build. +2000-02-22 H.J. Lu -Sun Mar 8 23:37:26 1998 Stan Cox + * elflink.h (elf_link_add_object_symbols): If a version symbol is + not defined, don't add a second ELF_VER_CHR. - * config.bfd (sparclite-*-elf*): Added. + * elflink.h (elf_bfd_final_link): Call output_extsym for global + symbols converted to local symbols even when stripping all + symbols. + (elf_link_output_extsym): Process global symbols converted to + local symbols even if they are being stripped. -Mon Feb 23 19:31:19 1998 Ian Lance Taylor +2000-02-21 Alan Modra - * configure.in: Add elf.lo to elf shell variable. - * Makefile.am (BFD_LIBS): Remove elf.lo. - (BFD_LIBS_CFILES): Remove elf.c. - (BFD32_BACKENDS): Add elf.lo. - (BFD32_BACKENDS_CFILES): Add elf.c. - * configure, Makefile.in: Rebuild. + * archures.c (bfd_octets_per_byte): Return unsigned int. + (bfd_arch_mach_octets_per_byte): Ditto. + * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned + comparison warning. + * section.c (bfd_get_section_size_before_reloc): Quell signed + vs. unsigned comparison warning. + (bfd_get_section_size_after_reloc): Same here. Fix parentheses too. + * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27 + change. What was I thinking? + * bfd-in2.h: Regenerate. -1998-02-23 15:53 Richard Henderson + * elflink.h (elf_gc_sweep): Skip non-elf input bfds. + (elf_gc_sections): Same here. + (elf_gc_common_finalize_got_offsets): And here. - * elf32-i386.c (elf_i386_relocate_section): A pc-relative - relocation against a non-local symbol should not have a dynamic - relocation. +2000-02-21 Ian Lance Taylor -Mon Feb 23 16:17:08 1998 Ian Lance Taylor + ELF HPPA doesn't work at present; remove it until it does. + * config.bfd: Comment out setting targ_defvec to + bfd_elf32_hppa_vec. + * Makefile.am: Rebuild dependencies. + (BFD32_BACKENDS): Remove elf32-hppa.lo. + (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c. + (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h. + * Makefile.in: Rebuild. + * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec. - * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in - COFF filehdr flags. - (pe_print_private_bfd_data): Print PE flags. From Mikey - . +2000-02-18 Geoff Keating -Sun Feb 22 20:39:00 1998 Richard Henderson + * coffcode.h (coff_set_arch_mach_hook): Use free(), because there + is no bfd_free(). Revert bfd_free part of previous change. - * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create - a plt entry when we can determine that we authoritatively define - the symbol. +2000-02-18 Geoff Keating -Sun Feb 22 20:33:05 1998 Richard Henderson + * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size + arrays. + (coff_compute_section_file_positions): Use bfd_free to pair + bfd_malloc. + (coff_write_object_contents): Likewise. - * configure.in (COREFILE selection): Remove sparc-*-linux*. They - don't actually use trad-core, but a SunOS-style core file handled - by gdb directly. - * hosts/sparclinux.h: Remove. + * coff-rs6000.c (xcoff_howto_table_16): New variable. + (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs. -Wed Feb 18 15:31:06 1998 Ian Lance Taylor +2000-02-18 Ulrich Drepper - * peicode.h (pe_print_idata): If there is no .idata section, look - for the import tables in some other section. Make the initial - label line up better with the data. Print the import address - table even if there is no import name table. If the import - address table holds actual addresses, print them. + * coff-rs6000.c (XCOFFARMAGBIG): New macro. + (xcoff_ar_file_hdr_big): New structure. + (SIZEOF_AR_FILE_HDR_BIG): New macro. + (xcoff_ar_hdr_big): New structure. + (SIZEOF_AR_HDR_BIG): New macro. + (xcoff_big_format_p): New macro. + (xcoff_ardata_big): New macro. + (arch_xhdr_big): New macro. + (xcoff_slurp_armap): Handle large archives. + (xcoff_archive_p): Detect large archives. + (xcoff_read_ar_hdr): Handle large archives. + (xcoff_openr_next_archived_file): Handle large archives. + (xcoff_generic_stat_arch_elt): Handle large archives. + (xcoff_write_armap_old): Rename from xcoff_write_armap. + (xcoff_write_armap_big): New function. + (xcoff_write_armap): New function, dispatch to _old or _big. + (xcoff_write_archive_contents_old): Rename from + xcoff_write_archive_contents. + (xcoff_write_archive_contents_big): New function. + (xcoff_write_archive_contents): New function, dispatch to _old or + _big. -Tue Feb 17 12:58:34 1998 Ian Lance Taylor +2000-02-18 Richard Henderson - * libbfd.c (bfd_seek): If fseek fails, save errno around call to - bfd_tell. If errno is EINVAL, set bfd_error_file_truncated, not - bfd_error_system_call. + * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect + and hide_symbol members. + (elf_link_hash_copy_indirect): Remove. + (elf_link_hash_hide_symbol): Remove. + (struct elf_backend_data): Add elf_backend_copy_indirect_symbol + and elf_backend_hide_symbol. + (_bfd_elf_link_hash_copy_indirect): Declare. + (_bfd_elf_link_hash_hide_symbol): Declare. + * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument. + (_bfd_elf_link_hash_hide_symbol): Likewise. + (_bfd_elf_link_hash_table_init): Don't init killed members. + * elflink.h (elf_link_add_object_symbols): Use the bed function + pointers not elf_link_hash_{copy_indirect,hide_symbol}. + (elf_link_assign_sym_version): Likewise. + * elfxx-target.h (elf_backend_copy_indirect_symbol): Default. + (elf_backend_hide_symbol): Likewise. + (elfNN_bed): Update for new members. -Fri Feb 13 13:11:33 1998 Ian Lance Taylor +2000-02-17 Kevin Buettner - * Makefile.am (AUTOMAKE_OPTIONS): Define. - * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. + * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD, + STACK_END_ADDR): Define for new core file format. + (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines + for handling the vagaries of the various core file structures used + by AIX over the years. + (rs6000coff_core_p, rs6000coff_core_file_matches_executable, + Rs6kCorData): Use above defines to adapt code to use AIX 4.3's + core_dumpx structure. - From H.J. Lu : - * Makefile.am (libbfd_la_LDFLAGS): Define. - * Makefile.in: Rebuild. +Thu Feb 17 00:04:48 2000 J"orn Rennecke -Thu Feb 12 17:31:11 1998 Ian Lance Taylor - - NetBSD patches from Gordon W. Ross : - * netbsd.h (MACHTYPE_OK): Define. - (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when - calling N_SET_MACHTYPE, rather than having a switch. - * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD, - and M_ALPHA_NETBSD. - * i386netbsd.c (MACHTYPE_OK): Don't define. - (DEFAULT_MID): Define. - * m68k4knetbsd.c (SEGMENT_SIZE): Don't define. - (MACHTYPE_OK): Don't define. - (DEFAULT_MID): Define. - * m68knetbsd.c: (MACHTYPE_OK): Don't define. - (DEFAULT_MID): Define. - * ns32knetbsd.c (MACHTYPE_OK): Don't define. - (DEFAULT_MID): Define. - * sparcnetbsd.c (MACHTYPE_OK): Don't define. - (DEFAULT_MID): Define. - - NetBSD patches from Gordon W. Ross : - * vaxnetbsd.c: New file. - * netbsd-core.c: Clean up. Remove unused macros. Use netbsd - rather than netbsd_core. - * targets.c (vaxnetbsd_vec): Declare. - (bfd_target_vector): Add vaxnetbsd_vec. If NETBSD_CORE is - defined, add netbsd_core_vec. - * configure.in: Set COREFILE for alpha*-*-netbsd* and - powerpc-*-netbsd* to netbsd-core.lo. If COREFILE is - netbsd-core.lo, set COREFLAG to -DNETBSD_CORE. - * config.bfd (alpha*-*-netbsd*): New target. - * Makefile.am: Rebuild dependencies. - (BFD32_BACKENDS): Add vaxnetbsd.lo. - (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c. - * configure, Makefile.in: Rebuild. + * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros. + (bfd_mach_sh3_dsp): Likewise. + (bfd_mach_sh4): Reinstate. + (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750. + * bfd-in2.h: Regenerate. + * coff-sh.c (struct sh_opcode): flags is no longer short. + (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros. + (sh_opcode41, sh_opcode42): Integrate as sh_opcode41. + (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes. + (sh_opcode41, sh_opcode4, sh_opcode80): Likewise. + (sh_opcodes): No longer const. + (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays. + (sh_insn_uses_reg): Check for USESAS and USESR8. + (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS. + (_bfd_sh_align_load_span): Return early for SH4. + Modify sh_opcodes lookup table for sh-dsp / sh3-dsp. + Take into account that field b of a parallel processing insn + could be mistaken for a separate insn. + * cpu-sh.c (arch_info_struct): New array elements for + sh2, sh-dsp and sh3-dsp. + Reinstate element for sh4. + (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros. + (SH4_NEXT): Reinstate. + (SH3_NEXT, SH3E_NEXT): Adjust. + * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare. + * elf32-sh.c (sh_elf_set_private_flags): New function. + (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise. + (sh_elf_merge_private_data): New function. + (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define. + (bfd_elf32_bfd_copy_private_bfd_data): Define. + (bfd_elf32_bfd_merge_private_bfd_data): Change to + sh_elf_merge_private_data. - * configure.host: Remove the old shared library build stuff. We - now use libtool instead. +2000-02-13 Richard Henderson -Wed Feb 11 17:13:09 1998 Richard Henderson + * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and + hide_symbol members. + (elf_link_hash_copy_indirect): New. + (elf_link_hash_hide_symbol): New. + * elflink.h (elf_link_add_object_symbols): Break out copy from + indirect new new symbol to elf.c. + (elf_link_assign_sym_version): Break out privatization of + non-exported symbol to elf.c. + * elf.c (_bfd_elf_link_hash_copy_indirect): New. + (_bfd_elf_link_hash_hide_symbol): New. + (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol. - * tekhex.c (tekhex_write_object_contents): Call tekhex_init. +2000-02-13 Ian Lance Taylor -Tue Feb 10 19:23:28 1998 H.J. Lu + * section.c (_bfd_strip_section_from_output): Add info parameter. + If it passed as non-NULL, use it to check whether any input BFD + has an input section which uses this output section. Change all + callers. + * bfd-in2.h: Rebuild. - * configure.in: Take stab-syms.lo out of sparclinux_vec list. - * configure: Rebuild. + * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and + bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of + 1999-11-29. + * bfd-in2.h: Rebuild. -Tue Feb 10 15:16:38 1998 Nick Clifton - * elf32-v850.c (remember_hi16s_reloc): New function. - (find_remembered_hi16s_reloc): New function. - (v850_elf_store_addend_in_insn): Use the above new functions to - match up HI6S relocs with LO16 relocs. +2000-02-10 Timothy Wall -Tue Feb 10 15:01:39 1998 Ian Lance Taylor + * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to + allow final modifications of swapped-in symbol. + (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST. + * coffcode.h (coff_write_relocs): Use macro + SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether + symbol index should be set to -1. - * configure.in: Change -linux* to -linux-gnu*. - * config.bfd, configure.host: Likewise. - * configure: Rebuild. +Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com) -Mon Feb 9 19:40:59 1998 Nick Clifton + * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG, + USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros. + * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes. + * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg, + sh_insns_uses_or_sets_freg): New functions. + * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros. + * (sh_insns_conflict): Use new functions and new macros to + detect conflicts when two instructions both set same integer registers, + both set same fp register, and both set special register. - * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another - LO16/HI16S bug and improve comments about what is going on. +2000-02-09 Timothy Wall -Sat Feb 7 15:27:03 1998 Ian Lance Taylor + * coffgen.c (coff_real_object_p): Set arch/mach info prior to + swapping in sections, so that the swapping routines have access to + the arch/mach info. - * configure, aclocal.m4: Rebuild with new libtool. +2000-02-08 Mark Elbrecht -Fri Feb 6 14:48:20 1998 Nick Clifton + * coff-go32.c: Update comment. Update copyright. - * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain - when merging v850 code into v850e/v850ea code. Do not initialise - output flags if the input is the default architecture. +2000-01-27 Thomas de Lellis -Fri Feb 6 11:50:22 1998 Jeffrey A Law (law@cygnus.com) + * syms.c (bfd_decode_symclass) + Two new class characters were added - 'V' and 'v'. The + meaning of 'W' is now restricted to just weak non-object + symbols. This allows differentiation between, for example, + weak functions vs weak objects. nm for example now dumps: + 'W' = weak global + 'w' = weak unresolved + 'V' = weak global object + 'v' = weak unresolved object - * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR - get the size from bfd_arch_bits_per_address instead of directly - from the isa. + (bfd_is_undefined_symclass): New function. Return true if the + given symbol class represents and undefined/unresolved symbol. -Thu Feb 5 14:21:34 1998 Michael Meissner + (bfd_symbol_info): Use bfd_is_undefined_symclass to check for + unresolved symbols. - * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address - to wrap, just return all 1's bits instead. - * libbfd.h: Regenerate. + * bfd-in2.h: Add prototype for bfd_is_undefined_symbol(). -Thu Feb 5 11:51:05 1998 Ian Lance Taylor + * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the + STT_ARM_16BIT flag set, but it is not attached to a data object + return STT_ARM_16BIT so that it will be treated as code by the + disassembler. - * coff-i386.c (coff_pe_i386_relocate_section): New static function - if COFF_WITH_PE. - (coff_relocate_section): If COFF_WITH_PE, define as - coff_pe_i386_relocate_section. - * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE, - skip empty sections, to match coff_write_object_contents. +2000-01-27 Alan Modra - * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend, - rather than swapping out r_offset twice. From Luke Deller - . + * coff-i386.c (i3coff_object_p): Remove prototype. + Update copyright. -Wed Feb 4 19:11:28 1998 Ian Lance Taylor + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const + to name. Update copyright. - * configure.in: Set libtool_enable_shared rather than - libtool_shared. Remove diversion hack. - * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild - with new libtool. + * trad-core.c (trad_unix_core_file_p): Cast core_regsec + assignment to avoid warning. Update copyright. -Wed Feb 4 16:10:21 1998 Brent Baccala +2000-01-24 Robert Lipe (robertl@sco.com) - * syms.c (struct stab_cache): Define. - (struct stab_find_info): Remove cached_offset, cached_stab, - cached_str, and cached_stroff fields. Add file_cache, - function_cache, and line_cache fields. - (_bfd_stab_section_find_nearest_line): Use extensive caching to - speed up searches. + * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc + instead of using GNU C extension. -Wed Feb 4 13:34:22 1998 Ian Lance Taylor +2000-01-21 Nick Clifton - * peicode.h (pe_print_idata): Check for import of ordinal rather - than name. - (pe_print_edata): If there is no .edata section, look for the - export data in some other section. + * libbfd.c (bfd_read): Do not attempt to get a negativly sized + amount from a bfd_in_memory structure. + (bfd_seek): Do not allow seeks past the end of a bfd_in_memory + structure. -Mon Feb 2 20:05:42 1998 Jason Molenda (crash@bugshack.cygnus.com) +2000-01-14 Nick Clifton - * configure.in: Change version to 2.8.4. - * configure: Regenerated. + * linker.c (default_indirect_link_order): oops - fix incorrectly + applied patch from Tim Wall. -Mon Feb 2 17:39:39 1998 Steve Haworth - - Add tms320c30 support: - * cpu-tic30.c: New file. - * aout-tic30.c: New file. - * coff-tic30.c: New file. - * archures.c (bfd_arch_tic30): Define. - (bfd_tic30_arch): Declare. - (bfd_archures_list): Add bfd_tic30_arch. - * targets.c (bfd_target_vector): Add tic30_aout_vec and - tic30_coff_vec. - * reloc.c (BFD_RELOC_TIC30_LDP): Define. - * coffcode.h (coff_set_arch_mach_hook): Add tic30 case. - (coff_set_flags): Likewise. - * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets. - * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors. - * Makefile.am: Rebuild dependencies. - (ALL_MACHINES): Add cpu-tic30.lo. - (ALL_MACHINES_CFILES): Add cpu-tic30.c. - (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo. - (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c. - * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild. - -Mon Feb 2 12:25:12 1998 Nick Clifton - - * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc - to lag behind LO16 reloc by a couple of instructions. - -Mon Feb 2 14:09:46 1998 Ian Lance Taylor - - * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force - make to reexamine the file timestamp. - ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise. - - * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from - 0x100000. - -Fri Jan 30 19:07:07 1998 Geoff Keating - - * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure - to create .dynsbss and .rela.sbss sections. - (ppc_elf_adjust_dynamic_symbol): Put space for small data to be - copied from dynamic objects into .sbss. - (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't - use it. Correct typo of .rela.sdata2. - (ppc_elf_finish_dynamic_symbol): Generate reloc to where we - put the data, which may now be in .sbss. - (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss. - (elf_backend_create_dynamic_sections): Define as - ppc_elf_create_dynamic_sections. - - * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs - against _GLOBAL_OFFSET_TABLE_. - (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in - shared libraries which refer to local symbols. Make sure that the - test for allocating space for a reloc in a shared object is the - same as the test for emitting a reloc. - -Thu Jan 29 15:55:35 1998 J.J. van der Heijden - - * config.bfd (i[3456]-*-mingw32*): New target. - * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32. - * aclocal.m4, configure: Rebuild. - -Wed Jan 28 13:41:26 1998 Ian Lance Taylor - - * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we - have a bfd_object. - -Tue Jan 27 21:43:55 1998 Richard Henderson - - Sparc v9 ABI compliant PLT: - * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries. - (plt_templates, sparc64_elf_build_plt_entry): Delete. - (LARGE_PLT_THRESHOLD): New define. - (GOT_RESERVED_ENTRIES): V9 ABI only uses 1. - (sparc64_elf_build_plt): New function. - (sparc64_elf_plt_entry_offset): Likewise. - (sparc64_elf_plt_ptr_offset): Likewise. - (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to - contain the index for convenience. Skip the initial entries - in .rela.plt. - (sparc64_elf_size_dynamic_sections): Zero the allocated contents - memory for the benefit of .rela.plt. - (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset. - (sparc64_elf_finish_dynamic_symbol): Kill template stuff. Use - sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc. - (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt. - Call sparc64_elf_build_plt. - (elf_backend_want_got_plt): No. - (elf_backend_plt_readonly): No. - (elf_backend_plt_alignment): 8. - - * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab. - * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it. - * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it - to be called. - -Tue Jan 27 21:45:15 1998 Jeffrey A Law (law@cygnus.com) - - * archures.c (bfd_mach_mips*): Add definitions for various MIPS - processors. - * cpu-mips.c (arch_info_struct): Add mips variants. - * bfd-in2.h: Rebuilt. +2000-01-13 Timothy Wall (twall@tiac.net> -Tue Jan 27 15:06:04 1998 Nick Clifton + * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx + = scnhsz, filhsz, relsz, aoutsz, etc) - * coff-arm.c (coff_arm_relocate_section): Preserve the contents of - t2a3_b_insn. + * coffswap.h: Ditto. -Tue Jan 27 12:47:27 1998 Robert Lipe +2000-01-13 Nick Clifton - * config.bfd (i[3456]86-sco3.2v5*): ELF now the default. - (i[3456]86sco3.2v5*coff): New target. + * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to + interwork thumb to arm stub. -Mon Jan 26 15:41:30 1998 Ian Lance Taylor +2000-01-13 Timothy Wall (twall@tiac.net> - * bfd-in2.h: Rebuild with changes to chew--tab expansion. + * archures.c (bfd_octets_per_byte): New function: Return + target byte size. + (bfd_arch_mach_octets_per_byte): New function: Return target + byte size. -Thu Jan 22 21:26:48 1998 Richard Henderson + * section.c: Distinguish between octets and bytes for usage of + _cooked_size, _raw_size, and output_offset. Clarify + description of bfd_set_section_contents. - * bfd.c (bfd_get_error_handler): Add orthogonal function. * bfd-in2.h: Regenerate. -Thu Jan 22 21:13:39 1998 Richard Henderson + * coffgen.c: Indicate that the offset parameter is in bytes, not + octets. - * tekhex.c (tekhex_write_object_contents): Check for no symbols. + * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte + where appropriate to get the octet offset when calling + bfd_set_section_contents. + (bfd_coff_reloc_link_order): Ditto. -Wed Jan 21 21:19:03 1998 Ian Lance Taylor + * linker.c (bfd_generic_reloc_link_order): Ditto. + (_bfd_default_link_order): Ditto. - * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't - adjust addend for an output common symbol (from Jimmy Blair - ). If COFF_WITH_PE, adjust addend for PC relative - defined symbol to counteract adjustment made in generic relocation - code. + * reloc.c (bfd_perform_relocation): Distinguish between octets + and bytes. Use octets when indexing into octet data; use bytes + when calculating target addresses. + (bfd_install_relocation): Ditto. - * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h. + * srec.c (srec_write_section): Ditto. -Wed Jan 21 21:16:06 1998 Manfred Hollstein +2000-01-13 Nick Clifton - * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name. - (GET_SCNDHR_NLNNO): Likewise. + * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from + 3 to 2. This allows 4 byte sized sections, which is necessary for + dlltool to build functioning DLLs. -Mon Jan 19 12:49:52 1998 Ian Lance Taylor +2000-01-10 Philip Blundell - * cpu-sh.c (arch_info_struct): Correct next field of sh3e. + * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu. + (arm*-*-conix*): New target. -Wed Jan 14 17:23:27 1998 Nick Clifton +2000-01-10 Egor Duda - * elf32-m32r.c: Add macros to handle NOP insertion. + * config.bfd: Include elf32_i386 vector to target list for cygwin + and mingw. -Wed Jan 14 16:15:22 1998 Richard Henderson + * config.in: Undefine HAVE_WIN32_PSTATUS_T. + * configure.in: Test for structure win32_pstatus_t in + + * configure: Regenerate. - * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section. - (xcoff_mark): Likewise. - (xcoff_build_ldsyms): Mark absolute symbols. + * elf.c (elfcore_grok_win32pstatus): New function: process + win32_pstatus_t notes in elf core file. + (elfcore_grok_note): Detect win32_pstatus notes. -Wed Jan 14 16:03:11 1998 Richard Henderson +2000-01-03 Martin v. Loewis - * bout.c (b_out_write_object_contents): Sort symbols before output - to keep {CALL,BAL}NAME symbols adjacent. - (b_out_symbol_cmp): New function. + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol + visibility. + * elflink.h (elf_link_add_object_symbols): Combine visibilities. + * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility. -For older changes see ChangeLog-9697 +For older changes see ChangeLog-9899 Local Variables: mode: change-log diff --git a/contrib/binutils/bfd/ChangeLog-9899 b/contrib/binutils/bfd/ChangeLog-9899 new file mode 100644 index 0000000..c6348c4 --- /dev/null +++ b/contrib/binutils/bfd/ChangeLog-9899 @@ -0,0 +1,5595 @@ +1999-12-29 Richard Henderson + + * elflink.h (bfd_elf,size_dynamic_sections): Don't export all + if no dynamic sections created. + +1999-12-27 Nick Clifton + + * peicode.h (pe_bfd_object_p): Only define for PE format + targets. + +1999-12-17 Nick Clifton + + * coff-i386.c (i3coff_object_p): Delete. + (i386coff_vec): Replace reference to i3coff_object_p with a + reference to coff_object_p. + + * coff-mcore.c (pe_object_p): Delete. + + * peicode.h (pe_bfd_object_p): New function: Detect the + presence of a PE format COFF object file. Also detect and + warn about the presence of LINK6 format Image Library Format + object files. + +1999-12-16 Nick Clifton + + * coff-arm.c (NUM_ELEM): New macro. + (NUM_RELOCS): New macro: The number of known ARM relocs. + (RTYPE2HOWTO): Return NULL if the reloc type is out of range. + (coff_arm_rtype_to_howto): Return NULL if the reloc type is out + of range. + (bfd_arm_process_before_allocation): Produce a warning message if + an out of range symbol index is encountered. + +1999-12-14 Nick Clifton + + * elflink.h (is_global_symbol_definition): New Function: Return + true iff the symbol is being given a global definition in this + bfd. + (elf_link_is_defined_archive_symbol): Do not bother processing + symbols for an archive element that has already been included + in the link. + Use is_global_symbol_definition(). + +1999-12-09 Andrew Cagney + + * config.bfd: Add support for sparc-*-netbsdelf* and + sparc-*-netbsdaout*. + +1999-12-13 Nick Clifton + + * elflink.h (elf_link_is_defined_archive_symbol): Check to see + if the symbol is in the common section. + +1999-12-10 Nick Clifton + + * elflink.h (elf_link_is_defined_archive_symbol): New + function: Decide if a symbol, in an archive map is there + because it is defined in the archive element, or because it is + just another common declaration of it. + (elf_link_add_archive_symbols): Use + elf_link_is_defined_archive_symbol to decide if an archive + element contain a reference to a common symbol should be + linked in or not. + +1999-12-10 Nick Clifton + + * elflink.h: Revert previous patch. + * targets.c: Revert previous patch. + * libbfd-in2.h: Revert previous patch. + * libbfd.h: Revert previous patch. + * elfxx-target.h: Revert previous patch. + * archive.c: Revert previous patch. + * aout-target.h: Revert previous patch. + * aout-tic30.h: Revert previous patch. + * bfd.c: Revert previous patch. + * coff-alpha.c: Revert previous patch. + * coff-rs6000.c: Revert previous patch. + * elf64-mips.c: Revert previous patch. + * ieee.c: Revert previous patch. + * libecoff.h: Revert previous patch. + * oasys.c: Revert previous patch. + * som.c: Revert previous patch. + * vms.c: Revert previous patch. + +1999-12-09 Nick Clifton + + * elflink.h (elf_link_add_archive_symbols): Add an archive + element even if contains a symbol which is currently only + considered to be a common. + + * targets.c (struct bfd_target): Add new field + _bfd_allow_commons_in_armap. + * bfd-in2.h:Regenerate. + + * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap): + Define. + (_bfd_archive_bsd_allow_commons_in_armap): Define. + * libbfd.h: Regenerate. + + * elfxx-target.h: If using COFF archive map, override + definition of allow_commons_in_armap and replace with + bfd_false. + + * archive.c (bfd_compute_and_write_armap): Do not place common + symbols into the archive map unless _bfd_allow_commons_in_armap + returns true. + + * aout-target.h (MY_allow_commons_in_armap): Define. + * aout-tic30.h (MY_allow_commons_in_armap): Define. + * bfd.c (bfd_allow_commons_in_armap): Define. + * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define. + * coff-rs6000.h (xcoff_allow_commons_in_armap): Define. + * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define. + * ieee.c (ieee_ecoff_allow_commons_in_armap): Define. + * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define. + * oasys.c (oasys_allow_commons_in_armap): Define. + * som.c (som_allow_commons_in_armap): Define. + * vms.c (vms_allow_commons_in_armap): Define. + +1999-12-07 Jim Blandy + + Add support for SSE registers in ELF core files. + * elf.c (elfcore_make_note_pseudosection): New function. + (elfcore_grok_prfpreg): Use it. + (elfcore_grok_prxfpreg): New function. + (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes. + +1999-12-03 Ian Lance Taylor + + * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16 + value by 4 before storing it back in the field. From + Koundinya. K . + +Tue Nov 30 22:41:14 1999 Jeffrey A Law (law@cygnus.com) + + * archures.c (bfd_mach_am33): Define. + * bfd-in2.h: Rebuilt. + * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list + * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions. + (compute_function_info): Handle additional registers saved by + movm on the am33. + (elf_mn10300_mach): Handle E_MN10300_MACH_AM33. + (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33. + +1999-11-29 Jim Blandy + + * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New + functions. + * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New + declarations. + +1999-11-27 Michael Meissner + + * reloc.c (BFD_RELOC_ALPHA_USER_LITERAL): New relocation for + internal use within gas for alpha explicit relocations. + (BFD_RELOC_ALPHA_USER_LITUSE_BASE): Ditto. + (BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF): Ditto. + (BFD_RELOC_ALPHA_USER_LITUSE_JSR): Ditto. + (BFD_RELOC_ALPHA_USER_GPDISP): Ditto. + (BFD_RELOC_ALPHA_USER_GPRELHIGH): Ditto. + (BFD_RELOC_ALPHA_USER_GPRELLOW): Ditto. + + * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for + BFD_RELOC_ALPHA_USER_*. + + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + +1999-11-26 Fred Fish + + * elf.c (elfcore_read_notes): Add prototype for static function. + (_bfd_elf_make_section_from_phdr): Renamed from bfd_section_from_phdr. + (bfd_section_from_phdr): Replacement function that calls + _bfd_elf_make_section_from_phdr for generic segment types and + backend fucntion pointed to by elf_backend_section_from_phdr for + backend specific segment types. + (_bfd_elfcore_section_from_phdr): Remove call to elfcore_read_notes, + now called by _bfd_elf_make_section_from_phdr. Note that this func + is now just a stub between the caller and bfd_section_from_phdr. + + * elf-bfd.h (struct elf_backend_data): Add new function pointer + elf_backend_section_from_phdr. + (elf_backend_section_from_phdr): Add prototype. + + * elfxx-target.h (elf_backend_section_from_phdr): Define default. + (elfNN_bed): Add elf_backend_section_from_phdr. + +1999-11-25 Nick Clifton + + * coff-arm.c (bfd_arm_get_bfd_for_interworking): Add + SEC_CODE and SEC_READONLY flags to glue sections. + + * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add + SEC_CODE and SEC_READONLY flags to glue sections. + +1999-11-20 Nick Clifton + + * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous + delta. + +1999-11-19 Catherine Moore + + * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding. + (elf_cpu32_plt_entry): Likewise. + +1999-11-18 Nick Clifton + + * coff-mcore.c (coff_mcore_rtype_to_howto): Special case handling + for RVA relocs. + (coff_mcore_relocate_section): Initialise addend to 0. + Special case processing of RVA reloc. + +1999-11-17 Richard Henderson + + * elf-bfd.h (struct elf_backend_data): Reorder collect and + type_change_ok; add sign_extend_vma. + * elf32-mips.c (elf_backend_sign_extend_vma): Define. + * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma. + (elf_swap_shdr_in, elf_swap_phdr_in): Likewise. + * elfxx-target.h (elf_backend_sign_extend_vma): Default. + (elfNN_bed): Follow struture changes. + +1999-11-09 Ian Lance Taylor + + * libbfd.c (bfd_read): Check result of read against desired result + using !=, not <. + (_bfd_generic_get_section_contents): Set bfd_error if the seek is + invalid compared to the section size. + + * ieee.c (ieee_slurp_debug): Get the length of the debug + information right if there is no data part. + +Tue Nov 2 01:44:41 1999 Jeffrey A Law (law@cygnus.com) + + * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND, + R_LINETAB, R_LINETAB_ESC, and R_COMMENT. + +1999-10-28 Ian Lance Taylor + + * elflink.h (elf_bfd_final_link): Make last_local signed. + +1999-10-27 Ian Lance Taylor + + * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section + starts with a zero. + +Sat Oct 23 17:36:12 1999 Andrew Cagney + + * archures.c: Add definitions bfd_mach_d10v, bfd_mach_d10v_ts2 and + bfd_mach_d10v_ts3. + * cpu-d10v.c (d10v_ts3_info, d10v_ts2_info): Add. + * bfd-in2.h: Regenerate. + +1999-10-15 Andrew Haley + + * dwarf1.c (parse_die): Fail to parse a die if its length is zero. + +Sun Oct 17 17:19:00 1999 Jeffrey A Law (law@cygnus.com) + + * libhppa.h (bfd_hppa_insn2fmt): Change to return an int. + +1999-10-08 Ian Lance Taylor + + * elflink.h (elf_merge_symbol): When overriding a weak symbol with + a defined symbol in a shared library, clear the DEF_DYNAMIC flag + too. + +Fri Oct 8 13:03:45 1999 Geoffrey Keating + + * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL + relocs also need the GP value. + (_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs + properly. Handle sign-extension for R_MIPS_64 correctly. Correct + the GP value for R_MIPS_LITERAL relocs too. Handle + R_MIPS_64 relocs properly on big-endian MIPS. + (mips_elf_sign_extend): Behave properly with 'long long'. + (mips_elf_highest): Correct typo. + +Mon Oct 4 17:49:45 1999 Nick Clifton + + * cpu-m32r.c (arch_info_struct): New static global. + (bfd_m32r_arch): Refer to it. + * elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH. + (m32r_elf_print_private_bfd_data): Ditto. + (m32r_elf_final_write_processing): Handle bfd_mach_m32rx. + * archures.c (bfd_mach_m32rx): Define it. + * bfd-in2.h: Rebuild. + +1999-09-28 Fred Fish + + * targets.c (cisco_core_vec): Replaced with two new vecs ... + (cisco_core_big_vec): Add new bigendian vec. + (cisco_core_little_vec): Add new little endian vec. + + * cisco-core.c (CRASH_INFO): Fixed offset replaced with ... + (crash_info_locs): Add array of possible offsets. + (MASK_ADDR): Mask to apply to crash info offset. + (crashinfo_external): Add textbase, database, bssbase and + turn into a typedef. + (cisco_core_file_validate): Renamed from cisco_core_file_p. + Many small changes to account for additional hardware versions. + Pick a reasonable size for ".reg" section. Add a ".crash" + section to allow access to crashinfo_external struct. + (cisco_core_file_p): New version of this function that + iterates over crash_info_locs, calling cisco_core_file_validate. + (cisco_core_vec): Old big endian only vec replaced with ... + (cisco_core_big_vec): Add big endian version. + (cisco_core_little_vec): Add little endian version. + + * configure.in (cisco_core_vec): Split to two new vectors ... + (cisco_core_big_vec): New target vector. + (cisco_core_little_vec): New target vector. + * configure: Regenerate. + * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec + to cisco_core_big_vec in targ_selvecs. + +1999-09-28 Geoffrey Keating + + * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete. + (mips_elf_relocate_got_local): Unused, delete. + (mips_elf_relocate_global_got): Unused, delete. + +1999-09-24 Fred Fish + + * elf.c (bfd_section_from_phdr): Add typename variable. Use p_type + to initialize it to something meaningful. Then use it to generate + more useful segment names. + +Sun Sep 19 12:16:47 1999 Jeffrey A Law (law@cygnus.com) + + * som.c (NO_PCREL_MODES): Define if the system does not define + R_SHORT_PCREL_MODE. + (hppa_som_gen_reloc_type): Handle both short and long pcrel branches. + (som_write_fixups): Eliminate redundant pcrel mode relocs. Handle + R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE + * libhppa.h (dis_assemble_22): New function. + (bfd_hppa_insn2fmt): Handle long branch. + + * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found + in PA2.0. + +1999-09-17 Alan Modra + + * coff-i386.c (coff_i386_reloc_type_lookup): Support BFD_RELOC_16, + BFD_RELOC_16_PCREL, BFD_RELOC_8, BFD_RELOC_8_PCREL relocs. + (reloc_howto_type howto_table): Tidy comments and whitespace. + +1999-09-17 Nick Clifton + + * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo + previous delta. Set sec->gc_mark instead. + +Thu Sep 16 11:21:13 1999 Catherine Moore + + * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0. + (elf_cpu32_plt_entry): Likewise. + +Thu Sep 16 10:48:17 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL. + + * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the + symbol table, then just compute a suitable value (but do not + create a __gp symbol). + + * elf-hppa.h (elf_hppa_relocate_section): Allow undefined + symbols when building shared libraries. + (elf_hppa_final_link_relocate): Correct handling of PCREL + relocations against undefined symbols. + +1999-09-16 Nick Clifton + + * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Mark + interworking sections as linker created so that they will not + be removed by garbage collection. + +Wed Sep 15 02:31:57 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling. + (elf_hppa_final_link_relocate): Consistently create an absolute + address, then subtract out the value of __gp. + +1999-09-14 Michael Meissner + + * configure.in (Canonicalization of target names): Remove adding + ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 + generates $ac_config_sub with a ${CONFIG_SHELL} already. + * configure: Regenerate. + +1999-09-14 Nick Clifton + + * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of + Mitsubishi). + +Mon Sep 13 20:01:47 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_record_segment_addrs): New function. + (elf_hppa_final_link): Initialize text_segment_base and + data_segment_base. + (elf_hppa_final_link_relocate): Handle SEGREL relocations. + + * elf-hppa.h (elf_hppa_final_link): Remove unused variables. + (elf_hppa_final_link_relocate): Likewise. + (elf_hppa_relocate_insn): Likewise. + (elf_hppa_relocate_section): Initialize HOWTO. + +1999-09-13 Donn Terry + + * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT + handling to support both GNU and MS objects. + + * coffcode.h (coff_write_object_contents): Don't check reloc_count + when determining whether to set F_RELFLG. + +1999-09-13 Philip Blundell + + * elf32-arm.h (elf32_arm_final_link_relocate): Don't range-check + PC24 relocs if the target is an undefined weak symbol. + (arm_add_to_rel): Fix compiler warning. + (elf32_arm_plt0_entry): Correct comments. + +1999-09-13 Alan Modra + + * elfcode.h (write_relocs): Check for the_bfd NULL when handling + an absolute symbol in REL relocs. + +Sun Sep 12 23:47:58 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32. + Stub SEGREL32. Return an error for any relocation not handled. + +1999-09-12 Ian Lance Taylor + + * cofflink.c (coff_link_add_symbols): Look for special MSVC string + constant symbols, and avoid multiple definition errors on them. + +1999-09-12 Donn Terry + + * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most + significant bit is set. + +1999-09-11 Ian Lance Taylor + + * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define. + + * elfcode.h (write_relocs): Handle an absolute symbol in REL + relocs as we do for RELA relocs. + +1999-09-11 Donn Terry + + * libpei.h (_bfd_pei_final_link_postscript): Declare. + (coff_final_link_postscript): Define. + * peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data + directory entries here. + (_bfd_pei_final_link_postscript): New function. + + * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets + section flags based on the section name. + + * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the + get the overflow of the s_nlnno field from the s_nreloc field. + * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap + the s_nlnno overflow of the .text section into the s_nreloc + field. + + * peigen.c (add_data_entry): Declare. + (pei_swap_aouthdr_out): Get image size right. Set linker version + more intuitively. + (pei_swap_scnhdr_out): Test for UNINIT section, not .bss. + (pe_print_idata): Code cleanup, print more info, get rid of (now) + extraneous ImageBase. + (pe_print_edata): Likewise. + (pe_print_pdata): Likewise. Print exception entries. + (pe_print_reloc): Likewise. Print MIPS_JMPADDR. + (tbl): Make const, add "UNKNOWN". + (_bfd_pe_print_private_bfd_data_common): Print timestamp. + (_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted + section data directory. + (_bfd_pe_bfd_copy_private_section_data): Copy pe_flags. + + * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare. + * peigen.c (_bfd_pe_bfd_get_symbol_info): New function. + * peicode.h (coff_get_symbol_info): Define. + + * config.bfd (i[3456]86-*-interix*): Set targ_cflags to + -DSTRICT_PE_FORMAT. + * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather + than __INTERIX. + (coff_classify_symbol): Re-revert 1999-08-08 patch if + STRICT_PE_FORMAT. + + * libpei.h: New file, broken out of peicode.h. + * peigen.c: New file, broken out of peicode.h. + * peicode.h: A bunch of code moved out to libpei.h and peigen.c. + * configure.in: Add peigen.lo to list of files required for each + PE target. + * Makefile.am: Rebuild dependencies. + (BFD32_BACKENDS): Add peigen.lo. + (BFD32_BACKENDS_CFILES): Add peigen.c. + (SOURCE_HFILES): Add libpei.h. + * configure, Makefile.in: Rebuild. + + * peicode.h (coff_swap_scnhdr_in): Don't check for a special + section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA + instead. Don't clear the s_paddr field for an uninitialized data + section. + + * coffcode.h (coff_mkobject_hook): Set timestamp field in + coff_data_type to f_timdat. + * peicode.h (pe_mkobject_hook): Likewise. + + * peicode.h (coff_swap_filehdr_in): Check the NT executable magic + number if COFF_IMAGE_WITH_PE. + + * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG + to the reverse of IMAGE_FILE_DEBUG_STRIPPED. + (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if + there is no SEC_DEBUGGING section. + * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of + IMAGE_FILE_DEBUG_STRIPPED. + + * pe-i386.c (COFF_LONG_FILENAMES): Define. + (COFF_SECTION_ALIGNMENT_ENTRIES): Define. + * pei-i386.c (COFF_LONG_FILENAMES): Define. + (COFF_SECTION_ALIGNMENT_ENTRIES): Define. + + * coffswap.h (IMAGE_BASE): Don't define. + * pei-arm.c (IMAGE_BASE): Don't define. + * pei-i386.c (IMAGE_BASE): Don't define. + * pei-mcore.c (IMAGE_BASE): Don't define. + * pei-ppc.c (IMAGE_BASE): Don't define. + + * cofflink.c (_bfd_coff_link_input_bfd): When writing out a + symbol, switch on the class when determining whether to modify the + value. For PE, don't modify the value of a C_FCN symbol not named + .bf. + + * libbfd-in.h (_bfd_abort): Declare. + (abort): Define. + * bfd.c (_bfd_abort): New function. + * libbfd.h: Rebuild. + + * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE + special handling. + + * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped, + don't write out the associated line numbers. + + * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol + aux entries. + + * cofflink.c (coff_link_add_symbols): Don't warn about symbol type + changes when the base type is unknown. + + * coffgen.c (coff_print_symbol): Fix printing of aux record for + function symbols. + + * syms.c (BSF_DEBUGGING_RELOC): Define. + * coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING + for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such + symbols named .bf. + * coffgen.c (fixup_symbol_value): Relocate a symbol which has + BSF_DEBUGGING_RELOC set. + * bfd-in2.h: Rebuild. + +1999-09-10 Ian Lance Taylor + + * ecoff.c (bfd_debug_section): Update initialization for new + comdat_info field. + (_bfd_ecoff_styp_to_sec_flags): Add section parameter. + * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration. + +1999-09-10 H.J. Lu + + * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new + _bfd_filnmlen field. + * coff-mips.c (mips_ecoff_backend_data): Likewise. + +Fri Sep 10 00:35:14 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries + for FPTR relocs involving local symbols. + + * elf-hppa.h (elf_hppa_final_link_relocate): Get the right + value for the stub address in a call through a stub. + Install the value for a local symbol directly into the DLT + instead of generating a reloc. Correctly handle FPTR64 relocs. + + * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function. + (elf_hppa_remark_useless_dynamic_symbols): Similarly. + (elf_hppa_final_link): Call them. + +1999-09-10 Ian Lance Taylor + + * elflink.h (elf_fix_symbol_flags): Move weakdef handling here... + (elf_adjust_dynamic_symbol): ...from here. + +Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR + relocation, remove them. SECREL64->LTOFF16WF. + (elf_hppa_final_link_relocate): Handle LTOFF* relocations. Handle + DIR* relocations. + (elf_hppa_relocate_insn): Similarly. + + * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs. + (elf_hppa_relocate_insn): Similarly. + + * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and + GPREL* relocations. + (elf_hppa_relocate_insn): Similarly. + + * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos. + Handle LTOFF_TP* relocs. + (elf_hppa_relocate_insn): Similarly. + + * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs. + Consistently deal with addends. Handle DLTIND14F and DLTREL14F. + (elf_hppa_relocate_insn): Handle PCREL* relocs. + + * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*, + DIR32, DIR64 and FPTR64 relocations. + (elf_hppa_relocate_insn): Similarly. + + * elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the + address of the .PARISC.global section. + (elf_hppa_relocate_section): Lookup and pass the PA64 hash + table entry elf_hppa_final_link_relocate. Do not give a warning + for a reloc against an external symbol if it has a PA64 hash + table entry. + (elf_hppa_final_link_relocate): Significantly rework. Handle + DLTIND relocations. Compute the final value of the relocation + before passing the value of elf_hppa_relocate_insn. + (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling + relocation support. Handle DLTIND relocation requests just like + DLTREL relocation requests. Simplify branch handling. + +1999-09-08 Ulrich Drepper + + * elf-hppa.h (elf_hppa_relocate_section): Catch problems with + non-allocated section as done in i386 version. + (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch + statement since this is no know relocation. + +Tue Sep 7 17:25:12 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F + relocs. + (elf_hppa_relocate_insn): Similarly. + + * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and + DLTREL14WD relocs. + (elf_hppa_relocate_insn): Similarly. + + * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and + DLTREL21L relocs. Pass the output bfd to elf_hppa_relocate_insn. + Pass the relocate type rather than the insn format to + elf_hppa_relocate_insn. + (elf_hppa_relocate_insn): Make switch dependent on relocation type + rather than the opcode. Handle DLTREL21L and DLTREL14R relocs. + +1999-09-07 Ian Lance Taylor + + * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field. + (bfd_coff_filnmlen): Define. + (bfd_coff_std_swap_table): Initialize new field. + * coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather + than FILNMLEN. + (coff_write_symbols): Likewise. + (coff_get_normalized_symtab): Likewise. + * coff-sh.c (bfd_coff_small_swap_table): Initialize new field. + * libcoff.h: Rebuild. + +1999-09-06 Donn Terry + + * coffcode.h (sort_by_secaddr): New static function if + COFF_IMAGE_WITH_PE. + (coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort + sections by VMA when assigning target_index values. Always set + virt_size. + + * libcoff-in.h (struct pei_section_tdata): Add pe_flags field. + * coffcode.h (coff_set_alignment_hook) [COFF_WITH_PE version]: Set + pe_flags field. + * libcoff.h: Rebuild. + + * coffcode.h (coff_set_custom_section_alignment): Add const to + declaration to match definition. + (coff_write_object_contents): Don't set F_AR32W(R)? if + COFF_WITH_PE. + + * coff-i386.c (in_reloc_p): Add declaration. + (i386coff_vec): Simplify initialization of + application_section_flags. + + * coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE + version. Move COFF_WITH_PE specific code to new version. + (stype_to_sec_flags): Likewise. Add section parameter. + * coffgen.c (make_a_section_from_file): Set target_index before + calling styp_to_sec_flags. Pass section to styp_to_sec_flags. + * libcoff.h: Rebuild. + + * syms.c (stt): Add some PE/PEI section names. + (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined + symbol. + (bfd_symbol_info): Check for 'w'. + + * section.c (struct bfd_comdat_info): Define. + (asection): Add comdat field. + (STD_SECTION): Initialize comdat field. + (bfd_make_section_anyway): Likewise. + * bfd-in2.h: Rebuild. + +1999-09-06 Andreas Schwab + + * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag + to version symbols. + +1999-09-06 Nick Clifton + + * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and + bfd_realloc instead of calloc and realloc. + +1999-09-04 Steve Chamberlain + + * cpu-pj.c: New file. + * elf32-pj.c: New file. + * config.bfd (pj*): New cpu. + (pj-*-*, pjl-*-*): New targets. + * configure.in (bfd_elf32_pj_vec): New target vector. + (bfd_elf32_pjl_vec): New target vector. + * archures.c (bfd_arch_pj): Define. + * elf.c (prep_headers): Handle bfd_arch_pj. + * reloc.c: Define BFD_RELOC_PJ_* relocations. + * targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add + to target vector list. + * Makefile.am: Rebuild dependencies. + (ALL_MACHINES): Add cpu-pj.lo. + (ALL_MACHINES_CFILES): Add cpu-pj.c. + (BFD32_BACKENDS): Add elf32-pj.lo. + (BFD32_BACKENDS_CFILES): Add elf32-pj.c. + * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild. + +1999-09-04 Ian Lance Taylor + + * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define. + * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK + and NON_GOT_REF from weak defined symbol to real symbol. + * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF. + (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't + create a COPY reloc. + * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF. + (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set, + don't create a COPY reloc. + +1999-09-03 Ian Lance Taylor + + * elflink.h (elf_bfd_final_link): When counting relocations, don't + count those in sections we are not including in the link. + +Thu Sep 2 17:41:20 1999 Jeffrey A Law (law@cygnus.com) + + * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK + field in hpux11 shared libraries. + +1999-09-02 Nick Clifton + + * elflink.h (elf_gc_record_vtentry): Fix memory leak. + +Wed Sep 1 13:34:29 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_add_symbol_hook): New function. + (elf_hppa_final_link, elf_hppa_relocate_section): Likewise. + (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise. + +1999-08-31 Alexandre Petit-Bianco + + * elflink.h (record_link_assignment): When possible, keep the + original type of the symbol. + +Mon Aug 30 15:26:48 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both + R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the + tools were configured. + * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare. + +1999-08-26 Mark Mitchell + + * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local + GOT entries for GOT16 relocations; they're not required. + +1999-08-24 Nick Clifton + + From a patch submitted by Roland McGrath + + * config.bfd (arm-*-netbsd*): New target. + * configure.in (armnetbsd_vec): New target vector. + * configure: Regenerate + * targets.c (bfd_target_vector): Add &armnetbsd_vec. + + * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo. + (ALL_MACHINES_CFILES): Add armnetbsd.c. + (armnetbsd.lo): New rule with deps. + * Makefile.in: Regenerate. + + * armnetbsd.c: New file: Definitions specific to arm-netbsd + target. + +Tue Aug 24 00:25:58 1999 Jeffrey A Law (law@cygnus.com) + + * som.c (som_slurp_symbol_table): Fix typo in comment. + +Fri Aug 20 17:01:23 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_fake_sections): Compute section indices + here instead of using elf_section_data... + +1999-08-19 Nick Clifton + + * coff-mcore.c (mcore_emit_base_file_entry): New function: Emit + relocations into the base file. + (coff_mcore_relocate_section): Call mcore_emit_base_file_entry if + we are building a base file. + +1999-08-19 Nick Clifton + + * elf32-arm.h (arm_add_to_rel): New function. Add a value to + a REL style reloc. + (elf32_arm_relocate_section): Use arm_add_to_rel to increment + REL relocs when performing a partial relocation. + +1999-08-18 Donn Terry + + * cofflink.c: Move definitions of N_TMASK, et. al., out of + _bfd_coff_link_input_bfd into top level. + + * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE. + (RTYPE2HOWTO): Return NULL if reloc type is out of range. + (coff_i386_rtype_to_howto): Likewise. + * coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG. + Completely ignore symbols which are all zero. + (dummy_reloc16_estimate): Add return 0. + * cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope + variable copy to name_copy to avoid shadowing outer scope + variable. + * libcoff-in.h (coff_data_type): Change raw_syment_count field + from unsigned int to unsigned long. Add timestamp field. + * libcoff.h: Rebuild. + +1999-08-17 H.J. Lu + + * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in + macro definition. + +1999-08-17 Ian Lance Taylor + + * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC + for special section symbols. + * elflink.h (elf_merge_symbol): If we have no old BFD, check + BSF_DYNAMIC on the section symbol to see whether the old BFD is + dynamic. + +1999-08-15 Mark Mitchell + + * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate + coincidence of variable names between old and new code. + +1999-08-12 Nick Clifton + + * elf32-arm.h (elf32_arm_to_thumb_stub): Make 'offset' parameter + into a bfd_vma and 'addend' parameter a 'bfd_signed_vma'. + (elf32_thumb_to_arm_stub): Make 'offset' parameter into a bfd_vma + and 'addend' parameter a 'bfd_signed_vma'. + (elf32_arm_final_link_relocate): Do not involve stubs in + R_ARM_THM_PC22 relocs relative to section symbols, they are long + jumps, not function calls. + +1999-08-11 Robin Farine + + * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow + in R_ARM_PC24 relocs. + +Tue Aug 10 12:48:09 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (elf_hppa_fake_sections): New function. + * elf32-hppa.c (elf_backend_fake_sections): Define. + + * elf-hppa.h (elf_hppa_final_write_processing): Update for + recent changes to the arch_info structure. + + * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle + R_HPPA_SEGBASE and R_HPPA_SEGREL32. + * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info + list. + +Tue Aug 10 00:34:29 1999 Mark P. Mitchell + Ralf Baechle + + * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always + output DT_MIPS_GOTSYM. + (_bfd_mips_elf_finish_dynamic_sections): Use the same value as + DT_MIPS_SYMTABNO if there are no global GOT symbols. + +Tue Aug 10 00:21:08 1999 Mark P. Mitchell + + * elf32-mips.c (mips_elf_create_dynamic_relocation): Change + prototype. Handle local symbols. Add commentary. + (mips_elf_calculate_relocation): Adjust accordingly. + (_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32 + relocations. + + * elflink.h (elf_bfd_final_link): Tweak last change. + +1999-08-09 Mark Mitchell + + * elflink.h (elf_link_size_reloc_section): Use the counts in the + elf-section data to allocate just the right amount of relocation + space. Don't allocate the hash space twice. + (elf_bfd_final_link): Calculate the amount of space to allocate in + each relocation section. + +Mon Aug 9 17:37:30 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in + 64bit mode, generate a section relative relocation for a 32bit + wide relocation. + (elf_hppa_is_local_label_name): New function. + * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted. To be + shared between 32bit and 64bit port. + +1999-08-09 Mark Mitchell + + * elf32-mips.c (elf_mips_howto_table): Fix src_mask for + R_MIPS_GOT16 and R_MIPS_CALL16. + (mips_elf_got16_entry): Use mips_elf_high to calculate the value + to use when looking for a preexisting GOT entry. + +1999-08-09 Jakub Jelinek + + * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of + the Sep. 4th, 1998 change. glibc 2.0.x dynamic linker had bug, + not binutils. + * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. + +1999-08-09 Geoff Keating + + * elflink.h (elf_link_output_extsym): Don't output a weak + reference to an undefined symbol just because it was defined weak + in a shared object. + +1999-08-09 Eli Zaretskii + + * coffgen.c (coff_find_nearest_line): When looking for file, use + last best match rather than first. If address is beyond last line + number record, don't return the last line as the correct value. + +1999-08-08 Ian Lance Taylor + + * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT. + * bfd-in2.h: Rebuild. + +1999-08-08 Mark Elbrecht + + * libcoff-in.h (struct coff_section_alignment_entry): Define. + * coffcode.h (coff_set_custom_section_alignment): New static + function. + (coff_section_alignment_table): New static array. + (coff_new_section_hook): Use coff_set_customer_section_alignment. + * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define. + * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define. + * libcoff.h: Rebuild. + +1999-08-08 Ian Lance Taylor + + * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to + MKDEP. + * Makefile.in: Rebuild. + +1999-08-08 Mumit Khan + + * section.c (SEC_SHARED): Define. + * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED. + (styp_to_sec_flags): Likewise. + * peicode.h (coff_swap_scnhdr_out): Likewise. + * bfd-in2.h: Rebuild. + +1999-08-08 Ian Lance Taylor + + * coffcode.h (coff_classify_symbol): Comment out part of + 1999-08-05 change which breaks cygwin DLLs. + + * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*. + * aclocal.m4, configure: Rebuild. + +1999-08-06 Ian Lance Taylor + + * section.c (global_syms): Only initialize union field if + __STDC__. + +1999-08-04 Mark Mitchell + + * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by + the size of a GOT entry here. + (mips_elf_calculate_relocation): Don't create a local GOT entry + for the symbol in a GOT16 relocation; just for it's high-order bit + (_bfd_mips_elf_relocate_section): Fix thinko. + +1999-08-05 Ian Lance Taylor + + Based on patches from Donn Terry : + * coffcode.h (enum coff_symbol_classification): Define. + (bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to + _bfd_coff_classify_symbol. Change return type. + (bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global. + (coff_slurp_symbol_table): Use coff_classify_symbol. + (coff_classify_symbol): New static function. + (coff_sym_is_global): Never define. + (bfd_coff_std_swap_table): Initialize with coff_classify_symbol. + * cofflink.c (coff_link_check_ar_symbols): Use + bfd_coff_classify_symbol rather than bfd_coff_sym_is_global. + (coff_link_add_symbols): Likewise. + (_bfd_coff_link_input_bfd): Likewise. + * coff-sh.c (bfd_coff_small_swap_table): Initialize with + coff_classify_symbol. + * libcoff.h: Rebuild. + +Wed Aug 4 18:08:07 1999 Jeffrey A Law (law@cygnus.com) + + * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors + (e_ltpsel, e_rtpsel): Similarly. + + * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel + and 14bit ertpsel. Handle 64bit psel. + +1999-08-04 Mark Mitchell + + * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16 + handling for REL relocations. And only left-shift R_MIPS26 + relocation addends where necessary. + +1999-08-03 Mark Mitchell + + * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ... + (mips_elf_next_lo16_relocation): Don't compute the addend here. + Just return the relocation found. + (mips_elf_relocate_section): Pull the LO16 addend out of the + section itself when using REL relocations. + + * elf32-mips.c (mips_elf_calculate_relocation): Restore + _DYNAMIC_LINK handling and handling of undefined symbols in shared + libraries. + +1999-08-03 Ian Lance Taylor + + * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation + value of a symbol in a SEC_DEBUGGING section. Warn when doing a + relocation against a symbol in an input section with no output + section. From Daniel Jacobowitz . + + * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used. + + * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to + look for generated file correctly. + * aclocal.m4, configure: Rebuild. + +1999-08-02 Mark Mitchell + + * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26 + and R_MIPS16_26 relocations correctly when relocating. + (_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16 + and R_MIPS_CALL_LO16 are for global symbols. + +1999-08-02 Jakub Jelinek + + * elflink.h (elf_bfd_final_link): Copy the whole isym, not just + some fields. + * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used + variables and initialize them. + +1999-08-01 Mark Mitchell + + * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where + there are no global symbols requiring GOT entries. + (_bfd_mips_elf_size_dynamic_sections): Likewise. + (_bfd_mips_elf_finish_dynamic_symbol): Likewise. + (_bfd_mips_elf_finish_dynamic_sections): Likewise. + + * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak + symbols are considered to have the value zero. + (_bfd_mips_elf_relocate_section): Don't try to perform a + relocation for an undefined symbol. + (_bfd_mips_elf_check_relocs): Allocate locate GOT space for local + GOT16 relocations. + +1999-07-30 Jakub Jelinek + + * elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI + wants ba,a,pt %xcc instead of %icc. + Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots + of large PLT entries. + (sparc64_elf_plt_ptr_offset): Fix calculation. + (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT + addend should be relative to load address, not .plt section start. + (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries. + +1999-07-30 Jakub Jelinek + + * elf-bfd.h (struct elf_backend_data): Add + print_symbol_all and output_arch_syms backend methods. + * elfxx-target.h: Likewise. + * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create, + sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms, + sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New + functions. + (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER + symbols in .dynsym, add their names into .dynstr. Put those symbols + into dynlocal. + (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER + pointers to STT_REGISTER symbols in dynsym section. + (sparc64_elf_print_symbol_all): New function. + * elf.c (bfd_elf_print_symbol): Allow special backend symbol + printing using the print_symbol_all hook. + +1999-07-30 Catherine Moore + + * elf32-arm.h (elf32_arm_check_relocs): Use r_offset for + R_ARM_GNU_VTENTRY. + +1999-07-29 Richard Henderson + + * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if + dynamic_sections_created. + +1999-07-29 Richard Henderson + + * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ... + (mips_rtype_to_howto): ... new function. + (_bfd_mips_elf_relocate_section): Use it. + +1999-07-28 Mark Mitchell + + * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo. + +1999-07-27 Nick Clifton + + Patch generated by Bernd Schmidt. + + * coff-arm.c (coff_arm_is_local_label_name): Change to strip + out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'. + +1999-07-23 Donn Terry + + * libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags + field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL. + * cofflink.c (coff_link_add_symbols): If PE, handle section + symbols specially. + * libcoff.h: Rebuild. + + * config.bfd (i[3456]86-*-interix*): New target. + +1999-07-21 Mark Elbrecht + + * coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and + COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with + .gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD. + * coff-go32.c: (COFF_LONG_SECTION_NAMES): Define. + (COFF_SUPPORT_GNU_LINKONCE): Define. + * coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define. + (COFF_SUPPORT_GNU_LINKONCE): Define. + +1999-07-21 Ian Lance Taylor + + From Mark Elbrecht: + * makefile.dos: Remove; obsolete. + * configure.bat: Remove; obsolete. + +1999-07-21 H.J. Lu + + * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes. + +1999-07-21 Philippe De Muyter + + * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error + message and fail if a symbol index is out of range. + +1999-07-21 Ian Lance Taylor + + * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value + when looking at a R_MIPS_GOT16 relocation. + +1999-07-20 Nick Clifton + + * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC. + +Mon Jul 19 14:03:44 1999 Mark P. Mitchell + + * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP + removed in previous change. + (_bfd_mips_elf_relocate_section): Adjust GP relative relocations + in relocateable output. + +1999-07-19 Ian Lance Taylor + + * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target + structure. + + * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD + if they appear to be specially created by the linker. + +1999-07-19 Nick Clifton + + * targets.c (alternative_target): New field in bfd_target + structure. + (bfd_search_for_target): New function: Find a target that + satisifies a search function. + * bfd-in2.h: Regenerate. + + * elfxx-target.h: Initialise the alternative_target field of + the bfd_target structures to point to the other target (if + defined). + * nlm-target.h: Initialise the alternative_target field of + the bfd_target structures to point to the other target (if + defined). + + * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): New macro. + (CREATE_LITTLE_COFF_TARGET_VEC): New macro. + + * aix386-core.c: Initialise new field of bfd_target structure. + * aout-adobe.c: Initialise new field of bfd_target structure. + * aout-arm.c: Initialise new field of bfd_target structure. + * aout-target.h: Initialise new field of bfd_target structure. + * aout-tic30.c: Initialise new field of bfd_target structure. + * binary.c: Initialise new field of bfd_target structure. + * bout.c: Initialise new field of bfd_target structure. + * cisco-core.c: Initialise new field of bfd_target structure. + * coff-a29k.c: Use CREATE_BIG_COFF_TARGET_VEC. + * coff-alpha.c: Initialise new field of bfd_target structure. + * coff-apollo.c: Use CREATE_BIG_COFF_TARGET_VEC. + * coff-arm.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC. + * coff-h8300.c: Use CREATE_BIG_COFF_TARGET_VEC. + * coff-h8500.c: Use CREATE_BIG_COFF_TARGET_VEC. + * coff-i386.c: Initialise new field of bfd_target structure. + * coff-i860.c: Initialise new field of bfd_target structure. + * coff-i960.c: Use CREATE_LITTLE_COFF_TARGET_VEC. + * coff-m68k.c: Use CREATE_BIG_COFF_TARGET_VEC. + * coff-mcore.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC. + * coff-mips.c: Initialise new field of bfd_target structure. + * coff-ppc.c: Initialise new field of bfd_target structure. + * coff-rs6000.c: Initialise new field of bfd_target structure. + * coff-sh.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC. + * coff-sparc.c: Use CREATE_BIG_COFF_TARGET_VEC. + * coff-tic30.c: Initialise new field of bfd_target structure. + * coff-tic80.c: Use CREATE_LITTLE_COFF_TARGET_VEC. + * coff-w65.c: Use CREATE_LITTLE_COFF_TARGET_VEC. + * coff-we32k.c: Use CREATE_BIG_COFF_TARGET_VEC. + * coff-z8k.c: Use CREATE_BIG_COFF_TARGET_VEC. + * hppabsd-core.c: Initialise new field of bfd_target structure. + * hpux-core.c: Initialise new field of bfd_target structure. + * i386msdos.c: Initialise new field of bfd_target structure. + * i386os9k.c: Initialise new field of bfd_target structure. + * ieee.c: Initialise new field of bfd_target structure. + * ihex.c: Initialise new field of bfd_target structure. + * irix-core.c: Initialise new field of bfd_target structure. + * mipsbsd.c: Initialise new field of bfd_target structure. + * netbsd-core.c: Initialise new field of bfd_target structure. + * oasys.c: Initialise new field of bfd_target structure. + * osf-core.c: Initialise new field of bfd_target structure. + * ppcboot.c: Initialise new field of bfd_target structure. + * ptrace-core.c: Initialise new field of bfd_target structure. + * sco5-core.c: Initialise new field of bfd_target structure. + * som.c: Initialise new field of bfd_target structure. + * srec.c: Initialise new field of bfd_target structure. + * tekhex.c: Initialise new field of bfd_target structure. + * trad-core.c: Initialise new field of bfd_target structure. + * versados.c: Initialise new field of bfd_target structure. + * vms.c: Initialise new field of bfd_target structure. + +1999-07-19 Andreas Schwab + + * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash + and rel_hdr. + +Sat Jul 17 02:28:28 1999 Mark P. Mitchell + + * elflink.h (elf_link_adjust_relocs): New function. + (elf_bfd_final_link): Use it. + (elf_link_input_bfd): Deal with the fact that there can be + two relocation sections for a single section. + (elf_reloc_link_order): Likewise. + + * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for + a relocateable object. + (_bfd_mips_elf_relocate_section): Handle relocateable links. + +1999-07-16 Jakub Jelinek + + * elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID. + (sparc64_elf_get_reloc_upper_bound, + sparc64_elf_get_dynamic_reloc_upper_bound, + sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table, + sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs): + New functions. + (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use + ELF64_R_TYPE_ID/DATA where appropriate. + +1999-07-16 Jakub Jelinek + + * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove + DT_SPARC_PLTFMT. + +1999-07-16 Ian Lance Taylor + + * elf32-mips.c (mips_elf_local_relocation_p): New static + function. + (mips_elf_next_lo16_addend): Call bfd_set_error on failure. + (mips_elf_calculate_relocation): Use mips_elf_local_relocation_p. + Always set *require_jalxp. + (mips_elf_stub_section_p): Mark abfd parameter as unused. + (_bfd_mips_elf_relocate_section): Only look for LO16 following + GOT16 if the GOT16 is against a local symbol. Don't return false + for an undefined symbol. If there is an overflow, assert that we + have a name. + +1999-07-16 Andreas Schwab + + * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused + variables `link' and `elfsec'. + (elf_bfd_final_link): Remove unused variable `os'. + +Thu Jul 15 17:55:31 1999 Mark P. Mitchell + + * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require + a PT_PHDR program headers. + (_bfd_mips_elf_final_link): Don't assume there are going to be + section symbols when we're not building a shared object. + (_bfd_mips_elf_check_relocs): Make sure we have a GOT when + we need one. + +1999-07-15 J.T. Conklin + + * config.bfd (i[3456]86-*-vxworks*): New target. + +1999-07-15 Mark Mitchell + + * elf32-mips.c (mips_elf_stub_section_p): New function. + (mips_elf_calculate_relocation): Handle MIPS16 stub functions. + (mips_elf_relocate_section): Adjust calling sequence for + mips_elf_calculate_relocation and mips_elf_perform_relocation. + (mips_elf_perform_relocation): Turn `jal' into `jalx' where + required. + +1999-07-15 Ian Lance Taylor + + * configure.in: Bump version number to 2.9.5. + * configure: Rebuild. + +Thu Jul 15 02:56:15 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle + 64bit format. + (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type + to derive final type instead of hardwiring a selection. + +1999-07-14 Mark Mitchell + + * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of + things relocated by R_MIPS16_GPREL. + (mips_elf_perform_relocation): Likewise. + +Wed Jul 14 15:23:19 1999 Jim Wilson + + * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss. + +1999-07-14 Richard Henderson + + * elf32-mips.c (struct mips_got_info): Add global_gotno. + (_bfd_mips_elf_size_dynamic_sections): Set it. + (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow. + (mips_elf_sort_hash_table): Set max_non_got_dynindex based off + new argument max_local. + +1999-07-14 Mark Mitchell + + * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit + subwords when handling an R_MIPS16_26 relocation. + (mips_elf_perform_relocation): Don't be paranoid abour right-shift + semantics. + + * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and + dst_mask to match reality. + (_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL. + (mips_elf_obtain_contents): Use bfd_get. + (mips_elf_perform_relocation): Handle R_MIPS16_GPREL. + (mips_elf_relocate_section): Likewise. + +1999-07-13 Mark Mitchell + + * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26. + (mips_elf_relocate_section): Adjust calling sequence for + mips_elf_perform_relocation. + (mips_elf_perform_relocation): Take additional argument. Handle + R_MIPS16_26. Use bfd_put for convenience. + +1999-07-13 Richard Henderson + + * elf.c (assign_file_positions_for_segments): Thinko last change. + Always overwrite p_flags. + +1999-07-13 Richard Henderson + + * elf-bfd.h (struct elf_backend_data): Add want_dynbss. + * elflink.c (_bfd_elf_create_dynamic_sections): Only create + .dynbss and .rel[a].bss if want_dynbss. + * elfxx-target.h (elf_backend_want_dynbss): Provide default. + +1999-07-13 Richard Henderson + + * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags. + +1999-07-13 Richard Henderson + + * elf-bfd.h (struct elf_link_local_dynamic_entry): New. + (struct elf_link_hash_table): Add dynlocal. + (_bfd_elf_link_lookup_local_dynindx): Prototype. + (_bfd_elf_link_adjust_dynindx): Delete. + (_bfd_elf_link_renumber_dynsyms): Prototype. + (_bfd_elf,link_record_local_dynamic_symbol): Prototype. + * elfcode.h (elf_link_record_local_dynamic_symbol): New alias. + * elflink.c (_bfd_elf_link_adjust_dynindx): Delete. + (_bfd_elf_link_lookup_local_dynindx): New function. + (elf_link_renumber_hash_table_dynsyms): New function. + (_bfd_elf_link_renumber_dynsyms): New function. + * elflink.h (elf_link_record_local_dynamic_symbol): New function. + (struct elf_assign_sym_version_info): Delete removed_dynamic. + (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output + instead of elf_link_remove_section_and_adjust_dynindices. + Remove removed_dynamic code. Use _bfd_elf_link_renumber_dynsyms. + (elf_link_assign_sym_version): Remove removed_dynamic code. + (elf_link_renumber_dynsyms): Delete. + (elf_bfd_final_link): Install section and local symbols into .dynsym. + + * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete. + (elf_m68k_size_dynamic_sections): Don't set section dynindicies. + (elf_m68k_finish_dynamic_sections): Don't write section dynsyms. + * elf32-mips.c: Similarly. + * elf32-ppc.c: Similarly. + * elf32-sparc.c: Similarly. + * elf64-alpha.c: Similarly. + * elf64-sparc.c: Similarly. + +1999-07-13 Mark Mitchell + + * elf32-mips.c (mips_elf_calculate_relocation): Do not complain + when _gp_disp is undefined. Do not check R_MIPS_LO16 for overflow + when the relocation is against _gp_disp. + +1999-07-12 Mark Mitchell + + * dwarf2.c (read_attribute): Support DW_FORM_ref8. + * elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs + to possibly_dynamic_relocs. Adjust usage throughout code. + (elf_mips_howto_table): Handle R_MIPS_64 correctly. + (elf_mips_ctor64_howto): Likewise. + (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32. + Adjust indentation. + (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode. + (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32. + Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries. + * elf64-mips.c (elf_backend_may_use_rel_p): Define. + +1999-07-12 Ian Lance Taylor + + * Makefile.am: Rebuild dependencies. + * Makefile.in: Rebuild. + + * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE. + * bfd-in2.h: Rebuild. + + * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED + as appropriate. Use EMPTY_HOWTO as appropriate. Fill in + structure initializations. Add casts. + * reloc.c (EMPTY_HOWTO): Define. + * bfd-in2.h: Rebuild. + * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless + comparisons against 0. + * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change + previous_ibfd_e_flags to unsigned long. + * vms.h (struct vms_private_data_struct): Change section_count to + unsigned. + * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned. + (_bfd_vms_write_gsd): Change symnum to unsigned. + * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned. + * vms-tir.c (etir_sta): Change psect to unsigned. + (alloc_section): Change idx to unsigned. + (tir_sta, tir_ctl): Change psect to unsigned. + (_bfd_vms_write_tir): Change len and before to bfd_size_type. + * vms.c (priv_section_count): Change to unsigned. + +1999-07-12 Andreas Schwab + + * elf32-m68k.c: Add some ATTRIBUTE_UNUSED. + * m68klinux.c: Likewise. + +1999-07-12 Ian Lance Taylor + + * Many files: Changes to avoid gcc warnings: Remove unused local + variables. Add default case to enum switches. + * coff-arm.c (bfd_arm_allocate_interworking_sections): Only + compile if not COFF_IMAGE_WITH_PE. + (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise. + (bfd_arm_get_bfd_for_interworking): Likewise. + (bfd_arm_process_before_allocation): Likewise. + * epoc-pei-arm.c: Don't rename bfd_arm functions. + * pei-arm.c: Likewise. + * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare. + (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change. + (mips_elf_got16_entry): Put parens around & in body of ==. + (mips_elf_calculate_relocation): Correct test for empty string. + * vms-gsd.c: Use _bfd_error_handler rather than fprintf to + stderr. + * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf + format. + +1999-07-11 Ian Lance Taylor + + * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED + as appropriate. Fill in structure initializations. Add variable + initializations. Add casts. + * dwarf1.c (parse_line_table): Change eachLine to unsigned long. + (dwarf1_unit_find_nearest_line): Change i to unsigned long. + + * elf.c (bfd_elf_hash): Change parameter from unsigned char * to + char *. + * elf-bfd.h (bfd_elf_hash): Update declaration. + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts + when calling bfd_elf_hash. + +1999-07-11 Mark Mitchell + + * libbfd.c (bfd_put_8): Make it of type `void'. + * bfd-in2.h: Regenerated. + * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize + for 32-bit hosts. + (_bfd_mips_elf_final_link): Likewise. + + * elflink.h (elf_link_read_relocs_from_section): Be type-correct. + +Thu Jul 8 12:32:23 1999 John David Anglin + + * config.bfd (hppa*-*-linux-gnu*): New target + +1999-07-07 Mark Mitchell + + * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify. + (_bfd_mips_elf_create_dynamic_sections): New function. + (_bfd_mips_elf_add_symbol_hook): Likewise. + (_bfd_mips_elf_adjust_dynamic_symbol): Likewise. + (_bfd_mips_elf_finish_dynamic_symbol): Likewise. + (_bfd_mips_elf_finish_dynamic_sections): Likewise. + (_bfd_mips_elf_gc_mark_hook): Likewise. + (_bfd_mips_elf_gc_sweep_hook): Likewise. + (_bfd_mips_elf_always_size_sections): Likewise. + (_bfd_mips_elf_size_dynamic_sections): Likewise. + (_bfd_mips_elf_check_relocs): Likewise. + (_bfd_mips_elf_link_hash_table_create): Likewise. + (_bfd_mips_elf_print_private_data): Likewise. + (_bfd_mips_elf_link_output_symbol_hook): Likewise. + (_bfd_mips_elf_final_link): Likewise. + (_bfd_mips_elf_additional_program_headers): Likewise. + (_bfd_mips_elf_modify_segment_map): Likewise. + (_bfd_mips_elf_relocate_section): Likewise. + * elf32-mips.c (mips_elf32_object_p): Move contents into + _bfd_mips_elf_object_p. + (mips_elf_additional_program_headers): Rename to + _bfd_mips_elf_additional_program_headers. + (mips_elf_modify_segment_map): Rename to + _bfd_mips_elf_modify_segment_map. + (elf_mips_abi_name): Change prototype. + (mips_elf32_section_from_shdr): Merge into + _bfd_mips_elf_section_from_shdr. + (mips_elf32_section_processing): Merge into + _bfd_mips_elf_section_processing. + (mips_elf_final_link): Rename to _bfd_mips_elf_final_link. Invoke + the right back-end ELF linker. + (mips_elf_relocate_section): Rename to + _bfd_mips_elf_relocate_section. Clean up. Adjust for 64-bit code. + (mips_elf_link_output_symbol_hook): Rename to + _bfd_mips_elf_link_output_symbol_hook. + (mips_elf_create_dynamic_section): Rename to + _bfd_mips_elf_create_dynamic_section. + (mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs. + Adjust for 64-bit code. Use mips_elf_got_section. + (mips_elf_adjust_dynamic_symbol): Rename to + _bfd_mips_elf_adjust_dynamic_symbol. Use + mips_elf_allocate_dynamic_relocations. + (mips_elf_finish_dynamic_symbol): Rename to + _bfd_mips_elf_finish_dynamic_symbol. Use mips_elf_got_section. + Adjust for 64-bit code. + (mips_elf_finish_dynamic_sections): Rename to + _bfd_mips_elf_finish_dynamic_sections. Adjust for 64-bit code. + (mips_elf_always_size_sections): Rename to + _bfd_mips_elf_always_size_sections. + (mips_elf_add_symbol_hook): Rename to + _bfd_mips_elf_add_symbol_hook. + (mips_elf_next_lo16_addend): Constify. + (mips_elf_calculate_relocation): Likewise. + (mips_elf_obtain_contents): Likewise. + (mips_elf_perform_relocation): Likewise. + (mips_elf_create_dynamic_relocation): Likewise. + (mips_elf_allocate_dynamic_relocations): New function. + (MIPS_ELF_REL_DYN_SECTION_NAME): New macro. + (MIPS_ELF_REL_SIZE): Likewise. + (MIPS_ELF_DYN_SIZE): Likewise. + (MIPS_ELF_GOT_SIZE): Likewise. + (MIPS_ELF_SYM_SIZE): Likewise. + (MIPS_ELF_LOG_FILE_ALIGN): Likewise. + (MIPS_ELF_GET_WORD): Likewise. + (MIPS_ELF_PUT_WORD): Likewise. + (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise. + (STUB_LW): Conditionalize for 64-bit value. + (elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST + entries. + (_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS]. + Check it for inconsistency. + (_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit + ABI. + (_bfd_mips_elf_fake_sections): Remove duplicate handling of + .msym. + (mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE. + (mips_elf_got_offset_from_index): Use misp_elf_got_section. + (mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE. + (mips_elf_local_got_index): Likewise. + (mips_elf_got_page): Likewise. + (mips_elf_got_info): Likewise. + (mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split. + (ELF_DYNAMIC_INTERPRETER): Handle 64-bit code. + (mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN, + instead of constant `2'. + (mips_elf_create_got_section): Tidy. Use MIPS_ELF_GOT_SIZE. + (mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN. + (mips_elf_size_dynamic_sections): Use + MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE, + MIPS_ELF_ADD_DYNAMIC_ENTRY. Remove #if 0'd code. + Adjust all releveant entries in elf backend table. + * elf64-mips.c (mips_elf64_section_from_shdr): Remove. + (mips_elf64_section_processing): Likewise. + Adjust elf backend entries to use _bfd_mips_elf variants now + publicly available. + + * elflink.h (elf_link_create_dynamic_sections): Handle non-standard + hash-entry sizes. + (size_dynamic_sections): Likewise. + (elf_link_output_extsym): Likewise. + * elf.c: (elf_fake_sections): Likewise. + * libbfd.c (bfd_get): New macro. + (bfd_put): Likewise. + * bfd-in2.h: Regenerated. + +1999-07-07 Mark Mitchell + + * elf-bfd.h (elf_size_info): Add hash_entry_size, + int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out, + wap_reloca_in, and swap_reloca_out. + * elflink.h (elf_link_read_relocs_from_section): Adjust to handle + multiple internal relocations per external relocation. + (link_read_relocs): Likewise. + (elf_bfd_final_link): Likewise. + (elf_link_input_bfd): Likewise. + (elf_gc_mark): Likewise. + (elf_gc_smash_unused_vtentry_relocs): Likewise. + * elfcode.h (elf_swap_dyn_out): Adjust type to match + elf_swap_dyn_in. + (size_info): Add entries for new fields. + * elf64-mips.c (mips_elf64_swap_reloc_out): Enable. + (mips_elf64_be_swap_reloc_in): New function. + (mips_elf64_be_swap_reloc_out): Likewise. + (mips_elf64_be_swap_reloca_in): Likewise. + (mips_elf64_be_swap_reloca_out): Likewise. + (mips_elf64_size_info): Add entries for new fields. + +1999-07-07 Ian Lance Taylor + + * elflink.h (elf_bfd_final_link): Assert that section reloc_count + field equals the new rel_count field. + (elf_link_input_bfd): When doing a relocateable link, use the new + rel_count field rather than the reloc_count field. + (elf_reloc_link_order): Likewise. + (elf_finish_pointer_linker_section): Likewise. + + Based on patch from H.J. Lu : + * elflink.h (elf_merge_symbol): Permit a non-weak definition in a + shared library to override a weak definition in a regular object. + +Tue Jul 6 10:23:39 1999 Jeffrey A Law (law@cygnus.com) + + * libhppa.h: Revert July 2, 1999 patch. + + * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors + need to generate DLTIND relocations, not DLTREL relocations. + +1999-07-05 Nick Clifton + + * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5 + architectures. + (coff_set_flags): Recognise arm 5 architectures. + + * cpu-arm.c: Add support for strongarm and arm9 cpus. + Add support for armv5 architecture. + + * archures.c: Add bfd_mach_arm_5 and bfd_mach_arm_5T. + + * reloc.c: Add new, assembler only, ARM reloc: + BFD_RELOC_ARM_ADRL_IMMEDIATE. + + * bfd-in2.h: Regenerate. + +1999-07-02 Mark Mitchell + + * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter. + (_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter. + * elf.c (_bfd_elf_find_nearest_line): Pass it. + * elf32-arm.h (elf32_arm_find_nearest_line): Likewise. + * elf32-mips.c (ABI_64_P): New macro. + (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P. + (_bfd_mips_elf_find_nearest_line): Adjust call to + _bfd_dwarf2_find_nearest_line. + * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype. + * libbfd.h: Regenerated. + +1999-07-02 Ian Lance Taylor + + * config.bfd: Add * at the end of i[3456]86-*-unixware. + +Fri Jul 2 12:21:10 1999 Jeffrey A Law (law@cygnus.com) + + * libhppa.h (HPPA_R_ARG_RELOC): Delete. + (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise. + +1999-07-01 Mark Mitchell + + * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2 + fields. + (_bfd_elf_init_reloc_shdr): New function. + * elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than + bfd_alloc followed by memset. + (_bfd_elf_init_reloc_shdr): New function, split out from ... + (elf_fake_sections): Here. + (assign_section_numbers): Assign section numbers for the second + relocation section, if required. + * elflink.h (elf_link_output_relocs): New function. + (elf_link_size_reloc_section): Likewise. + (elf_bfd_final_link): Use elf_link_size_reloc_section. + (elf_link_input_bfd): Use elf_link_output_relocs. + + * elf32-mips.c (_bfd_mips_elf_fake_sections): Use + _bfd_elf_init_reloc_shdr to initialize rel_hdr2. + +Thu Jul 1 13:58:48 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL + with 22bit format. + +1999-06-28 Mark Mitchell + + * elf32-mips.c (mips_elf_got_info): Move declaration before + prototypes. Change global_gotsym to be a pointer to a hash entry, + rather than a number index. + (mips_elf_link_hash_entry): Move declaration before prototypes. + (mips_elf_irix6_finish_dynamic_symbol): New function. + (mips_elf_sign_extend): Likewise. + (mips_elf_high): Likewise. + (mips_elf_higher): Likewise. + (mips_elf_highest): Likewise. + (mips_elf_global_got_index): Likewise. + (mips_elf_local_got_index): Likewise. + (mips_elf_got_offset_from_index): Likeiwse. + (mips_elf_record_global_got_symbol): Likewise. + (mips_elf_got_page): Likewise. + (mips_elf_next_lo16_addend): Likewise. + (mips_elf_calculate_relocation): Likewise. + (mips_elf_obtain_contents): Likewise. + (mips_elf_perform_relocation): Likewise. + (mips_elf_assign_gp): Likewise. + (mips_elf_sort_hash_table_f): Likewise. + (mips_elf_sort_hash_table): Likewise. + (mips_elf_got_section): Likewise. + (mips_elf_got_info): Likewise. + (mips_elf_create_local_got_entry): Likewise. + (mips_elf_got16_entry): Likewise. + (mips_elf_create_dynamic_relocation): Likewise. + (elf_mips_howto_table): Add description of R_MIPS_SCN_DISP. + (mips_elf_final_gp): Use mips_elf_assign_gp. + (_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols + into SHN_SCOMMON automatically on IRIX6. + (mips_elf_add_symbol_hook): Likewise. + (mips_elf_relocate_section): Rewrite, using + mips_elf_calculate_relocation and mips_elf_perform_relocation. + (mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME. + Don't deal with .rld_map on IRIX6. + (mips_elf_create_got_section): Adjust use of global_gotsym. Set + section flags appropriately for .got. + (mips_elf_check_relocs): Handle IRIX6 relocations making use of + the got. Call mips_elf_record_global_got_symbol and allocate + local got space appropriately. + (mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned + char *. Rework calculation of GOT size. Sort dynamic symbol + table entries so entries that do not require GOT entries appear at + the beginning. Don't use DT_MIPS_HIPAGENO on IRIX6. Remove dead + code dealing with DT_INIT and DT_FINI. Remove fiddling with + global_gotsym. + (mips_elf_finish_dynamic_symbol): Adjust creation of global GOT + entries. + (mips_elf_finish_dynamic_symbol): Use + mips_elf_irix6_finish_dynamic_symbol. + (mips_elf_finish_dynamic_sections): Correct off-by-one error + setting DT_MIPS_UNREFEXTNO. Adjust setting of DT_MIPS_GOTSYM for + change to global_gotsym. Set DT_MIPS_OPTIONS on IRIX6. + +1999-06-30 Ian Lance Taylor + + * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a + relocateable link. From Ralf Baechle . + +1999-06-04 Philip Blundell + + * elf32-arm.h (elf_backend_got_header_size): Define. + (elf_backend_plt_header_size): Likewise. + +1999-06-28 Jim Pick + + * elf32-arm.h (elf32_arm_relocate_section): Mind no_undefined + +Tue Jun 29 02:25:03 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as + relocation function. + * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function. + +1999-06-27 Mark Mitchell + + * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro. + (MIPS_ELF_OPTIONS_SECTION_NAME): Likewise. + (MIPS_ELF_STUB_SECTION_NAME): Likewise. + (_bfd_mips_elf_section_from_shdr): Use them. + (_bfd_mips_elf_fake_sections): Likewise. Add .srdata to the list + of GP-relative sections. + (_bfd_mips_elf_set_section_contents): Use them. + (_bfd_mips_elf_section_processing): Share code between .sdata and + .lit4/.lit8 sections. Set appropriate flags for .srdata. + (mips_elf_additional_program_headers): Add handling for + PT_MIPS_OPTIONS segment on IRIX6. + (mips_elf_modify_segment_map): Likeiwse. + (mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI. + Include the options sections on IRIX6. Don't look for GP-relative + sections by name; use SHF_MIPS_GPREL instead. + (ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for + the N32 ABI. + (mips_elf_create_dynamic_sections): Don't muck about with section + alignments and such on IRIX6. + (mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME. + (mips_elf_size_dynamic_sections): Likewise. Adjust to handle the + fact that ELF_DYNAMIC_INTERPRETER is no longer a constant. Use + bfd_zalloc rather than bfd_alloc and memset. + (mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME. + Don't assert the existence of .rld_map on IRIX6. + (mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME. + + * elf32-mips.c (mips_elf_adjust_dynindx): Remove. + (mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx + instead. + +1999-06-26 Mark Mitchell + + * elf32-mips.c (mips_elf_swap_msym_in): New function. + (mips_elf_swap_msym_out): New function. + (mips_elf_create_msym_section): Likewise. + (MIPS_ELF_MSYM_SECTION_NAME): New macro. + (_bfd_mips_elf_final_write_processing): Set sh_link for .msym. + (_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM + section not named .msym. + (_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not + .msym directly. Set appropriate attributes for the .msym + section. + (mips_elf_link_hash_entry): Add min_dyn_reloc_index field. + (mips_elf_link_hash_newfunc): Clear it. + (mips_elf_create_dynamic_sections): Create the .msym section + on IRIX6. + (mips_elf_size_dynamic_sections): Allocate space for the + .msym section. Add a DT_MIPS_MSYM entry. + (mips_elf_finish_dynamic_symbol): Write out a .msym entry for + the symbol. + (mips_elf_finish_dynamic_sections): Assign a value for + DT_MIPS_MSYM. Add .msym entries for the section symbols as well. + + * elf32-mips.c (irix_compat_t): New enumeration. + (ABI_N32_P): New macro. + (IRIX_COMPAT): Likewise. + (SGI_COMPAT): Implement in terms of IRIX_COMPAT. + (mips_elf_relocate_section): Fix typo. + +1999-06-26 Mumit Khan + + * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections + as writable PE sections. + +1999-06-26 David Mosberger + + * dwarf2.c (struct arange): New type. + (struct comp_unit): Replace LOW and HIGH by member ARANGE. + (arange_add): New function. + (decode_line_info): Keep track of address ranges that a compilation + unit covers. + (comp_unit_contains_address): Return true if address is contained + in _any_ of the address ranges associated with a compilation unit. + (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line + on the first comp_unit that contains the address. + +1999-06-26 David Mosberger + + * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer. + (decode_line_info): Add variable STASH and initialize it to point + to the per-bfd dwarf2_debug info. Remove static variable + dwarf_line_buffer and use stash->dwarf_line_buffer in its place. + +1999-06-26 Ian Lance Taylor + + * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic + shared library to have an undefined symbol. + + From Franz Sirl : + * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch. + +Thu Jun 24 20:59:11 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.c (elf_hppa_final_write_processing): New function. + * elf32-hppa.c: Remove everything related to symbol extension + sections & records. Use the common elf_hppa_final_write_processing. + +1999-06-22 Mark Mitchell + + * elflink.h (size_dynamic_sections): Use user-specified init/fini + functions instead of _init/_fini if requested. + +1999-06-23 Ian Lance Taylor + + * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link + field. + +1999-06-22 Ian Lance Taylor + + From Franz Sirl : + * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx + field to 0, not -1. + (ppc_elf_finish_dynamic_sections): Check for positive section + dynindx field, rather than comparing against -1. + (ppc_elf_relocate_section): Only return false if undefined_symbol + or reloc_overflow fail, not always upon encountering an error. + +1999-06-22 Mark Mitchell + + * elflink.h (link_read_relocs): Explicitly cast external_relocs to + bfd_byte * before performing pointer arithmetic. + +Tue Jun 22 13:06:25 1999 Jeffrey A Law (law@cygnus.com) + + * elf-hppa.h: New file. Common stuff for elf32 and elf64 PA + support. + * elf32-hppa.c: Include elf-hppa.h. + (ARCH_SIZE): Define. + (elf_hppa_reloc_type_lookup): Delete. Found in the common code + now. + (elf32_hppa_info_to_howto): Similarly. + (elf_hppa_howto_table): Similarly. + (elf_hppa_reloc_type_lookup): Similarly. + (hppa_elf_gen_reloc_type): Similarly. + * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete. + +1999-06-22 Nick Clifton + + * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow + handling R_V850_22_PCREL relocation. + +1999-06-21 Ian Lance Taylor + + * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return + type. + +Sun Jun 20 14:13:57 1999 Richard Henderson + + * section.c (_bfd_strip_section_from_output): Ignore sections + DISCARDed by the link script. + +1999-06-19 Ian Lance Taylor + + * elflink.h (elf_link_remove_section_and_adjust_dynindices): + Remove unused local variable spp. + + * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if + the entry symbol is not set. + +Fri Jun 18 04:24:57 1999 Richard Henderson + + * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust + GPDISP or LITUSE in a relocatable link. + +Thu Jun 17 21:24:43 1999 J"orn Rennecke + + * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc. + * (alloc_dwarf1_func): Likewise. + +Wed Jun 16 03:09:57 1999 Jeffrey A Law (law@cygnus.com) + + * libhppa.h: Fix various formatting errors. + (assemble_3); Rewrite using CATENATE. + (assemble_17): Fix various bugs. + +1999-06-16 Nick Clifton + + * elf32-mcore.c (R_MCORE_RAW): Fix definition. + +1999-06-15 Richard Henderson + + * section.c (SEC_SHORT): Define. + * bfd-in2.h: Rebuild. + +1999-06-13 Mark Mitchell + + * elflink.h (elf_link_remove_section_and_adjust_dynindices): + Remove abfd parameter. Use _bfd_strip_section_from_output. + (bfd_elf_size_dynamic_sections): Adjust callers accordingly. + + * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function. + * elflink.c (_bfd_elf_link_adjust_dynindx): Define it. + * elflink.h (elf_link_remove_section_and_adjust_dynindices): New + function. + (bfd_elf_size_dynamic_sections): Use it. + +1999-06-13 Alan Modra + + * elf32-i386.c (elf_howto_table): Change R_386_PC8 from + complain_overflow_bitfield to complain_overflow_signed. + +1999-06-13 Mark Mitchell + + * elflink.h (elf_link_read_relocs_from_section): New function, + split out from ... + (elf_link_read_relocs): Here. Use it for both relocation + sections. + +1999-06-12 Mark Mitchell + + * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume + asect->reloc_count is valid. + +1999-06-12 Ian Lance Taylor + + * elf32-mips.c (mips_elf32_section_processing): Permit a + SHT_MIPS_REGINFO section to have a size of 0. + +1999-06-12 David O'Brien + + * config.bfd (alpha*-*-freebsd*): New target. + (i[3456]86-*-freebsd*): Now defaults to ELF. + +1999-06-11 Ian Lance Taylor + + * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to + wrap if the relocation covers the high bit of an address. + + * dwarf2.c (decode_line_info): Remove unused variable first_time. + +1999-06-10 Jakub Jelinek + + * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std + instead of R_SPARC_max. + (sparc64_elf_info_to_howto): Likewise. + * elf32_sparc.c (elf32_sparc_relocate_section): Likewise. + (elf32_sparc_info_to_howto): Likewise; handle vtable relocations. + +1999-06-07 Richard Henderson + + * section.c (_bfd_strip_section_from_output): Remove output + sections with no initial link_order. + +1999-06-07 Nick Clifton + + * elf32-m88k.c (ELF_MAXPAGESIZE): Define. + +Mon Jun 7 11:49:43 1999 Andreas Schwab + + * Makefile.am (SOURCE_HFILES): Add missing headers. + * Makefile.in: Regenerated. + +1999-06-06 Mark Mitchell + + * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize + the N32 ABI. + +1999-06-04 Franz Sirl + + * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of + range undefweak symbols. + * hash.c: Add missing comma after @xref{} + * linker.c: Likewise. + +1999-06-04 Nick Clifton + + * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message + if not defined. + * elf32-gen.c (ELF_MAXPAGESIZE): Define. + * elf32-i860.c (ELF_MAXPAGESIZE): Define. + * elf32-i960.c (ELF_MAXPAGESIZE): Define. + * elf64-gen.c (ELF_MAXPAGESIZE): Define. + +1999-06-04 Ian Lance Taylor + + * Makefile.am: Rebuild dependencies. + (BFD32_BACKENDS): Add dwarf1.lo. + (BFD32_BACKENDS_CFILES): Add dwarf1.c. + * Makefile.in: Rebuild. + +1999-06-04 Nick Clifton + + * Makefile.am: Add epoc-arm-pe target. + * Makefile.in: Regenerate. + * pe-arm.c: Only redefine interworking function names if they have + not already been redefined. + * pei-arm.c: Only redefine interworking function names if they have + not already been redefined. + * epoc-pe-arm.c: Redefine interworking function names to avoid a + name space clash. + * epoc-pei-arm.c: Redefine interworking function names to avoid a + name space clash. + +1999-06-03 Nick Clifton + + * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1. + +Fri Jun 4 10:05:11 1999 Andreas Schwab + + * elf.c (elf_fake_sections): Undo change of 1999-05-10. + +Fri Jun 4 03:10:49 1999 J"orn Rennecke + + * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of + start / stop for recalculating of r_addend of R_SH_SWITCH*. + +Fri Jun 4 02:53:13 1999 J"orn Rennecke + + * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32 + in other text sections. + +Fri Jun 4 02:29:34 1999 J"orn Rennecke + + * libbfd.c (_bfd_generic_verify_endian_match): New function. + * libbfd-in.h (_bfd_generic_verify_endian_match): Declare. + * libbfd.h: Regenerate. + * coff-sh.c (sh_merge_private_data): Delete. + (coff_bfd_merge_private_bfd_data): Change to + _bfd_generic_verify_endian_match. + (elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define. + +1999-06-03 Ulrich Drepper + + * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE. + +1999-06-03 Ian Lance Taylor + + * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct + prototype. + (bfd_elf32_arm_process_before_allocation): Likewise. + * bfd-in2.h: Rebuild. + +1999-06-03 David Mosberger + + * dwarf2.c (struct line_info): Add member END_SEQUENCE to keep + track of end_sequence markers. + (add_line_info): Add END_SEQUENCE arg. + (decode_line_info): Don't try to infer lo_pc and hi_pc from the + debug-line info---it doesn't work right if a compilation unit + consists of multiple discontiguous code-sequences. It would be + worthwhile to optimize for the common case where a compilation + unit results in a contiguous set of code sequences, but this is + quite tricky to get right for arbitrary DWARF2 files. + (lookup_address_in_line_info_table): Don't use the last line entry + for a compilation unit for anything with an address higher than + this line entry. Also, check for end_sequence markers to + correctly handle discontinuities. + (_bfd_dwarf2_find_nearest_line): When checking previously loaded + compilation units, check all compilation units with each->high==0 + just like when reading compilation units. + + * dwarf2.c (decode_line_info): Initialize table->files and + table->last_line to NULL to avoid segfaults due to random + values in these members. + (concat_filename): Check for out-of-range file number before + indexing filename table. Segfaults suck. + + * dwarf2.c (decode_line_info): Don't truncate address to least + significant 32 bits (breaks 64 bit targets). + (lookup_address_in_function_table): Ditto. + (comp_unit_contains_address): Ditto. + +1999-06-02 Mark Mitchell > + + * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR. + * elf64-mips.c (mips_elf64_howto_table_rel): Likewise. + (mips_elf64_howto_table_rela): Likewise. + + * elfcode.h (elf_slurp_reloc_table_from_section): New function, + split out from ... + (elf_slurp_reloc_table): Here. Use it to handle the case where a + single section has two associated relocation sections. + +1999-06-02 Mark Salter + + * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if + COFF_WITH_PE defined. + +1999-06-02 Nick Clifton + + * pe-arm.c: Rename global arm interworking functions to avoid name + collision when all targets BFD is built. + * pei-arm.c: Ditto. + +1999-05-31 Mark Mitchell + + * elf-bfd.h (elf_backend_data): Remove use_rela_p. Add + may_use_rel_p, may_use_rela_p, default_use_rela_p. + (bfd_elf_section_data): Add use_rela_p. + * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately. + (_bfd_elf_new_section_hook): Likewise. + (elf_fake_sections): Use may_use_rela_p, etc., instead of + use_rela_p. + (_bfd_elf_copy_private_section_data): Copy use_rela_p. + * elfcode.h (write_relocs): Determine whether or not use rela + relocs based on the relocation section header. + * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p + instead of use_rela_p. + * elfxx-target.h (elf_backend_may_use_relp): New macro. + (elf_backend_may_use_rela_p): Likewise. + (elf_backend_default_use_rela_p): Likewise. + (elfNN_bed): Use them. + +Wed Jun 2 12:38:49 1999 Miodrag Vallat + + * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096. + +Tue Jun 1 17:57:58 1999 Mark P. Mitchell + + * reloc.c (BFD_RELOC_MIPS_SUB): New relocation. + (BFD_RELOC_MIPS_GOT_PAGE): Likewise. + (BFD_RELOC_MIPS_GOT_OFST): Likewise. + (BFD_RELOC_MIPS_GOT_DISP): Likewise. + * bfd-in2.h: Regenerated. + * libbfd.h: Likewise. + * elf32-mips.c (mips_info_to_howto_rela): New function. + (USE_REL): Adjust for new conventions. + (MINUS_ONE): New macro. + (elf_mips_howto_table): Add R_MIPS_SUB. + (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST, + and MIPS_GOT_DISP. + (mips_elf_final_write_processing): Set sh_link, not sh_info, for a + .MIPS.content section. + (_bfd_mips_elf_fake_sections): Treat all sections that begin + with .MIPS.content as .MIPS.content sections. Set + SHF_MNIPS_NOSTRIP for such section. + (elf_info_to_howto): Define to mips_info_to_howto_rela. + * elf64-mips.c (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, + MIPS_GOT_OFST, and MIPS_GOT_DISP. + +Wed Jun 2 11:51:12 1999 Andreas Schwab + + * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized + variable. + + * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous + `else'. + +1999-05-30 Philip Blundell + + * elf32-arm.h (elf32_arm_relocate_section): Reinstate change of + 1993-03-25 (!!). Take into account the bitmasks for the reloc so + the addend does not overflow into the rest of the word. + +1999-05-29 Nick Clifton + + * bfd-in.h: Amend prototype for + bfd_elf32_arm_process_before_allocation . + * bfd-in.h: Regenerate. + + * elfarm-oabi.c (NUM_ELEM): New macro: Compute the number of + elements in a fixed sized array. + (ARM_ELF_ABI_VERSION): Define. + (ARM_ELF_OS_ABI_VERSION): Define. + (R_ARM_THM_ABS5): Fix rightshift and size. + (R_ARM_THM_PC22): Fix size. + (R_ARM_PLT32): Define Howto. + (find_howto): New function: Locate a howto based on a reloc + number. + (elf32_arm_info_to_howto): Use find_howto if necessary. + (elf32_arm_reloc_map): Change type of field bfd_reloc_val to + bfd_reloc_code_real_type. + (elf32_arm_reloc_map[]): Add entries for BFD_RELOC_VTABLE_INHERIT + and BFD_RELOC_VTABLE_ENTRY. + (elf32_arm_reloc_type_lookup): Use find_howto if necessary. + + * elfarm-nabi.c (NUM_ELEM): New macro: Compute the number of + elements in a fixed sized array. + (ARM_ELF_ABI_VERSION): Define. + (ARM_ELF_OS_ABI_VERSION): Define. + (R_ARM_THM_ABS5): Fix rightshift and size. + (R_ARM_THM_PC22): Fix size. + (elf32_arm_info_to_howto_rel): Rename to elf32_arm_info_to_howto. + (elf32_arm_reloc_map): Change type of field bfd_reloc_val to + bfd_reloc_code_real_type. + + * elf32-arm.h (struct elf32_arm_link_hash_table): Add new field: + no_pipeline_knowledge. + (elf32_arm_link_hash_create): Initialise new field to zero. + (bfd_elf32_arm_process_before_allocation): Add new paraemter: + no_pipeline_knowledge. Use this parameter to initialise the field + in the globals data structure. + (elf32_arm_final_link_relocate): Only add in pipeline offset if + no_pipeline_knowledge is false and the binary is from an old + toolchain. + (elf32_arm_merge_private_data): Generate an error if an attempt is + made to link together big endian and little endian code. + (elf32_arm_post_process_headers): New function: Initialise the + EI_OSABI and EI_ABIVERSION fields of the newly created ELF program + header. + (elf_backend_post_process_headers): Define. + +1999-05-28 Nick Clifton + + * elf-bfd.h (struct elf_backend_data): Add new field: + elf_backend_post_process_headers. + + * elfxx-target.h (elf_backend_post_process_headers): Define to + NULL if not already defined. + (elfNN_bed): Initialise elf_backend_post_process_headers field. + + * elf.c (prep_headers): Set the EI_OSABI and EI_ABIVERSION fields + to zero. + (_bfd_elf_compute_section_file_positions): Call + elf_backend_post_process_headers if defined. + +1999-05-28 Ian Lance Taylor + + * configure.in: Check whether getuid and getgid exist. + * archive.c: Define getuid and getgid as macros if HAVE_GETUID or + HAVE_GETGID are not defined, respectively. + (bfd_write_armap): Don't special case on _WIN32 for getuid and + getgid. + * configure.host: Set ac_cv_func_get{ug}id for *-*-windows*. + * configure, config.in: Rebuild. + +1999-05-28 Martin Dorey + + * elf32-i960.c: New file. + * elf.c (prep_headers): Handle bfd_arch_i960. + * targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec. + * config.bfd (i960-*-elf*): New target. + * configure.in (bfd_elf32_i960_vec): New target vector. + * Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo. + (BFD32_BACKENDS_CFILES): Add elf32-i960.c. + * Makefile.in, aclocal.m4, configure: Rebuild. + +1999-05-27 Nick Clifton + + * elfarm-oabi.c (elf32_arm_howto_table): Add entry for + R_ARM_PLT32. + (find_howto): New function: Find entries in the + elf32_arm_howto_table. + (elf32_arm_info_to_howto): Use find_howto if the entry cannot be + computed simply. + (elf32_arm_reloc_type_lookup): Add lookup for + BFD_RELOC_ARM_PLT32. + +1999-05-25 Philip Blundell + + * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function. + (elf32_arm_link_hash_table_create): Use above function as the + constructor for hash table entries. + (elf32_arm_relocate_section): Avoid crash when there is no output + section. + (elf32_arm_final_link_relocate): New parameter h. + (elf32_arm_relocate_section): Pass symbol hash entry to above + routine. + (elf32_arm_gc_sweep_hook, elf32_arm_check relocs): Correct + comments. + +1999-05-25 Catherine Moore + + * coff-arm.c (coff_arm_relocate_section): Don't emit + base file entries for pc-relative values. + +1999-05-25 DJ Delorie + + * peicode.h (coff_swap_sym_in): When we create the actual section + to reflect the not-there section C_SECTION symbols refer to, + change the symbol class to C_STAT as the section is now really + there. + +1999-05-24 Philip Blundell + + * elf32-arm.h (elf32_arm_relocate_section): Undo change of + 1999-03-25. + +Mon May 17 13:35:35 1999 Stan Cox + + * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed + F_PIC_INT to F_PIC. + * coffcode.h (coff_set_arch_mach_hook): Added F_ARM_2a, and + F_ARM_3M labels. Changed F_PIC_INT to F_PIC. + +1999-05-16 Nick Clifton + + * coff-mcore.c (in_reloc_p): Reinstate. + +1999-05-15 Nick Clifton + + * reloc.c (BFD_RELOC_MCORE_RVA): Define. + * bfd-in2.h: Regenerate. + * coff-mcore.c (in_reloc_p): Remove defintion. + (mcore_coff_howto): Add IMAGE_REL_MCORE_RVA. + (mcore_coff_reloc_type_lookup): Map BFD_RELOC_RVA to + IMAGE_REL_MCORE_RVA. + (coff_mcore_rtype_to_howto): Add special processing for + IMAGE_REL_MCORE_RVA. + (coff_mcore_relocate_section): Add support for + IMAGE_REL_MCORE_RVA. + * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE. + (mcore_elf_reloc_type_lookup): Map BFD_RELOC_RVA to + R_MCORE_RELATIVE. + (mcore_elf_relocate_section): Delete redundant case labels. + +Fri May 14 10:59:55 1999 Andreas Schwab + + * elf32-arm.h (elf32_arm_relocate_section): Fix operator + precedence between bit-and and comparison. + +Thu May 13 09:45:23 1999 Joel Sherrill (joel@OARcorp.com) + + * config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to + list of target formats (targ_selvecs). + (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets. + (powerpcle*-*rtems*, sh-*-rtemself*): New targets. + +1999-05-10 DJ Delorie + + * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a + reasonable mode until "ar x" is smart enough to skip it (fixes + gcc/libgcc.a builds on mips-ecoff targets + + * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed + to work. Hack to support MS import libraries, which use different + COMDAT types than GNU. + (coff_slurp_symbol_table): C_SECTION symbols are local; they refer + to implied zero-length sections (see peicode below) + * coffgen.c (coff_get_normalized_symtab): Properly read long MS + filename symbols, which use one *or more* auxents. + * coffswap.h (coff_swap_aux_in): ditto + * peicode.h (coff_swap_sym_in): Build the implied zero-length + sections + +Tue May 11 15:51:58 1999 Jeffrey A Law (law@cygnus.com) + + * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false + for all relocations. + +1999-05-10 Catherine Moore + + * bfd-in.h (bfd_arm_allocate_interworking_sections): Static + if COFF_IMAGE_WITH_PE. + (bfd_arm_process_before_allocation): Likewise. + (bfd_arm_get_bfd_for_interworking): Likewise. + * coff-arm.c: Likewise. + * bfd-in2.h: Regenerate. + * configure.in (armpe_little_vec): Remove coff-arm.lo. + (armpe_big_vec): Likewise. + * configure: Rebuild. + +1999-05-10 Nick Clifton + + * elf.c (elf_fake_sections): Check for .rel. as start of rel + section, not just .rel. Same for .rela. + +1999-05-07 Nick Clifton + + * coff-mcore.c (coff_mcore_relocate_section): Replace assert about + endianism with an error message. + +Thu May 6 17:09:09 1999 Fred Fish + + * dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer + assignment from "unsigned char *" to "char *". + (decode_line_info): Likewise for dwarf_line_buffer assignment. + +1999-05-05 Catherine Moore + + * coff-arm.c (coff_arm_relocate_section): Add one to + address of ARM_RVA32 thumb functions. + +1999-05-05 Catherine Moore + + * elf32-m68k.c (elf32_m68k_set_private_flags): New. + (elf32_m68k_copy_private_bfd_data): New. + (elf32_m68k_merge_private_bfd_data): New. + (elf32_m68k_print_private_bfd_data): New. + (CPU32_FLAG): Define. + (PLT_CPU32_ENTRY_SIZE): Define. + (elf_cpu32_plt0_entry): Declare. + (elf_cpu32_plt_entry): Declare. + (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries. + (elf_m68k_finish_dynamic_symbol): Likewise. + (elf_m68k_finish_dynamic_sections): Likewise. + (elf_backend_plt_header_size): Remove definition. + (bfd_elf32_bfd_copy_private_bfd_data): Define. + (bfd_elf32_bfd_merge_private_bfd_data): Define. + (bfd_elf32_bfd_set_private_flags): Define. + (bfd_elf32_bfd_print_private_bfd_data): Define. + +Mon May 3 09:24:49 1999 Jeffrey A Law (law@cygnus.com) + + * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE + and R_LONG_PCREL_MODE. + +1999-04-29 Nick Clifton + + * coff-mcore.c (coff_mcore_relocate_section): Fix typos. + +Fri Apr 28 16:36:19 1999 Stan Cox + + * elf32-sh.c (sh_elf_relocate_section): Include relocation addend + in relocation calculation. + +1999-04-26 Tom Tromey + + * aclocal.m4, configure: Updated for new version of libtool. + +1999-04-21 Nick Clifton + + * coff-mcore.c: Add support for mcore relocs. + +1999-04-20 Gavin Romig-Koch + + * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the + incorrect use EF_MIPS_xxBITPTRS. + +1999-04-18 Ian Lance Taylor + + * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local + variable insn. + + * bfd-in2.h: Rebuild. + * libbfd.h: Rebuild. + +Sat Apr 17 20:55:15 1999 Catherine Moore + + * coff-arm.c (coff_arm_rtype_to_howto): Remove ARM26D transform. + (coff_arm_relocate_section): Add ARM26D transform. Only + change to ARM26D for relocateable links. + +1999-04-16 Gavin Romig-Koch + + * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New. + (bfd_elf32_bfd_print_private_bfd_data): New. + +1999-04-15 Doug Evans + + * elf32-arm.h (elf32_arm_final_link_relocate): For R_ARM_THM_ABS5, + refetch addend if USE_REL, add many comments regarding current state. + For R_ARM_THM_PC22, refetch addend if USE_REL, simplify. + * elfarm-nabi.c (elf32_arm_howto_table): For R_ARM_THM_ABS5, fix + size and rightshift. For R_ARM_THM_PC22, fix bitsize. + * elfarm-oabi.c (elf32_arm_howto_table): Ditto. + +Wed Apr 14 14:33:08 1999 Richard Henderson + + * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'. + * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise. + +1999-04-13 David Mosberger + + * dwarf2.c (decode_line_info): Don't truncate address to least + significant 32 bits (breaks 64 bit targets). + (lookup_address_in_function_table): Ditto. + (comp_unit_contains_address): Ditto. + +Tue Apr 13 21:27:19 1999 Catherine Moore + + * coff-arm.c (arm_emit_base_file_entry): New routine. + (A2T3_OFFSET): Define. + (T2A3_OFFSET): Define. + (coff_arm_relocate_section): Emit base file entries for interworking + stubs. + +1999-04-13 Philip Blundell + + * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for + relocs 17 through 19. + +Sun Apr 11 01:25:17 1999 Richard Henderson + + * elfcode.h: Remove fnmatch.h. + * elflink.h (elf_link_assign_sym_version): Call back to ld + instead of calling fnmatch. + + * config.bfd (i?86-*-beoself): Include pe vecs. + +Sun Apr 11 01:14:06 1999 Richard Henderson + + * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt + to go missing. + +1999-04-10 Richard Henderson + + * elf32-i386.c (elf_i386_relocate_section): Mind no_undefined + when trying to resolve dynamic symbol references. + * elf32-m68k.c (elf_m68k_relocate_section): Likewise. + * elf32-mips.c (mips_elf_relocate_section): Likewise. + * elf32-ppc.c (ppc_elf_relocate_section): Likewise. + * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. + * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. + * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. + * elflink.h (elf_link_output_extsym): Likewise. + +Sat Apr 10 15:12:09 1999 Richard Henderson + + * section.c (_bfd_strip_section_from_output): New function moved from + * elf64-alpha.c (elf64_alpha_strip_section_from_output): ... here. + * elf32-i386.c (elf_i386_size_dynamic_sections): Use it. + * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. + * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise. + * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. + * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise. + * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise. + * bfd-in2.h: Update. + +1999-04-09 Ian Lance Taylor + + * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow. + +1999-04-08 Nick Clifton + + * coff-mcore.c: New File: Support for mcore-pe targets. + * cpu-mcore.c: New File: Support for mcore targets. + * elf32-mcore.c: New File: Support for mcore-elf target. + * pe-mcore.c: New File: Definitions for mcore-pe target. + * pei-mcore.c: New File: Definitions for mcore-pei target. + * Makefile.am: Add support for MCore targets. + * Makefile.in: Regenerate. + * config.bfd: Add support for MCore targets. + * configure.in: Add support for MCore targets. + * configure: Regenerate. + * archures.c: Add support for MCore architecture. + * bfd-in2.h: Regenerate. + * coffcode.h: Add support for mcore-pe targets. + * elf.c: Add support for mcore-elf target. + * reloc.c: Add support for MCore relocs. + * targets.c: Add support for MCore targets. + +1999-04-07 Nick Clifton + + * elfarm-nabi.c (elf32_arm_howto_table): Add entries for + R_ARM_XPC25 and R_ARM_THM_XPC22. + (elf32_arm_reloc_map): Remove redundant entries. + +1999-04-06 Ian Lance Taylor + + * sysdep.h (LC_MESSAGES): Never define. + +1999-04-06 Chris Torek + + * reloc.c (bfd_check_overflow): Add addrsize parameter. Change + all callers. Rewrite completely. + (_bfd_relocate_contents): Rewrite overflow checking. + * bfd-in2.h: Rebuild. + +1999-04-05 Ian Lance Taylor + + From Gabriel Paubert : + * elf32-ppc.c (ppc_elf_howto_raw): Set R_PPC_GOT16_LO, + R_PPC_PLT16_LO and R_PPC_SECTOFF_LO to be complain_overflow_dont. + Set R_PPC_PLT16_HA, R_PPC_SECTOFF_HA and R_PPC_EMB_NADDR16_HA to + have a rightshift of 16 and use ppc_elf_addr16_ha_reloc. + * ppcboot.c (ppcboot_vec): Use little endian routines for + headers. + + * elf.c (elfcore_strndup): Only define if it will be used. + * elf32-ppc.c (ppc_elf_relax_section): Remove unused locals irel + and irelend. + (ppc_elf_check_relocs): Remove unused local i. + (ppc_elf_gc_mark_hook): Add default case to switch. + + From Bernd Nitzler : + * srec.c (srec_scan): Accept \r in symbol definitions. + (srec_object_p): Set HAS_SYMS if we saw any symbols. + (symbolsrec_object_p): Likewise. + +1999-04-04 Don Bowman + + * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*. + +1999-04-04 Ian Lance Taylor + + * dwarf1.c (parse_line_table): Remove unused locals last_pc and + last_line. + * elf-bfd.h (_bfd_elfcore_section_from_phdr): Declare. + * elf32-i386.c (elf_i386_gc_mark_hook): Add default case to + switch. + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove unused + local i. + * syms.c (_bfd_stab_section_find_nearest_line): Remove unused + local val. + +1999-03-31 Nick Clifton + + * config.bfd: Add support for arm-epoc-pe target. + * configure.in: Add support for arm-epoc-pe target. + * configure: Regenerate. + * targets.c: Add support for arm-epoc-pe target. + * coff-arm.c: Allow header files to override definition of + TARGET_UNDERSCORE and USER_LABEL_PREFIX. + * pe-arm.h: Allow previous header files to override definition of + TARGET_LITTLE_SYM and TARGET_BIG_SYM. + * pei-arm.h: Allow previous header files to override definition of + TARGET_LITTLE_SYM and TARGET_BIG_SYM. + * epoc-pe-arm.c: New file. Support arm-epoc-pe target. + * epoc-pei-arm.c: New file. Support arm-epoc-pei target. + +1999-03-30 Nick Clifton + + * elf.c (elf_map_symbols): Handle the case where section + symbols are generated for content-less sections which are + not mapped to the output file. + + * linker.c: Replace direct references to fields in BFD structure + with accessor macros. + + * elflink.h: Replace direct references to fields in BFD structure + with accessor macros. + +1999-03-25 Philip Blundell + + * config.bfd: Eliminate redundancy in checks for Linux/ARM. + + * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into + account when adjusting section symbols during a partial link. + +1999-03-24 Nick Clifton + + * coff-sparc.c (struct coff_reloc_map): Change type of field + 'bfd_reloc_val' to bfd_reloc_code_real_type. + * elf-m10200.c (struct mn10200_reloc_map): Ditto. + * elf-m10300.c (struct mn10300_reloc_map): Ditto. + * elf32-arc.c (struct arc_reloc_map): Ditto. + * elf32-d10v.c (struct d10v_reloc_map): Ditto. + * elf32-d30v.c (struct d30v_reloc_map): Ditto. + * elf32-fr30.c (struct fr30_reloc_map): Ditto. + * elf32-m32r.c (struct m32r_reloc_map): Ditto. + * elf32-sh.c (struct elf_reloc_map): Ditto. + * elf32-sparc.c (struct elf_reloc_map): Ditto. + * elf32-v850.c (struct v850_reloc_map): Ditto. + * elf64-sparc.c (struct elf_reloc_map): Ditto. + * elfarm-nabi.c (struct elf32_arm_reloc_map): Ditto. + * elfarm-oabi.c (struct elf32_arm_reloc_map): Ditto. + +1999-03-17 Martin Hunt + + * syms.c (_bfd_stab_section_find_nearest_line): Changed this + function so source-level assembly works. If multiple N_SOs + are seen without and N_FUNs, create an indextable entry with + a NULL function name. + +1999-03-16 Gavin Romig-Koch + + * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging + of certian similar cpus. + +1999-03-16 Gavin Romig-Koch + + * elf32-mips.c (_bfd_mips_elf_final_write_processing): + Add the 5000. Change the architecture for the 5400 to mips4. + (elf_mips_mach): Add r5000. + +1999-03-11 Doug Evans + + * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb. + +1999-03-11 Nick Clifton + + * binary.c (binary_set_section_contents): Generate warning about + huge file offsets for any section that will occupy file space, not + just those that are loadable. + +1999-02-24 Jim Blandy + + * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes. + +1999-02-22 Jim Lemke + + * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0. + +Mon Feb 22 18:26:51 1999 Ian Lance Taylor + + * elf-bfd.h (ELF_LINK_HASH_REF_REGULAR_NONWEAK): Define. + * elflink.h: Revert all changes since Feb 16. Instead: + (elf_link_add_object_symbols): Set REF_REGULAR_NONWEAK flag if + appropriate. Copy it to version symbols. + (elf_fix_symbol_flags): Set REF_REGULAR_NONWEAK for non ELF + symbols if appropriate. + (elf_adjust_dynamic_symbol): Set REF_REGULAR_NONWEAK for weakdef + symbol if appropriate. + (elf_link_output_extsym): If symbol is marked as undefined, and + has no nonweak references, mark it as weak undefined. + +Fri Feb 19 16:01:12 1999 Ian Lance Taylor + + * elflink.h (elf_merge_symbol): When overriding a dynamic + definition with a weak undefined symbol, set NEEDS_PLT if it is a + function. + (elf_link_add_object_symbols): Don't copy the other field if we + are overridding. + +Thu Feb 18 18:07:43 1999 Ian Lance Taylor + + * elflink.h (elf_merge_symbol): Do not merge any symbol from a + shared object with a weak undefined symbol. + +1999-02-18 Nick Clifton + + * elfarm-nabi.c: Set partial_inplace back to false. + +1999-02-17 Nick Clifton + + * coff-arm.c (TARGET_UNDERSCORE): Re-enable. + (USER_LABEL_PREFIX): Set to "_". + + The following patches are from: Scott Bambrough + + + * libaout.h (M_ARM6_NETBSD): Set to 143. + + * reloc.c: Add ARM PIC relocs: BFD_RELOC_ARM_GOT12, + BFD_RELOC_ARM_GOT32, BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_COPY, + BFD_RELOC_ARM_GLOB_DAT, BFD_RELOC_ARM_PLT32, + BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC. + * bfd-in2.h: Regenerate. + + * elfarm-nabi.c (elf32_arm_howto_table): Set partial_inplace to + 'true' as REL relocs are now being used. Add new PIC relocs: + R_ARM_COPY, R_ARM_GLOB_DAT, R_ARM_JUMP_SLOT, R_ARM_RELATIVE, + R_ARM_GOTOFF, R_ARM_GOTPC, R_ARM_GOT32, R_ARM_PLT32. + + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Check byte order + of targets. + (elf32_arm_final_link_relocate): Change parameters so that entire + reloc is passed. Add support for PIC relocs. + (elf32_arm_relocate_section): Pass entire reloc to + elf32_arm_final_link_relocate. + (elf32_arm_check_relocs): Handle new PIC relocs. + (elf32_arm_adjust_dynamic_symbol): New function. + (elf32_arm_size_dynamic_sections): New function. + (elf32_arm_discard_copies): New function. + (elf32_arm_finish_dynamic_symbol): New function. + (elf32_arm_finish_dynamic_sections): New function. + (ELF_MAXPAGE_SIZE): Define. + (bfd_elf32_bfd_reloc_type_lookup): Define. + (elf_backend_relocate_section): Define. + (elf_backend_adjust_dynamic_symbol): Define. + (elf_backend_create_dynamic_sections): Define. + (elf_backend_finish_dynamic_symbol): Define. + (elf_backend_finish_dynamic_sections): Define. + (elf_backend_size_dynamic_sections): Define. + (elf_backend_plt_readonly): Define. + (elf_backend_want_got_plt): Define. + (elf_backend_want_plt_sym): Define. + +Wed Feb 17 12:02:26 1999 Stan Cox + + * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Make reginfo + sections SEC_LINK_ONCE and SEC_LINK_DUPLICATES_SAME_SIZE. + (_bfd_mips_elf_fake_sections): Likewise. + +Wed Feb 17 12:07:23 1999 Andreas Schwab + + * elfarm-oabi.c (bfd_elf32_arm_allocate_interworking_sections, + bfd_elf32_arm_get_bfd_for_interworking, + bfd_elf32_arm_process_before_allocation): Define to avoid clash + with elfarm-nabi.c. + + * elf32-arm.h: Don't declare elf32_arm_info_to_howto. + (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub, + elf32_arm_find_nearest_line): Make them static. + +Tue Feb 16 22:44:37 1999 Ian Lance Taylor + + * elflink.h (elf_merge_symbol): Add pflags parameter. Change all + callers. Do not merge a definition from a shared object with a + weak undefined symbol. + (elf_link_add_object_symbols): Do not change the symbol type or + size if the old symbol overrides the new one. + +1999-02-08 Nick Clifton + + * config.bfd: Add support for strongarm target. + +Mon Feb 8 11:18:14 1999 Andreas Schwab + + * elf32-m68k.c (reloc_map): Use the correct types for the struct + fields instead of unsigned char. + +Fri Feb 5 00:22:36 1999 Ian Lance Taylor + + * Makefile.am: Rebuild dependencies. + * Makefile.in: Rebuild. + +Thu Feb 4 22:30:13 1999 Ian Lance Taylor + + * configure.in: Change AC_PREREQ to 2.13. Remove AM_CYGWIN32. + Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to + AC_PROG_INSTALL. Add comments to uses of AC_DEFINE. + * acinclude.m4: Add comments to uses of AC_DEFINE. + * acconfig.h: Remove. + * configure: Rebuild with current autoconf/automake. + * aclocal.m4: Likewise. + * config.in: Likewise. + * Makefile.in: Likewise. + +1999-02-04 DJ Delorie + + * libbfd.c (real_read): don't call fread for zero bytes. This + covers up a bug (or misuse of bfd) that's exposed by Solaris. + +Thu Feb 4 12:38:10 1999 Stan Cox + + * elf32-mips.c (mips_elf_relocate_section): Insure that the target + of a jump is in the current 256 MB region. + +Thu Feb 4 12:15:38 1999 Ian Lance Taylor + + * format.c (bfd_check_format_matches): Change last patch to only + take effect for the binary target. + +Wed Feb 3 19:40:12 1999 Ian Lance Taylor + + * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR. + +Wed Feb 3 15:02:44 1999 Catherine Moore + + * elf32-fr30.c (fr30_elf_check_relocs): New routine. + +Tue Feb 2 21:38:28 1999 Ian Lance Taylor + + * format.c (bfd_check_format_matches): If the target was + previously specified, don't check other targets when checking for + an archive file. + +Tue Feb 2 18:16:43 1999 Catherine Moore + + * elf32-arm.h (elf32_arm_reloc_map): Removed. + (elf32_arm_reloc_type_lookup): Removed + * elfarm-nabi.c (elf32_arm_reloc_map): New. + (elf32_arm_reloc_type_lookup): New. + * elfarm-oabi.c (elf32_arm_reloc_map): New. + (elf32_arm_reloc_type_lookup): New. + +Mon Feb 1 19:49:21 1999 Catherine Moore + + * elfarm-nabi.c: Renamed from elf32-arm-newabi.c. + * elfarm-oabi.c: Renamed from elf32-arm-oldabi.c + * Makefile.am: Use new files. + * Makefile.in: Regenerate. + * configure.in: Use new files. + * configure: Regenerate. + +1999-02-01 Nick Clifton + + * elf32-fr30.c (fr30_elf_gc_mark_hook): New function. + (fr30_elf_gc_sweep_hook): New function. + (elf_backend_can_gc_sections): Define. + +Mon Feb 1 12:21:47 1999 Catherine Moore + + * targets.c (bfd_target_vector): Add bfd_elf32_littlearm_oabi_vec + and bfd_elf32_bigarm_oabi_vec. + +Mon Feb 1 11:46:31 1999 Catherine Moore + + * Makefile.am (elf32-arm-oldabi.lo): New. + (elf32-arm-newabi.lo): New. + * Makefile.in: Regenerate. + * config.bfd (thumb-*-elf): Remove definition of targ_underscore. + (arm-*-elf): Likewise. + (arm-*-oabi): New. + (thumb-*-oabi): New. + * configure: Regenerate. + * configure.in (bfd_elf32_littlearm_oabi_vec): New. + (bfd_elf32_bigarm_oabi_vec): New. + * elf32-arm-newabi.c: New. + * elf32-arm-oldabi.c: New. + * elf32-arm.c: Removed. + * elf32-arm.h: New. + +Mon Feb 1 11:52:12 1999 Frank Ch. Eigler + + * binary.c (binary_set_section_contents): Omit warnings for + unloadable sections. + +1999-01-31 Michael Meissner + + * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to + powerpc{,le}-*-eabi. + +1999-01-29 Nick Clifton + + * dwarf2.c (read_unsigned_leb128): Remove unused variables. + * dwarf2.c (read_signed_leb128): Remove unused variables. + +Fri Jan 29 00:47:21 1999 H.J. Lu + + * elf.c (assign_file_positions_for_segments): Only adjust + p_align when needed. + +Thu Jan 28 20:05:22 1999 Ian Lance Taylor + + * binary.c (binary_set_section_contents): Don't return early for a + non-loadable section, in case the first section is non-loadable. + Don't set the low lma for a SEC_NEVER_LOAD section. From Maciej + W. Rozycki . + +1999-01-28 Nick Clifton + + * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and + R_FR30_GNU_VTENTRY relocs. + +Thu Jan 28 11:08:16 1999 Catherine Moore + + * elflink.h (elf_link_output_sym): Zero syms which are + part of sections which have been excluded. + +Wed Jan 27 13:35:35 1999 Stan Cox + + * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed F_PIC + to F_PIC_INT. + * coffcode.h (coff_set_arch_mach_hook): Removed F_ARM_2a and + F_ARM_3M labels. Changed F_PIC to F_PIC_INT. + +1999-01-27 Nick Clifton + + * elf32-fr30.c (fr30_elf_howto_table): Fix name of R_FR30_48 + relocation. + (fr30_final_link_relocate): Use computed value as result of + relocation. + +1999-01-26 Frank Ch. Eigler + + * binary.c (binary_set_section_contents): Emit warning for + huge file offsets due to widely-dispersed section LMAs. + +Mon Jan 18 03:35:35 1999 Ian Lance Taylor + + * elf.c (assign_file_positions_for_segments): If not D_PAGED, + align first section to largest section alignment, not first + section alignment. + +1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com) + + * configure.in: Require autoconf 2.12.1 or higher. + +Tue Dec 22 15:21:41 1998 Catherine Moore + + * archures.c (bfd_mach_i386_i386_intel_syntax): Define. + * bfd-in2.h: Likewise. + * cpu-i386.c (bfd_i386_arch_intel_syntax): New. + +1998-12-16 Gavin Romig-Koch + + * archures.c,bfd-in2.h (bfd_mach_mips4111): New. + * cpu-mips.c: Add support for and independent 4111. + * elf32-mips.c (elf_mips_mach): E_MIPS_MACH_4111 -> bfd_mach_mips4111. + (_bfd_mips_elf_final_write_processing): + bfd_mach_mips4111 -> E_MIPS_ARCH_3 | E_MIPS_MACH_4111. + +1998-12-15 Gavin Romig-Koch + + * elf32-mips.c (elf_mips_abi_name): New. + (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags. + +1998-12-12 Gavin Romig-Koch + + * elf32-mips.c (_bfd_mips_elf_final_write_processing): + Handle bfd_mach_mips4300. + +1998-12-11 Ulrich Drepper + + * elf32-i386.c: Remove leaked development code from patch + 1998-12-10 by Richard Henderson. + +1998-12-10 Richard Henderson + + * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations + in debug sections for symbol defined externally. + +Thu Dec 10 10:58:38 1998 Andreas Schwab + + * targets.c (bfd_target_vector): Remove duplicate entry for + tekhex_vec. + +1998-12-09 Nick Clifton + + * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0 + since we are using RELAs. + +Tue Dec 8 22:15:48 1998 Ian Lance Taylor + + SCO Open Server Release 5 core file support, from Jouke Numan + : + * sco5-core.c: New file. + * configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo. + (sco5-core.lo): Define SCO5_CORE in COREFLAG. + * Makefile.am: Rebuild dependencies. + (OPTIONAL_BACKENDS): Add sco5-core.lo. + (OPTIONAL_BACKENDS_CFILES): Add sco5-core.c. + * bfd.c (struct _bfd): Add sco5_core_data field to tdata. + * targets.c (sco5_core_vec): Add to target list if SCO5_CORE. + * bfd-in2.h, configure, Makefile.in: Rebuild. + +Tue Dec 8 19:38:42 1998 Mark Klein + + * config.bfd (hppa*-*-mpeix*): New target. + * configure.in: Add AC_HEADER_DIRENT. + (hppa*-*-mpeix*): New target. + * configure.host (hppa*-*-mpeix*): New host. + * hpux-core.c: Check HOST_HPPAMPEIX. Use HAVE_DIRENT_H and + friends rather than just including . + * som.h (struct som_symbol): Add hppa_priv_level and apto + tc_data. Change all users. + (struct somdata): Add comp_unit field. + (obj_som_compilation_unit): Define. + (bfd_som_attach_compilation_unix): Declare. + * som.c: Check HOST_HPPAMPEIX. + (struct som_misc_symbol_info): Add new field priv_level. + (som_object_setup): Add current_offset parameter. Change all + callers. + (setup_sections): Likewise. + (som_object_p): For EXECLIBMAGIC, read the lst header. + (som_write_symbol_strings): Add compilation_unit parameter. + Change all callers. + (som_finish_writing): Write out compilation_unit. + (som_bfd_derive_misc_symbol_info): Set priv_level. + (som_build_and_write_symbol_table): Set xleast field to 3. + (som_slurp_symbol_table): Set symbol priv_level. + (bfd_som_attach_compilation_unit): New function. + (som_bfd_ar_write_symbol_stuff): Set xleast field to 3. Set + priv_level into symbol_value. + * configure, config.in: Rebuild. + +Tue Dec 8 16:21:35 1998 Ian Lance Taylor + + * hpux-core.c (hpux_core_core_file_p): Change call to nonexistent + warning function to call _bfd_error_handler instead. + + * libbfd.c (COERCE32): Cast through unsigned long and long to + avoid bug in old version of gcc. + + * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove. + (elf_backend_additional_program_headers): Don't define. + +1998-12-08 Nick Clifton + + * elf32-fr30.c (fr30_final_link_relocate): Fix PC relative + relocations to include offset of 2 included in the insns, and the + offset of the relocs within the section. + +Wed Dec 2 15:03:59 1998 David Taylor + + The following changes were made by David Taylor + , Edith Epstein + , Jim Blandy + , and Elena Zannoni + as part of the project to merge in + changes originally made by HP; HP did not create ChangeLog + entries. + + * aclocal.m4, configure, Makefile.in: Rebuilt using latest + automake macro library. + + * hpux-core.c (hpux_core_core_file_p): this function now + understands HPUX 10.30 thread info. Yes, the thread stacks can be + found in the corefile! Also, in hpux_core_core_file_p, if we + encounter a section with an unknown type, don't punt. Instead, + just skip it. Also, count the number of sections of known type + that we encounter. If we encounter at least one good one, then + we'll declare that the file is a core file. If we encounter any + unknown ones but some known ones, then we'll issue a warning (but + still declare it to be a core file). Also, correctly decide when a + file is not a core. + (PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined. + (CORE_ANON_SHMEM): define if not defined. + (hpux_core_struct): add members lwpid and user_tid. + (core_kernel_thread_id, core_user_thread_id): new macros. + (make_bfd_asection): use bfd_alloc to allocate room for a copy of + the name before storing it in the bfd. + (hpux_core_core_file_p): handle threads. + + * libhppa.h (GET_FIELD): protect against redefinition. + (HPPA_WIDE): define. + (GET_FIELD): define. + (GET_BIT): define. + (MASK): define. + (CATENATE): define. + (ELEVEN): define. + (sign_extend): redefine. + (assemble_6): define. + (assemble_12): rewrite. + (assemble_16): define. + (assemble_16a): define. + (assemble_17): rewrite. + (assemble_22): define. + +1998-12-07 Nick Clifton + + * elf32-fr30.c (fr30_final_link_relocate): Using signed + relocations for signed values. + +Sun Dec 6 16:30:33 1998 Ian Lance Taylor + + * mipsbsd.c (MY(set_arch_mach)): Make static. + * aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use + bfd_mach_mips* macros rather than simple numbers. + + COFF weak symbol support, based on patches from Mark Elbrecht + : + * coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT. + * coffgen.c (coff_renumber_symbols): Handle weak symbols. + (coff_write_alien_symbol): Likewise. + * cofflink.c (coff_link_check_ar_symbols): Likewise. + (coff_link_add_symbols): Likewise. + (_bfd_coff_link_input_bfd): Likewise. + (_bfd_coff_write_global_sym): Likewise. + + * elf.c (copy_private_bfd_data): Always initialize the + includes_phdrs field. + + * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF + file defines a symbol first mentioned in an ELF file. + + * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if + possible, rather than only if BFD64. + * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT, + not __GNUC__. + * bfd-in2.h: Rebuild. + + * srec.c (srec_set_section_contents): Correct test to avoid + switching to 4 byte addresses after seeing a second section which + requires 3 byte addresses. From Joel Schantz + . + + * config.bfd (m68*-*-gnu*): New target. From Aymeric Vincent + . + +1998-12-04 Jim Blandy + + * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Fix logic to + decide whether the output file is -mrelocatable-lib, + -mrelocatable, or neither. (gdb.base/nodebug.exp) + +1998-12-03 Nick Clifton + + * elf32-fr30.c: Add support for R_FR30_48 reloc. + * reloc.c: Add BFD_RELOC_FR30_48 relocation. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate + +Wed Dec 2 00:58:37 1998 Ian Lance Taylor + + * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to + link against a dynamic symbol with no type or size. + +1998-12-01 Ulrich Drepper + + * elf32-i386.c (i386_check_relocs) [R_386_32]: Don't emit + relocation for section which does not get loaded. + (elf_i386_relocate_section) [R_386_32]: Likewise. + +Tue Dec 1 11:33:33 1998 Jim Wilson + + * coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size, + reloc_count and i long instead of unsigned long. Handle error + return from bfd_canonicalize_reloc. + +1998-12-01 Nick Clifton + + * elf32-v850.c (v850_elf_relocate_section): Detect the absence of + a hash table. + +Mon Nov 30 15:28:09 1998 J"orn Rennecke + + * elf32-sh.c (elf/sh.h): Include. + sh_reloc_type: Delete. Changed all references to elf_sh_reloc_type. + (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8. + (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8. + (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8. + * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h. + +Fri Nov 27 17:51:38 1998 Geoff Keating + + * elflink.h (compute_bucket_count): Don't allow minsize==0, it + causes division by zero later on. + +Thu Nov 26 11:19:35 1998 Dave Brolley + + * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not + needed. + +1998-11-25 DJ Delorie + + * coff-i386.c (i3coff_object_p): Remove hack. Use new emulation + hook now. + +Tue Nov 24 10:25:27 1998 Nick Clifton + + * elf32-fr30.c (fr30_elf_relocate_section): Call + fr30_final_link_relocate. + (fr30_final_link_relocate): New function: Handle I20 and I32 + relocs. + (fr30_elf_i32_reloc): New function: Handle I32 relocs. + (fr30_elf_pc9_reloc): New function: Handle 9_PCREL relocs. + (fr30_elf_pc12_reloc): New function: Handle 12_PCREL relocs. + + * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc + chain to empty. + + The following changes are based on a patch submitted by Gianluca + Moro : + + (v850_elf_perform_relocation): Only update a hi16s reloc if it has + not already been updated. + (find_remembered_hi16s_reloc): New parameter 'already_found' + returns state of remembered hi16s reloc. + (remember_hi16s_reloc): Set 'found' field to false. + (hi16s_location): Add 'found' field. + +1998-11-23 DJ Delorie + + * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants + to see .DLL files as unrecognized. + (i3coff_object_p): Sorry, had to hack it to not recognize these + files (pei-i386) on request. + +1998-11-23 DJ Delorie + + * opncls.c (bfd_make_readable): need more cleanup for symbols and + relents. Call bfd_check_format to reinitialize. + +Fri Nov 20 14:21:36 1998 Nick Clifton + + * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious + warnings. + +Thu Nov 19 14:42:15 1998 Geoffrey Noer + + * aclocal.m4: regenerate + * configure: regenerate + +Tue Nov 17 20:23:35 1998 Richard Henderson + + * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size. + * elf.c (_bfd_elf_link_hash_newfunc): Clear it. + * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and + respect it as an upper bound on what memory to reference. + (elf_gc_smash_unused_vtentry_relocs): Likewise. + (elf_gc_record_vtentry): Handle as-yet undefined vtables. Set and + update vtable_entries_size appropriately. + +Tue Nov 17 15:28:31 1998 Nick Clifton + + * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold + reloc number. + +Mon Nov 16 22:19:21 1998 DJ Delorie + + * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY + bfds; they have no "file" so we fake it. + * bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen) + * libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by + resizing the memory buffer. + * opncls.c (bfd_make_writable): New function; lets you write a + bfd_create'd bfd to an in-memory buffer. + (bfd_make_readable): New function; lets you read back that buffer + as if it were from bfd_openr. Used to build generated archive + members (winsup's ld's dlltool) + +Mon Nov 16 19:15:19 1998 Dave Brolley + + * po/bfd.pot: Regenerated. + +Mon Nov 16 10:57:06 1998 Nick Clifton + + * elf32-v850.c (hi16s_location): Replaced fixed size array with + linked list. + +Sun Nov 15 20:28:25 1998 Richard Henderson + + * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper + element of the gotentry list for local symbols too. + (elf64_alpha_relocate_section): Unify local and global handling. + Assert that gotent->use_count > 0. + +Sat Nov 14 15:16:01 1998 Ian Lance Taylor + + * configure.in (vms_alpha_vec): Rename from evax_alpha_vec, and + update for file name changes of July 2, 1998. + (vms_vax_vec): New. + * configure: Rebuild. + +Thu Nov 12 19:19:54 1998 Dave Brolley + + * po/bfd.pot: Regenerated. + +Tue Nov 10 16:17:06 1998 Geoffrey Noer + + * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*. + * aclocal.m4, configure: regenerate + +Tue Nov 10 15:13:59 1998 Nick Clifton + + * elf.c (prep_headers): Add support for bfd_arch_fr30. + +Tue Nov 10 13:37:36 1998 Felix Lee + + * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE, + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): didn't define macro when value + was cached. + * aclocal.m4, configure: regenerated. + +Tue Nov 10 14:31:01 1998 Catherine Moore + + * elf32-d10v.c (reloc_type): Add R_D10V_GNU_VTINHERIT and + R_D10V_GNU_VTENTRY relocs. + (elf_d10v_howto_table): Likewise. + (d10v_reloc_map d10v_reloc_map): Likewise. + (elf32_d10v_gc_mark_hook): New. + (elf32_d10v_gc_sweep_hook): New. + (elf32_d10v_check_relocs): New. + (elf32_d10v_relocate_section): New. + (elf_backend_relocate_section): Define. + (elf_backend_can_gc_sections): Define. + +Sat Nov 7 18:07:51 1998 Peter Schauer + + * Makefile.am (BFD32_BACKENDS): Move vms files here... + (BFD64_BACKENDS): ...from here. + (BFD32_BACKENDS_CFILES): Move vms files here... + (BFD64_BACKENDS_CFILES): ...from here. + * Makefile.in: Rebuild. + +Wed Nov 4 15:58:48 1998 Nick Clifton + + * Makefile.am: Add FR30 target. + * Makefile.in: Add FR30 target. + * archures.c: Add support for FR30. + * config.bfd: Add support for FR30. + * configure.in: Add support for FR30. + * reloc.c: Add support for FR30 relocations. + * targets.c: Add support for FR30 relocations. + * bfd-in2.h: Regenerate. + * configure: Regenerate. + * libbfd.h: Regenerate. + * cpu-fr30.c: New file. + * elf32-fr30.c: New file. + +Mon Nov 2 14:59:33 1998 Geoffrey Noer + + * configure.in: detect cygwin* instead of cygwin32* + * configure: regenerate + +Sun Nov 1 19:32:28 1998 Jeffrey A Law (law@cygnus.com) + + * elf-m10300.c (mn10300_elf_relax_section): Do not use alloca, + use bfd_malloc and free instead and check return value from bfd_malloc. + +Sun Nov 1 16:20:35 1998 Ian Lance Taylor + + * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare. + * libbfd.h: Rebuild. + + * elf32-mips.c (mips_elf_dynsym_sec_names): Comment out. + (SIZEOF_MIPS_DYNSYM_SECNAMES): Likewise. + (MIPS_TEXT_DYNSYM_SECN): Likewise. + (_bfd_mips_elf_fake_sections): Don't set sh_info field of a .hash + section. + (struct mips_elf_link_hash_table): Remove dynsym_sec_strindex + field. + (mips_elf_link_hash_table_create): Don't initialize + dynsym_sec_strindex. + (mips_elf_gc_mark_hook): Add default case to avoid warning. + (mips_elf_size_dynamic_sections): Generate a section symbol for + every output section. + (mips_elf_finish_dynamic_sections): Count all sections for + DT_MIPS_UNREFEXTNO. + (mips_elf_finish_dynamic_sections): Use dynamic symbols for all + output sections. + +Sun Nov 1 12:46:53 1998 Geoff Keating + + * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Allocate two slots + for later PLT entries in large PLTs. + (ppc_elf_finish_dynamic_symbol): Allow for the extra slots. + +Sat Oct 31 20:10:09 1998 Jeffrey A Law (law@cygnus.com) + + * elf32-ppc.c (ppc_elf_reload_section): Fix typo. + +1998-10-26 15:58 Ulrich Drepper + + * elf-bfd.h (struct elf_link_hash_entry): Add new field elf_hash_value. + * elflink.h (elf_collect_hash_codes): New function. This function is + called for each exported symbol and we compute the ELF hash value for + it. + (compute_bucket_value): New function. It is called from + size_dynamic_sections to determine the hash table size. When we are + optimizing a better, but slower, algorithm is used. + (size_dynamic_sections): Call compute_bucket_value. + + * elf.c (bfd_elf_hash): Optimize the hash function a bit. + +Mon Oct 19 20:03:21 1998 Catherine Moore + + * elf32-sh.c: Add HOWTO entries for R_SH_GNU_VTINHERIT and + R_SH_GNU_VTENTRY. + (sh_elf_gc_mark_hook): New. + (sh_elf_gc_sweep_hook): New. + (sh_elf_check_relocs): New. + (elf_backend_can_gc_sections): Define. + +Mon Oct 19 16:57:05 1998 Felix Lee + + * acinclude.m4: undo previous gettext change + * aclocal.m4: rebuild with right version of aclocal. + +Mon Oct 19 01:47:21 1998 Felix Lee + + * acinclude.m4, aclocal.m4: move gettext-related fragments from + aclocal.m4 to acinclude.m4, so they don't get lost. + + * elfcore.h: rewrite for better corefile support. + * elf.c (elfcore_*): new functions. + * elf-bfd.h (elf_obj_tdata): new structure members. + * acconfig.h, acinclude.m4, configure.in: add feature-tests for + flavor of procfs. + * aclocal.m4, config.in, configure, Makefile.in: regenerated. + +Fri Oct 16 14:07:45 1998 Catherine Moore + + * elf32-m32r.c: Add HOWTO entries for R_M32R_GNU_VTINHERIT + and R_M32R_GNU_VTENTRY. + (elf_backend_can_gc_sections): Define. + (m32r_elf_check_relocs): New. + (m32r_elf_gc_mark_hook): New. + (m32r_elf_gc_sweep_hook): New. + (m32r_elf_relocate_section): Handle VT relocs. + +Mon Oct 12 14:18:40 1998 Nick Clifton + + * coff-arm.c (arm_relocate_section): Remove redundant test. + + * bfd-in2.h (struct reloc_howto_struct): Improve comment to make + cleat that the 'bitsize' field is the size of the bitfield AFTER + relocation not before. + + * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield. + + * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo + relocs. + +Tue Oct 6 09:20:44 1998 Catherine Moore + + * elf32-sparc.c: Add HOWTO entries for R_SPARC_GNU_VTINHERIT and + R_SPARC_GNU_VTENTRY. + (elf32_sparc_check_relocs): Handle them. + (elf32_sparc_reloc_type_lookup): Likewise. + (elf32_sparc_relocate_section): Likewise. + (elf32_sparc_gc_mark_hook): New. + (elf32_sparc_gc_sweep_hook): New. + +Mon Oct 5 14:55:30 1998 Jeffrey A Law (law@cygnus.com) + + * som.c (som_finish_writing): Perform some sanity checks when + writing an executable or shared library. + +Mon Oct 5 12:02:31 1998 Gavin Romig-Koch + + * dwarf1.c : New file. Adds _bfd_dwarf1_find_nearest_line. + * configure.in (elf): Add dwarf1.lo. + * elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info. + * elf.c (_bfd_elf_find_nearest_line): Add call to + _bfd_dwarf1_find_nearest_line. + * elf32-mips.c (_bfd_mips_elf_find_nearest_line): + Add call to _bfd_dwarf1_find_nearest_line. + * configure: Rebuilt. + +Mon Oct 5 10:06:22 1998 Catherine Moore + + * elflink.h (elf_gc_sections): Do not allow garbage + collection if dynamic sections have been created. + +Mon Oct 5 09:07:37 1998 Catherine Moore + + * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and + R_V850_GNU_VTENTRY. + (v850_elf_check_relocs): Handle VTINHERIT and VTENTRY relocs. + (v850_elf_perform_relocation): Likewise. + (v850_elf_final_link_relocate): Likewise. + (v850_elf_relocate_section): Likewise. + (v850_elf_gc_sweep_hook): New routine. + (v850_elf_gc_mark_hook): New routine. + (elf_backend_can_gc_sections): Define. + +Mon Oct 5 09:04:25 1998 Catherine Moore + + * elf32-m68k.c (elf_m68k_gc_sweep_hook): Don't assume + that dynobj exists. + +Sun Oct 4 23:29:34 1998 David Edelsohn + + * rs6000-core.c (rs6000coff_core_file_matches_executable_p): + Declare size as bfd_size_type. + (rs6000coff_get_section_contents): Declare count as bfd_size_type. + +Sun Oct 4 20:38:29 1998 Jeffrey A Law (law@cygnus.com) + + * cpu-hppa.c (bfd_hppa20_arch): Define. Link it into the bfd_hppa_arch + structure. + * som.c (CPU_PA_RISC2_0): Define. + (_PA_RISC2_0_ID): Likewise. + (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed. + +Sun Oct 4 21:19:09 1998 Ian Lance Taylor + + * elflink.h (elf_link_add_object_symbols): When a versioned symbol + has a base which is already defined, only add the referenced + symbol to the dynamic symbol table if it is defined or referenced + by a regular file. + + * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs + correctly. + +1998-09-27 Andreas Schwab + + * elflink.h (elf_link_add_object_symbols): Undo last change. + +Wed Sep 23 16:09:31 1998 Richard Henderson + + * elflink.h (elf_link_add_object_symbols): Don't record a dynamic + symbol for the indirect alias to a versioned symbol. + +Mon Sep 21 12:15:22 1998 Catherine Moore + + * elf32-i386.c (elf32_i386_vtinherit_howto): New. + (elf32_i386_vtentry_howto): New. + (elf_i386_reloc_type_lookup): Return elf32_i386_vtentry_howto + or elf32_i386_vtinherit_howto on lookup. + +Sun Sep 20 00:48:07 1998 Andreas Schwab + + * elf32-m68k.c: Include "elf/m68k.h". Remove definition of enum + reloc_type. Rename R_68K__max to R_68K_max. + (howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY + reloc. + +Sun Sep 20 00:09:25 1998 Chris Torek + + * libbfd.c (bfd_getb32): Rewrite expression to get better code. + (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise. + + * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not + after. + +Sat Sep 19 22:42:23 1998 Doug Rabson + + * elflink.h (elf_link_add_object_symbols): Ensure that the warning + message has a null byte terminator. + +Fri Sep 18 14:35:29 1998 Nick Clifton + + * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of + word subject to R_V850_32 relocation. + +Thu Sep 17 17:20:36 1998 Nick Clifton + + * dwarf2.c: Add comment describing problem computing line numbers + for undefined symbols at link time. + +Thu Sep 17 16:03:28 1998 Richard Henderson + + * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't + transform a defweak into a plt entry. + (elf64_alpha_calc_dynrel_sizes): Allow room for secondary + plt entry references to receive a RELATIVE reloc. + (elf64_alpha_finish_dynamic_symbol): Fill them in. + (elf64_alpha_relocate_section): Assert we don't overrun + the allocated relocation space. + +Wed Sep 16 18:03:13 1998 Nick Clifton + + * elf.c (swap_out_syms): Always treat section symbols as + special, even if they are attached to a common section. + +Wed Sep 16 10:34:13 1998 Nick Clifton + + * elf32-v850.c (v850_elf_symbol_processing): Move symbols in + sections with v850 common section attributes into named v850 + common sections. + (v850_elf_add_symbol_hook): Move symbols in sections with v850 + common section attributes into named v850 common sections. + +Wed Sep 16 11:26:49 CDT 1998 Catherine Moore + + * elf32-arm.c (elf32_arm_gc_mark_hook): Remove print + statement. + +1998-09-15 Geoff Keating + + * elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset + part of Vladimir's change of 1998-08-19. Make a R_PPC_SDAREL16 + reloc to the wrong section a warning, not an error. .dynsbss + is not an output section, so there is no need to check for it. + +Tue Sep 15 12:40:05 1998 Catherine Moore + + * elf-bfd.h: Add argument to elf_backend_get_symbol_type. + +Tue Sep 15 08:34:40 1998 Catherine Moore + + * elf.c (swap_out_syms): Pass type to elf_backend_get_symbol_type. + * elf32-arm.c: Add HOWTO entries for R_ARM_GNU_VTINHERIT and + R_ARM_GNU_VTENTRY. + (elf32_arm_gc_mark_hook): New. + (elf32_arm_gc_sweep_hook): New. + (elf32_arm_check_relocs): New. + (elf32_arm_final_link_relocate): Handle VTINHERIT and VTENTRY + relocations. + (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY + relocations. + +1998-09-10 Geoff Keating + + * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL, + assume there is no PLT or GOT. + +Wed Sep 9 14:24:12 1998 Nick Clifton + + * elf32-arm.c (elf32_arm_find_nearest_line): New function: just + like _elf_bfd_find_nearest_line() except that STT_ARM_TFUNC is + also accepted as a function symbol type. + +Mon Sep 7 13:24:03 1998 Peter Schauer + + * rs6000-core.c (_LONG_LONG): Define for AIX 4.x only. + +Sat Sep 5 20:40:18 1998 Ian Lance Taylor + + * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to + match definition of _bfd_gc_sections field. + * libbfd.h: Rebuild. + +Fri Sep 4 13:54:23 1998 David Miller + + * elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust + the addend of a dynamic relocation referencing a section. + * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. + (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset. + +Thu Sep 3 17:28:50 1998 Richard Henderson + + * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the + bed has a size_dynamic_sections routine before trying to use it. + +Mon Aug 31 14:49:22 1998 Richard Henderson + + * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use + _bfd_elf_rel_vtable_reloc_fn. + +Mon Aug 31 10:23:40 1998 Catherine Moore + + * Makefile.am: Add elf32-arm.c. + * Makefile.in: Rebuild. + * elf-bfd.h: Add elf_backend_get_symbol_type. + * elf.c (swap_out_syms): If defined, call + elf_backend_get_symbol_type. + * elf32-arm.c: Define elf_backend_get_symbol_type. + (elf32_arm_get_symbol-type): New routine. + (record_thumb_to_arm_glue): Change to use STT_ARM_TFUNC. + (bfd_elf32_arm_process_before_allocation): Change to + check for STT_ARM_TFUNC. + (elf32_arm_final_link_relocate): Likewise. + * elfxx-target.h: Add elf_backend_get_symbol_type. + +Fri Aug 28 19:44:07 1998 Richard Henderson + + * archures.c (bfd_mach_alpha_ev[456]): New. + * cpu-alpha.c: Rework to match these types. + * bfd-in2.h: Rebuild. + +Fri Aug 28 19:38:53 1998 Richard Henderson + + * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare. + * elf.c (_bfd_elf_rel_vtable_reloc_fn): New. + + * elf32-i386.c (elf_howto_table): Add vtable relocs. + (elf_i386_reloc_type_lookup): Recognize them. + (elf_i386_check_relocs): Pass them off to generic code. + (elf_i386_relocate_section): Ignore them. + (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New. + (elf_backend_can_gc_sections): True. + +Thu Aug 20 15:03:45 1998 Nick Clifton + + * elf32-arm.c (elf32_thumb_to_arm_stub): Check sym_sec is not NULL + before looking at owner field. + (elf32_arm_to_thumb_stub): Ditto. + (elf32_arm_relocate_section): Compute name before calling + elf32_arm_final_link_relocate(). + +Thu Aug 20 11:30:17 1998 Michael Snyder + + * elf.c: comment and formatting cleanups. + * elfcore.h: ditto. + +Wed Aug 19 15:43:26 1998 Michael Snyder + + * elfcode.h (elf_object_p): Reject files of header type ET_CORE + (core files are treated differently than object files). + * elf-bfd.h (_bfd_elf_write_corefile_contents, + bfd_elf_mkcorefile): declare. + * elfxx-target.h (_bfd_elf_write_corefile_contents, + bfd_elf_mkcorefile): add to bfd_target vector. + * elfcore.h (elf_core_file_p): save the program header table, + and set the bfd architecture from the elf file header. + * elf.c (bfd_elf_mkcorefile): new function. + (_bfd_elf_write_corefile_contents): new function. + (assign_file_positions_for_segments): add cases for handling + PT_NOTE segments. (assign_file_positions_except_relocs): + core files should be handled the same as exec files. + (prep_headers): identify core files as type ET_CORE. + (copy_private_bfd_data): identify the sections belonging to + the PT_NOTE segment. + + * elf32-sparc.c (elf32_sparc_final_write_processing): + add break statement to default case. + +1998-08-19 Vladimir N. Makarov + + * elf32-ppc.c (ppc_elf_relocate_section): Check that output + section (not input) will be in sections ".sbss", ".sbss2", + ".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL, + R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA. In all these cases also ignore + output_offset for correct evaluation of addend. + +Tue Aug 18 11:48:12 1998 Catherine Moore + + * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking, + elf32_arm_allocate_interworking_sections and + elf32_arm_process_before_allocation. + +Tue Aug 18 11:46:00 1998 Nick Clifton + + * bfd-in.h: Ammend prototype for + elf32_arm_process_before_allocation to remove surplus third + argument. + + * bfd-in2.h: Regenerate. + +Sat Aug 15 20:55:08 1998 Richard Henderson + + * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols. + +Fri Aug 14 09:12:28 1998 Stan Cox + + * aoutx.h (aout_link_input_section_ext): Use the relocation already + calculated for RELOC_SPARC_REV32 case. + +Thu Aug 13 14:02:02 1998 Catherine Moore + + * bfd-in.h: Add prototypes for elf32_arm_get_bfd_for_interworking, + elf32_arm_allocate_interworking_sections and + elf32_arm_process_before_allocation. + * bfd-in2.h: Regenerated. + * elf32-arm.c Define elf32_arm_link_hash_table. + (insert_thumb_branch): New routine. + (find_thumb_glue): New routine. + (find_arm_glue): New routine. + (record_arm_to_thumb_glue): New routine. + (record_thumb_to_arm_glue): New routine. + (elf32_arm_link_hash_table_create): New routine. + (elf32_arm_get_bfd_for_interworking): New routine. + (elf32_arm_allocate_interworking_sections) New routine. + (elf32_arm_process_before_allocation) New routine. + (elf32_thumb_to_arm_stub): New routine. + (elf32_arm_to_thumb_stub): New routine. + (elf32_print_private_bfd_data): Fix typo. + (elf32_arm_final_link_relocate): Add argument sym_sec. + Check for branches to thumb symbols in case R_ARM_PC24. + Check for branches to arm symbols in case R_ARM_THM_PC22. + (elf32_arm_relocate_section): Pass symbol section to + elf32_arm_final_link_relocate. + +Wed Aug 12 19:00:39 1998 Geoff Keating + + * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT + entries unless the symbol is defined in the executable; in + particular, undefined weak symbols get a PLT entry. + +Wed Aug 12 14:48:33 1998 Ian Lance Taylor + + * libaout.h: Remove nested comment to avoid warning. + +Wed Aug 12 08:10:11 1998 Catherine Moore + + * elf32-arm.c (elf32_arm_final_link_relocate): Rework + R_ARM_PC24 relocation. + +Tue Aug 11 14:42:26 1998 Catherine Moore + + * elf32-arm.c (elf32_arm_final_link_relocate): Remove unused + argument is_local. Add argument sym_flags. Check sym_flags + in R_ARM_ABS32 case. Include addend for R_ARM_THM_PC22 case. + (elf32_arm_relocate_section): Don't pass local sym and pass + sym_flags to elf32_arm_final_link_relocate. + +Mon Aug 10 20:38:39 1998 Richard Henderson + + * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change + to not count too few relocs for dynamicly linked executables. + +Mon Aug 10 15:35:34 1998 Richard Henderson + + * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Never consider + symbols without a dynamic index dynamic. Consider all weak + symbols dynamic. + (elf64_alpha_strip_section_from_output): Don't assume 1-1 + correspondance between input and output sections. + +Mon Aug 10 15:31:39 1998 Andreas Schwab + + * elflink.h (elf_gc_common_finalize_got_offsets): For backends + that use a .got.plt section start the got offset at zero. + +Mon Aug 10 17:31:21 1998 Ian Lance Taylor + + * ieee.c (ieee_write_processor): Correct the processor ID written + out for bfd_arch_m68k, accommodating change of March 25. + +Sun Aug 9 20:55:44 1998 Catherine Moore + + * elf32-arm.c (elf32_arm_final_link_relocate): Rework + R_ARM_THM_RPC22 relocations. + +Sat Aug 8 15:15:30 1998 Richard Henderson + + * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols + are always dynamic. + (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE + .got relocs in -Bsymbolic shared objects. + +Wed Aug 5 15:48:08 1998 Nick Clifton + + * elf32-arm.c: Add private flags to ELF header. + (elf32_arm_print_private_bfd_data): New Function. + (elf32_arm_set_private_flags): New Function. + (elf32_arm_copy_private_flags): New Function. + (elf32_arm_merge_private_bfd_data): New Function. + +Mon Aug 3 17:10:15 1998 Ian Lance Taylor + + * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against + a local symbol. + (elf32_sparc_relocate_section): Likewise. + +Sun Aug 2 03:19:23 1998 Richard Henderson + + * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL. Create the + .got if any relocation referrs to _GLOBAL_OFFSET_TABLE_. + (ppc_elf_relocate_section): Pull sgot and splt search to the start + of the function. Recognize no .plt as static linking. + +1998-08-01 Ulrich Drepper + + * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass + ".liblist" string through gettext. + +Fri Jul 31 16:38:14 1998 Catherine Moore + + * Makefile.am: Add support for elf32-arm.lo. + * Makefile.in: Rebuild. + * config.bfd (arm-*-elf): Define targ_defvec and targ_selvecs. + (thumb-*-elf): Define targ_defvec and targ_selvecs. + * configure.in: Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec. + * configure: Regenerate. + * elf.c: (prep_headers): Support arch_type of EM_ARM. + * targets.c: Support new targets bfd_elf32_bigarm_vec and + bfd_target bfd_elf32_littlearm_vec. + * elf32-arm.c: New file. + +Tue Jun 28 19:05:28 1998 Stan Cox + + * libaout.h (M_SPARCLITE_LE): New machine. + * sunos.c (MACHTYPE_OK): Add machine M_SPARCLITE_LE. + * aoutf1.h (sunos_set_arch_mach): Add machine M_SPARCLITE_LE. + (sunos_write_object_contents): Add machine bfd_mach_sparc_sparclite_le + * aoutx.h (howto_table_ext): Add relocation R_SPARC_REV32. + (NAME(aout,machine_type)) Add machine bfd_mach_sparc_sparclite_le + (aout_link_input_section_ext): Add RELOC_SPARC_REV32 support. + * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map, + elf32_sparc_relocate_section): Rename R_SPARC_32LE to be R_SPARC_REV32 + * libbfd.h (bfd_reloc_code_real_names): Rename BFD_RELOC_SPARC_32LE to + be BFD_RELOC_SPARC_REV32. + * reloc.c: Ditto. + * config.bfd (sparc86x-*-aout): New + +Fri Jul 24 13:54:19 1998 Nick Clifton + + * linker.c (_bfd_generic_final_link): Allocate NULL symbol before + actually mapping the output sections. + +Fri Jul 24 11:24:29 1998 Jeffrey A Law (law@cygnus.com) + + + * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry. + (mn10300_elf_reloc_map): Similarly. + (mn10300_elf_final_link_relocate): Handle R_MN10300_24. + +Fri Jul 24 12:36:04 1998 Ian Lance Taylor + + * elf32-mips.c (elf_mips_howto_table): Add reloc types used on + Irix 6. + (bfd_elf32_bfd_reloc_type_lookup): Add default case. + * elf64-mips.c: Replace all uses of mips_elf64_reloc_type with + elf_mips_reloc_type defined in elf/mips.h. + +1998-07-24 Ulrich Drepper + + * elf64-mips.c: Remove reloc_type definition completely. It's now + in elf/mips.h. + +Thu Jul 23 13:33:19 1998 Doug Evans + + * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations + as they are defined in elf/mips.h now. + +Thu Jul 23 11:29:43 1998 Jeffrey A Law (law@cygnus.com) + + + * Re-add lost change: + * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field + "movm_stack_size". + (mn10300_elf_relax_section): Include stack space for register saves + in the imm8 field of a "call" instruction. + (compute_function_info): Determine how much stack is allocated by + the movm instruction. Fix typo. + (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size. + +Thu Jul 23 11:38:05 1998 Ian Lance Taylor + + * elf32-sparc.c (elf_backend_got_header_size): Define as 4. + * elf64-sparc.c (elf_backend_got_header_size): Define as 8. + +1998-07-22 Ulrich Drepper + + * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type. + +Wed Jul 22 16:27:18 1998 Nick Clifton + + * elf32-hppa.h: Let ELF header define the enum containing the + external reloc numbers. + * elf32-i386.h: Likewise. + +1998-07-22 14:57 Ulrich Drepper + + * elf-m10300.c: Let ELF header now define the macros to get the enum. + * elf32-mips.c: Likewise. + * elf32-ppc.c: Likewise. + +Wed Jul 22 13:53:52 1998 Nick Clifton + + * bfd-in2.h: Change type of 'class' parameter to 'unsigned int' in + bfd_coff_set_symbol_class(), in order to avoid K&R compatability + prblems. + * bfd-in.h: Regenerate. + * coffgen.c (bfd_coff_set_symbol_class): Change type of 'class' + parameter to 'unsigned int' to avoid K&R compatability problems. + +Wed Jul 22 16:43:24 1998 Ian Lance Taylor + + * ieee.c (ieee_find_nearest_line): Change filename_ptr and + functionname_ptr to be const. Change line_ptr to be unsigned. + + * coffcode.h (coff_link_output_has_begun): Simplify handling when + macro is not defined. Change second parameter from bfd_link_info + to coff_final_link_info. Add prototype. + (coff_final_link_postscript): Simplify handling when macro is not + defined. Add prototype. + +1998-07-22 13:08 Ulrich Drepper + + * elf-mn10300.c: Before include system specific ELF header define + START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS. + * elf32-mips.c: Likewise. + * elf32-ppc.c: Likewise. + +Wed Jul 22 13:46:51 1998 Ian Lance Taylor + + * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c + temporary patch over to elf64-mips.c as well. + +1998-07-21 Ulrich Drepper + + * elf32-mips.c (reloc_type): Temporarily disable definition of + standard relocation since they are now defined in elf/mips.h. + +Tue Jul 21 09:47:00 1998 Catherine Moore + + * elf-m10200.c (mn10200_elf_final_link_relocate): + Modify range test for case R_MN10200_8. + + * elf-m10300.c (mn10300_elf_final_link_relocate): + Modify range test for case R_MN10300_8. + +Mon Jul 20 18:50:54 1998 Richard Henderson + + * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size. + * elf32-i386.c (elf_backend_got_header_size): Define. + (elf_backend_plt_header_size): Define. + * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise. + * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise. + * elfxx-target.h: Provide a default of zero. + * elflink.c (_bfd_elf_create_got_section): Use got_header_size. + * elflink.h (elf_gc_common_finalize_got_offsets): Likewise. + + * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT + entry from an executable, even if the plt refcount goes to 0. + +Mon Jul 20 12:47:26 1998 Andreas Schwab + + * aoutx.h (NAME(aout,find_nearest_line)): Also remember the + directory name at the line number. + + * elf.c (_bfd_elf_find_nearest_line): Also consider symbols + with an unspecified type. + +Wed Jul 15 11:20:01 1998 Ian Lance Taylor + + * sunos.c: Add undef of valid to avoid problem on SunOS. + +Tue Jul 14 15:30:59 1998 Richard Henderson + + * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize. + +Tue Jul 14 11:22:21 1998 Andreas Schwab + + * elf32-m68k.c (elf_m68k_check_relocs): Also reference count + R_68K_PCxx and R_68K_xx relocations. Make sure that + ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference. + (elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and + R_68K_xx relocations. + (elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol + that has no plt entry. + (elf_m68k_relocate_section): Ignore the plt offset in a static + link. + * elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for + an ignored symbol. + (elf_gc_common_finalize_got_offsets): Set the got offsets also in + a static link. + + * elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc + types. + (howto_table, reloc_map): Add entries for them. + (elf_m68k_check_relocs): Handle them. Implement reference + counting for got and plt entries. + (elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions. + (elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt + symbols. + (rtype_to_howto_rel, elf_info_to_howto_rel): Delete. + (elf_m68k_relocate_section): Handle the new reloc types. + (bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook, + elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define. + * elflink.h (elf_link_add_object_symbols): When creating an + indirect reference for symbol versioning also copy the plt + offset. + (elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT + flag also reset the plt offset. + (elf_link_assign_sym_version): Likewise. + (elf_gc_common_finalize_got_offsets): Increment the got offset by + the size of the entry in bytes. + (elf_gc_allocate_got_offsets): Likewise. + +Tue Jul 14 11:18:14 1998 Ian Lance Taylor + + * elflink.h (elf_gc_sections): Return true rather than falling off + the bottom. + + * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not + xmalloc. + +Mon Jul 13 11:06:31 1998 Nick Clifton + + * coff-arm.c: Supress definition of TARGET_UNDERSCORE and add a + comment describing when it should be enabled. + Changed definition of USER_LABEL_PREFIX to "", to fall into line + with GCC sources. + +Mon Jul 13 13:06:54 1998 Ian Lance Taylor + + * ieee.c (ieee_slurp_external_symbols): Handle call optimization + information ATN records. + +Fri Jul 10 16:31:06 1998 Ian Lance Taylor + + * ieee.c (ieee_slurp_external_symbols): Select an appropriate + section for an absolute symbol in a fully linked file. Based on + patch from Christian Holland . + +Wed Jul 8 11:29:56 1998 Manfred Hollstein + + * coff-m88k.c (m88k_special_reloc): Don't lose the information + that a symbol is undefined. + +Tue Jul 7 21:47:02 1998 Jeffrey A Law (law@cygnus.com) + + * som.c (som_bfd_gc_sections): Define. + +Mon Jul 6 11:35:50 1998 Nick Clifton + + * coff-arm.c (aoutarm_std_reloc_howto): Do not complain about + overflows in ARM_26D patches, since they have already been + implmented. Patch submitted by Dr. R.J. Black + +Sat Jul 4 12:25:36 1998 Ian Lance Taylor + + * coffcode.h (coff_write_object_contents): If we have any long + section names, call coff_write_symbols even if there are no + symbols. + +Fri Jul 3 13:11:35 1998 Ian Lance Taylor + + * elf.c (copy_private_bfd_data): Only set phdr_included once for a + PT_LOAD segment, rather than only setting it once for the entire + file. + + * elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA, + rather than ignoring every phdr with a p_paddr of 0, ignore all + the phdrs if they all have a p_paddr of 0. + + * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr + section was discarded from the link. + +Fri Jul 3 14:39:05 1998 J"orn Rennecke + + * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number. + +Fri Jul 3 14:35:48 1998 J"orn Rennecke + + * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with + floating point operations. + +Thu Jul 2 18:37:25 1998 Ian Lance Taylor + + * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global + function symbols. + +Thu Jul 2 14:59:42 1998 Klaus Kaempf + + Merge of vax/vms (read-only) support + * configure.com: Support Vax target. + * makefile.vms: Support Vax target. + * vms.h: Renamed from evax.h, merged vax/vms (read-only) support. + * vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only) + support. + * vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only) + support. + * vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only) + support. + * vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only) + support. + * vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only) + support. + * libbfd.c (real_read): Use unbuffered read on VMS/Vax. + * targets.c (bfd_target_ovax_flavour): New flavour. + (vms_alpha_vec): Renamed from evax_alpha_vec. + (vms_vax_vec): New. + (target_vector): Update accordingly. + * config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not + evax_alpha_vec. + (vax*-*-*vms*): New target. + * Makefile.am: Update for renamed files. Rebuild dependencies. + * bfd-in2.h: Rebuild. + * configure.in, Makefile.in, aclocal.m4: Rebuild. + +Thu Jul 2 13:31:55 1998 Ian Lance Taylor + + Based on patch from Matt Semersky : + * linker.c (_bfd_generic_final_link): Force a trailing NULL + pointer on abfd->outsymbols. + (generic_add_output_symbol): Handle NULL sym parameter. + +Wed Jul 1 17:05:53 1998 Nick Clifton + + * elf.c (copy_private_bfd_data): Add support for changing VMA or + LMA of sections. + +Wed Jul 1 16:58:50 1998 Ian Lance Taylor + + * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons + when handling 32 bit immediate relocs. + * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise. + +Tue Jun 30 09:55:03 1998 Jeffrey A Law (law@cygnus.com) + + * section.c (STD_SECTION): Account for recently added gc_mark + field in struct asection. + + * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function. + (bfd_elf32_bfd_merge_private_bfd_data): Define. + +Thu Jun 25 18:31:41 1998 Richard Henderson + + ELF Section-level Garbage Collection: + * bfd.c (bfd_gc_sections): New. + * aout-adobe.c: Hook to default implementation. + * aout-target.h, aout-tic30.c, binary.c, bout.c: Likewise. + * coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h: Likewise. + * evax-alpha.c, i386msdos.c, i386os9k.c, ieee.c: Likewise. + * ihex.c, nlm-target.h, oasys.c, ppcboot.c, srec.c: Likewise. + * tekhex.c, versados.c: Likewise. + * libbfd-in.h (_bfd_nolink_bfd_gc_sections): New. + * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_gc_sections. + + * reloc.c (BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY): New. + (bfd_generic_gc_sections): New. + * section.c (SEC_KEEP): New. + (asection): Add gc_mark member. + + * elfcode.h (elf_gc*): New name remappings. + * elflink.h (elf_link_input_bfd): Don't set contents on stabs + sections to be excluded. + (elf_gc_mark, elf_gc_sweep, elf_gc_sweep_symbol): New. + (elf_gc_propogate_vtable_entries_used): New. + (elf_gc_smash_unused_vtentry_relocs): New. + (elf_gc_sections, elf_gc_record_vtinherit, elf_gc_record_vtentry): New. + (elf_gc_common_finalize_got_offsets): New. + (elf_gc_allocate_got_offsets, elf_gc_common_final_link): New. + * elfxx-target.h: Add and default gc hooks. + + * elf-bfd.h (struct elf_link_hash_entry): Swap got_offset/plt_offset + for unions. + (struct elf_obj_tdata): Likewise for local_got_offsets. + * elf.c, elf-i386.c, elf32-m68k.c, elf32-mips.c: Update all uses. + * elf32-ppc.c, elf32-sparc.c, elf64-alpha.c: Likewise. + * elf64-sparc.c, elflink.h: Likewise. + + * elf-bfd.h (struct elf_link_hash_entry): Add vtable members. + (ELF_LINK_HASH_MARK): Define. + (struct elf_backend_data): Add GC hooks. + * elf.c (_bfd_elf_link_hash_newfunc): Zero vtable members. + + * elf-m10300.c (mn10300_elf_check_relocs): New. + (mn10300_elf_gc_mark_hook): New. + (R_MN10300_GNU_VTINHERIT, R_MN10300_GNU_VTENTRY): New. + (elf_mn10300_howto, mn10300_reloc_map): Handle them. + (mn10300_elf_final_link_relocate): Likewise. + (mn10300_elf_relocate_section): Likewise. + (elf_backend_can_gc_sections): Define. + * elf32-mips.c (R_MIPS_GNU_VTINHERIT, R_MIPS_GNU_VTENTRY): New. + (elf_mips_gnu_vtinherit_howto, elf_mips_gnu_vtentry_howto): New. + (bfd_elf32_bfd_reloc_type_lookup): Handle them. + (mips_info_to_howto_rel): Likewise. + (mips_elf_relocate_section): Likewise. + (mips_elf_check_relocs): Likewise. + (mips_elf_gc_mark_hook, mips_elf_gc_sweep_hook): New. + (elf_backend_can_gc_sections): Define. + * elf32-ppc.c (R_PPC_GNU_VTINHERIT, R_PPC_GNU_VTENTRY): New. + (ppc_elf_howto_raw): Handle them. + (ppc_elf_reloc_type_lookup): Likewise. + (ppc_elf_relocate_section): Likewise. + (ppc_elf_check_relocs): Reference count .got and .plt entries. + Handle new vtable relocs. + (ppc_elf_adjust_dynamic_symbol): Recognize unused .plt entries. + (ppc_elf_gc_mark_hook, ppc_elf_gc_sweep_hook): New. + (elf_backend_can_gc_sections): Define. + +Fri Jun 26 10:48:23 1998 Jeffrey A Law (law@cygnus.com) + + * archures.c (bfd_mach_mn10300): Define. + * elf-m10300.c: Include elf/mn10300.h + (elf_mn10300_mach): New function. + (_bfd_mn10300_elf_final_write_processing): Likewise. + (_bfd_mn10300_elf_object_p): Likewise. + (elf_backendfinal_write_processing): Define. + (elf_backend_object_p): Likewise. + +Thu Jun 25 18:31:08 1998 Nick Clifton + + * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S + relocation. + +Wed Jun 24 17:17:57 1998 Ian Lance Taylor + + * elflink.h (elf_bfd_final_link): Loop over input_bfds using the + link_next field, not the next field. + +Sun Jun 21 19:38:39 1998 Ian Lance Taylor + + * elf.c (map_sections_to_segments): Check the section address + against the phdr size both with and without a modulo of + maxpagesize. + +Fri Jun 19 17:08:18 1998 Ian Lance Taylor + + * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a + linker created empty input section if the output section has the + same name. + + * elflink.h (elf_link_output_extsym): Print an error message if + _bfd_elf_section_from_bfd_section fails. + + * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on + failure. + +Tue Jun 16 11:55:55 1998 Ian Lance Taylor + + * elf.c (copy_private_bfd_data): Improve handling of Solaris + native linker output. Avoid putting an empty section in more than + one segment. + +Fri Jun 12 13:30:17 1998 Tom Tromey + + * po/Make-in (all-yes): If maintainer mode, depend on .pot file. + ($(PACKAGE).pot): Unconditionally depend on POTFILES. + +Fri Jun 12 13:34:02 1998 Doug Evans + + * elf.c (swap_out_syms): New arg relocatable_p. + Don't add section VMA to symbols for relocatable output. + (_bfd_elf_compute_section_file_positions): Update call to + swap_out_syms. + +Mon Jun 8 15:20:57 1998 Nick Clifton + + * elf32-v850.c (v850_elf_perform_relocation): Make comparisons + against 'addend' be signed rather than unsigned. + +Sat Jun 6 00:31:21 1998 Nick Clifton + + * elf32-m32r.c: Add prototyps for static functions. + + * coff-arm.c: Add prototypes for static functions. + +Fri Jun 5 17:21:51 1998 Nick Clifton + + * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the + LMA is used to order sections in a segment. + + * elf32-v850.c: Add prototypes for static functions. + Change type of addend parameter to bfd_vma in various functions. + +Fri Jun 5 18:09:58 1998 Ian Lance Taylor + + * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use + complain_overflow_signed instead of complain_overflow_bitfield. + +Fri Jun 5 15:11:11 1998 Andreas Schwab + + * elf.c (elf_map_symbols): Don't add section VMA to symbol value + when comparing against 0. + +Wed Jun 3 17:52:49 1998 Ian Lance Taylor + + * Makefile.am (config.status): New target. + * Makefile.in: Rebuild. + +Wed Jun 3 12:18:24 1998 Stan Cox + + * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an + error if previous object endianness doesn't match current object. + +Tue Jun 2 17:50:59 1998 Nick Clifton + + * elf32-v850.c (v850_elf_print_private_bfd_data): Call + _bfd_elf_print_private)bfd_data (). + +Tue Jun 2 15:29:35 1998 Ian Lance Taylor + + * elflink.h (elf_merge_symbol): Don't always set type_change_ok + and size_change_ok. + (elf_link_add_object_symbols): Set type_change_ok and + size_change_ok before calling elf_merge_symbol. + + * elf32-mips.c (mips_elf_relocate_section): If we issue an + undefined symbol error, don't also issue an overflow error. + +Tue Jun 2 13:51:00 1998 Geoff Keating + + * elf32-ppc.c (ppc_elf_relocate_section): The target of an + R_PPC_LOCAL24PC relocation should be local; if not, print an error + message instead of crashing. + +Mon Jun 1 18:23:12 1998 Yuli Barcohen + + * archures.c (bfd_mach_cpu32): Define. + (bfd_default_scan): Add case for 68060. Fix 68332 case to use + bfd_mach_cpu32. + * cpu-m68k.c (arch_info_struct): Add m68k:cpu32. + * ieee.c: Include . + (ieee_object_p): Parse out process ID string to make it more + likely to be acceptable for bfd_scan_arch. + * bfd-in2.h: Rebuild. + +Mon Jun 1 11:12:02 1998 Nick Clifton + + * elf32-m32r.c (m32r_elf_print_private_bfd_data): Also call + _bfd_elf_print_private_bfd_data() so that the program header will + be displayed. + +Mon Jun 1 12:14:28 1998 Ian Lance Taylor + + * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than + 0x68. Reindent. Add some comments. + +Fri May 29 09:58:08 1998 Nick Clifton + + * elf.c (copy_private_bfd_data): Adjust physical address of + segment in output BFD to contain LMAs of its sections. + +Tue May 26 19:37:47 1998 Stan Cox + + * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map, + elf32_sparc_relocate_section): Added R_SPARC_32LE for little + endian data 32 bit relocations. + (elf32_sparc_merge_private_bfd_data): Check if linking little + endian objects with big endian objects. + (elf32_sparc_object_p): Set bfd_mach_sparc_sparclite_le. + (elf32_sparc_final_write_processing): Set EF_SPARC_LEDATA in e_flags. + * libbfd.h (bfd_reloc_code_real_names): Added BFD_RELOC_SPARC_32LE. + * reloc.c: Same. + * cpu-sparc.c (arch_info_struct): Added sparc:sparclite_le + * archures.c (bfd_mach_sparc_sparclite_le): New. + * bfd-in2.h (BFD_RELOC_SPARC_32LE, bfd_mach_sparc_sparclite_le): New. + +Thu May 21 16:59:28 1998 Nick Clifton + + * peicode.h (add_data_entry): Fix precedence of operators in if () + statement. + +Tue May 19 18:41:19 1998 Ian Lance Taylor + + * bfd-in.h: Move over patch to bfd-in2.h. + + * reloc.c (bfd_check_overflow): Add casts before shifts which may + not fit in 32 bits. + (_bfd_relocate_contents): Likewise. + +Mon May 18 14:44:15 1998 Nick Clifton + + * peicode.h (add_data_entry): If the section has no private data + then do not create a Data Dictionary entry for it. + +Mon May 18 00:09:28 1998 Richard Henderson + + * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes. + (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots, + elf64_alpha_size_got_sections): Rewrite, handling multiple got + subsections during relaxation more correctly. + +Thu May 14 14:22:58 1998 Nick Clifton + + * bfd-in2.h: Add new prototype: bfd_coff_set_symbol_class (). + Add extra argument to bfd_arm_process_before_allocation (). + * bfd-in.h: Reflect changes made in bfd-in2.h. + * coffgen.c (bfd_coff_set_symbol_class): New function. Set the + coff class of a BFD symbol. + * coff-arm.c: Add support for interworking between Thumb code and + non-interworking aware ARM code. + +Sun May 10 22:33:59 1998 Jeffrey A Law (law@cygnus.com) + + * po/Make-in (install-info): New target. + +Thu May 7 17:40:56 1998 Ian Lance Taylor + + * filemode.c: Remove; not used. + + If sysdep.h includes a header file, don't include it again: + * aix386-core.c: Don't include , , or + . + * aoutx.h: Don't include . Use "sysdep.h" rather than + . + * archive.c: Don't include or . + * evax-alpha.c; Don't include . + * evax-egsd.c: Likewise. + * evax-etir.c: Likewise. + * evax-misc.c: Likewise. + * evax-emh.c: Likewise. Also, don't include . + * hppabsd-core.c: Don't include , , or + . + * hpux-core.c: Likewise. + * netbsd-core.c: Likewise. + * som.c: Likewise. + * libbfd.c: Don't include . + * nlmcode.h: Don't include . + * osf-core.c: Don't include or . + * ptrace-core.c: Don't include , , + , or . + * trad-core.c: Don't include or . + +Thu May 7 13:12:50 1998 Klaus Kaempf + + * configure.com: If the version number can not be found in + configure.in, set it to "unknown" rather than "2.8.1". + +Wed May 6 09:46:05 1998 Gavin Koch + + * elf32-mips.c (elf_mips_mach): New. + (_bfd_mips_elf_object_p): Use elf_mips_mach. + (_bfd_mips_elf_final_write_processing): Use the names + of machines, rather than the numbers. Set both the ARCH + and MACH in e_flags. Handle a few more specific machines. + (_bfd_mips_elf_merge_private_bfd_data): Merge both + EF_MIPS_ARCH and EF_MIPS_MACH. + +Tue May 5 21:01:53 1998 Richard Henderson + + * syms.c (bfd_is_local_label): Revert last change. + * srec.c (srec_write_symbols): Discard debugging symbols. + +Tue May 5 23:36:06 1998 Ian Lance Taylor + + * som.c: Include . + * som.h: Don't include sysdep.h. + +Tue May 5 18:29:24 1998 Tom Tromey + + * libbfd.h: Rebuilt. + * libbfd-in.h: Removed gettext includes and defines. + * sysdep.h: Moved gettext-related includes and defines here. + +Tue May 5 16:47:54 1998 Richard Henderson + + * srec.c (srec_write_symbols): Use bfd_is_local_label rather than + an ad-hoc test. Kill bogus #if 0 code. + * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local. + +Mon May 4 16:10:33 1998 Ian Lance Taylor + + * sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address + when generating a normal executable for a symbol defined in a + regular file. When copying a reloc into the output file, adjust + the addend for a PC relative reloc against a global symbol. + +Mon May 4 10:08:18 1998 Tom Tromey + + * libbfd.h: Rebuilt. + * libbfd-in.h (_): Define as dgettext. + +Mon May 4 11:02:23 1998 Ian Lance Taylor + + * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma, + not signed. + * peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS + when declaring parameter types. + (pe_saved_coff_bfd_copy_private_bfd_data): Likewise. + +Wed Apr 29 15:35:03 1998 Ian Lance Taylor + + * config.bfd: If we include any ELF targets in targ_defvec and/or + targ_selvecs, then add the generic ELF targets to targ_selvecs. + * elf32-gen.c (dummy): New static const variable. + (elf_generic_info_to_howto): New static function. + (elf_generic_info_to_howto_rel): New static function. + (elf_info_to_howto): Define as elf_generic_info_to_howto. + (elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel. + * elf64-gen.c: Same changes as elf32-gen.c. + * elfcode.h (elf_object_p): For the generic target, ignore a + failure of bfd_default_set_arch_mach. Fix indentation a bit. + +Tue Apr 28 20:05:52 1998 Ian Lance Taylor + + * configure.in (WIN32LIBADD): Add -lintl on cygwin32. + * configure: Rebuild. + +Tue Apr 28 12:16:57 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * config.bfd: Update OSR5/Unixware patterns. + +Mon Apr 27 18:02:24 1998 Richard Henderson + + * elf.c (assign_file_positions_for_segments): Allow for holes + between sections added by a link script. + +Mon Apr 27 11:49:55 1998 Ian Lance Taylor + + * configure.in: Change version number to 2.9.4 + * configure: Rebuild. + + Based on patch from H.J. Lu : + * elf.c (bfd_elf_get_bfd_needed_list): New function. + * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare. + * bfd-in2.h: Rebuild. + +Sat Apr 25 20:07:53 1998 Richard Henderson + + * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other. + Change all users. + +Sat Apr 25 18:29:07 1998 Richard Henderson + + * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members. + (elf64_alpha_relax_section): Fill them in. + (elf64_alpha_relax_opt_call): Implement more than a stub. + (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default + alignment on .scommon. + (elf64_alpha_merge_gots): Merge use counts as well. + +Sat Apr 25 14:07:29 1998 Richard Henderson + + * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section + for calculating a local symbol's address. + (elf64_alpha_calc_got_offsets): Skip entries with 0 use count. + Set the .got's cooked size as well as the raw size. + +Fri Apr 24 09:16:00 1998 Nick Clifton + + * elf32-v850.c (v850_elf_print_private_bfd_data): Add + internationalisation of printed information. + + * coff-arm.c (coff_arm_print_private_bfd_data): Add + internationalisation of printed information. + +Fri Apr 24 12:09:18 1998 Ian Lance Taylor + + * syms.c (struct indexentry): Change directory_name, file_name, + and function_name fields to char *. + (struct stab_find_info): Change cached_file_name field to char *. + +Thu Apr 23 08:13:04 1998 Nick Clifton + + * peicode.h (dir_names): Add missing N_() macros to dir_names array. + +Wed Apr 22 13:06:15 1998 Tom Tromey + + * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). + +Wed Apr 22 17:48:48 1998 Ian Lance Taylor + + * Makefile.am (install-data-local): Make $(includedir). + * Makefile.in: Rebuild. + +Wed Apr 22 13:06:15 1998 Tom Tromey + + * libbfd-in.h: Use `gettext' and not `dgettext' for now. + +Wed Apr 22 12:53:40 1998 Ian Lance Taylor + + * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl. + * Makefile.in: Rebuild. + + * bfd-in2.h: Rebuild for Nick's changes. + +Tue Apr 21 23:11:51 1998 Richard Henderson + + * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last + change wrt length == max_namelen. + +Tue Apr 21 21:19:36 1998 Tom Tromey + + * Many files: Added gettext invocations around user-visible + strings. + * libbfd-in.h: Added gettext includes and defines. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, + HAVE_LC_MESSAGES): Define. + * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and + po/Makefile. + * Makefile.am (SUBDIRS): Added po. + (POTFILES): New macro. + (po/POTFILES.in): New target. + (SOURCE_HFILES): New macro. + (HFILES): Use it. + * po/Make-in, po/POTFILES.in, po/bfd.pot: New files. + +Tue Apr 21 13:38:18 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de) + + * elfcore.h (bfd_prstatus): Copy core_prstatus from the first + NT_PRSTATUS note section encountered, it contains the status of + the currently executing thread when the core file was written. + +Tue Apr 21 10:00:12 1998 Nick Clifton + + * libcoff.h: Add extra parameter to + bfd_coff_link_output_has_begun overrideable function. + * cofflink.c: Pass extra parameter to + bfd_coff_link_output_has_begun function. + * bfd-in.h: Add prototypes for exported ARM interworking + functions. + * peicode.h: ARM specific code reorganised to conform to BFD + coding conventions. + * coffcode.h: ARM specific code reorganised to conform to BFD + coding conventions. + * coff-arm.c: Code reorganised to conform to the BFD coding + conventions. Global variables have been moved into an ARM + specific hash table structure and a new function: + bfd_arm_get_bfd_for_interworking() has been created which is + called from the linker scripts. + +Tue Apr 21 00:11:51 1998 Richard Henderson + + * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test. + + * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from + elf64_alpha_relax_find_reloc_ofs. Changed all callers. + (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss. + (elf64_alpha_size_got_sections): Don't merge .got sections twice. + +Sat Apr 18 01:21:04 1998 Stan Cox + + * config.bfd: Added sparc86x support. + +Fri Apr 17 22:29:04 1998 Ian Lance Taylor + + * elf32-mips.c (mips_elf_relocate_section): Do not complain about + an out of range pc-relative jump/call to an undefined weak symbol. + +Thu Apr 16 13:49:00 1998 Richard Henderson + + * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp + comparisons signed. + +Thu Apr 16 11:43:33 1998 Ian Lance Taylor + + * archive.c (bfd_generic_archive_p): If a slurp subroutine returns + an error other than bfd_error_system_call, set the error to + bfd_error_wrong_format. + + * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add + bfd_elf32_powerpcle_vec. + + * elf.c (copy_private_bfd_data): If all the p_paddr fields in the + program segments are zero, don't set p_paddr_valid. + +Wed Apr 15 22:15:16 1998 Richard Henderson + + * elf64-alpha.c: Initial implementation of relaxation -- + (struct alpha_elf_link_hash_entry): Add use_count member. + (elf64_alpha_check_relocs): Initialize and increment it. + (elf64_alpha_can_merge_gots): Check it when considering merging. + (elf64_alpha_merge_gots): Drop entries with zero use. + (elf64_alpha_calc_got_offsets_for_symbol): Likewise. + (elf64_alpha_always_size_sections): Split out got sizing ... + (elf64_alpha_size_got_sections): ... here. New function. + (elf64_alpha_relax_find_reloc_ofs): New function. + (elf64_alpha_relax_with_lituse): Likewise. + (elf64_alpha_relax_without_lituse): Likewise. + (elf64_alpha_relax_opt_call): Likewise. + (elf64_alpha_relax_section): Likewise. + (elf64_alpha_add_symbol_hook): Likewise. + (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16. + (elf64_alpha_relocate_section): Likewise. + (bfd_elf64_bfd_relax_section): Define. + (elf_backend_add_symbol_hook): Likewise. + +Wed Apr 15 16:08:46 1998 Richard Henderson + + * elf.c (prep_headers): Use new EM_SPARCV9 symbol. + * elf64-sparc.c (ELF_MACHINE_CODE): Likewise. + (ELF_MACHINE_ALT1): New. Set to EM_OLD_SPARC64. + +Wed Apr 15 11:34:33 1998 Ian Lance Taylor + + * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32. + * configure: Rebuild. + +Mon Apr 13 16:46:27 1998 Ian Lance Taylor + + * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@. + (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@. + * configure.in: Define and substitute WIN32LDFLAGS and + WIN32LIBADD. + * aclocal.m4: Rebuild with new libtool. + * configure, Makefile.in: Rebuild. + +Fri Apr 10 13:44:27 1998 Ian Lance Taylor + + * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol + before any other symbols in the same section. + +Wed Apr 8 14:50:23 1998 Michael Meissner + + * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF + systems. + +Tue Apr 7 16:25:31 1998 Gavin Romig-Koch + + * dwarf2.c (comp_unit): Move it earlier in the source. Add + addr_size. + (read_address): Replace 'bdf*' argument with 'comp_unit*' argument. + Use addr_size for address size, rather than sizeof(bfd_vma). + (read_attribute): Replace bdf* argument with 'comp_unit*' argument. + Fix call to read_address. + (decode_line_info): Replace bdf* argument with 'comp_unit*' argument. + Scrap other unneeded arguments. Fix call to read_address. + (scan_unit_for_functions): Fix call to read_attribute. + (parse_comp_unit): We now handle more values for addr_size. + Set addr_size in unit. Fix call to read_attribute and + decode_line_info. + +Tue Apr 7 15:44:47 1998 Gavin Romig-Koch + + * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null. + +Tue Apr 7 12:35:18 1998 Ian Lance Taylor + + * archures.c (bfd_default_scan): Add m68k cases back to default + switch, reverting patch of March 25, since IEEE support depends + upon them. + +Mon Apr 6 14:06:40 1998 Ian Lance Taylor + + * Makefile.am (diststuff): New target. + * Makefile.in: Rebuild. + +Sun Apr 5 16:21:44 1998 Jeffrey A Law (law@cygnus.com) + + * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of + som_offset when we have an extended name table. + +Sun Apr 5 16:04:39 1998 H.J. Lu + + * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before + trying to copy it. + * Makefile.in: Rebuild. + +Fri Apr 3 11:09:42 1998 Andreas Schwab + + * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section + symbols when creating a shared library. + (elf_m68k_adjust_dynindx): New function, used by above code. + (elf_m68k_finish_dynamic_sections): Initialize the section + symbols. + (elf_m68k_relocate_section): Change abort to BFD_ASSERT. + +Wed Apr 1 16:04:02 1998 Nick Clifton + + * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant + value 11. + +Wed Apr 1 13:36:58 1998 Andreas Schwab + + * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix + assertion. + +Tue Mar 31 00:12:12 1998 Jeffrey A Law (law@cygnus.com) + + * elf-m10300.c (mn10300_elf_relax_section): Correctly handle + absolute symbols. + +Mon Mar 30 12:46:15 1998 Ian Lance Taylor + + * configure.in: Set version to 2.9.1. + * configure: Rebuild. + + * Branched binutils 2.9. + +Mon Mar 30 12:20:50 1998 Brent Baccala + + * syms.c (ENABLE_CACHING): Define. + (struct indexentry): Define. + (struct stab_cache): Remove. + (cmpindexentry): New static function. + (struct stab_find_info): Add new fields: indextable, + indextablesize, cached_indexentry, cached_offset, cached_stab, and + cached_file_name. Remove fields: file_cache, function_cache, and + line_cache. + (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted + index table and search it. + +Mon Mar 30 10:39:34 1998 Ian Lance Taylor + + * elf.c (_bfd_elf_copy_private_section_data): Call + copy_private_bfd_data once we've seen the last SEC_ALLOC section. + + * cpu-mips.c: Remove trailing comma at end of enumeration list. + +Sat Mar 28 16:33:02 1998 Ian Lance Taylor + + * coff-arm.c: Define all globally visible variables and functions + only when COFF_WITH_PE is not defined. + * configure.in (armpe_little_vec, armpe_big_vec): Add + coff-arm.lo. + * configure: Rebuild. + +Fri Mar 27 16:06:02 1998 Ian Lance Taylor + + Fix some gcc -Wall warnings: + * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings. + * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise. + * archures.c (bfd_default_scan): Likewise. + * bfd.c (bfd_scan_vma): Likewise. + * binary.c (mangle_name): Likewise + * coff-arm.c (aoutarm_fix_pcrel_26): Likewise. + * coff-sh.c (sh_relocate_section): Likewise. + * coff-stgo32.c (create_go32_stub): Likewise. + * coffcode.h (coff_slurp_line_table): Likewise. + * ecoff.c (_bfd_ecoff_write_armap): Likewise. + * elf.c (_bfd_elf_make_section_from_shdr): Likewise. + (assign_file_positions_for_segments): Likewise. + * elf32-mips.c (mips_elf_relocate_section): Likewise. + * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise. + * oasys.c (oasys_write_sections): Likewise. + * ppcboot.c (ppcboot_object_p): Likewise. + (mangle_name): Likewise. + * riscix.c (riscix_fix_pcrel_26): Likewise. + * srec.c (srec_scan): Likewise. + * stabs.c (_bfd_write_section_stabs): Likewise. + * sunos.c (sunos_add_dynamic_symbols): Likewise. + * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to + switch. Declare parameters for function pointers. + * archures.c (bfd_default_scan): Add braces to avoid ambiguous if + warning. + * elf.c (elf_sort_sections): Likewise. + * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation. + Add default cases to switches. + (coff_arm_relocate_section): Remove unused local variables. + Always set rstat. + (coff_arm_bfd_set_private_flags): Change flag variable to type + flagword. + * coff-mips.c (mips_relocate_section): Initialize use_lo. + * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int. + (dump_toc): Change cat to const, and initialize it. + * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff. + * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise. + (sh_elf_relocate_section): Initialize r_symndx. + * coffcode.h (coff_compute_section_file_positions): Only declare + old_sofar if ALIGN_SECTIONS_IN_FILE. + (coff_write_object_contents): Initialize csym. + * coffgen.c (coff_pointerize_aux): Make type and class unsigned. + * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to + switch. + * dwarf2.c: Include libiberty.h. + (read_2_signed_bytes, read_4_signed_bytes): Comment out. + (decode_line_info): Remove unused local variables. + * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise. + (m32r_elf_relocate_section): Likewise. + * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise. + (v850_elf_reloc): Likewise. + * elf-bfd.h (elf_linker_section_t): Make alignment unsigned. + (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned. + * elf.c (assign_file_positions_for_segments): Always set adjust. + * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr. Fully + parenthesize expression. + * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h. + (m32r_elf_object_p): Return a value. + (m32r_elf_print_private_bfd_data): Change fprintf format string. + * elf32-mips.c (mips_elf_final_link): Initialize last. + (mips_elf_finish_dynamic_sections): Initialize last and dindx. + * elf32-v850.c (v850_elf_object_p): Return a value. + (v850_elf_print_private_bfd_data): Change fprintf format string. + * elfcode.h (elf_slurp_symbol_table): Change symcount and i to + unsigned long. + * elflink.h (elf_link_add_object_symbols): Change vernum to + unsigned int, and initialize it. Change fprintf format string. + (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type + when setting or comparing to soname_indx. + (elf_create_pointer_linker_section): Change num_symbols to + unsigned int. + * libcoff-in.h (coff_data_type): Change flags to flagword. + * peicode.h (pe_print_idata): Initialize idx. Change j to + bfd_size_type. Initialize hint_member. Remove useless test to + time_stamp. + (pe_print_edata): Change num_functions and num_names in struct + EDT_type to unsigned long. Remove cast. Change fprintf format + string. + * ppcboot.c (ppcboot_object_p): Change i to size_t. + * reloc.c (bfd_get_reloc_size): Change return type to unsigned + int. + * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to + int *. Update uses. Change j to long. + * bfd-in2.h, libcoff.h: Rebuild. + +Fri Mar 27 10:10:46 1998 Catherine Moore + + * elf32-v850.c Remove definition of USE_REL. + (v850_elf_info_to_howto_rela): New function. + (v850_elf_perform_relocation): Renamed from + v850_elf_store_addend_in_insn. Removed replace argument. + (v850_elf_reloc): store the relocation in the addend field instead + of the insn. + (v850_elf_final_link_relocate): Now calls + v850_elf_perform_relocation. + (v850_elf_relocate_section): Remove code to generate REL + relocations. + +Thu Mar 26 13:32:17 1998 Ian Lance Taylor + + * coffcode.h (coff_new_section_hook): Set the type and storage + class in the native symbol information allocated for a new section + symbol. + +Thu Mar 26 10:13:41 1998 Nick Clifton + + * peicode.h: Chain together calls to + coff_bfd_copy_private_bfd_data and + coff_bfd_print_private_bfd_data. + + * coff-arm.c: Add prototypes for + coff_arm_bfd_print_private_bfd_data and + coff_arm_bfd_copy_private_bfd_data. + +Wed Mar 25 15:45:55 1998 Nick Clifton + + * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE + build. + + * peicode.h: Call arm-coff private data functions after handling + pe private data. + + * coff-arm.c: Turn statics into globals so that they can be shared + both pe and pei backends. + +Wed Mar 25 15:19:38 1998 Ian Lance Taylor + + * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than + plain numbers. + (sunos_write_object_contents): Likewise. + * aoutx.h (NAME(aout,machine_type)): Likewise. + * coffcode.h (coff_set_arch_mach_hook): Likewise. + +Wed Mar 25 13:59:24 1998 Andreas Schwab + + * archures.c (bfd_mach_m68*): Add definitions for various m68k + variants. + (bfd_default_scan): Remove m68k special cases. + * bfd-in2.h: Rebuild. + * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather + than plain numbers. + * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise. + * cpu-m68k.c (arch_info_struct): Likewise. Add entry for + m68k:68000. + (bfd_m68k_arch): Set mach field to zero to signal no explicit + selection, change printable_name to just "m68k" and make that the + default instead of m68k:68020. + + * aout-tic30.c (NAME): Define this to avoid multiple definitions + from aoutx.h. + (MY_get_section_contents): Define as aout_32_get_section_contents + rather than NAME(aout,get_section_contents). + + * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast. + + * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha + and call bfd_default_set_arch_mach to do the real work. + +Wed Mar 25 10:41:35 1998 Richard Henderson + + * bout.c (BALX): Include return register g14 as part of the insn. + (BALX_MASK): New. + (calljx_callback): Use it. + +Wed Mar 25 11:19:28 1998 Ian Lance Taylor + + * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma. + * libbfd.h: Rebuild. + + * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change + byte_count to unsigned int. + (mn10300_elf_relax_section): Initialize internal_relocs. Remove + unused local variables. + + * evax-alpha.c (evax_close_and_cleanup): Remove unused local + variables er and er1. + + * cpu-v850.c: Include . + (scan): Case isdigit argument to unsigned char. + + From Yan Meroth : + * ihex.c (ihex_scan): Add extbase variable so that getting an + extended linear address record does not ignore any previous + extended address. + (ihex_write_object_contents): When writing out an extended linear + address record, zero out any previous extended address. + +Tue Mar 24 16:09:43 1998 Manfred Hollstein + + * ieee.c (do_one): Check section before dereferencing it. + (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr. + (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive. + +Mon Mar 23 18:51:47 1998 Joel Sherrill + + * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF. + +Mon Mar 23 14:23:36 1998 Nick Clifton + + * coff-arm.c: Add interworking functions to pe backends. + +Fri Mar 20 18:47:20 1998 Ian Lance Taylor + + * configure.in: Use AM_DISABLE_SHARED. + * aclocal.m4, configure: Rebuild with libtool 1.2. + +Fri Mar 20 11:25:41 1998 Nick Clifton + + * coff-arm.c (coff_arm_relocate_section): Better error messages + when interowrking conflucts occur. Courtesy of Jonathan Walton + and Tony Thompson. + (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted + relocations. Patch courtesy of Jonathan Walton and Tony + Thompson. + +Fri Mar 20 02:26:43 1998 Richard Henderson + + * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert + part of Feb 22 change controling when to override the existing + symbol with the .plt entry. + +Wed Mar 18 09:26:25 1998 Nick Clifton + + * config.bfd (targ_cpu): Add thumb-pe target. + + * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external + functions in PE build. + +Sun Mar 8 23:37:26 1998 Stan Cox + + * config.bfd (sparclite-*-elf*): Added. + +Mon Feb 23 19:31:19 1998 Ian Lance Taylor + + * configure.in: Add elf.lo to elf shell variable. + * Makefile.am (BFD_LIBS): Remove elf.lo. + (BFD_LIBS_CFILES): Remove elf.c. + (BFD32_BACKENDS): Add elf.lo. + (BFD32_BACKENDS_CFILES): Add elf.c. + * configure, Makefile.in: Rebuild. + +1998-02-23 15:53 Richard Henderson + + * elf32-i386.c (elf_i386_relocate_section): A pc-relative + relocation against a non-local symbol should not have a dynamic + relocation. + +Mon Feb 23 16:17:08 1998 Ian Lance Taylor + + * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in + COFF filehdr flags. + (pe_print_private_bfd_data): Print PE flags. From Mikey + . + +Sun Feb 22 20:39:00 1998 Richard Henderson + + * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create + a plt entry when we can determine that we authoritatively define + the symbol. + +Sun Feb 22 20:33:05 1998 Richard Henderson + + * configure.in (COREFILE selection): Remove sparc-*-linux*. They + don't actually use trad-core, but a SunOS-style core file handled + by gdb directly. + * hosts/sparclinux.h: Remove. + +Wed Feb 18 15:31:06 1998 Ian Lance Taylor + + * peicode.h (pe_print_idata): If there is no .idata section, look + for the import tables in some other section. Make the initial + label line up better with the data. Print the import address + table even if there is no import name table. If the import + address table holds actual addresses, print them. + +Tue Feb 17 12:58:34 1998 Ian Lance Taylor + + * libbfd.c (bfd_seek): If fseek fails, save errno around call to + bfd_tell. If errno is EINVAL, set bfd_error_file_truncated, not + bfd_error_system_call. + +Fri Feb 13 13:11:33 1998 Ian Lance Taylor + + * Makefile.am (AUTOMAKE_OPTIONS): Define. + * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. + + From H.J. Lu : + * Makefile.am (libbfd_la_LDFLAGS): Define. + * Makefile.in: Rebuild. + +Thu Feb 12 17:31:11 1998 Ian Lance Taylor + + NetBSD patches from Gordon W. Ross : + * netbsd.h (MACHTYPE_OK): Define. + (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when + calling N_SET_MACHTYPE, rather than having a switch. + * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD, + and M_ALPHA_NETBSD. + * i386netbsd.c (MACHTYPE_OK): Don't define. + (DEFAULT_MID): Define. + * m68k4knetbsd.c (SEGMENT_SIZE): Don't define. + (MACHTYPE_OK): Don't define. + (DEFAULT_MID): Define. + * m68knetbsd.c: (MACHTYPE_OK): Don't define. + (DEFAULT_MID): Define. + * ns32knetbsd.c (MACHTYPE_OK): Don't define. + (DEFAULT_MID): Define. + * sparcnetbsd.c (MACHTYPE_OK): Don't define. + (DEFAULT_MID): Define. + + NetBSD patches from Gordon W. Ross : + * vaxnetbsd.c: New file. + * netbsd-core.c: Clean up. Remove unused macros. Use netbsd + rather than netbsd_core. + * targets.c (vaxnetbsd_vec): Declare. + (bfd_target_vector): Add vaxnetbsd_vec. If NETBSD_CORE is + defined, add netbsd_core_vec. + * configure.in: Set COREFILE for alpha*-*-netbsd* and + powerpc-*-netbsd* to netbsd-core.lo. If COREFILE is + netbsd-core.lo, set COREFLAG to -DNETBSD_CORE. + * config.bfd (alpha*-*-netbsd*): New target. + * Makefile.am: Rebuild dependencies. + (BFD32_BACKENDS): Add vaxnetbsd.lo. + (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c. + * configure, Makefile.in: Rebuild. + + * configure.host: Remove the old shared library build stuff. We + now use libtool instead. + +Wed Feb 11 17:13:09 1998 Richard Henderson + + * tekhex.c (tekhex_write_object_contents): Call tekhex_init. + +Tue Feb 10 19:23:28 1998 H.J. Lu + + * configure.in: Take stab-syms.lo out of sparclinux_vec list. + * configure: Rebuild. + +Tue Feb 10 15:16:38 1998 Nick Clifton + * elf32-v850.c (remember_hi16s_reloc): New function. + (find_remembered_hi16s_reloc): New function. + (v850_elf_store_addend_in_insn): Use the above new functions to + match up HI6S relocs with LO16 relocs. + +Tue Feb 10 15:01:39 1998 Ian Lance Taylor + + * configure.in: Change -linux* to -linux-gnu*. + * config.bfd, configure.host: Likewise. + * configure: Rebuild. + +Mon Feb 9 19:40:59 1998 Nick Clifton + + * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another + LO16/HI16S bug and improve comments about what is going on. + +Sat Feb 7 15:27:03 1998 Ian Lance Taylor + + * configure, aclocal.m4: Rebuild with new libtool. + +Fri Feb 6 14:48:20 1998 Nick Clifton + + * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain + when merging v850 code into v850e/v850ea code. Do not initialise + output flags if the input is the default architecture. + +Fri Feb 6 11:50:22 1998 Jeffrey A Law (law@cygnus.com) + + * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR + get the size from bfd_arch_bits_per_address instead of directly + from the isa. + +Thu Feb 5 14:21:34 1998 Michael Meissner + + * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address + to wrap, just return all 1's bits instead. + * libbfd.h: Regenerate. + +Thu Feb 5 11:51:05 1998 Ian Lance Taylor + + * coff-i386.c (coff_pe_i386_relocate_section): New static function + if COFF_WITH_PE. + (coff_relocate_section): If COFF_WITH_PE, define as + coff_pe_i386_relocate_section. + * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE, + skip empty sections, to match coff_write_object_contents. + + * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend, + rather than swapping out r_offset twice. From Luke Deller + . + +Wed Feb 4 19:11:28 1998 Ian Lance Taylor + + * configure.in: Set libtool_enable_shared rather than + libtool_shared. Remove diversion hack. + * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild + with new libtool. + +Wed Feb 4 16:10:21 1998 Brent Baccala + + * syms.c (struct stab_cache): Define. + (struct stab_find_info): Remove cached_offset, cached_stab, + cached_str, and cached_stroff fields. Add file_cache, + function_cache, and line_cache fields. + (_bfd_stab_section_find_nearest_line): Use extensive caching to + speed up searches. + +Wed Feb 4 13:34:22 1998 Ian Lance Taylor + + * peicode.h (pe_print_idata): Check for import of ordinal rather + than name. + (pe_print_edata): If there is no .edata section, look for the + export data in some other section. + +Mon Feb 2 20:05:42 1998 Jason Molenda (crash@bugshack.cygnus.com) + + * configure.in: Change version to 2.8.4. + * configure: Regenerated. + +Mon Feb 2 17:39:39 1998 Steve Haworth + + Add tms320c30 support: + * cpu-tic30.c: New file. + * aout-tic30.c: New file. + * coff-tic30.c: New file. + * archures.c (bfd_arch_tic30): Define. + (bfd_tic30_arch): Declare. + (bfd_archures_list): Add bfd_tic30_arch. + * targets.c (bfd_target_vector): Add tic30_aout_vec and + tic30_coff_vec. + * reloc.c (BFD_RELOC_TIC30_LDP): Define. + * coffcode.h (coff_set_arch_mach_hook): Add tic30 case. + (coff_set_flags): Likewise. + * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets. + * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors. + * Makefile.am: Rebuild dependencies. + (ALL_MACHINES): Add cpu-tic30.lo. + (ALL_MACHINES_CFILES): Add cpu-tic30.c. + (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo. + (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c. + * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild. + +Mon Feb 2 12:25:12 1998 Nick Clifton + + * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc + to lag behind LO16 reloc by a couple of instructions. + +Mon Feb 2 14:09:46 1998 Ian Lance Taylor + + * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force + make to reexamine the file timestamp. + ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise. + + * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from + 0x100000. + +Fri Jan 30 19:07:07 1998 Geoff Keating + + * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure + to create .dynsbss and .rela.sbss sections. + (ppc_elf_adjust_dynamic_symbol): Put space for small data to be + copied from dynamic objects into .sbss. + (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't + use it. Correct typo of .rela.sdata2. + (ppc_elf_finish_dynamic_symbol): Generate reloc to where we + put the data, which may now be in .sbss. + (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss. + (elf_backend_create_dynamic_sections): Define as + ppc_elf_create_dynamic_sections. + + * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs + against _GLOBAL_OFFSET_TABLE_. + (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in + shared libraries which refer to local symbols. Make sure that the + test for allocating space for a reloc in a shared object is the + same as the test for emitting a reloc. + +Thu Jan 29 15:55:35 1998 J.J. van der Heijden + + * config.bfd (i[3456]-*-mingw32*): New target. + * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32. + * aclocal.m4, configure: Rebuild. + +Wed Jan 28 13:41:26 1998 Ian Lance Taylor + + * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we + have a bfd_object. + +Tue Jan 27 21:43:55 1998 Richard Henderson + + Sparc v9 ABI compliant PLT: + * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries. + (plt_templates, sparc64_elf_build_plt_entry): Delete. + (LARGE_PLT_THRESHOLD): New define. + (GOT_RESERVED_ENTRIES): V9 ABI only uses 1. + (sparc64_elf_build_plt): New function. + (sparc64_elf_plt_entry_offset): Likewise. + (sparc64_elf_plt_ptr_offset): Likewise. + (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to + contain the index for convenience. Skip the initial entries + in .rela.plt. + (sparc64_elf_size_dynamic_sections): Zero the allocated contents + memory for the benefit of .rela.plt. + (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset. + (sparc64_elf_finish_dynamic_symbol): Kill template stuff. Use + sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc. + (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt. + Call sparc64_elf_build_plt. + (elf_backend_want_got_plt): No. + (elf_backend_plt_readonly): No. + (elf_backend_plt_alignment): 8. + + * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab. + * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it. + * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it + to be called. + +Tue Jan 27 21:45:15 1998 Jeffrey A Law (law@cygnus.com) + + * archures.c (bfd_mach_mips*): Add definitions for various MIPS + processors. + * cpu-mips.c (arch_info_struct): Add mips variants. + * bfd-in2.h: Rebuilt. + +Tue Jan 27 15:06:04 1998 Nick Clifton + + * coff-arm.c (coff_arm_relocate_section): Preserve the contents of + t2a3_b_insn. + +Tue Jan 27 12:47:27 1998 Robert Lipe + + * config.bfd (i[3456]86-sco3.2v5*): ELF now the default. + (i[3456]86sco3.2v5*coff): New target. + +Mon Jan 26 15:41:30 1998 Ian Lance Taylor + + * bfd-in2.h: Rebuild with changes to chew--tab expansion. + +Thu Jan 22 21:26:48 1998 Richard Henderson + + * bfd.c (bfd_get_error_handler): Add orthogonal function. + * bfd-in2.h: Regenerate. + +Thu Jan 22 21:13:39 1998 Richard Henderson + + * tekhex.c (tekhex_write_object_contents): Check for no symbols. + +Wed Jan 21 21:19:03 1998 Ian Lance Taylor + + * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't + adjust addend for an output common symbol (from Jimmy Blair + ). If COFF_WITH_PE, adjust addend for PC relative + defined symbol to counteract adjustment made in generic relocation + code. + + * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h. + +Wed Jan 21 21:16:06 1998 Manfred Hollstein + + * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name. + (GET_SCNDHR_NLNNO): Likewise. + +Mon Jan 19 12:49:52 1998 Ian Lance Taylor + + * cpu-sh.c (arch_info_struct): Correct next field of sh3e. + +Wed Jan 14 17:23:27 1998 Nick Clifton + + * elf32-m32r.c: Add macros to handle NOP insertion. + +Wed Jan 14 16:15:22 1998 Richard Henderson + + * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section. + (xcoff_mark): Likewise. + (xcoff_build_ldsyms): Mark absolute symbols. + +Wed Jan 14 16:03:11 1998 Richard Henderson + + * bout.c (b_out_write_object_contents): Sort symbols before output + to keep {CALL,BAL}NAME symbols adjacent. + (b_out_symbol_cmp): New function. + +For older changes see ChangeLog-9697 + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/contrib/binutils/bfd/MAINTAINERS b/contrib/binutils/bfd/MAINTAINERS new file mode 100644 index 0000000..d59a3bd --- /dev/null +++ b/contrib/binutils/bfd/MAINTAINERS @@ -0,0 +1 @@ +See ../binutils/MAINTAINERS diff --git a/contrib/binutils/bfd/Makefile.am b/contrib/binutils/bfd/Makefile.am index 2d38959..b6741bc 100644 --- a/contrib/binutils/bfd/Makefile.am +++ b/contrib/binutils/bfd/Makefile.am @@ -12,6 +12,9 @@ docdir = doc lib_LTLIBRARIES = libbfd.la +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + # bfd.h goes here, for now BFD_H = bfd.h @@ -26,13 +29,15 @@ 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 + 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 + 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. @@ -42,17 +47,21 @@ ALL_MACHINES = \ 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 \ @@ -66,6 +75,7 @@ ALL_MACHINES = \ cpu-sh.lo \ cpu-sparc.lo \ cpu-tic30.lo \ + cpu-tic54x.lo \ cpu-tic80.lo \ cpu-v850.lo \ cpu-vax.lo \ @@ -79,17 +89,21 @@ ALL_MACHINES_CFILES = \ 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 \ @@ -103,6 +117,7 @@ ALL_MACHINES_CFILES = \ cpu-sh.c \ cpu-sparc.c \ cpu-tic30.c \ + cpu-tic54x.c \ cpu-tic80.c \ cpu-v850.c \ cpu-vax.c \ @@ -115,6 +130,7 @@ ALL_MACHINES_CFILES = \ BFD32_BACKENDS = \ aout-adobe.lo \ aout-arm.lo \ + aout-cris.lo \ aout-ns32k.lo \ aout-sparcle.lo \ aout-tic30.lo \ @@ -145,6 +161,7 @@ BFD32_BACKENDS = \ coff-stgo32.lo \ coff-svm68k.lo \ coff-tic30.lo \ + coff-tic54x.lo \ coff-tic80.lo \ coff-u68k.lo \ coff-we32k.lo \ @@ -152,23 +169,28 @@ BFD32_BACKENDS = \ coff-z8k.lo \ cofflink.lo \ dwarf1.lo \ - dwarf2.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 \ @@ -178,6 +200,7 @@ BFD32_BACKENDS = \ elf32-pj.lo \ elf32-ppc.lo \ elf32-sh.lo \ + elf32-sh-lin.lo \ elf32-sparc.lo \ elf32-v850.lo \ elf32.lo \ @@ -245,6 +268,7 @@ BFD32_BACKENDS = \ BFD32_BACKENDS_CFILES = \ aout-adobe.c \ aout-arm.c \ + aout-cris.c \ aout-ns32k.c \ aout-sparcle.c \ aout-tic30.c \ @@ -275,6 +299,7 @@ BFD32_BACKENDS_CFILES = \ coff-stgo32.c \ coff-svm68k.c \ coff-tic30.c \ + coff-tic54x.c \ coff-tic80.c \ coff-u68k.c \ coff-we32k.c \ @@ -282,24 +307,28 @@ BFD32_BACKENDS_CFILES = \ coff-z8k.c \ cofflink.c \ dwarf1.c \ - dwarf2.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 \ @@ -308,6 +337,7 @@ BFD32_BACKENDS_CFILES = \ elf32-pj.c \ elf32-ppc.c \ elf32-sh.c \ + elf32-sh-lin.c \ elf32-sparc.c \ elf32-v850.c \ elf32.c \ @@ -378,8 +408,13 @@ BFD32_BACKENDS_CFILES = \ 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 \ @@ -390,8 +425,13 @@ BFD64_BACKENDS = \ 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 \ @@ -438,12 +478,12 @@ 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 elf32-arm.h elfcode.h elfcore.h \ - elflink.h freebsd.h genlink.h go32stub.h libaout.h \ - libbfd.h libcoff.h libecoff.h elf-bfd.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 + 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 HFILES = \ elf32-target.h elf64-target.h targmatch.h \ @@ -528,6 +568,16 @@ elf64-target.h : elfxx-target.h sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new mv -f elf64-target.new elf64-target.h +elf32-ia64.c : elfxx-ia64.c + rm -f elf32-ia64.c + sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new + mv -f elf32-ia64.new elf32-ia64.c + +elf64-ia64.c : elfxx-ia64.c + rm -f elf64-ia64.c + sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new + mv -f elf64-ia64.new elf64-ia64.c + 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) @@ -538,17 +588,23 @@ $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) # Install BFD include file, and others that it needs. install-data-local: $(BFD_H) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(includedir) - $(INSTALL_DATA) $(BFD_H) $(includedir)/bfd.h - $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h - $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(includedir)/bfdlink.h + $(mkinstalldirs) $(DESTDIR)$(includedir) + $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(includedir)/bfd.h + $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(includedir)/ansidecl.h + $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(includedir)/bfdlink.h + # Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES). DEP: dep.sed $(CFILES) $(HFILES) bfd.h rm -f DEP1 $(MAKE) MKDEP="$(MKDEP)" DEP1 - sed -f dep.sed < DEP1 > $@ - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@ + sed -f dep.sed < DEP1 > DEPA + echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 @@ -637,7 +693,7 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) MOSTLYCLEANFILES = elf32-target.h elf64-target.h ofiles stamp-ofiles \ targmatch.h -CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEP1 DEP2 libbfd.a stamp-lib \ +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 # We want to rerun configure if config.bfd or configure.host change. @@ -645,481 +701,599 @@ config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host $(SHELL) ./config.status --recheck -elfarm-oabi.lo: elfarm-oabi.c elf32-arm.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h - -elfarm-nabi.lo: elfarm-nabi.c elf32-arm.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h - # What appears below is generated by a hacked mkdep using gcc -MM. # DO NOT DELETE THIS LINE -- mkdep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -archive.lo: archive.c $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h -archures.lo: archures.c -bfd.lo: bfd.c $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h libcoff.h \ - libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h -cache.lo: cache.c -coffgen.lo: coffgen.c $(INCDIR)/coff/internal.h libcoff.h \ - $(INCDIR)/bfdlink.h -corefile.lo: corefile.c -format.lo: format.c -init.lo: init.c -libbfd.lo: libbfd.c -opncls.lo: opncls.c $(INCDIR)/objalloc.h -reloc.lo: reloc.c $(INCDIR)/bfdlink.h -section.lo: section.c $(INCDIR)/bfdlink.h -syms.lo: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \ +archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \ + $(INCDIR)/aout/ranlib.h +archures.lo: archures.c $(INCDIR)/filenames.h +bfd.lo: bfd.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ + libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h +cache.lo: cache.c $(INCDIR)/filenames.h +coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ + libcoff.h $(INCDIR)/bfdlink.h +corefile.lo: corefile.c $(INCDIR)/filenames.h +format.lo: format.c $(INCDIR)/filenames.h +init.lo: init.c $(INCDIR)/filenames.h +libbfd.lo: libbfd.c $(INCDIR)/filenames.h +opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h +reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h +section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h +syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def +targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h \ + targmatch.h +hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h +linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + genlink.h +srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h +binary.lo: binary.c $(INCDIR)/filenames.h +tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h +ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h +stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def -targets.lo: targets.c $(INCDIR)/fnmatch.h targmatch.h -hash.lo: hash.c $(INCDIR)/objalloc.h -linker.lo: linker.c $(INCDIR)/bfdlink.h genlink.h -srec.lo: srec.c $(INCDIR)/libiberty.h -binary.lo: binary.c -tekhex.lo: tekhex.c $(INCDIR)/libiberty.h -ihex.lo: ihex.c $(INCDIR)/libiberty.h -stabs.lo: stabs.c $(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 -cpu-a29k.lo: cpu-a29k.c -cpu-alpha.lo: cpu-alpha.c -cpu-arc.lo: cpu-arc.c -cpu-arm.lo: cpu-arm.c -cpu-avr.lo: cpu-avr.c -cpu-d10v.lo: cpu-d10v.c -cpu-d30v.lo: cpu-d30v.c -cpu-fr30.lo: cpu-fr30.c -cpu-h8300.lo: cpu-h8300.c -cpu-h8500.lo: cpu-h8500.c -cpu-hppa.lo: cpu-hppa.c -cpu-i370.lo: cpu-i370.c -cpu-i386.lo: cpu-i386.c -cpu-i860.lo: cpu-i860.c -cpu-i960.lo: cpu-i960.c -cpu-m32r.lo: cpu-m32r.c -cpu-m68k.lo: cpu-m68k.c -cpu-m88k.lo: cpu-m88k.c -cpu-m10200.lo: cpu-m10200.c -cpu-m10300.lo: cpu-m10300.c -cpu-mcore.lo: cpu-mcore.c -cpu-mips.lo: cpu-mips.c -cpu-ns32k.lo: cpu-ns32k.c ns32k.h -cpu-pj.lo: cpu-pj.c -cpu-powerpc.lo: cpu-powerpc.c -cpu-rs6000.lo: cpu-rs6000.c -cpu-sh.lo: cpu-sh.c -cpu-sparc.lo: cpu-sparc.c -cpu-tic30.lo: cpu-tic30.c -cpu-tic80.lo: cpu-tic80.c -cpu-v850.lo: cpu-v850.c -cpu-vax.lo: cpu-vax.c -cpu-we32k.lo: cpu-we32k.c -cpu-w65.lo: cpu-w65.c -cpu-z8k.lo: cpu-z8k.c -aout-adobe.lo: aout-adobe.c $(INCDIR)/aout/adobe.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 +cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h +cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h +cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h +cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h +cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h +cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h +cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h +cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h +cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h +cpu-ia64.lo: cpu-ia64.c $(INCDIR)/filenames.h cpu-ia64-opc.c \ + $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h +cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h +cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h +cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h +cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h +cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h +cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h +cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h +cpu-m68k.lo: cpu-m68k.c $(INCDIR)/filenames.h +cpu-m88k.lo: cpu-m88k.c $(INCDIR)/filenames.h +cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h +cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h +cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h +cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h +cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h +cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h +cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h +cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h +cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h +cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h +cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h +cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h +cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h +cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h +cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h +cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h +cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h +cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h +aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \ $(INCDIR)/bfdlink.h -aout-arm.lo: aout-arm.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h aoutx.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h +aout-arm.lo: aout-arm.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aoutx.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h +aout-cris.lo: aout-cris.c aout32.c aoutx.h $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \ ns32k.h libaout.h $(INCDIR)/bfdlink.h aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \ - libaout.h aoutf1.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -aout-tic30.lo: aout-tic30.c libaout.h $(INCDIR)/bfdlink.h \ + libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h aoutx.h -aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \ + $(INCDIR)/aout/ar.h aout-target.h +aout-tic30.lo: aout-tic30.c $(INCDIR)/filenames.h libaout.h \ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -aout32.lo: aout32.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -armnetbsd.lo: armnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h +aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \ + libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h +aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -bout.lo: bout.c $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h -cf-i386lynx.lo: cf-i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/coff/m68k.h \ +armnetbsd.lo: armnetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + genlink.h $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def libaout.h +cf-i386lynx.lo: cf-i386lynx.c $(INCDIR)/filenames.h \ + coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h +cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/sparc.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-a29k.lo: coff-a29k.c $(INCDIR)/filenames.h $(INCDIR)/coff/a29k.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/coff/sparc.h \ +coff-apollo.lo: coff-apollo.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/apollo.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/coff/arm.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-a29k.lo: coff-a29k.c $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h \ +coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h coff-m68k.c \ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-apollo.lo: coff-apollo.c $(INCDIR)/coff/apollo.h \ +coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h \ + libcoff.h coffcode.h coffswap.h +coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/h8500.h $(INCDIR)/coff/internal.h libcoff.h \ + coffcode.h coffswap.h +coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/coff/i386.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-arm.lo: coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-aux.lo: coff-aux.c $(INCDIR)/coff/aux-coff.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h \ +coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/coff/i860.h \ + $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-h8300.lo: coff-h8300.c $(INCDIR)/bfdlink.h genlink.h \ - $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h \ +coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/coff/i960.h \ + $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-h8500.lo: coff-h8500.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-i386.lo: coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-i860.lo: coff-i860.c $(INCDIR)/coff/i860.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/coff/i386.h \ +coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m68k.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-i960.lo: coff-i960.c $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-m68k.lo: coff-m68k.c $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-m88k.lo: coff-m88k.c $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-mips.lo: coff-mips.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ - $(INCDIR)/coff/mips.h libcoff.h libecoff.h coffswap.h \ - ecoffswap.h -coff-pmac.lo: coff-pmac.c coff-rs6000.c $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \ +coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m88k.h \ + $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-rs6000.lo: coff-rs6000.c $(INCDIR)/coff/internal.h \ +coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h libcoff.h \ + libecoff.h coffswap.h ecoffswap.h +coff-pmac.lo: coff-pmac.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \ + xcoff-target.h coffcode.h coffswap.h +coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h libcoff.h \ + $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h +coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h libcoff.h \ coffcode.h coffswap.h -coff-sh.lo: coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-sparc.lo: coff-sparc.c $(INCDIR)/coff/sparc.h \ +coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/coff/sparc.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \ +coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \ go32stub.h -coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ +coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/tic30.h $(INCDIR)/coff/internal.h libcoff.h \ coffcode.h coffswap.h -coff-tic30.lo: coff-tic30.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic80.h \ +coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ +coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \ + $(INCDIR)/coff/tic80.h $(INCDIR)/coff/internal.h libcoff.h \ coffcode.h coffswap.h -coff-we32k.lo: coff-we32k.c $(INCDIR)/coff/we32k.h \ +coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/coff/we32k.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-w65.lo: coff-w65.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-z8k.lo: coff-z8k.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -cofflink.lo: cofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ - libcoff.h -dwarf1.lo: dwarf1.c $(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)/libiberty.h elf-bfd.h \ +coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/w65.h $(INCDIR)/coff/internal.h libcoff.h \ + coffcode.h coffswap.h +coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/z8k.h $(INCDIR)/coff/internal.h libcoff.h \ + coffcode.h coffswap.h +cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/internal.h libcoff.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 \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h +ecofflink.lo: ecofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/objalloc.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h +efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \ + coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.h +elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h +elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.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)/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 $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ - libcoff.h libecoff.h -ecofflink.lo: ecofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/objalloc.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ - libcoff.h libecoff.h -elf.lo: elf.c $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h -elf32-arc.lo: elf32-arc.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm-oabi.h \ - $(INCDIR)/elf/reloc-macros.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ elf32-arm.h elf32-target.h elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-arm.h \ - elf32-target.h -elf32-avr.lo: elf32-avr.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-d10v.lo: elf32-d10v.c elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + elf32-arm.h elf32-target.h +elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-d30v.lo: elf32-d30v.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ +elf32-cris.lo: elf32-cris.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-fr30.lo: elf32-fr30.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ +elf32-d10v.lo: elf32-d10v.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/d10v.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-i370.lo: elf32-i370.c $(INCDIR)/bfdlink.h elf-bfd.h \ +elf32-d30v.lo: elf32-d30v.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/i370.h elf32-target.h -elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-i860.lo: elf32-i860.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-i960.lo: elf32-i960.c 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-m32r.lo: elf32-m32r.c 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 elf32-target.h -elf32-m68k.lo: elf32-m68k.c $(INCDIR)/bfdlink.h elf-bfd.h \ +elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-m88k.lo: elf32-m88k.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/bfdlink.h elf32-target.h +elf32-hppa.lo: elf32-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 elf32-hppa.h elf-hppa.h elf32-target.h +elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h elf32-target.h +elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf-m10200.lo: elf-m10200.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ +elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf-m10300.lo: elf-m10300.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/reloc-macros.h \ +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-mcore.lo: elf32-mcore.c $(INCDIR)/bfdlink.h elf-bfd.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)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-mips.lo: elf32-mips.c $(INCDIR)/bfdlink.h genlink.h \ +elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-pj.lo: elf32-pj.c $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \ +elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/bfdlink.h elf32-target.h +elf-m10200.lo: elf-m10200.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-sparc.lo: elf32-sparc.c $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/bfdlink.h elf32-target.h +elf-m10300.lo: elf-m10300.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-v850.lo: elf32-v850.c $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32.lo: elf32.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - elfcore.h elflink.h -elflink.lo: elflink.c $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h -epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c coff-arm.c \ - $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ - libpei.h -hp300bsd.lo: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mcore.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \ + elf32-target.h +elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-sh-lin.lo: elf32-sh-lin.c elf32-sh.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \ + elf32-target.h +elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h elfcore.h elflink.h +elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h +epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \ + coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.h +epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c $(INCDIR)/filenames.h \ + coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.h +hp300bsd.lo: hp300bsd.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \ - aoutx.h $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -som.lo: som.c -i386aout.lo: i386aout.c $(INCDIR)/aout/aout64.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386bsd.lo: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/aout/ar.h aout-target.h +som.lo: som.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h +i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/aout/ar.h aout-target.h +i386freebsd.lo: i386freebsd.c freebsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +i386linux.lo: i386linux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -i386freebsd.lo: i386freebsd.c freebsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386linux.lo: i386linux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h -i386lynx.lo: i386lynx.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386msdos.lo: i386msdos.c libaout.h $(INCDIR)/bfdlink.h -i386netbsd.lo: i386netbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386mach3.lo: i386mach3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h -i386os9k.lo: i386os9k.c $(INCDIR)/bfdlink.h libaout.h \ - $(INCDIR)/os9k.h -ieee.lo: ieee.c $(INCDIR)/ieee.h libieee.h -m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h libaout.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h +i386lynx.lo: i386lynx.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +i386msdos.lo: i386msdos.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h +i386netbsd.lo: i386netbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h +i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + libaout.h $(INCDIR)/os9k.h +ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/ieee.h \ + libieee.h +m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +m68klinux.lo: m68klinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h +m68klynx.lo: m68klynx.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +m68knetbsd.lo: m68knetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +m88kmach3.lo: m88kmach3.c $(INCDIR)/filenames.h libaout.h \ $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -m68klinux.lo: m68klinux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h -m68klynx.lo: m68klynx.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -m68knetbsd.lo: m68knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -m88kmach3.lo: m88kmach3.c libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -mipsbsd.lo: mipsbsd.c libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -newsos3.lo: newsos3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h -nlm.lo: nlm.c libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h -nlm32-i386.lo: nlm32-i386.c $(INCDIR)/nlm/i386-ext.h \ +mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +newsos3.lo: newsos3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h +nlm.lo: nlm.c $(INCDIR)/filenames.h libnlm.h $(INCDIR)/nlm/common.h \ + $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h +nlm32-i386.lo: nlm32-i386.c $(INCDIR)/filenames.h $(INCDIR)/nlm/i386-ext.h \ libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h -nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/nlm/sparc32-ext.h \ +nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/filenames.h \ + $(INCDIR)/nlm/sparc32-ext.h libnlm.h $(INCDIR)/nlm/common.h \ + $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ + nlm-target.h +nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/nlm/ppc-ext.h \ libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h -nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/nlm/ppc-ext.h libnlm.h \ - $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \ - nlmswap.h nlm-target.h -nlm32.lo: nlm32.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \ - $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h -ns32knetbsd.lo: ns32knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -oasys.lo: oasys.c $(INCDIR)/oasys.h liboasys.h -pc532-mach.lo: pc532-mach.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -pe-arm.lo: pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-arm.lo: pei-arm.c coff-arm.c $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-i386.lo: pe-i386.c coff-i386.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-i386.lo: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-mcore.lo: pe-mcore.c coff-mcore.c $(INCDIR)/coff/mcore.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-mcore.lo: pei-mcore.c coff-mcore.c $(INCDIR)/coff/mcore.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-ppc.lo: pe-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-ppc.lo: pei-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-sh.lo: pe-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - coffcode.h peicode.h libpei.h -pei-sh.lo: pei-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - coffcode.h peicode.h libpei.h -pe-mips.lo: pe-mips.c $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h \ +nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \ + $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h +ns32knetbsd.lo: ns32knetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/oasys.h \ + liboasys.h +pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \ + $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pei-arm.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \ + $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pe-i386.lo: pe-i386.c $(INCDIR)/filenames.h coff-i386.c \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pei-i386.lo: pei-i386.c $(INCDIR)/filenames.h coff-i386.c \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pe-mcore.lo: pe-mcore.c $(INCDIR)/filenames.h coff-mcore.c \ + $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \ + $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \ + $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ peicode.h libpei.h -pei-mips.lo: pei-mips.c pe-mips.c $(INCDIR)/coff/mipspe.h \ +pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \ + $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.h +pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h coffcode.h peicode.h libpei.h +pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \ + $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \ + libpei.h +pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/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)/coff/internal.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h -ppcboot.lo: ppcboot.c -reloc16.lo: reloc16.c $(INCDIR)/bfdlink.h genlink.h \ - $(INCDIR)/coff/internal.h libcoff.h -riscix.lo: riscix.c libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -sparclinux.lo: sparclinux.c $(INCDIR)/aout/aout64.h \ +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 +riscix.lo: riscix.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +sparclinux.lo: sparclinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ libaout.h $(INCDIR)/bfdlink.h aout-target.h -sparclynx.lo: sparclynx.c $(INCDIR)/aout/sun4.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -sparcnetbsd.lo: sparcnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \ - $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -vaxnetbsd.lo: vaxnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -versados.lo: versados.c $(INCDIR)/libiberty.h -vms.lo: vms.c $(INCDIR)/bfdlink.h vms.h -vms-gsd.lo: vms-gsd.c $(INCDIR)/bfdlink.h vms.h -vms-hdr.lo: vms-hdr.c $(INCDIR)/bfdlink.h vms.h -vms-misc.lo: vms-misc.c $(INCDIR)/bfdlink.h vms.h -vms-tir.lo: vms-tir.c $(INCDIR)/bfdlink.h vms.h -xcofflink.lo: xcofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ - libcoff.h -aout64.lo: aout64.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -coff-alpha.lo: coff-alpha.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ - $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ - libecoff.h coffswap.h ecoffswap.h -demo64.lo: demo64.c aoutf1.h $(INCDIR)/aout/sun4.h \ +sparclynx.lo: sparclynx.c $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \ libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ aout-target.h -elf64-alpha.lo: elf64-alpha.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ +sparcnetbsd.lo: sparcnetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \ + $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h +vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h +vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/internal.h libcoff.h +aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +coff-alpha.lo: coff-alpha.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \ - libcoff.h libecoff.h ecoffswap.h elf64-target.h -elf64-gen.lo: elf64-gen.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - elf64-target.h -elf64-mips.lo: elf64-mips.c $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h \ - genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \ - elf64-target.h -elf64-sparc.lo: elf64-sparc.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + libcoff.h libecoff.h coffswap.h ecoffswap.h +coff64-rs6000.lo: coff64-rs6000.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6k64.h libcoff.h \ + $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h +demo64.lo: demo64.c aoutf1.h $(INCDIR)/filenames.h \ + $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/aout/ar.h aout-target.h +efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \ + coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.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 \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ + libecoff.h ecoffswap.h elf64-target.h +elf64-hppa.lo: elf64-hppa.c $(INCDIR)/filenames.h 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-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 +elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \ + $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \ + ecoffswap.h elf64-target.h +elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \ $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \ elf64-target.h -elf64.lo: elf64.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - elfcore.h elflink.h -nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/nlm/alpha-ext.h \ - libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h -nlm64.lo: nlm64.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \ - $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h -aix386-core.lo: aix386-core.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h -hpux-core.lo: hpux-core.c -irix-core.lo: irix-core.c -lynx-core.lo: lynx-core.c -osf-core.lo: osf-core.c -sco5-core.lo: sco5-core.c libaout.h $(INCDIR)/bfdlink.h -trad-core.lo: trad-core.c libaout.h $(INCDIR)/bfdlink.h -cisco-core.lo: cisco-core.c +elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h elfcore.h elflink.h +nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \ + $(INCDIR)/nlm/alpha-ext.h libnlm.h $(INCDIR)/nlm/common.h \ + $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ + nlm-target.h +nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \ + $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h +aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h +hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h +irix-core.lo: irix-core.c $(INCDIR)/filenames.h +lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h +osf-core.lo: osf-core.c $(INCDIR)/filenames.h +sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h +trad-core.lo: trad-core.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h +cisco-core.lo: cisco-core.c $(INCDIR)/filenames.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 bb8e06c..0c60c1c 100644 --- a/contrib/binutils/bfd/Makefile.in +++ b/contrib/binutils/bfd/Makefile.in @@ -75,10 +75,14 @@ CC = @CC@ CC_FOR_BUILD = @CC_FOR_BUILD@ COREFILE = @COREFILE@ COREFLAG = @COREFLAG@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ @@ -96,10 +100,12 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ +STRIP = @STRIP@ TDEFINES = @TDEFINES@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ @@ -125,6 +131,9 @@ docdir = doc lib_LTLIBRARIES = libbfd.la +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + # bfd.h goes here, for now BFD_H = bfd.h @@ -135,411 +144,41 @@ 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 +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 +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-d10v.lo \ - cpu-d30v.lo \ - cpu-fr30.lo \ - cpu-h8300.lo \ - cpu-h8500.lo \ - cpu-hppa.lo \ - cpu-i370.lo \ - cpu-i386.lo \ - cpu-i860.lo \ - cpu-i960.lo \ - cpu-m32r.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-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-d10v.c \ - cpu-d30v.c \ - cpu-fr30.c \ - cpu-h8300.c \ - cpu-h8500.c \ - cpu-hppa.c \ - cpu-i370.c \ - cpu-i386.c \ - cpu-i860.c \ - cpu-i960.c \ - cpu-m32r.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-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-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-tic80.lo \ - coff-u68k.lo \ - coff-we32k.lo \ - coff-w65.lo \ - coff-z8k.lo \ - cofflink.lo \ - dwarf1.lo \ - dwarf2.lo \ - ecoff.lo \ - ecofflink.lo \ - elf.lo \ - elf32-arc.lo \ - elfarm-oabi.lo \ - elfarm-nabi.lo \ - elf32-avr.lo \ - elf32-d10v.lo \ - elf32-d30v.lo \ - elf32-fr30.lo \ - elf32-gen.lo \ - elf32-i370.lo \ - elf32-i386.lo \ - elf32-i860.lo \ - elf32-i960.lo \ - elf32-m32r.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-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-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-tic80.c \ - coff-u68k.c \ - coff-we32k.c \ - coff-w65.c \ - coff-z8k.c \ - cofflink.c \ - dwarf1.c \ - dwarf2.c \ - ecoff.c \ - ecofflink.c \ - elf.c \ - elf32-arc.c \ - elfarm-oabi.c \ - elfarm-nabi.c \ - elf32-avr.c \ - elf32-d10v.c \ - elf32-d30v.c \ - elf32-fr30.c \ - elf32-gen.c \ - elf32-i370.c \ - elf32-i386.c \ - elf32-i860.c \ - elf32-i960.c \ - elf32-m32r.c \ - elf32-m68k.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-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 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 # 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 \ - demo64.lo \ - elf64-alpha.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 \ - demo64.c \ - elf64-alpha.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 + + +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 # These are defined by configure.in: @@ -552,26 +191,13 @@ 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) +CFILES = $(BFD_LIBS_CFILES) $(ALL_MACHINES_CFILES) $(BFD32_BACKENDS_CFILES) $(BFD64_BACKENDS_CFILES) $(OPTIONAL_BACKENDS_CFILES) -SOURCE_HFILES = \ - aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h \ - ecoffswap.h elf32-arm.h elfcode.h elfcore.h \ - elflink.h freebsd.h genlink.h go32stub.h libaout.h \ - libbfd.h libcoff.h libecoff.h elf-bfd.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 +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 -HFILES = \ - elf32-target.h elf64-target.h targmatch.h \ - $(SOURCE_HFILES) +HFILES = elf32-target.h elf64-target.h targmatch.h $(SOURCE_HFILES) POTFILES = $(CFILES) $(SOURCE_HFILES) @@ -598,18 +224,15 @@ 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 = elf32-target.h elf64-target.h ofiles stamp-ofiles targmatch.h -CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP 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 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs @@ -629,7 +252,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES) libbfd_la_OBJECTS = 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 +ihex.lo stabs.lo stab-syms.lo dwarf2.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -649,7 +272,7 @@ OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS) all: all-redirect .SUFFIXES: -.SUFFIXES: .S .c .lo .o .s +.SUFFIXES: .S .c .lo .o .obj .s $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile @@ -704,6 +327,11 @@ maintainer-clean-noinstLIBRARIES: .c.o: $(COMPILE) -c $< +# FIXME: We should only use cygpath when building on Windows, +# and only if it is available. +.c.obj: + $(COMPILE) -c `cygpath -w $<` + .s.o: $(COMPILE) -c $< @@ -712,6 +340,7 @@ maintainer-clean-noinstLIBRARIES: mostlyclean-compile: -rm -f *.o core *.core + -rm -f *.$(OBJEXT) clean-compile: @@ -897,7 +526,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 $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -1070,6 +699,16 @@ elf64-target.h : elfxx-target.h rm -f elf64-target.h sed -e s/NN/64/g < $(srcdir)/elfxx-target.h > elf64-target.new mv -f elf64-target.new elf64-target.h + +elf32-ia64.c : elfxx-ia64.c + rm -f elf32-ia64.c + sed -e s/NN/32/g < $(srcdir)/elfxx-ia64.c > elf32-ia64.new + mv -f elf32-ia64.new elf32-ia64.c + +elf64-ia64.c : elfxx-ia64.c + rm -f elf64-ia64.c + sed -e s/NN/64/g < $(srcdir)/elfxx-ia64.c > elf64-ia64.new + mv -f elf64-ia64.new elf64-ia64.c $(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) @@ -1078,17 +717,22 @@ $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS) # Install BFD include file, and others that it needs. install-data-local: $(BFD_H) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(includedir) - $(INSTALL_DATA) $(BFD_H) $(includedir)/bfd.h - $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h - $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(includedir)/bfdlink.h + $(mkinstalldirs) $(DESTDIR)$(includedir) + $(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(includedir)/bfd.h + $(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(includedir)/ansidecl.h + $(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(includedir)/bfdlink.h # Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES). DEP: dep.sed $(CFILES) $(HFILES) bfd.h rm -f DEP1 $(MAKE) MKDEP="$(MKDEP)" DEP1 - sed -f dep.sed < DEP1 > $@ - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@ + sed -f dep.sed < DEP1 > DEPA + echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 @@ -1173,483 +817,601 @@ stmp-lcoff-h: $(LIBCOFF_H_FILES) config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host $(SHELL) ./config.status --recheck -elfarm-oabi.lo: elfarm-oabi.c elf32-arm.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h - -elfarm-nabi.lo: elfarm-nabi.c elf32-arm.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h elf32-target.h - # What appears below is generated by a hacked mkdep using gcc -MM. # DO NOT DELETE THIS LINE -- mkdep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -archive.lo: archive.c $(INCDIR)/aout/ar.h $(INCDIR)/aout/ranlib.h -archures.lo: archures.c -bfd.lo: bfd.c $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h libcoff.h \ - libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h -cache.lo: cache.c -coffgen.lo: coffgen.c $(INCDIR)/coff/internal.h libcoff.h \ - $(INCDIR)/bfdlink.h -corefile.lo: corefile.c -format.lo: format.c -init.lo: init.c -libbfd.lo: libbfd.c -opncls.lo: opncls.c $(INCDIR)/objalloc.h -reloc.lo: reloc.c $(INCDIR)/bfdlink.h -section.lo: section.c $(INCDIR)/bfdlink.h -syms.lo: syms.c $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h \ +archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \ + $(INCDIR)/aout/ranlib.h +archures.lo: archures.c $(INCDIR)/filenames.h +bfd.lo: bfd.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \ + libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h +cache.lo: cache.c $(INCDIR)/filenames.h +coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ + libcoff.h $(INCDIR)/bfdlink.h +corefile.lo: corefile.c $(INCDIR)/filenames.h +format.lo: format.c $(INCDIR)/filenames.h +init.lo: init.c $(INCDIR)/filenames.h +libbfd.lo: libbfd.c $(INCDIR)/filenames.h +opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h +reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h +section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h +syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def +targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h \ + targmatch.h +hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h +linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + genlink.h +srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h +binary.lo: binary.c $(INCDIR)/filenames.h +tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h +ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h +stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def -targets.lo: targets.c $(INCDIR)/fnmatch.h targmatch.h -hash.lo: hash.c $(INCDIR)/objalloc.h -linker.lo: linker.c $(INCDIR)/bfdlink.h genlink.h -srec.lo: srec.c $(INCDIR)/libiberty.h -binary.lo: binary.c -tekhex.lo: tekhex.c $(INCDIR)/libiberty.h -ihex.lo: ihex.c $(INCDIR)/libiberty.h -stabs.lo: stabs.c $(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 -cpu-a29k.lo: cpu-a29k.c -cpu-alpha.lo: cpu-alpha.c -cpu-arc.lo: cpu-arc.c -cpu-arm.lo: cpu-arm.c -cpu-avr.lo: cpu-avr.c -cpu-d10v.lo: cpu-d10v.c -cpu-d30v.lo: cpu-d30v.c -cpu-fr30.lo: cpu-fr30.c -cpu-h8300.lo: cpu-h8300.c -cpu-h8500.lo: cpu-h8500.c -cpu-hppa.lo: cpu-hppa.c -cpu-i370.lo: cpu-i370.c -cpu-i386.lo: cpu-i386.c -cpu-i860.lo: cpu-i860.c -cpu-i960.lo: cpu-i960.c -cpu-m32r.lo: cpu-m32r.c -cpu-m68k.lo: cpu-m68k.c -cpu-m88k.lo: cpu-m88k.c -cpu-m10200.lo: cpu-m10200.c -cpu-m10300.lo: cpu-m10300.c -cpu-mcore.lo: cpu-mcore.c -cpu-mips.lo: cpu-mips.c -cpu-ns32k.lo: cpu-ns32k.c ns32k.h -cpu-pj.lo: cpu-pj.c -cpu-powerpc.lo: cpu-powerpc.c -cpu-rs6000.lo: cpu-rs6000.c -cpu-sh.lo: cpu-sh.c -cpu-sparc.lo: cpu-sparc.c -cpu-tic30.lo: cpu-tic30.c -cpu-tic80.lo: cpu-tic80.c -cpu-v850.lo: cpu-v850.c -cpu-vax.lo: cpu-vax.c -cpu-we32k.lo: cpu-we32k.c -cpu-w65.lo: cpu-w65.c -cpu-z8k.lo: cpu-z8k.c -aout-adobe.lo: aout-adobe.c $(INCDIR)/aout/adobe.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 +cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h +cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h +cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h +cpu-d10v.lo: cpu-d10v.c $(INCDIR)/filenames.h +cpu-d30v.lo: cpu-d30v.c $(INCDIR)/filenames.h +cpu-fr30.lo: cpu-fr30.c $(INCDIR)/filenames.h +cpu-h8300.lo: cpu-h8300.c $(INCDIR)/filenames.h +cpu-h8500.lo: cpu-h8500.c $(INCDIR)/filenames.h +cpu-hppa.lo: cpu-hppa.c $(INCDIR)/filenames.h +cpu-ia64.lo: cpu-ia64.c $(INCDIR)/filenames.h cpu-ia64-opc.c \ + $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h +cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h +cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h +cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h +cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h +cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h +cpu-m68hc11.lo: cpu-m68hc11.c $(INCDIR)/filenames.h +cpu-m68hc12.lo: cpu-m68hc12.c $(INCDIR)/filenames.h +cpu-m68k.lo: cpu-m68k.c $(INCDIR)/filenames.h +cpu-m88k.lo: cpu-m88k.c $(INCDIR)/filenames.h +cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h +cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h +cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h +cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h +cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h +cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h +cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h +cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h +cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h +cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h +cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h +cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h +cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h +cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h +cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h +cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h +cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h +cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h +aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \ $(INCDIR)/bfdlink.h -aout-arm.lo: aout-arm.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h aoutx.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h +aout-arm.lo: aout-arm.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aoutx.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h +aout-cris.lo: aout-cris.c aout32.c aoutx.h $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \ ns32k.h libaout.h $(INCDIR)/bfdlink.h aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \ - libaout.h aoutf1.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -aout-tic30.lo: aout-tic30.c libaout.h $(INCDIR)/bfdlink.h \ + libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h aoutx.h -aout0.lo: aout0.c aoutf1.h $(INCDIR)/aout/sun4.h libaout.h \ + $(INCDIR)/aout/ar.h aout-target.h +aout-tic30.lo: aout-tic30.c $(INCDIR)/filenames.h libaout.h \ $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -aout32.lo: aout32.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -armnetbsd.lo: armnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h +aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \ + libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h +aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -bout.lo: bout.c $(INCDIR)/bfdlink.h genlink.h $(INCDIR)/bout.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h -cf-i386lynx.lo: cf-i386lynx.c coff-i386.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ - coffcode.h coffswap.h -cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/coff/m68k.h \ +armnetbsd.lo: armnetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + genlink.h $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def libaout.h +cf-i386lynx.lo: cf-i386lynx.c $(INCDIR)/filenames.h \ + coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h +cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/sparc.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-a29k.lo: coff-a29k.c $(INCDIR)/filenames.h $(INCDIR)/coff/a29k.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/coff/sparc.h \ +coff-apollo.lo: coff-apollo.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/apollo.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/coff/arm.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-a29k.lo: coff-a29k.c $(INCDIR)/coff/a29k.h $(INCDIR)/coff/internal.h \ +coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h coff-m68k.c \ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-apollo.lo: coff-apollo.c $(INCDIR)/coff/apollo.h \ +coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h \ + libcoff.h coffcode.h coffswap.h +coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/h8500.h $(INCDIR)/coff/internal.h libcoff.h \ + coffcode.h coffswap.h +coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/coff/i386.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-arm.lo: coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-aux.lo: coff-aux.c $(INCDIR)/coff/aux-coff.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h \ +coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/coff/i860.h \ + $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-h8300.lo: coff-h8300.c $(INCDIR)/bfdlink.h genlink.h \ - $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h \ +coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/coff/i960.h \ + $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-h8500.lo: coff-h8500.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/h8500.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-i386.lo: coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-i860.lo: coff-i860.c $(INCDIR)/coff/i860.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/coff/i386.h \ +coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m68k.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-i960.lo: coff-i960.c $(INCDIR)/coff/i960.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-m68k.lo: coff-m68k.c $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-m88k.lo: coff-m88k.c $(INCDIR)/coff/m88k.h $(INCDIR)/coff/internal.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h -coff-mips.lo: coff-mips.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ - $(INCDIR)/coff/mips.h libcoff.h libecoff.h coffswap.h \ - ecoffswap.h -coff-pmac.lo: coff-pmac.c coff-rs6000.c $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \ +coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m88k.h \ + $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-rs6000.lo: coff-rs6000.c $(INCDIR)/coff/internal.h \ +coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h libcoff.h \ + libecoff.h coffswap.h ecoffswap.h +coff-pmac.lo: coff-pmac.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \ + xcoff-target.h coffcode.h coffswap.h +coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h libcoff.h \ + $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h +coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h libcoff.h \ coffcode.h coffswap.h -coff-sh.lo: coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-sparc.lo: coff-sparc.c $(INCDIR)/coff/sparc.h \ +coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/coff/sparc.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \ +coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \ go32stub.h -coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ +coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/tic30.h $(INCDIR)/coff/internal.h libcoff.h \ coffcode.h coffswap.h -coff-tic30.lo: coff-tic30.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic30.h \ +coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic80.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/coff/m68k.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ +coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \ + $(INCDIR)/coff/tic80.h $(INCDIR)/coff/internal.h libcoff.h \ coffcode.h coffswap.h -coff-we32k.lo: coff-we32k.c $(INCDIR)/coff/we32k.h \ +coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h coffcode.h coffswap.h +coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/coff/we32k.h \ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \ coffcode.h coffswap.h -coff-w65.lo: coff-w65.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/w65.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -coff-z8k.lo: coff-z8k.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/z8k.h \ - $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h -cofflink.lo: cofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ - libcoff.h -dwarf1.lo: dwarf1.c $(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)/libiberty.h elf-bfd.h \ +coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/w65.h $(INCDIR)/coff/internal.h libcoff.h \ + coffcode.h coffswap.h +coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/z8k.h $(INCDIR)/coff/internal.h libcoff.h \ + coffcode.h coffswap.h +cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/internal.h libcoff.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 \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h +ecofflink.lo: ecofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/objalloc.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/ecoff.h libcoff.h libecoff.h +efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \ + coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.h +elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h +elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.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)/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 $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ - libcoff.h libecoff.h -ecofflink.lo: ecofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/objalloc.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ - libcoff.h libecoff.h -elf.lo: elf.c $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h -elf32-arc.lo: elf32-arc.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm-oabi.h \ - $(INCDIR)/elf/reloc-macros.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ elf32-arm.h elf32-target.h elfarm-nabi.lo: elfarm-nabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ - elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-arm.h \ - elf32-target.h -elf32-avr.lo: elf32-avr.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-d10v.lo: elf32-d10v.c elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + elf32-arm.h elf32-target.h +elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-d30v.lo: elf32-d30v.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ +elf32-cris.lo: elf32-cris.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-fr30.lo: elf32-fr30.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-gen.lo: elf32-gen.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ +elf32-d10v.lo: elf32-d10v.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/d10v.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-i370.lo: elf32-i370.c $(INCDIR)/bfdlink.h elf-bfd.h \ +elf32-d30v.lo: elf32-d30v.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/i370.h elf32-target.h -elf32-i386.lo: elf32-i386.c $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-i860.lo: elf32-i860.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/fr30.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-i960.lo: elf32-i960.c 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-m32r.lo: elf32-m32r.c 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 elf32-target.h -elf32-m68k.lo: elf32-m68k.c $(INCDIR)/bfdlink.h elf-bfd.h \ +elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-m88k.lo: elf32-m88k.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/bfdlink.h elf32-target.h +elf32-hppa.lo: elf32-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 elf32-hppa.h elf-hppa.h elf32-target.h +elf32-i370.lo: elf32-i370.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/i370.h elf32-target.h +elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf-m10200.lo: elf-m10200.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ +elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf-m10300.lo: elf-m10300.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/reloc-macros.h \ +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-mcore.lo: elf32-mcore.c $(INCDIR)/bfdlink.h elf-bfd.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)/elf/mcore.h $(INCDIR)/elf/reloc-macros.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 \ elf32-target.h -elf32-mips.lo: elf32-mips.c $(INCDIR)/bfdlink.h genlink.h \ +elf32-m68k.lo: elf32-m68k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-pj.lo: elf32-pj.c $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \ +elf32-m68hc11.lo: elf32-m68hc11.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-m68hc12.lo: elf32-m68hc12.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/m68hc11.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-m88k.lo: elf32-m88k.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/bfdlink.h elf32-target.h +elf-m10200.lo: elf-m10200.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32-sparc.lo: elf32-sparc.c $(INCDIR)/bfdlink.h elf-bfd.h \ + $(INCDIR)/bfdlink.h elf32-target.h +elf-m10300.lo: elf-m10300.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h -elf32-v850.lo: elf32-v850.c $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h elf32-target.h -elf32.lo: elf32.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - elfcore.h elflink.h -elflink.lo: elflink.c $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h -epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c coff-arm.c \ - $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ - libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ - libpei.h -hp300bsd.lo: hp300bsd.c libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mcore.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \ + elf32-target.h +elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32-sh-lin.lo: elf32-sh-lin.c elf32-sh.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \ + $(INCDIR)/elf/reloc-macros.h elf32-target.h +elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \ + $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \ + elf32-target.h +elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h +elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h elfcore.h elflink.h +elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h +epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \ + coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.h +epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c $(INCDIR)/filenames.h \ + coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.h +hp300bsd.lo: hp300bsd.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \ - aoutx.h $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -som.lo: som.c -i386aout.lo: i386aout.c $(INCDIR)/aout/aout64.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386bsd.lo: i386bsd.c libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/aout/ar.h aout-target.h +som.lo: som.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h +i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \ - $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/aout/ar.h aout-target.h +i386freebsd.lo: i386freebsd.c freebsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +i386linux.lo: i386linux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ - aout-target.h -i386freebsd.lo: i386freebsd.c freebsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386linux.lo: i386linux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h -i386lynx.lo: i386lynx.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386msdos.lo: i386msdos.c libaout.h $(INCDIR)/bfdlink.h -i386netbsd.lo: i386netbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -i386mach3.lo: i386mach3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h -i386os9k.lo: i386os9k.c $(INCDIR)/bfdlink.h libaout.h \ - $(INCDIR)/os9k.h -ieee.lo: ieee.c $(INCDIR)/ieee.h libieee.h -m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h libaout.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h +i386lynx.lo: i386lynx.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +i386msdos.lo: i386msdos.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h +i386netbsd.lo: i386netbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h +i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + libaout.h $(INCDIR)/os9k.h +ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/ieee.h \ + libieee.h +m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +m68klinux.lo: m68klinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h +m68klynx.lo: m68klynx.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +m68knetbsd.lo: m68knetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +m88kmach3.lo: m88kmach3.c $(INCDIR)/filenames.h libaout.h \ $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -m68klinux.lo: m68klinux.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h -m68klynx.lo: m68klynx.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -m68knetbsd.lo: m68knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -m88kmach3.lo: m88kmach3.c libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -mipsbsd.lo: mipsbsd.c libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -newsos3.lo: newsos3.c $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h libaout.h \ - $(INCDIR)/bfdlink.h aout-target.h -nlm.lo: nlm.c libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h -nlm32-i386.lo: nlm32-i386.c $(INCDIR)/nlm/i386-ext.h \ +mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +newsos3.lo: newsos3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h +nlm.lo: nlm.c $(INCDIR)/filenames.h libnlm.h $(INCDIR)/nlm/common.h \ + $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h +nlm32-i386.lo: nlm32-i386.c $(INCDIR)/filenames.h $(INCDIR)/nlm/i386-ext.h \ libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h -nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/nlm/sparc32-ext.h \ +nlm32-sparc.lo: nlm32-sparc.c $(INCDIR)/filenames.h \ + $(INCDIR)/nlm/sparc32-ext.h libnlm.h $(INCDIR)/nlm/common.h \ + $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ + nlm-target.h +nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/nlm/ppc-ext.h \ libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h -nlm32-ppc.lo: nlm32-ppc.c $(INCDIR)/nlm/ppc-ext.h libnlm.h \ - $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \ - nlmswap.h nlm-target.h -nlm32.lo: nlm32.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \ - $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h -ns32knetbsd.lo: ns32knetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -oasys.lo: oasys.c $(INCDIR)/oasys.h liboasys.h -pc532-mach.lo: pc532-mach.c libaout.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/aout/aout64.h aout-target.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -pe-arm.lo: pe-arm.c coff-arm.c $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-arm.lo: pei-arm.c coff-arm.c $(INCDIR)/coff/arm.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-i386.lo: pe-i386.c coff-i386.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-i386.lo: pei-i386.c coff-i386.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-mcore.lo: pe-mcore.c coff-mcore.c $(INCDIR)/coff/mcore.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-mcore.lo: pei-mcore.c coff-mcore.c $(INCDIR)/coff/mcore.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-ppc.lo: pe-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pei-ppc.lo: pei-ppc.c coff-ppc.c $(INCDIR)/coff/powerpc.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h -pe-sh.lo: pe-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - coffcode.h peicode.h libpei.h -pei-sh.lo: pei-sh.c coff-sh.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \ - coffcode.h peicode.h libpei.h -pe-mips.lo: pe-mips.c $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h \ +nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \ + $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h +ns32knetbsd.lo: ns32knetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/oasys.h \ + liboasys.h +pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \ + $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pei-arm.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \ + $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pe-i386.lo: pe-i386.c $(INCDIR)/filenames.h coff-i386.c \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pei-i386.lo: pei-i386.c $(INCDIR)/filenames.h coff-i386.c \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pe-mcore.lo: pe-mcore.c $(INCDIR)/filenames.h coff-mcore.c \ + $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \ + $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \ + libpei.h +pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \ + $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.h +pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \ + $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ peicode.h libpei.h -pei-mips.lo: pei-mips.c pe-mips.c $(INCDIR)/coff/mipspe.h \ +pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \ + libcoff.h coffcode.h peicode.h libpei.h +pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \ + $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \ + libpei.h +pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/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)/coff/internal.h $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h -ppcboot.lo: ppcboot.c -reloc16.lo: reloc16.c $(INCDIR)/bfdlink.h genlink.h \ - $(INCDIR)/coff/internal.h libcoff.h -riscix.lo: riscix.c libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ - aout-target.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -sparclinux.lo: sparclinux.c $(INCDIR)/aout/aout64.h \ +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 +riscix.lo: riscix.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +sparclinux.lo: sparclinux.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ libaout.h $(INCDIR)/bfdlink.h aout-target.h -sparclynx.lo: sparclynx.c $(INCDIR)/aout/sun4.h libaout.h \ - $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -sparcnetbsd.lo: sparcnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \ - $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h -vaxnetbsd.lo: vaxnetbsd.c netbsd.h libaout.h $(INCDIR)/bfdlink.h \ - aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h -versados.lo: versados.c $(INCDIR)/libiberty.h -vms.lo: vms.c $(INCDIR)/bfdlink.h vms.h -vms-gsd.lo: vms-gsd.c $(INCDIR)/bfdlink.h vms.h -vms-hdr.lo: vms-hdr.c $(INCDIR)/bfdlink.h vms.h -vms-misc.lo: vms-misc.c $(INCDIR)/bfdlink.h vms.h -vms-tir.lo: vms-tir.c $(INCDIR)/bfdlink.h vms.h -xcofflink.lo: xcofflink.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ - libcoff.h -aout64.lo: aout64.c aoutx.h $(INCDIR)/bfdlink.h libaout.h \ - $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ - $(INCDIR)/aout/ar.h -coff-alpha.lo: coff-alpha.c $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ - $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ - libecoff.h coffswap.h ecoffswap.h -demo64.lo: demo64.c aoutf1.h $(INCDIR)/aout/sun4.h \ +sparclynx.lo: sparclynx.c $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \ libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ aout-target.h -elf64-alpha.lo: elf64-alpha.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ +sparcnetbsd.lo: sparcnetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +sunos.lo: sunos.c $(INCDIR)/bfdlink.h libaout.h aoutf1.h \ + $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \ + aout-target.h +vaxnetbsd.lo: vaxnetbsd.c netbsd.h $(INCDIR)/filenames.h \ + libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +versados.lo: versados.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h +vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + vms.h +xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/coff/internal.h libcoff.h +aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \ + $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h +coff-alpha.lo: coff-alpha.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \ - libcoff.h libecoff.h ecoffswap.h elf64-target.h -elf64-gen.lo: elf64-gen.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ - elf64-target.h -elf64-mips.lo: elf64-mips.c $(INCDIR)/aout/ar.h $(INCDIR)/bfdlink.h \ - genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h ecoffswap.h \ - elf64-target.h -elf64-sparc.lo: elf64-sparc.c elf-bfd.h $(INCDIR)/elf/common.h \ - $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \ + libcoff.h libecoff.h coffswap.h ecoffswap.h +coff64-rs6000.lo: coff64-rs6000.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6k64.h libcoff.h \ + $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h +demo64.lo: demo64.c aoutf1.h $(INCDIR)/filenames.h \ + $(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/aout/ar.h aout-target.h +efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \ + coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \ + peicode.h libpei.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 \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h libcoff.h \ + libecoff.h ecoffswap.h elf64-target.h +elf64-hppa.lo: elf64-hppa.c $(INCDIR)/filenames.h 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-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 +elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \ + $(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \ + $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h \ + $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \ + ecoffswap.h elf64-target.h +elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \ $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \ elf64-target.h -elf64.lo: elf64.c elfcode.h $(INCDIR)/bfdlink.h elf-bfd.h \ - $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ - elfcore.h elflink.h -nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/nlm/alpha-ext.h \ - libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \ - $(INCDIR)/nlm/external.h nlmswap.h nlm-target.h -nlm64.lo: nlm64.c nlmcode.h libnlm.h $(INCDIR)/nlm/common.h \ - $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h -aix386-core.lo: aix386-core.c $(INCDIR)/coff/i386.h \ - $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h -hpux-core.lo: hpux-core.c -irix-core.lo: irix-core.c -lynx-core.lo: lynx-core.c -osf-core.lo: osf-core.c -sco5-core.lo: sco5-core.c libaout.h $(INCDIR)/bfdlink.h -trad-core.lo: trad-core.c libaout.h $(INCDIR)/bfdlink.h -cisco-core.lo: cisco-core.c +elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ + elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h elfcore.h elflink.h +nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \ + $(INCDIR)/nlm/alpha-ext.h libnlm.h $(INCDIR)/nlm/common.h \ + $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \ + nlm-target.h +nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \ + $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h +aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \ + $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \ + $(INCDIR)/bfdlink.h +hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h +irix-core.lo: irix-core.c $(INCDIR)/filenames.h +lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h +osf-core.lo: osf-core.c $(INCDIR)/filenames.h +sco5-core.lo: sco5-core.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h +trad-core.lo: trad-core.c $(INCDIR)/filenames.h libaout.h \ + $(INCDIR)/bfdlink.h +cisco-core.lo: cisco-core.c $(INCDIR)/filenames.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/README b/contrib/binutils/bfd/README index 51ce133..992c285 100644 --- a/contrib/binutils/bfd/README +++ b/contrib/binutils/bfd/README @@ -34,7 +34,7 @@ BFD supports the following configure options: Use mmap when accessing files. This is faster on some hosts, but slower on others. It may not work on all hosts. -Report bugs with BFD to bug-gnu-utils@gnu.org. +Report bugs with BFD to bug-binutils@gnu.org. Patches are encouraged. When sending patches, always send the output of diff -u or diff -c from the original file to the new file. Do not diff --git a/contrib/binutils/bfd/acinclude.m4 b/contrib/binutils/bfd/acinclude.m4 index cac26e8..5391294 100644 --- a/contrib/binutils/bfd/acinclude.m4 +++ b/contrib/binutils/bfd/acinclude.m4 @@ -74,7 +74,9 @@ dnl Check for existence of a type $1 in sys/procfs.h AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE, [AC_MSG_CHECKING([for $1 in sys/procfs.h]) AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1, - [AC_TRY_COMPILE([#include ], + [AC_TRY_COMPILE([ +#define _SYSCALL32 +#include ], [$1 avar], bfd_cv_have_sys_procfs_type_$1=yes, bfd_cv_have_sys_procfs_type_$1=no @@ -92,7 +94,9 @@ dnl Check for existence of member $2 in type $1 in sys/procfs.h AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER, [AC_MSG_CHECKING([for $1.$2 in sys/procfs.h]) AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2, - [AC_TRY_COMPILE([#include ], + [AC_TRY_COMPILE([ +#define _SYSCALL32 +#include ], [$1 avar; void* aref = (void*) &avar.$2], bfd_cv_have_sys_procfs_type_member_$1_$2=yes, bfd_cv_have_sys_procfs_type_member_$1_$2=no @@ -104,4 +108,18 @@ AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER, AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2) ]) +sinclude(../libtool.m4) +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_DEFUN([AM_DISABLE_SHARED],) +AC_SUBST(LIBTOOL) +]) +sinclude(../gettext.m4) +ifelse(yes,no,[ +AC_DEFUN([CY_WITH_NLS],) +AC_SUBST(INTLLIBS) +]) diff --git a/contrib/binutils/bfd/aclocal.m4 b/contrib/binutils/bfd/aclocal.m4 index ca9d432..45cc339 100644 --- a/contrib/binutils/bfd/aclocal.m4 +++ b/contrib/binutils/bfd/aclocal.m4 @@ -86,7 +86,9 @@ dnl Check for existence of a type $1 in sys/procfs.h AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE, [AC_MSG_CHECKING([for $1 in sys/procfs.h]) AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1, - [AC_TRY_COMPILE([#include ], + [AC_TRY_COMPILE([ +#define _SYSCALL32 +#include ], [$1 avar], bfd_cv_have_sys_procfs_type_$1=yes, bfd_cv_have_sys_procfs_type_$1=no @@ -104,7 +106,9 @@ dnl Check for existence of member $2 in type $1 in sys/procfs.h AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER, [AC_MSG_CHECKING([for $1.$2 in sys/procfs.h]) AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2, - [AC_TRY_COMPILE([#include ], + [AC_TRY_COMPILE([ +#define _SYSCALL32 +#include ], [$1 avar; void* aref = (void*) &avar.$2], bfd_cv_have_sys_procfs_type_member_$1_$2=yes, bfd_cv_have_sys_procfs_type_member_$1_$2=no @@ -116,7 +120,39 @@ AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER, AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2) ]) +sinclude(../libtool.m4) +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_DEFUN([AM_DISABLE_SHARED],) +AC_SUBST(LIBTOOL) +]) + +sinclude(../gettext.m4) +ifelse(yes,no,[ +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. @@ -210,415 +246,6 @@ else fi AC_SUBST($1)]) - -# serial 40 AC_PROG_LIBTOOL -AC_DEFUN(AC_PROG_LIBTOOL, -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN(AC_LIBTOOL_SETUP, -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_RANLIB])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -dnl - -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$lt_target" in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_SHARED, [dnl -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_STATIC, [dnl -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN(AC_PROG_LD, -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -]) - -AC_DEFUN(AC_PROG_LD_GNU, -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -]) - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(AC_PROG_NM, -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(ac_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi]) -NM="$ac_cv_path_NM" -AC_MSG_RESULT([$NM]) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN(AC_CHECK_LIBM, -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case "$lt_target" in -*-*-beos* | *-*-cygwin*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library, adds --enable-ltdl-convenience to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case "$enable_ltdl_convenience" in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library, and adds --enable-ltdl-install to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -dnl old names -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl - # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, @@ -675,348 +302,3 @@ else $1_FALSE= fi]) -# This file is derived from `gettext.m4'. The difference is that the -# included macros assume Cygnus-style source and build trees. - -# Macro to add for using GNU gettext. -# Ulrich Drepper , 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 3 - -AC_DEFUN(CY_WITH_NLS, - [AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) - - USE_INCLUDED_LIBINTL=no - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested]) - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH(included-gettext, - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If gettext or catgets are available (in this order) we - dnl use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include ], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) - - if test "$gt_cv_func_gettext_libc" != "yes"; then - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_TRY_LINK([], [return (int) gettext ("")], - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)])]) - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT, 1, - [Define as 1 if you have gettext and don't want to use GNU gettext.]) - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - fi - ]) - - dnl In the standard gettext, we would now check for catgets. - dnl However, we never want to use catgets for our releases. - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. - dnl Fall back on GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - INTLOBJS="\$(GETTOBJS)" - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_SUBST(MSGFMT) - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.gmo - INSTOBJEXT=.mo - DATADIRNAME=share - INTLDEPS='$(top_builddir)/../intl/libintl.a' - INTLLIBS=$INTLDEPS - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext programs is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - else - DATADIRNAME=share - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - # If this is used in GNU gettext we have to set USE_NLS to `yes' - # because some of the sources are only built for this goal. - if test "$PACKAGE" = gettext; then - USE_NLS=yes - USE_INCLUDED_LIBINTL=yes - fi - - dnl These rules are solely for the distribution goal. While doing this - dnl we only have to keep exactly one list of the available catalogs - dnl in configure.in. - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done - - dnl Make all variables we use known to autoconf. - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) - AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) - AC_SUBST(INTLDEPS) - AC_SUBST(INTLLIBS) - AC_SUBST(INTLOBJS) - AC_SUBST(POFILES) - AC_SUBST(POSUB) - ]) - -AC_DEFUN(CY_GNU_GETTEXT, - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_OFF_T])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ -unistd.h values.h sys/param.h]) - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ -__argz_count __argz_stringify __argz_next]) - - if test "${ac_cv_func_stpcpy+set}" != "set"; then - AC_CHECK_FUNCS(stpcpy) - fi - if test "${ac_cv_func_stpcpy}" = "yes"; then - AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function]) - fi - - AM_LC_MESSAGES - CY_WITH_NLS - - if test "x$CATOBJEXT" != "x"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - AC_MSG_CHECKING(for catalogs to be installed) - NEW_LINGUAS= - for lang in ${LINGUAS=$ALL_LINGUAS}; do - case "$ALL_LINGUAS" in - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac - done - LINGUAS=$NEW_LINGUAS - AC_MSG_RESULT($LINGUAS) - fi - - dnl Construct list of names of catalog files to be constructed. - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - dnl The reference to in the installed file - dnl must be resolved because we cannot expect the users of this - dnl to define HAVE_LOCALE_H. - if test $ac_cv_header_locale_h = yes; then - INCLUDE_LOCALE_H="#include " - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header . Take care yourself. */" - fi - AC_SUBST(INCLUDE_LOCALE_H) - - dnl Determine which catalog format we have (if any is needed) - dnl For now we know about two different formats: - dnl Linux libc-5 and the normal X/Open format - if test -f $srcdir/po2tbl.sed.in; then - if test "$CATOBJEXT" = ".cat"; then - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) - - dnl Transform the SED scripts while copying because some dumb SEDs - dnl cannot handle comments. - sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed - fi - dnl po2tbl.sed is always needed. - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ - $srcdir/po2tbl.sed.in > po2tbl.sed - fi - - dnl In the intl/Makefile.in we have a special dependency which makes - dnl only sense for gettext. We comment this out for non-gettext - dnl packages. - if test "$PACKAGE" = "gettext"; then - GT_NO="#NO#" - GT_YES= - else - GT_NO= - GT_YES="#YES#" - fi - AC_SUBST(GT_NO) - AC_SUBST(GT_YES) - - MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" - AC_SUBST(MKINSTALLDIRS) - - dnl *** For now the libtool support in intl/Makefile is not for real. - l= - AC_SUBST(l) - - dnl Generate list of files to be processed by xgettext which will - dnl be included in po/Makefile. But only do this if the po directory - dnl exists in srcdir. - if test -d $srcdir/po; then - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - fi - ]) - -# Search path for a program which passes the given test. -# Ulrich Drepper , 1996. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AM_PATH_PROG_WITH_TEST, -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - /*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in ifelse([$5], , $PATH, [$5]); do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test -n "[$]$1"; then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -# Check whether LC_MESSAGES is available in . -# Ulrich Drepper , 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -AC_DEFUN(AM_LC_MESSAGES, - [if test $ac_cv_header_locale_h = yes; then - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [return LC_MESSAGES], - am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) - if test $am_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your locale.h file contains LC_MESSAGES.]) - fi - fi]) - diff --git a/contrib/binutils/bfd/aout-arm.c b/contrib/binutils/bfd/aout-arm.c index 7365f9d..182c1c6 100644 --- a/contrib/binutils/bfd/aout-arm.c +++ b/contrib/binutils/bfd/aout-arm.c @@ -1,7 +1,7 @@ /* BFD back-end for raw ARM a.out binaries. Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) - + This file is part of BFD, the Binary File Descriptor library. This program is free software; you can redistribute it and/or modify @@ -18,7 +18,6 @@ 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 N_TXTADDR(x) \ ((N_MAGIC(x) == NMAGIC) ? 0x8000 : \ (N_MAGIC(x) != ZMAGIC) ? 0 : \ @@ -44,7 +43,7 @@ reloc_howto_type *MYARM(bfd_reloc_type_lookup) PARAMS((bfd *, bfd_reloc_code_real_type)); static boolean MYARM(write_object_contents) PARAMS((bfd *)); -/* Avoid multiple defininitions from aoutx if supporting standarad a.out +/* Avoid multiple defininitions from aoutx if supporting standarad a.out as well as our own. */ #define NAME(x,y) CAT3(aoutarm,_32_,y) @@ -63,7 +62,7 @@ MY(fix_pcrel_26) PARAMS ((bfd *, arelent *, asymbol *, PTR, static void MY(swap_std_reloc_in) PARAMS ((bfd *, struct reloc_std_external *, arelent *, asymbol **, bfd_size_type)); -void MY(swap_std_reloc_out) PARAMS ((bfd *, arelent *, +void MY(swap_std_reloc_out) PARAMS ((bfd *, arelent *, struct reloc_std_external *)); reloc_howto_type MY(howto_table)[] = @@ -98,7 +97,7 @@ reloc_howto_type MY(howto_table)[] = #define RELOC_ARM_BITS_NEG_LITTLE ((unsigned int) 0x10) reloc_howto_type * -MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel) +MY(reloc_howto) (abfd, rel, r_index, r_extern, r_pcrel) bfd *abfd; struct reloc_std_external *rel; int *r_index; @@ -139,12 +138,12 @@ MY(reloc_howto)(abfd, rel, r_index, r_extern, r_pcrel) return MY(howto_table) + index; } - + #define MY_reloc_howto(BFD, REL, IN, EX, PC) \ MY(reloc_howto) (BFD, REL, &IN, &EX, &PC) void -MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc) +MY(put_reloc) (abfd, r_extern, r_index, value, howto, reloc) bfd *abfd; int r_extern; int r_index; @@ -159,7 +158,7 @@ MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc) PUT_WORD (abfd, value, reloc->r_address); r_length = howto->size ; /* Size as a power of two */ - /* Special case for branch relocations. */ + /* Special case for branch relocations. */ if (howto->type == 3 || howto->type == 7) r_length = 3; @@ -188,12 +187,12 @@ MY(put_reloc)(abfd, r_extern, r_index, value, howto, reloc) | (r_length << RELOC_STD_BITS_LENGTH_SH_LITTLE)); } } - + #define MY_put_reloc(BFD, EXT, IDX, VAL, HOWTO, RELOC) \ - MY(put_reloc)(BFD, EXT, IDX, VAL, HOWTO, RELOC) + MY(put_reloc) (BFD, EXT, IDX, VAL, HOWTO, RELOC) void -MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr) +MY(relocatable_reloc) (howto, abfd, reloc, amount, r_addr) reloc_howto_type *howto; bfd *abfd; struct reloc_std_external *reloc; @@ -202,11 +201,11 @@ MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr) { if (howto->type == 3) { - if (reloc->r_type[0] + if (reloc->r_type[0] & (bfd_header_big_endian (abfd) ? RELOC_STD_BITS_EXTERN_BIG : RELOC_STD_BITS_EXTERN_LITTLE)) { - /* The reloc is still external, so don't modify anything. */ + /* The reloc is still external, so don't modify anything. */ *amount = 0; } else @@ -225,7 +224,7 @@ MY(relocatable_reloc)(howto, abfd, reloc, amount, r_addr) } #define MY_relocatable_reloc(HOW, BFD, REL, AMOUNT, ADDR) \ - MY(relocatable_reloc)(HOW, BFD, REL, &(AMOUNT), ADDR) + MY(relocatable_reloc) (HOW, BFD, REL, &(AMOUNT), ADDR) static bfd_reloc_status_type MY(fix_pcrel_26_done) (abfd, reloc_entry, symbol, data, input_section, @@ -257,7 +256,7 @@ MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section, bfd_size_type addr = reloc_entry->address; long target = bfd_get_32 (abfd, (bfd_byte *) data + addr); bfd_reloc_status_type flag = bfd_reloc_ok; - + /* If this is an undefined symbol, return error */ if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0) @@ -297,12 +296,12 @@ MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section, /* Now the ARM magic... Change the reloc type so that it is marked as done. Strictly this is only necessary if we are doing a partial relocation. */ reloc_entry->howto = &MY(howto_table)[7]; - + return flag; } reloc_howto_type * -MY(bfd_reloc_type_lookup)(abfd,code) +MY(bfd_reloc_type_lookup) (abfd,code) bfd *abfd; bfd_reloc_code_real_type code; { @@ -392,11 +391,10 @@ MY_swap_std_reloc_out (abfd, g, natptr) r_pcrel = 0; } else if (g->howto->type == 7) - { + { r_length = 3; r_pcrel = 1; } - #if 0 /* For a standard reloc, the addend is in the object file. */ @@ -506,7 +504,7 @@ const bfd_target aout_arm_little_vec = BFD_JUMP_TABLE_DYNAMIC (MY), & aout_arm_big_vec, - + (PTR) MY_backend_data, }; @@ -547,6 +545,6 @@ const bfd_target aout_arm_big_vec = BFD_JUMP_TABLE_DYNAMIC (MY), & aout_arm_little_vec, - + (PTR) MY_backend_data, }; diff --git a/contrib/binutils/bfd/aout-encap.c b/contrib/binutils/bfd/aout-encap.c index c25f903..5f8a511 100644 --- a/contrib/binutils/bfd/aout-encap.c +++ b/contrib/binutils/bfd/aout-encap.c @@ -53,12 +53,12 @@ encap_object_p (abfd) bfd_set_error (bfd_error_wrong_format); return 0; } - + coff_magic = bfd_h_get_16 (abfd, magicbuf); if (coff_magic != COFF_MAGIC) return 0; /* Not an encap coff file */ - __header_offset_temp==COFF_MAGIC ? sizeof(struct coffheader) : 0) + __header_offset_temp==COFF_MAGIC ? sizeof (struct coffheader) : 0) (fseek ((f), HEADER_OFFSET((f)), 1)) magic = bfd_h_get_32 (abfd, magicbuf); @@ -72,7 +72,7 @@ encap_object_p (abfd) bfd_set_error (bfd_error_wrong_format); return 0; } - NAME(aout,swap_exec_header_in)(abfd, &exec_bytes, &exec); + NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec); return aout_32_some_aout_object_p (abfd, &exec, encap_realcallback); } @@ -83,9 +83,9 @@ encap_real_callback (abfd) bfd *abfd; { struct internal_exec *execp = exec_hdr (abfd); - - MY(callback)(abfd, execp); - + + MY(callback) (abfd, execp); + /* If we have a coff header, it can give us better values for text_start and exec_data_start. This is particularly useful for remote debugging of embedded systems. */ diff --git a/contrib/binutils/bfd/aout-target.h b/contrib/binutils/bfd/aout-target.h index 046417b..1902cdf 100644 --- a/contrib/binutils/bfd/aout-target.h +++ b/contrib/binutils/bfd/aout-target.h @@ -61,7 +61,7 @@ MY(callback) (abfd) bfd_vma adjust; adjust = execp->a_entry - obj_textsec (abfd)->vma; - /* Adjust only by whole pages. */ + /* Adjust only by whole pages. */ adjust &= ~(TARGET_PAGE_SIZE - 1); obj_textsec (abfd)->vma += adjust; obj_datasec (abfd)->vma += adjust; @@ -84,7 +84,7 @@ MY(callback) (abfd) /* The file offsets of the string table and symbol table. */ obj_sym_filepos (abfd) = N_SYMOFF (*execp); obj_str_filepos (abfd) = N_STROFF (*execp); - + /* Determine the architecture and machine type of the object file. */ #ifdef SET_ARCH_MACH SET_ARCH_MACH(abfd, *execp); @@ -164,7 +164,7 @@ MY(object_p) (abfd) if (!(MACHTYPE_OK (N_MACHTYPE (exec)))) return 0; #endif - NAME(aout,swap_exec_header_in)(abfd, &exec_bytes, &exec); + NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec); #ifdef SWAP_MAGIC /* swap_exec_header_in read in a_info with the wrong byte order */ @@ -178,7 +178,7 @@ MY(object_p) (abfd) * means that it isn't obvious if EXEC_P should be set. * All of the following must be true for an executable: * There must be no relocations, the bfd can be neither an - * archive nor an archive element, and the file must be executable. */ + * archive nor an archive element, and the file must be executable. */ if (exec.a_trsize + exec.a_drsize == 0 && bfd_get_format(abfd) == bfd_object && abfd->my_archive == NULL) @@ -197,7 +197,6 @@ MY(object_p) (abfd) #define MY_object_p MY(object_p) #endif - #ifndef MY_mkobject static boolean MY(mkobject) PARAMS ((bfd *)); @@ -206,7 +205,7 @@ static boolean MY(mkobject) (abfd) bfd *abfd; { - if (NAME(aout,mkobject)(abfd) == false) + if (NAME(aout,mkobject) (abfd) == false) return false; #if 0 /* Sizes get set in set_sizes callback, later, after we know the architecture and machine. */ @@ -230,7 +229,6 @@ MY(mkobject) (abfd) static boolean MY_bfd_copy_private_section_data PARAMS ((bfd *, asection *, bfd *, asection *)); -/*ARGSUSED*/ static boolean MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec) bfd *ibfd; @@ -530,7 +528,6 @@ MY_bfd_final_link (abfd, info) #define MY_bfd_link_split_section _bfd_generic_link_split_section #endif - #ifndef MY_bfd_copy_private_bfd_data #define MY_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data #endif @@ -581,7 +578,7 @@ MY_bfd_final_link (abfd, info) #endif /* Aout symbols normally have leading underscores */ -#ifndef MY_symbol_leading_char +#ifndef MY_symbol_leading_char #define MY_symbol_leading_char '_' #endif @@ -643,7 +640,7 @@ const bfd_target MY(vec) = /* Alternative_target */ NULL, - + (PTR) MY_backend_data }; #endif /* MY_BFD_TARGET */ diff --git a/contrib/binutils/bfd/aout-tic30.c b/contrib/binutils/bfd/aout-tic30.c index 686c159..f0f4d3d 100644 --- a/contrib/binutils/bfd/aout-tic30.c +++ b/contrib/binutils/bfd/aout-tic30.c @@ -128,7 +128,7 @@ static CONST struct aout_backend_data tic30_aout_backend_data = /* This table lists the relocation types for the TMS320C30. There are only a few relocations required, and all must be divided by 4 (>> 2) to get the 32-bit addresses in the format the TMS320C30 likes - it. */ + it. */ reloc_howto_type tic30_aout_howto_table[] = { EMPTY_HOWTO (-1), @@ -210,7 +210,7 @@ tic30_aout_reloc_howto (abfd, relocs, r_index, r_extern, r_pcrel) requires that any relocations for the data section should point to the end of the aligned text section, plus an offset. By default, this does not happen, therefore this function takes care of - that. */ + that. */ static bfd_reloc_status_type tic30_aout_fix_16 (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message) @@ -224,11 +224,11 @@ tic30_aout_fix_16 (abfd, reloc_entry, symbol, data, input_section, output_bfd, e { bfd_vma relocation; - /* Make sure that the symbol's section is defined. */ + /* Make sure that the symbol's section is defined. */ if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0) return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined; /* Get the size of the input section and turn it into the TMS320C30 - 32-bit address format. */ + 32-bit address format. */ relocation = (symbol->section->vma >> 2); relocation += bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address); bfd_put_16 (abfd, relocation, (bfd_byte *) data + reloc_entry->address); @@ -236,7 +236,7 @@ tic30_aout_fix_16 (abfd, reloc_entry, symbol, data, input_section, output_bfd, e } /* This function does the same thing as tic30_aout_fix_16 except for 32 - bit relocations. */ + bit relocations. */ static bfd_reloc_status_type tic30_aout_fix_32 (abfd, reloc_entry, symbol, data, input_section, @@ -251,11 +251,11 @@ tic30_aout_fix_32 (abfd, reloc_entry, symbol, data, input_section, { bfd_vma relocation; - /* Make sure that the symbol's section is defined. */ + /* Make sure that the symbol's section is defined. */ if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0) return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined; /* Get the size of the input section and turn it into the TMS320C30 - 32-bit address format. */ + 32-bit address format. */ relocation = (symbol->section->vma >> 2); relocation += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); bfd_put_32 (abfd, relocation, (bfd_byte *) data + reloc_entry->address); @@ -267,7 +267,7 @@ tic30_aout_fix_32 (abfd, reloc_entry, symbol, data, input_section, useless for a relocation, so we just get the offset value and place a version of this within the object code. tic30_aout_final_link_relocate will then calculate the required - relocation to add on to the value in the object code. */ + relocation to add on to the value in the object code. */ static bfd_reloc_status_type tic30_aout_fix_pcrel_16 (abfd, reloc_entry, symbol, data, input_section, @@ -285,7 +285,7 @@ tic30_aout_fix_pcrel_16 (abfd, reloc_entry, symbol, data, input_section, /* The byte before the location of the fix contains bits 23-16 of the pcrel instruction. Bit 21 is set for a delayed instruction - which requires on offset of 3 instead of 1. */ + which requires on offset of 3 instead of 1. */ if (offset_data & 0x20) relocation -= 3; else @@ -295,14 +295,16 @@ tic30_aout_fix_pcrel_16 (abfd, reloc_entry, symbol, data, input_section, } /* These macros will get 24-bit values from the bfd definition. - Big-endian only. */ -#define bfd_getb_24(BFD,ADDR) (bfd_get_8(BFD,ADDR) << 16) | \ - (bfd_get_8(BFD,ADDR+1) << 8) | \ - (bfd_get_8(BFD,ADDR+2)) + Big-endian only. */ +#define bfd_getb_24(BFD,ADDR) \ + (bfd_get_8 (BFD, ADDR ) << 16) | \ + (bfd_get_8 (BFD, ADDR + 1) << 8) | \ + (bfd_get_8 (BFD, ADDR + 2) ) -#define bfd_putb_24(BFD,DATA,ADDR) bfd_put_8(BFD,(bfd_byte)((DATA >> 16) & 0xFF),ADDR); \ - bfd_put_8(BFD,(bfd_byte)((DATA >> 8) & 0xFF),ADDR+1); \ - bfd_put_8(BFD,(bfd_byte)(DATA & 0xFF),ADDR+2) +#define bfd_putb_24(BFD,DATA,ADDR) \ + bfd_put_8 (BFD, (bfd_byte) ((DATA >> 16) & 0xFF), ADDR ); \ + bfd_put_8 (BFD, (bfd_byte) ((DATA >> 8) & 0xFF), ADDR + 1); \ + bfd_put_8 (BFD, (bfd_byte) ( DATA & 0xFF), ADDR + 2) /* Set parameters about this a.out file that are machine-dependent. This routine is called from some_aout_object_p just before it returns. */ @@ -563,7 +565,7 @@ tic30_aout_object_p (abfd) * means that it isn't obvious if EXEC_P should be set. * All of the following must be true for an executable: * There must be no relocations, the bfd can be neither an - * archive nor an archive element, and the file must be executable. */ + * archive nor an archive element, and the file must be executable. */ if (exec.a_trsize + exec.a_drsize == 0 && bfd_get_format (abfd) == bfd_object && abfd->my_archive == NULL) @@ -586,7 +588,6 @@ tic30_aout_object_p (abfd) section contents, and copy_private_bfd_data is not called until after the section contents have been set. */ -/*ARGSUSED */ static boolean MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec) bfd *ibfd; @@ -720,7 +721,7 @@ MY_bfd_final_link (abfd, info) int pad; /* Set the executable header size to 0, as we don't want one for an - output. */ + output. */ adata (abfd).exec_bytes_size = 0; pos = adata (abfd).exec_bytes_size; /* Text. */ @@ -765,7 +766,7 @@ MY_bfd_final_link (abfd, info) obj_bsssec (abfd)->vma = vma; obj_bsssec (abfd)->user_set_vma = 1; - /* We are fully resized, so don't readjust in final_link. */ + /* We are fully resized, so don't readjust in final_link. */ adata (abfd).magic = z_magic; return NAME (aout, final_link) (abfd, info, MY_final_link_callback); @@ -961,7 +962,6 @@ tic30_aout_set_arch_mach (abfd, arch, machine) #define MY_bfd_link_split_section _bfd_generic_link_split_section #endif - #ifndef MY_bfd_copy_private_bfd_data #define MY_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data #endif @@ -1058,7 +1058,7 @@ const bfd_target tic30_aout_vec = BFD_JUMP_TABLE_DYNAMIC (MY), NULL, - + (PTR) MY_backend_data }; #endif /* MY_BFD_TARGET */ diff --git a/contrib/binutils/bfd/aoutf1.h b/contrib/binutils/bfd/aoutf1.h index fdf95b5..4ad49a1 100644 --- a/contrib/binutils/bfd/aoutf1.h +++ b/contrib/binutils/bfd/aoutf1.h @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This is needed to reject a NewsOS file, e.g. in gdb/testsuite/gdb.t10/crossload.exp. I needed to add M_UNKNOWN to recognize a 68000 object, so this will - probably no longer reject a NewsOS object. . */ + probably no longer reject a NewsOS object. . */ #ifndef MACHTYPE_OK #define MACHTYPE_OK(mtype) \ (((mtype) == M_SPARC && bfd_lookup_arch (bfd_arch_sparc, 0) != NULL) \ @@ -123,7 +123,7 @@ sunos_set_arch_mach (abfd, machtype) case M_UNKNOWN: /* Some Sun3s make magic numbers without cpu types in them, so - we'll default to the 68000. */ + we'll default to the 68000. */ arch = bfd_arch_m68k; machine = bfd_mach_m68000; break; @@ -180,7 +180,7 @@ sunos_set_arch_mach (abfd, machtype) } #define SET_ARCH_MACH(ABFD, EXEC) \ - NAME(sunos,set_arch_mach)(ABFD, N_MACHTYPE (EXEC)); \ + NAME(sunos,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \ choose_reloc_size(ABFD); /* Determine the size of a relocation entry, based on the architecture */ @@ -275,11 +275,11 @@ sunos_write_object_contents (abfd) Unfortunately, they don't document the FPA structure, or at least I can't find it easily. Fortunately the core header contains its own length. So this shouldn't cause problems, except for c_ucode, which - so far we don't use but is easy to find with a little arithmetic. */ + so far we don't use but is easy to find with a little arithmetic. */ /* But the reg structure can be gotten from the SPARC processor handbook. This really should be in a GNU include file though so that gdb can use - the same info. */ + the same info. */ struct regs { int r_psr; @@ -439,7 +439,7 @@ swapcore_sun3 (abfd, ext, intcore) intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_ssize); memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname)); intcore->fp_stuff_pos = (long) (((struct external_sun3_core *) 0)->fp_stuff); - /* FP stuff takes up whole rest of struct, except c_ucode. */ + /* FP stuff takes up whole rest of struct, except c_ucode. */ intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) - (file_ptr) (((struct external_sun3_core *) 0)->fp_stuff); /* Ucode is the last thing in the struct -- just before the end */ @@ -449,7 +449,6 @@ swapcore_sun3 (abfd, ext, intcore) intcore->c_stacktop = 0x0E000000; /* By experimentation */ } - /* byte-swap in the Sparc core structure */ static void swapcore_sparc (abfd, ext, intcore) @@ -476,7 +475,7 @@ swapcore_sparc (abfd, ext, intcore) intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_ssize); memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname)); intcore->fp_stuff_pos = (long) (((struct external_sparc_core *) 0)->fp_stuff); - /* FP stuff takes up whole rest of struct, except c_ucode. */ + /* FP stuff takes up whole rest of struct, except c_ucode. */ intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) - (file_ptr) (((struct external_sparc_core *) 0)->fp_stuff); /* Ucode is the last thing in the struct -- just before the end */ @@ -544,7 +543,7 @@ swapcore_solaris_bcp (abfd, ext, intcore) memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname)); intcore->fp_stuff_pos = (long) (((struct external_solaris_bcp_core *) 0)->fp_stuff); - /* FP stuff takes up whole rest of struct, except c_ucode. */ + /* FP stuff takes up whole rest of struct, except c_ucode. */ intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) - (file_ptr) (((struct external_solaris_bcp_core *) 0)->fp_stuff); /* Ucode is the last thing in the struct -- just before the end */ @@ -764,7 +763,7 @@ sunos4_core_file_matches_executable_p (core_bfd, exec_bfd) return false; } - /* Solaris core files do not include an aouthdr. */ + /* Solaris core files do not include an aouthdr. */ if ((core_hdr (core_bfd)->hdr)->c_len == SOLARIS_BCP_CORE_LEN) return true; diff --git a/contrib/binutils/bfd/aoutx.h b/contrib/binutils/bfd/aoutx.h index 920661b..94a46b0 100644 --- a/contrib/binutils/bfd/aoutx.h +++ b/contrib/binutils/bfd/aoutx.h @@ -23,7 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ SECTION a.out backends - DESCRIPTION BFD supports a number of different flavours of a.out format, @@ -165,10 +164,18 @@ DESCRIPTION #define MY_swap_std_reloc_in NAME(aout,swap_std_reloc_in) #endif +#ifndef MY_swap_ext_reloc_in +#define MY_swap_ext_reloc_in NAME(aout,swap_ext_reloc_in) +#endif + #ifndef MY_swap_std_reloc_out #define MY_swap_std_reloc_out NAME(aout,swap_std_reloc_out) #endif +#ifndef MY_swap_ext_reloc_out +#define MY_swap_ext_reloc_out NAME(aout,swap_ext_reloc_out) +#endif + #ifndef MY_final_link_relocate #define MY_final_link_relocate _bfd_final_link_relocate #endif @@ -260,7 +267,7 @@ EMPTY_HOWTO (-1), HOWTO(40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false), }; -#define TABLE_SIZE(TABLE) (sizeof(TABLE)/sizeof(TABLE[0])) +#define TABLE_SIZE(TABLE) (sizeof (TABLE)/sizeof (TABLE[0])) reloc_howto_type * NAME(aout,reloc_type_lookup) (abfd,code) @@ -283,6 +290,8 @@ NAME(aout,reloc_type_lookup) (abfd,code) if (ext) switch (code) { + EXT (BFD_RELOC_8, 0); + EXT (BFD_RELOC_16, 1); EXT (BFD_RELOC_32, 2); EXT (BFD_RELOC_HI22, 8); EXT (BFD_RELOC_LO10, 11); @@ -353,7 +362,7 @@ NAME(aout,swap_exec_header_in) (abfd, raw_bytes, execp) /* The internal_exec structure has some fields that are unused in this configuration (IE for i960), so ensure that all such uninitialized fields are zero'd out. There are places where two of these structs - are memcmp'd, and thus the contents do matter. */ + are memcmp'd, and thus the contents do matter. */ memset ((PTR) execp, 0, sizeof (struct internal_exec)); /* Now fill in fields in the execp, from the bytes in the raw data. */ execp->a_info = bfd_h_get_32 (abfd, bytes->e_info); @@ -390,7 +399,7 @@ NAME(aout,swap_exec_header_out) (abfd, execp, raw_bytes) { struct external_exec *bytes = (struct external_exec *)raw_bytes; - /* Now fill in fields in the raw data, from the fields in the exec struct. */ + /* Now fill in fields in the raw data, from the fields in the exec struct. */ bfd_h_put_32 (abfd, execp->a_info , bytes->e_info); PUT_WORD (abfd, execp->a_text , bytes->e_text); PUT_WORD (abfd, execp->a_data , bytes->e_data); @@ -426,7 +435,7 @@ FUNCTION SYNOPSIS const bfd_target *aout_@var{size}_some_aout_object_p (bfd *abfd, - const bfd_target *(*callback_to_real_object_p)()); + const bfd_target *(*callback_to_real_object_p) ()); DESCRIPTION Some a.out variant thinks that the file open in @var{abfd} @@ -507,7 +516,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p) /* The default relocation entry size is that of traditional V7 Unix. */ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE; - /* The default symbol entry size is that of traditional Unix. */ + /* The default symbol entry size is that of traditional Unix. */ obj_symbol_entry_size (abfd) = EXTERNAL_NLIST_SIZE; #ifdef USE_MMAP @@ -591,7 +600,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p) header, should cope with them in this callback as well. */ #endif /* DOCUMENTATION */ - result = (*callback_to_real_object_p)(abfd); + result = (*callback_to_real_object_p) (abfd); /* Now that the segment addresses have been worked out, take a better guess at whether the file is executable. If the entry point @@ -606,7 +615,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p) To fix this, we now accept any non-zero entry point as an indication of executability. This will work most of the time, since only the linker - sets the entry point, and that is likely to be non-zero for most systems. */ + sets the entry point, and that is likely to be non-zero for most systems. */ if (execp->a_entry != 0 || (execp->a_entry >= obj_textsec(abfd)->vma @@ -683,7 +692,6 @@ NAME(aout,mkobject) (abfd) return true; } - /* FUNCTION aout_@var{size}_machine_type @@ -747,7 +755,7 @@ NAME(aout,machine_type) (arch, machine, unknown) case bfd_arch_arm: if (machine == 0) arch_flags = M_ARM; break; - + case bfd_arch_mips: switch (machine) { case 0: @@ -768,7 +776,12 @@ NAME(aout,machine_type) (arch, machine, unknown) case bfd_mach_mips8000: case bfd_mach_mips10000: case bfd_mach_mips16: - /* FIXME: These should be MIPS3 or MIPS4. */ + case bfd_mach_mips32: + case bfd_mach_mips32_4k: + case bfd_mach_mips5: + case bfd_mach_mips64: + case bfd_mach_mips_sb1: + /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */ arch_flags = M_MIPS2; break; default: @@ -790,6 +803,10 @@ NAME(aout,machine_type) (arch, machine, unknown) *unknown = false; break; + case bfd_arch_cris: + if (machine == 0 || machine == 255) arch_flags = M_CRIS; + break; + default: arch_flags = M_UNKNOWN; } @@ -800,7 +817,6 @@ NAME(aout,machine_type) (arch, machine, unknown) return arch_flags; } - /* FUNCTION aout_@var{size}_set_arch_mach @@ -927,7 +943,7 @@ adjust_z_magic (abfd, execp) file_ptr text_end; CONST struct aout_backend_data *abdp; int ztih; /* Nonzero if text includes exec header. */ - + abdp = aout_backend_info (abfd); /* Text. */ @@ -995,7 +1011,7 @@ adjust_z_magic (abfd, execp) } obj_datasec(abfd)->filepos = (obj_textsec(abfd)->filepos + obj_textsec(abfd)->_raw_size); - + /* Fix up exec header while we're at it. */ execp->a_text = obj_textsec(abfd)->_raw_size; if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted))) @@ -1040,7 +1056,7 @@ adjust_n_magic (abfd, execp) file_ptr pos = adata(abfd).exec_bytes_size; bfd_vma vma = 0; int pad; - + /* Text. */ obj_textsec(abfd)->filepos = pos; if (!obj_textsec(abfd)->user_set_vma) @@ -1055,7 +1071,7 @@ adjust_n_magic (abfd, execp) if (!obj_datasec(abfd)->user_set_vma) obj_datasec(abfd)->vma = BFD_ALIGN (vma, adata(abfd).segment_size); vma = obj_datasec(abfd)->vma; - + /* Since BSS follows data immediately, see if it needs alignment. */ vma += obj_datasec(abfd)->_raw_size; pad = align_power (vma, obj_bsssec(abfd)->alignment_power) - vma; @@ -1100,7 +1116,7 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end) (TARGET_PAGE_SIZE). However, newer versions of SUNOS start the text segment right after the exec header; the latter is counted in the text segment size, and is paged in by the kernel with the rest of - the text. */ + the text. */ /* This perhaps isn't the right way to do this, but made it simpler for me to understand enough to implement it. Better would probably be to go @@ -1187,7 +1203,6 @@ NAME(aout,new_section_hook) (abfd, newsect) /* align to double at least */ newsect->alignment_power = bfd_get_arch_info(abfd)->section_align_power; - if (bfd_get_format (abfd) == bfd_object) { if (obj_textsec(abfd) == NULL && !strcmp(newsect->name, ".text")) { @@ -1297,7 +1312,7 @@ aout_get_external_symbols (abfd) obj_aout_external_syms (abfd) = syms; obj_aout_external_sym_count (abfd) = count; } - + if (obj_aout_external_strings (abfd) == NULL && exec_hdr (abfd)->a_syms != 0) { @@ -1626,7 +1641,7 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer) file. */ (*_bfd_error_handler) (_("%s: can not represent section for symbol `%s' in a.out object file format"), - bfd_get_filename (abfd), + bfd_get_filename (abfd), cache_ptr->name != NULL ? cache_ptr->name : _("*unknown*")); bfd_set_error (bfd_error_nonrepresentable_section); return false; @@ -1671,6 +1686,8 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer) sym_pointer->e_type[0] = ((aout_symbol_type *) cache_ptr)->type; else if ((cache_ptr->flags & BSF_GLOBAL) != 0) sym_pointer->e_type[0] |= N_EXT; + else if ((cache_ptr->flags & BSF_LOCAL) != 0) + sym_pointer->e_type[0] &= ~N_EXT; if ((cache_ptr->flags & BSF_CONSTRUCTOR) != 0) { @@ -1706,7 +1723,7 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer) return true; } -/* Native-level interface to symbols. */ +/* Native-level interface to symbols. */ asymbol * NAME(aout,make_empty_symbol) (abfd) @@ -1773,7 +1790,7 @@ NAME(aout,translate_symbol_table) (abfd, in, ext, count, str, strsize, dynamic) /* We read the symbols into a buffer, which is discarded when this function exits. We read the strings into a buffer large enough to - hold them all plus all the cached symbol entries. */ + hold them all plus all the cached symbol entries. */ boolean NAME(aout,slurp_symbol_table) (abfd) @@ -1960,7 +1977,6 @@ error_return: _bfd_stringtab_free (strtab); return false; } - long NAME(aout,get_symtab) (abfd, location) @@ -1970,18 +1986,17 @@ NAME(aout,get_symtab) (abfd, location) unsigned int counter = 0; aout_symbol_type *symbase; - if (!NAME(aout,slurp_symbol_table)(abfd)) + if (!NAME(aout,slurp_symbol_table) (abfd)) return -1; for (symbase = obj_aout_symbols(abfd); counter++ < bfd_get_symcount (abfd);) - *(location++) = (asymbol *)( symbase++); + *(location++) = (asymbol *) ( symbase++); *location++ =0; return bfd_get_symcount (abfd); } - /* Standard reloc stuff */ -/* Output standard relocation information to a file in target byte order. */ +/* Output standard relocation information to a file in target byte order. */ extern void NAME(aout,swap_std_reloc_out) PARAMS ((bfd *, arelent *, struct reloc_std_external *)); @@ -2024,7 +2039,6 @@ NAME(aout,swap_std_reloc_out) (abfd, g, natptr) check for that here */ - if (bfd_is_com_section (output_section) || bfd_is_abs_section (output_section) || bfd_is_und_section (output_section)) @@ -2077,9 +2091,8 @@ NAME(aout,swap_std_reloc_out) (abfd, g, natptr) } } - /* Extended stuff */ -/* Output extended relocation information to a file in target byte order. */ +/* Output extended relocation information to a file in target byte order. */ extern void NAME(aout,swap_ext_reloc_out) PARAMS ((bfd *, arelent *, struct reloc_ext_external *)); @@ -2161,7 +2174,6 @@ NAME(aout,swap_ext_reloc_out) (abfd, g, natptr) contain 60. This macro subs the base of each section from the value to give the true offset from the section */ - #define MOVE_ADDRESS(ad) \ if (r_extern) { \ /* undefined symbol */ \ @@ -2381,8 +2393,8 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols) (struct reloc_ext_external *) relocs; for (; counter < count; counter++, rptr++, cache_ptr++) - NAME(aout,swap_ext_reloc_in) (abfd, rptr, cache_ptr, symbols, - bfd_get_symcount (abfd)); + MY_swap_ext_reloc_in (abfd, rptr, cache_ptr, symbols, + bfd_get_symcount (abfd)); } else { @@ -2432,7 +2444,8 @@ NAME(aout,squirt_out_relocs) (abfd, section) for (natptr = native; count != 0; --count, natptr += each_size, ++generic) - NAME(aout,swap_ext_reloc_out) (abfd, *generic, (struct reloc_ext_external *)natptr); + MY_swap_ext_reloc_out (abfd, *generic, + (struct reloc_ext_external *) natptr); } else { @@ -2468,7 +2481,7 @@ NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols) return 0; } - if (!(tblptr || NAME(aout,slurp_reloc_table)(abfd, section, symbols))) + if (!(tblptr || NAME(aout,slurp_reloc_table) (abfd, section, symbols))) return -1; if (section->flags & SEC_CONSTRUCTOR) { @@ -2523,19 +2536,17 @@ NAME(aout,get_reloc_upper_bound) (abfd, asect) bfd_set_error (bfd_error_invalid_operation); return -1; } - long NAME(aout,get_symtab_upper_bound) (abfd) bfd *abfd; { - if (!NAME(aout,slurp_symbol_table)(abfd)) + if (!NAME(aout,slurp_symbol_table) (abfd)) return -1; return (bfd_get_symcount (abfd)+1) * (sizeof (aout_symbol_type *)); } -/*ARGSUSED*/ alent * NAME(aout,get_lineno) (ignore_abfd, ignore_symbol) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -2544,7 +2555,6 @@ NAME(aout,get_lineno) (ignore_abfd, ignore_symbol) return (alent *)NULL; } -/*ARGSUSED*/ void NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -2561,18 +2571,17 @@ NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret) if (stab_name == NULL) { - sprintf(buf, "(%d)", type_code); + sprintf (buf, "(%d)", type_code); stab_name = buf; } ret->type = '-'; ret->stab_type = type_code; - ret->stab_other = (unsigned)(aout_symbol(symbol)->other & 0xff); - ret->stab_desc = (unsigned)(aout_symbol(symbol)->desc & 0xffff); + ret->stab_other = (unsigned) (aout_symbol(symbol)->other & 0xff); + ret->stab_desc = (unsigned) (aout_symbol(symbol)->desc & 0xffff); ret->stab_name = stab_name; } } -/*ARGSUSED*/ void NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -2585,27 +2594,26 @@ NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how) switch (how) { case bfd_print_symbol_name: if (symbol->name) - fprintf(file,"%s", symbol->name); + fprintf (file,"%s", symbol->name); break; case bfd_print_symbol_more: - fprintf(file,"%4x %2x %2x",(unsigned)(aout_symbol(symbol)->desc & 0xffff), - (unsigned)(aout_symbol(symbol)->other & 0xff), - (unsigned)(aout_symbol(symbol)->type)); + fprintf (file,"%4x %2x %2x",(unsigned) (aout_symbol(symbol)->desc & 0xffff), + (unsigned) (aout_symbol(symbol)->other & 0xff), + (unsigned) (aout_symbol(symbol)->type)); break; case bfd_print_symbol_all: { CONST char *section_name = symbol->section->name; - bfd_print_symbol_vandf((PTR)file,symbol); - fprintf(file," %-5s %04x %02x %02x", + fprintf (file," %-5s %04x %02x %02x", section_name, - (unsigned)(aout_symbol(symbol)->desc & 0xffff), - (unsigned)(aout_symbol(symbol)->other & 0xff), - (unsigned)(aout_symbol(symbol)->type & 0xff)); + (unsigned) (aout_symbol(symbol)->desc & 0xffff), + (unsigned) (aout_symbol(symbol)->other & 0xff), + (unsigned) (aout_symbol(symbol)->type & 0xff)); if (symbol->name) - fprintf(file," %s", symbol->name); + fprintf (file," %s", symbol->name); } break; } @@ -2705,8 +2713,8 @@ NAME(aout,find_nearest_line) CONST char *directory_name = NULL; CONST char *main_file_name = NULL; CONST char *current_file_name = NULL; - CONST char *line_file_name = NULL; /* Value of current_file_name at line number. */ - CONST char *line_directory_name = NULL; /* Value of directory_name at line number. */ + CONST char *line_file_name = NULL; /* Value of current_file_name at line number. */ + CONST char *line_directory_name = NULL; /* Value of directory_name at line number. */ bfd_vma low_line_vma = 0; bfd_vma low_func_vma = 0; asymbol *func = 0; @@ -2718,7 +2726,7 @@ NAME(aout,find_nearest_line) *line_ptr = 0; if (symbols != (asymbol **)NULL) { for (p = symbols; *p; p++) { - aout_symbol_type *q = (aout_symbol_type *)(*p); + aout_symbol_type *q = (aout_symbol_type *) (*p); next: switch (q->type){ case N_TEXT: @@ -2765,15 +2773,15 @@ NAME(aout,find_nearest_line) } main_file_name = current_file_name = q->symbol.name; - /* Look ahead to next symbol to check if that too is an N_SO. */ + /* Look ahead to next symbol to check if that too is an N_SO. */ p++; if (*p == NULL) break; - q = (aout_symbol_type *)(*p); + q = (aout_symbol_type *) (*p); if (q->type != (int)N_SO) goto next; - /* Found a second N_SO First is directory; second is filename. */ + /* Found a second N_SO First is directory; second is filename. */ directory_name = current_file_name; main_file_name = current_file_name = q->symbol.name; if (obj_textsec(abfd) != section) @@ -2881,7 +2889,6 @@ NAME(aout,find_nearest_line) return true; } -/*ARGSUSED*/ int NAME(aout,sizeof_headers) (abfd, execable) bfd *abfd; @@ -4125,7 +4132,7 @@ aout_link_write_symbols (finfo, input_bfd) /* We have saved the hash table entry for this symbol, if there is one. Note that we could just look it up again in the hash table, provided we first check that it is an - external symbol. */ + external symbol. */ h = *sym_hash; /* Use the name from the hash table, in case the symbol was @@ -4789,7 +4796,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs, #ifdef MY_reloc_howto howto = MY_reloc_howto(input_bfd, rel, r_index, r_extern, r_pcrel); -#else +#else { int r_jmptable; int r_relative; @@ -5671,6 +5678,10 @@ aout_link_reloc_link_order (finfo, o, p) } else { +#ifdef MY_put_ext_reloc + MY_put_ext_reloc (finfo->output_bfd, r_extern, r_index, p->offset, + howto, &erel, pr->addend); +#else PUT_WORD (finfo->output_bfd, p->offset, erel.r_address); if (bfd_header_big_endian (finfo->output_bfd)) @@ -5693,6 +5704,7 @@ aout_link_reloc_link_order (finfo, o, p) } PUT_WORD (finfo->output_bfd, pr->addend, erel.r_addend); +#endif /* MY_put_ext_reloc */ rel_ptr = (PTR) &erel; } diff --git a/contrib/binutils/bfd/archive.c b/contrib/binutils/bfd/archive.c index 27dfd39..14dc770 100644 --- a/contrib/binutils/bfd/archive.c +++ b/contrib/binutils/bfd/archive.c @@ -152,10 +152,8 @@ extern int errno; the cache when we actually read one. We also don't sort the cache; it's generally short enough to search linearly. Note that the pointers here point to the front of the ar_hdr, not - to the front of the contents! -*/ -struct ar_cache -{ + to the front of the contents! */ +struct ar_cache { file_ptr ptr; bfd *arelt; struct ar_cache *next; @@ -164,7 +162,7 @@ struct ar_cache #define ar_padchar(abfd) ((abfd)->xvec->ar_pad_char) #define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen) -#define arch_eltdata(bfd) ((struct areltdata *)((bfd)->arelt_data)) +#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data)) #define arch_hdr(bfd) ((struct ar_hdr *)arch_eltdata(bfd)->arch_header) static char *get_extended_arelt_filename PARAMS ((bfd *arch, @@ -316,7 +314,7 @@ _bfd_add_bfd_to_archive_cache (arch_bfd, filepos, new_elt) } /* The name begins with space. Hence the rest of the name is an index into - the string table. */ + the string table. */ static char * get_extended_arelt_filename (arch, name) @@ -326,9 +324,9 @@ get_extended_arelt_filename (arch, name) unsigned long index = 0; /* Should extract string so that I can guarantee not to overflow into - the next region, but I'm too lazy. */ + the next region, but I'm too lazy. */ errno = 0; - /* Skip first char, which is '/' in SVR4 or ' ' in some other variants. */ + /* Skip first char, which is '/' in SVR4 or ' ' in some other variants. */ index = strtol (name + 1, NULL, 10); if (errno != 0) { @@ -411,7 +409,7 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag) } } /* BSD4.4-style long filename. - Only implemented for reading, so far! */ + Only implemented for reading, so far! */ else if (hdr.ar_name[0] == '#' && hdr.ar_name[1] == '1' && hdr.ar_name[2] == '/' @@ -440,15 +438,15 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag) { /* We judge the end of the name by looking for '/' or ' '. Note: The SYSV format (terminated by '/') allows embedded - spaces, so only look for ' ' if we don't find '/'. */ + spaces, so only look for ' ' if we don't find '/'. */ char *e; e = memchr (hdr.ar_name, '\0', ar_maxnamelen (abfd)); if (e == NULL) { - e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd)); + e = memchr (hdr.ar_name, '/', ar_maxnamelen (abfd)); if (e == NULL) - e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd)); + e = memchr (hdr.ar_name, ' ', ar_maxnamelen (abfd)); } if (e != NULL) @@ -526,7 +524,7 @@ _bfd_get_elt_at_filepos (archive, filepos) if (_bfd_add_bfd_to_archive_cache (archive, filepos, n_nfd)) return n_nfd; - /* huh? */ + /* Huh? */ bfd_release (archive, (PTR) n_nfd); bfd_release (archive, (PTR) new_areldata); return NULL; @@ -560,7 +558,6 @@ DESCRIPTION the archive and the previous return value to return a created BFD to the next contained element. NULL is returned when there are no more. - */ bfd * @@ -595,7 +592,7 @@ bfd_generic_openr_next_archived_file (archive, last_file) unsigned int size = arelt_size (last_file); /* Pad to an even boundary... Note that last_file->origin can be odd in the case of - BSD-4.4-style element with a long odd size. */ + BSD-4.4-style element with a long odd size. */ filestart = last_file->origin + size; filestart += filestart % 2; } @@ -603,7 +600,6 @@ bfd_generic_openr_next_archived_file (archive, last_file) return _bfd_get_elt_at_filepos (archive, filestart); } - const bfd_target * bfd_generic_archive_p (abfd) bfd *abfd; @@ -630,7 +626,7 @@ bfd_generic_archive_p (abfd) #endif /* We are setting bfd_ardata(abfd) here, but since bfd_ardata - involves a cast, we can't do it as the left operand of assignment. */ + involves a cast, we can't do it as the left operand of assignment. */ abfd->tdata.aout_ar_data = ((struct artdata *) bfd_zalloc (abfd, sizeof (struct artdata))); @@ -737,7 +733,7 @@ do_slurp_bsd_armap (abfd) if (mapdata == NULL) return false; parsed_size = mapdata->parsed_size; - bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */ + bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */ raw_armap = (bfd_byte *) bfd_zalloc (abfd, parsed_size); if (raw_armap == (bfd_byte *) NULL) @@ -782,16 +778,17 @@ do_slurp_bsd_armap (abfd) } ardata->first_file_filepos = bfd_tell (abfd); - /* Pad to an even boundary if you have to */ + /* Pad to an even boundary if you have to. */ ardata->first_file_filepos += (ardata->first_file_filepos) % 2; /* FIXME, we should provide some way to free raw_ardata when we are done using the strings from it. For now, it seems - to be allocated on an objalloc anyway... */ + to be allocated on an objalloc anyway... */ bfd_has_map (abfd) = true; return true; } -/* Returns false on error, true otherwise */ +/* Returns false on error, true otherwise. */ + static boolean do_slurp_coff_armap (abfd) bfd *abfd; @@ -803,7 +800,7 @@ do_slurp_coff_armap (abfd) unsigned int stringsize; unsigned int parsed_size; carsym *carsyms; - unsigned int nsymz; /* Number of symbols in armap. */ + unsigned int nsymz; /* Number of symbols in armap. */ bfd_vma (*swap) PARAMS ((const bfd_byte *)); char int_buf[sizeof (long)]; unsigned int carsym_size, ptrsize, i; @@ -812,7 +809,7 @@ do_slurp_coff_armap (abfd) if (mapdata == NULL) return false; parsed_size = mapdata->parsed_size; - bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */ + bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */ if (bfd_read ((PTR) int_buf, 1, 4, abfd) != 4) { @@ -821,7 +818,7 @@ do_slurp_coff_armap (abfd) return false; } /* It seems that all numeric information in a coff archive is always - in big endian format, nomatter the host or target. */ + in big endian format, nomatter the host or target. */ swap = bfd_getb32; nsymz = bfd_getb32 ((PTR) int_buf); stringsize = parsed_size - (4 * nsymz) - 4; @@ -836,7 +833,7 @@ do_slurp_coff_armap (abfd) && bfd_get_arch (abfd) == bfd_arch_i960 && bfd_get_flavour (abfd) == bfd_target_coff_flavour) { - /* This looks dangerous, let's do it the other way around */ + /* This looks dangerous, let's do it the other way around. */ nsymz = bfd_getl32 ((PTR) int_buf); stringsize = parsed_size - (4 * nsymz) - 4; swap = bfd_getl32; @@ -844,7 +841,7 @@ do_slurp_coff_armap (abfd) #endif /* The coff armap must be read sequentially. So we construct a - bsd-style one in core all at once, for simplicity. */ + bsd-style one in core all at once, for simplicity. */ carsym_size = (nsymz * sizeof (carsym)); ptrsize = (4 * nsymz); @@ -855,7 +852,7 @@ do_slurp_coff_armap (abfd) carsyms = ardata->symdefs; stringbase = ((char *) ardata->symdefs) + carsym_size; - /* Allocate and read in the raw offsets. */ + /* Allocate and read in the raw offsets. */ raw_armap = (int *) bfd_alloc (abfd, ptrsize); if (raw_armap == NULL) goto release_symdefs; @@ -867,7 +864,7 @@ do_slurp_coff_armap (abfd) goto release_raw_armap; } - /* OK, build the carsyms */ + /* OK, build the carsyms. */ for (i = 0; i < nsymz; i++) { rawptr = raw_armap + i; @@ -880,27 +877,25 @@ do_slurp_coff_armap (abfd) ardata->symdef_count = nsymz; ardata->first_file_filepos = bfd_tell (abfd); - /* Pad to an even boundary if you have to */ + /* Pad to an even boundary if you have to. */ ardata->first_file_filepos += (ardata->first_file_filepos) % 2; - bfd_has_map (abfd) = true; bfd_release (abfd, (PTR) raw_armap); - - /* Check for a second archive header (as used by PE) */ + /* Check for a second archive header (as used by PE). */ { struct areltdata *tmp; bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET); tmp = (struct areltdata *) _bfd_read_ar_hdr (abfd); - if (tmp != NULL) + if (tmp != NULL) { if (tmp->arch_header[0] == '/' - && tmp->arch_header[1] == ' ') + && tmp->arch_header[1] == ' ') { ardata->first_file_filepos += - (tmp->parsed_size + sizeof(struct ar_hdr) + 1) & ~1; + (tmp->parsed_size + sizeof (struct ar_hdr) + 1) & ~1; } bfd_release (abfd, tmp); } @@ -952,7 +947,7 @@ bfd_slurp_armap (abfd) /* Returns false on error, true otherwise */ /* flavor 2 of a bsd armap, similar to bfd_slurp_bsd_armap except the header is in a slightly different order and the map name is '/'. - This flavour is used by hp300hpux. */ + This flavour is used by hp300hpux. */ #define HPUX_SYMDEF_COUNT_SIZE 2 @@ -975,7 +970,7 @@ bfd_slurp_bsd_armap_f2 (abfd) if (i != 16) return false; - /* The archive has at least 16 bytes in it */ + /* The archive has at least 16 bytes in it. */ if (bfd_seek (abfd, -16L, SEEK_CUR) != 0) return false; @@ -1024,7 +1019,7 @@ bfd_slurp_bsd_armap_f2 (abfd) ardata->cache = 0; stringsize = bfd_h_get_32 (abfd, raw_armap + HPUX_SYMDEF_COUNT_SIZE); - /* skip sym count and string sz */ + /* Skip sym count and string sz. */ stringbase = ((char *) raw_armap + HPUX_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE); @@ -1044,11 +1039,11 @@ bfd_slurp_bsd_armap_f2 (abfd) } ardata->first_file_filepos = bfd_tell (abfd); - /* Pad to an even boundary if you have to */ + /* Pad to an even boundary if you have to. */ ardata->first_file_filepos += (ardata->first_file_filepos) % 2; /* FIXME, we should provide some way to free raw_ardata when we are done using the strings from it. For now, it seems - to be allocated on an objalloc anyway... */ + to be allocated on an objalloc anyway... */ bfd_has_map (abfd) = true; return true; } @@ -1061,9 +1056,10 @@ bfd_slurp_bsd_armap_f2 (abfd) element (the first in the archive, or second if there is an armap); the name in the ar_hdr is replaced by . Index is the P.R. of an int (decimal). Data General have - extended the format by using the prefix // for the special element */ + extended the format by using the prefix // for the special element. */ + +/* Returns false on error, true otherwise. */ -/* Returns false on error, true otherwise */ boolean _bfd_slurp_extended_name_table (abfd) bfd *abfd; @@ -1117,22 +1113,25 @@ _bfd_slurp_extended_name_table (abfd) { char *temp = bfd_ardata (abfd)->extended_names; char *limit = temp + namedata->parsed_size; - for (; temp < limit; ++temp) { - if (*temp == '\012') - temp[temp[-1] == '/' ? -1 : 0] = '\0'; - if (*temp == '\\') - *temp = '/'; - } + for (; temp < limit; ++temp) + { + if (*temp == '\012') + temp[temp[-1] == '/' ? -1 : 0] = '\0'; + if (*temp == '\\') + *temp = '/'; + } } - /* Pad to an even boundary if you have to */ + /* Pad to an even boundary if you have to. */ bfd_ardata (abfd)->first_file_filepos = bfd_tell (abfd); bfd_ardata (abfd)->first_file_filepos += (bfd_ardata (abfd)->first_file_filepos) % 2; /* FIXME, we can't release namedata here because it was allocated - below extended_names on the objalloc... */ - /* bfd_release (abfd, namedata); */ + below extended_names on the objalloc... */ +#if 0 + bfd_release (abfd, namedata); +#endif } return true; } @@ -1140,7 +1139,8 @@ _bfd_slurp_extended_name_table (abfd) #ifdef VMS /* Return a copy of the stuff in the filename between any :]> and a - semicolon */ + semicolon. */ + static const char * normalize (abfd, file) bfd *abfd; @@ -1183,12 +1183,11 @@ normalize (abfd, file) { const char *filename = strrchr (file, '/'); - #ifdef HAVE_DOS_BASED_FILE_SYSTEM { /* We could have foo/bar\\baz, or foo\\bar, or d:bar. */ char *bslash = strrchr (file, '\\'); - if (bslash > filename) + if (filename == NULL || (bslash != NULL && bslash > filename)) filename = bslash; if (filename == NULL && file[0] != '\0' && file[1] == ':') filename = file + 1; @@ -1250,7 +1249,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen) *tablen = 0; - /* Figure out how long the table should be */ + /* Figure out how long the table should be. */ for (current = abfd->archive_head; current != NULL; current = current->next) { const char *normal; @@ -1318,7 +1317,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen) { /* Works for now; may need to be re-engineered if we encounter an oddball archive format and want to - generalise this hack. */ + generalise this hack. */ struct ar_hdr *hdr = arch_hdr (current); strcpy (strptr, normal); if (! trailing_slash) @@ -1330,10 +1329,10 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen) } hdr->ar_name[0] = ar_padchar (current); /* We know there will always be enough room (one of the few - cases where you may safely use sprintf). */ + cases where you may safely use sprintf). */ sprintf ((hdr->ar_name) + 1, "%-d", (unsigned) (strptr - *tabloc)); /* Kinda Kludgy. We should just use the returned value of - sprintf but not all implementations get this right */ + sprintf but not all implementations get this right. */ { char *temp = hdr->ar_name + 2; for (; temp < hdr->ar_name + maxname; temp++) @@ -1351,6 +1350,24 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen) /** A couple of functions for creating ar_hdrs */ +#ifdef HPUX_LARGE_AR_IDS +/* Function to encode large UID/GID values according to HP. */ + +static void +hpux_uid_gid_encode (str, id) + char str[6]; + long int id; +{ + int cnt; + + str[5] = '@' + (id & 3); + id >>= 2; + + for (cnt = 4; cnt >= 0; ++cnt, id >>= 6) + str[cnt] = ' ' + (id & 0x3f); +} +#endif /* HPUX_LARGE_AR_IDS */ + #ifndef HAVE_GETUID #define getuid() 0 #endif @@ -1362,7 +1379,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen) /* Takes a filename, returns an arelt_data for it, or NULL if it can't make one. The filename must refer to a filename in the filesystem. The filename field of the ar_hdr will NOT be initialized. If member - is set, and it's an in-memory bfd, we fake it. */ + is set, and it's an in-memory bfd, we fake it. */ static struct areltdata * bfd_ar_hdr_from_filesystem (abfd, filename, member) @@ -1377,11 +1394,11 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member) if (member && (member->flags & BFD_IN_MEMORY) != 0) { - /* Assume we just "made" the member, and fake it */ + /* Assume we just "made" the member, and fake it. */ struct bfd_in_memory *bim = (struct bfd_in_memory *) member->iostream; - time(&status.st_mtime); - status.st_uid = getuid(); - status.st_gid = getgid(); + time (&status.st_mtime); + status.st_uid = getuid (); + status.st_gid = getgid (); status.st_mode = 0644; status.st_size = bim->size; } @@ -1397,20 +1414,34 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member) return NULL; hdr = (struct ar_hdr *) (((char *) ared) + sizeof (struct areltdata)); - /* ar headers are space padded, not null padded! */ + /* ar headers are space padded, not null padded! */ memset ((PTR) hdr, ' ', sizeof (struct ar_hdr)); strncpy (hdr->ar_fmag, ARFMAG, 2); - /* Goddamned sprintf doesn't permit MAXIMUM field lengths */ + /* Goddamned sprintf doesn't permit MAXIMUM field lengths. */ sprintf ((hdr->ar_date), "%-12ld", (long) status.st_mtime); - sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid); +#ifdef HPUX_LARGE_AR_IDS + /* HP has a very "special" way to handle UID/GID's with numeric values + > 99999. */ + if (status.st_uid > 99999) + hpux_uid_gid_encode (hdr->ar_gid, (long) status.st_uid); + else +#endif + sprintf ((hdr->ar_uid), "%ld", (long) status.st_uid); +#ifdef HPUX_LARGE_AR_IDS + /* HP has a very "special" way to handle UID/GID's with numeric values + > 99999. */ + if (status.st_gid > 99999) + hpux_uid_gid_encode (hdr->ar_uid, (long) status.st_gid); + else +#endif sprintf ((hdr->ar_gid), "%ld", (long) status.st_gid); sprintf ((hdr->ar_mode), "%-8o", (unsigned int) status.st_mode); sprintf ((hdr->ar_size), "%-10ld", (long) status.st_size); /* Correct for a lossage in sprintf whereby it null-terminates. I cannot understand how these C losers could design such a ramshackle bunch of - IO operations */ + IO operations. */ temp = (char *) hdr; temp1 = temp + sizeof (struct ar_hdr) - 2; for (; temp < temp1; temp++) @@ -1426,9 +1457,9 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member) } /* This is magic required by the "ar" program. Since it's - undocumented, it's undocumented. You may think that it would take - a strong stomach to write this, and it does, but it takes even a - stronger stomach to try to code around such a thing! */ + undocumented, it's undocumented. You may think that it would take + a strong stomach to write this, and it does, but it takes even a + stronger stomach to try to code around such a thing! */ struct ar_hdr *bfd_special_undocumented_glue PARAMS ((bfd *, const char *)); @@ -1443,8 +1474,8 @@ bfd_special_undocumented_glue (abfd, filename) return (struct ar_hdr *) ar_elt->arch_header; } +/* Analogous to stat call. */ -/* Analogous to stat call */ int bfd_generic_stat_arch_elt (abfd, buf) bfd *abfd; @@ -1461,13 +1492,40 @@ bfd_generic_stat_arch_elt (abfd, buf) hdr = arch_hdr (abfd); -#define foo(arelt, stelt, size) \ - buf->stelt = strtol (hdr->arelt, &aloser, size); \ - if (aloser == hdr->arelt) return -1; +#define foo(arelt, stelt, size) \ + buf->stelt = strtol (hdr->arelt, &aloser, size); \ + if (aloser == hdr->arelt) \ + return -1; + + /* Some platforms support special notations for large IDs. */ +#ifdef HPUX_LARGE_AR_IDS +# define foo2(arelt, stelt, size) \ + if (hdr->arelt[5] == ' ') \ + { \ + foo (arelt, stelt, size); \ + } \ + else \ + { \ + int cnt; \ + for (buf->stelt = cnt = 0; cnt < 5; ++cnt) \ + { \ + if (hdr->arelt[cnt] < ' ' || hdr->arelt[cnt] > ' ' + 0x3f) \ + return -1; \ + buf->stelt <<= 6; \ + buf->stelt += hdr->arelt[cnt] - ' '; \ + } \ + if (hdr->arelt[5] < '@' || hdr->arelt[5] > '@' + 3) \ + return -1; \ + buf->stelt <<= 2; \ + buf->stelt += hdr->arelt[5] - '@'; \ + } +#else +# define foo2(arelt, stelt, size) foo (arelt, stelt, size) +#endif foo (ar_date, st_mtime, 10); - foo (ar_uid, st_uid, 10); - foo (ar_gid, st_gid, 10); + foo2 (ar_uid, st_uid, 10); + foo2 (ar_gid, st_gid, 10); foo (ar_mode, st_mode, 8); buf->st_size = arch_eltdata (abfd)->parsed_size; @@ -1484,7 +1542,7 @@ bfd_dont_truncate_arname (abfd, pathname, arhdr) /* FIXME: This interacts unpleasantly with ar's quick-append option. Fortunately ic960 users will never use that option. Fixing this is very hard; fortunately I know how to do it and will do so once - intel's release is out the door. */ + intel's release is out the door. */ struct ar_hdr *hdr = (struct ar_hdr *) arhdr; size_t length; @@ -1530,7 +1588,7 @@ bfd_bsd_truncate_arname (abfd, pathname, arhdr) { /* We could have foo/bar\\baz, or foo\\bar, or d:bar. */ char *bslash = strrchr (pathname, '\\'); - if (bslash > filename) + if (filename == NULL || (bslash != NULL && bslash > filename)) filename = bslash; if (filename == NULL && pathname[0] != '\0' && pathname[1] == ':') filename = pathname + 1; @@ -1564,7 +1622,7 @@ bfd_bsd_truncate_arname (abfd, pathname, arhdr) 4> truncate it before the .o, append .o, stuff THAT in. */ /* This is what gnu ar does. It's better but incompatible with the - bsd ar. */ + bsd ar. */ void bfd_gnu_truncate_arname (abfd, pathname, arhdr) @@ -1581,7 +1639,7 @@ bfd_gnu_truncate_arname (abfd, pathname, arhdr) { /* We could have foo/bar\\baz, or foo\\bar, or d:bar. */ char *bslash = strrchr (pathname, '\\'); - if (bslash > filename) + if (filename == NULL || (bslash != NULL && bslash > filename)) filename = bslash; if (filename == NULL && pathname[0] != '\0' && pathname[1] == ':') filename = pathname + 1; @@ -1612,7 +1670,7 @@ bfd_gnu_truncate_arname (abfd, pathname, arhdr) (hdr->ar_name)[length] = ar_padchar (abfd); } -/* The BFD is open for write and has its format set to bfd_archive */ +/* The BFD is open for write and has its format set to bfd_archive. */ boolean _bfd_write_archive_contents (arch) @@ -1623,7 +1681,7 @@ _bfd_write_archive_contents (arch) bfd_size_type elength = 0; const char *ename = NULL; boolean makemap = bfd_has_map (arch); - boolean hasobjects = false; /* if no .o's, don't bother to make a map */ + boolean hasobjects = false; /* If no .o's, don't bother to make a map. */ bfd_size_type wrote; unsigned int i; int tries; @@ -1633,6 +1691,11 @@ _bfd_write_archive_contents (arch) then construct a fresh ar_hdr for them. */ for (current = arch->archive_head; current; current = current->next) { + /* This check is checking the bfds for the objects we're reading + from (which are usually either an object file or archive on + disk), not the archive entries we're writing to. We don't + actually create bfds for the archive members, we just copy + them byte-wise when we write out the archive. */ if (bfd_write_p (current)) { bfd_set_error (bfd_error_invalid_operation); @@ -1645,14 +1708,14 @@ _bfd_write_archive_contents (arch) if (!current->arelt_data) return false; - /* Put in the file name */ + /* Put in the file name. */ BFD_SEND (arch, _bfd_truncate_arname, (arch, current->filename, (char *) arch_hdr (current))); } if (makemap && ! hasobjects) - { /* don't bother if we won't make a map! */ + { /* Don't bother if we won't make a map! */ if ((bfd_check_format (current, bfd_object)) #if 0 /* FIXME -- these are not set correctly */ && ((bfd_get_file_flags (current) & HAS_SYMS)) @@ -1712,7 +1775,7 @@ _bfd_write_archive_contents (arch) unsigned int remaining = arelt_size (current); struct ar_hdr *hdr = arch_hdr (current); - /* write ar header */ + /* Write ar header. */ if (bfd_write ((char *) hdr, 1, sizeof (*hdr), arch) != sizeof (*hdr)) return false; if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0) @@ -1762,7 +1825,7 @@ _bfd_write_archive_contents (arch) return true; } -/* Note that the namidx for the first symbol is 0 */ +/* Note that the namidx for the first symbol is 0. */ boolean _bfd_compute_and_write_armap (arch, elength) @@ -1780,7 +1843,7 @@ _bfd_compute_and_write_armap (arch, elength) long syms_max = 0; boolean ret; - /* Dunno if this is the best place for this info... */ + /* Dunno if this is the best place for this info... */ if (elength != 0) elength += sizeof (struct ar_hdr); elength += elength % 2; @@ -1795,13 +1858,12 @@ _bfd_compute_and_write_armap (arch, elength) if (first_name == NULL) goto error_return; - /* Drop all the files called __.SYMDEF, we're going to make our - own */ + /* Drop all the files called __.SYMDEF, we're going to make our own. */ while (arch->archive_head && strcmp (arch->archive_head->filename, "__.SYMDEF") == 0) arch->archive_head = arch->archive_head->next; - /* Map over each element */ + /* Map over each element. */ for (current = arch->archive_head; current != (bfd *) NULL; current = current->next, elt_no++) @@ -1832,7 +1894,8 @@ _bfd_compute_and_write_armap (arch, elength) if (symcount < 0) goto error_return; - /* Now map over all the symbols, picking out the ones we want */ + /* Now map over all the symbols, picking out the ones we + want. */ for (src_count = 0; src_count < symcount; src_count++) { flagword flags = (syms[src_count])->flags; @@ -1847,7 +1910,7 @@ _bfd_compute_and_write_armap (arch, elength) size_t namelen; struct orl *new_map; - /* This symbol will go into the archive header */ + /* This symbol will go into the archive header. */ if (orl_count == orl_max) { orl_max *= 2; @@ -1886,7 +1949,7 @@ _bfd_compute_and_write_armap (arch, elength) } } - /* OK, now we have collected all the data, let's write them out */ + /* OK, now we have collected all the data, let's write them out. */ ret = BFD_SEND (arch, write_armap, (arch, elength, map, orl_count, stridx)); @@ -1921,7 +1984,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx) int padit = stridx & 1; unsigned int ranlibsize = orl_count * BSD_SYMDEF_SIZE; unsigned int stringsize = stridx + padit; - /* Include 8 bytes to store ranlibsize and stringsize in output. */ + /* Include 8 bytes to store ranlibsize and stringsize in output. */ unsigned int mapsize = ranlibsize + stringsize + 8; file_ptr firstreal; bfd *current = arch->archive_head; @@ -1978,7 +2041,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx) return false; } - /* now write the strings themselves */ + /* Now write the strings themselves. */ bfd_h_put_32 (arch, stringsize, temp); if (bfd_write (temp, 1, sizeof (temp), arch) != sizeof (temp)) return false; @@ -1991,7 +2054,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx) } /* The spec sez this should be a newline. But in order to be - bug-compatible for sun's ar we use a null. */ + bug-compatible for sun's ar we use a null. */ if (padit) { if (bfd_write ("", 1, 1, arch) != 1) @@ -2021,10 +2084,13 @@ _bfd_archive_bsd_update_armap_timestamp (arch) if (bfd_stat (arch, &archstat) == -1) { perror (_("Reading archive file mod timestamp")); - return true; /* Can't read mod time for some reason */ + + /* Can't read mod time for some reason. */ + return true; } if (archstat.st_mtime <= bfd_ardata (arch)->armap_timestamp) - return true; /* OK by the linker's rules */ + /* OK by the linker's rules. */ + return true; /* Update the timestamp. */ bfd_ardata (arch)->armap_timestamp = archstat.st_mtime + ARMAP_TIME_OFFSET; @@ -2045,10 +2111,13 @@ _bfd_archive_bsd_update_armap_timestamp (arch) { /* FIXME: bfd can't call perror. */ perror (_("Writing updated armap timestamp")); - return true; /* Some error while writing */ + + /* Some error while writing. */ + return true; } - return false; /* We updated the timestamp successfully. */ + /* We updated the timestamp successfully. */ + return false; } /* A coff armap looks like : @@ -2074,7 +2143,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx) int stridx; { /* The size of the ranlib is the number of exported symbols in the - archive * the number of bytes in a int, + an int for the count */ + archive * the number of bytes in a int, + an int for the count. */ unsigned int ranlibsize = (symbol_count * 4) + 4; unsigned int stringsize = stridx; unsigned int mapsize = stringsize + ranlibsize; @@ -2088,7 +2157,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx) if (padit) mapsize++; - /* work out where the first object file will go in the archive */ + /* Work out where the first object file will go in the archive. */ archive_member_file_ptr = (mapsize + elength + sizeof (struct ar_hdr) @@ -2098,7 +2167,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx) hdr.ar_name[0] = '/'; sprintf (hdr.ar_size, "%-10d", (int) mapsize); sprintf (hdr.ar_date, "%ld", (long) time (NULL)); - /* This, at least, is what Intel coff sets the values to.: */ + /* This, at least, is what Intel coff sets the values to. */ sprintf ((hdr.ar_uid), "%d", 0); sprintf ((hdr.ar_gid), "%d", 0); sprintf ((hdr.ar_mode), "%-7o", (unsigned) 0); @@ -2108,7 +2177,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx) if (((char *) (&hdr))[i] == '\0') (((char *) (&hdr))[i]) = ' '; - /* Write the ar header for this item and the number of symbols */ + /* Write the ar header for this item and the number of symbols. */ if (bfd_write ((PTR) &hdr, 1, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) @@ -2126,23 +2195,23 @@ coff_write_armap (arch, elength, map, symbol_count, stridx) count = 0; while (current != (bfd *) NULL && count < symbol_count) { - /* For each symbol which is used defined in this object, write out - the object file's address in the archive */ + /* For each symbol which is used defined in this object, write + out the object file's address in the archive. */ - while (((bfd *) (map[count]).pos) == current) + while (count < symbol_count && ((bfd *) (map[count]).pos) == current) { bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr); count++; } - /* Add size of this archive entry */ + /* Add size of this archive entry. */ archive_member_file_ptr += (arelt_size (current) + sizeof (struct ar_hdr)); - /* remember aboout the even alignment */ + /* Remember aboout the even alignment. */ archive_member_file_ptr += archive_member_file_ptr % 2; current = current->next; } - /* now write the strings themselves */ + /* Now write the strings themselves. */ for (count = 0; count < symbol_count; count++) { size_t len = strlen (*map[count].name) + 1; @@ -2152,7 +2221,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx) } /* The spec sez this should be a newline. But in order to be - bug-compatible for arc960 we use a null. */ + bug-compatible for arc960 we use a null. */ if (padit) { if (bfd_write ("", 1, 1, arch) != 1) diff --git a/contrib/binutils/bfd/archures.c b/contrib/binutils/bfd/archures.c index 7462592..84b7744 100644 --- a/contrib/binutils/bfd/archures.c +++ b/contrib/binutils/bfd/archures.c @@ -31,7 +31,7 @@ SECTION BFD keeps one atom in a BFD describing the architecture of the data attached to the BFD: a pointer to a - <>. + <>. Pointers to structures can be requested independently of a BFD so that an architecture's information can be interrogated @@ -41,13 +41,13 @@ SECTION The set of default architectures is selected by the macro <>. This is normally set up in the @file{config/@var{target}.mt} file of your choice. If the name is not - defined, then all the architectures supported are included. + defined, then all the architectures supported are included. When BFD starts up, all the architectures are called with an initialize method. It is up to the architecture back end to insert as many items into the list of architectures as it wants to; generally this would be one for each machine and one for the - default case (an item with a machine field of 0). + default case (an item with a machine field of 0). BFD's idea of an architecture is implemented in @file{archures.c}. */ @@ -64,9 +64,9 @@ DESCRIPTION the family is in use. The machine gives a number which distinguishes different versions of the architecture, containing, for example, 2 and 3 for Intel i960 KA and i960 KB, - and 68020 and 68030 for Motorola 68020 and 68030. + and 68020 and 68030 for Motorola 68020 and 68030. -.enum bfd_architecture +.enum bfd_architecture .{ . bfd_arch_unknown, {* File arch not known *} . bfd_arch_obscure, {* Arch known, not one of these *} @@ -79,14 +79,14 @@ DESCRIPTION .#define bfd_mach_m68040 6 .#define bfd_mach_m68060 7 .#define bfd_mach_cpu32 8 -. bfd_arch_vax, {* DEC Vax *} +. bfd_arch_vax, {* DEC Vax *} . bfd_arch_i960, {* Intel 960 *} . {* The order of the following is important. -. lower number indicates a machine type that +. lower number indicates a machine type that . only accepts a subset of the instructions . available to machines with higher numbers. . The exception is the "ca", which is -. incompatible with all other machines except +. incompatible with all other machines except . "core". *} . .#define bfd_mach_i960_core 1 @@ -109,9 +109,12 @@ DESCRIPTION .#define bfd_mach_sparc_sparclite_le 6 .#define bfd_mach_sparc_v9 7 .#define bfd_mach_sparc_v9a 8 {* with ultrasparc add'ns *} +.#define bfd_mach_sparc_v8plusb 9 {* with cheetah add'ns *} +.#define bfd_mach_sparc_v9b 10 {* with cheetah add'ns *} .{* Nonzero if MACH has the v9 instruction set. *} .#define bfd_mach_sparc_v9_p(mach) \ -. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a) +. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \ +. && (mach) != bfd_mach_sparc_sparclite_le) . bfd_arch_mips, {* MIPS Rxxxx *} .#define bfd_mach_mips3000 3000 .#define bfd_mach_mips3900 3900 @@ -128,10 +131,17 @@ DESCRIPTION .#define bfd_mach_mips8000 8000 .#define bfd_mach_mips10000 10000 .#define bfd_mach_mips16 16 +.#define bfd_mach_mips32 32 +.#define bfd_mach_mips32_4k 3204113 {* 32, 04, octal 'K' *} +.#define bfd_mach_mips5 5 +.#define bfd_mach_mips64 64 +.#define bfd_mach_mips_sb1 12310201 {* octal 'SB', 01 *} . bfd_arch_i386, {* Intel 386 *} .#define bfd_mach_i386_i386 0 .#define bfd_mach_i386_i8086 1 .#define bfd_mach_i386_i386_intel_syntax 2 +.#define bfd_mach_x86_64 3 +.#define bfd_mach_x86_64_intel_syntax 4 . bfd_arch_we32k, {* AT&T WE32xxx *} . bfd_arch_tahoe, {* CCI/Harris Tahoe *} . bfd_arch_i860, {* Intel 860 *} @@ -146,13 +156,36 @@ DESCRIPTION .#define bfd_mach_h8300h 2 .#define bfd_mach_h8300s 3 . bfd_arch_powerpc, {* PowerPC *} +.#define bfd_mach_ppc 0 +.#define bfd_mach_ppc_403 403 +.#define bfd_mach_ppc_403gc 4030 +.#define bfd_mach_ppc_505 505 +.#define bfd_mach_ppc_601 601 +.#define bfd_mach_ppc_602 602 +.#define bfd_mach_ppc_603 603 +.#define bfd_mach_ppc_ec603e 6031 +.#define bfd_mach_ppc_604 604 +.#define bfd_mach_ppc_620 620 +.#define bfd_mach_ppc_630 630 +.#define bfd_mach_ppc_750 750 +.#define bfd_mach_ppc_860 860 +.#define bfd_mach_ppc_a35 35 +.#define bfd_mach_ppc_rs64ii 642 +.#define bfd_mach_ppc_rs64iii 643 +.#define bfd_mach_ppc_7400 7400 . bfd_arch_rs6000, {* IBM RS/6000 *} +.#define bfd_mach_rs6k 0 +.#define bfd_mach_rs6k_rs1 6001 +.#define bfd_mach_rs6k_rsc 6003 +.#define bfd_mach_rs6k_rs2 6002 . bfd_arch_hppa, {* HP PA RISC *} . bfd_arch_d10v, {* Mitsubishi D10V *} .#define bfd_mach_d10v 0 .#define bfd_mach_d10v_ts2 2 .#define bfd_mach_d10v_ts3 3 . bfd_arch_d30v, {* Mitsubishi D30V *} +. bfd_arch_m68hc11, {* Motorola 68HC11 *} +. bfd_arch_m68hc12, {* Motorola 68HC12 *} . bfd_arch_z8k, {* Zilog Z8000 *} .#define bfd_mach_z8001 1 .#define bfd_mach_z8002 2 @@ -178,16 +211,22 @@ DESCRIPTION .#define bfd_mach_arm_4T 6 .#define bfd_mach_arm_5 7 .#define bfd_mach_arm_5T 8 +.#define bfd_mach_arm_5TE 9 +.#define bfd_mach_arm_XScale 10 . bfd_arch_ns32k, {* National Semiconductors ns32000 *} . bfd_arch_w65, {* WDC 65816 *} . bfd_arch_tic30, {* Texas Instruments TMS320C30 *} +. bfd_arch_tic54x, {* Texas Instruments TMS320C54X *} . bfd_arch_tic80, {* TI TMS320c80 (MVP) *} . bfd_arch_v850, {* NEC V850 *} .#define bfd_mach_v850 0 .#define bfd_mach_v850e 'E' .#define bfd_mach_v850ea 'A' -. bfd_arch_arc, {* Argonaut RISC Core *} -.#define bfd_mach_arc_base 0 +. bfd_arch_arc, {* ARC Cores *} +.#define bfd_mach_arc_5 0 +.#define bfd_mach_arc_6 1 +.#define bfd_mach_arc_7 2 +.#define bfd_mach_arc_8 3 . bfd_arch_m32r, {* Mitsubishi M32R/D *} .#define bfd_mach_m32r 0 {* backwards compatibility *} .#define bfd_mach_m32rx 'x' @@ -198,20 +237,22 @@ DESCRIPTION . bfd_arch_fr30, .#define bfd_mach_fr30 0x46523330 . bfd_arch_mcore, +. bfd_arch_ia64, {* HP/Intel ia64 *} +.#define bfd_mach_ia64_elf64 0 +.#define bfd_mach_ia64_elf32 1 . bfd_arch_pj, . bfd_arch_avr, {* Atmel AVR microcontrollers *} .#define bfd_mach_avr1 1 .#define bfd_mach_avr2 2 .#define bfd_mach_avr3 3 .#define bfd_mach_avr4 4 +.#define bfd_mach_avr5 5 +. bfd_arch_cris, {* Axis CRIS *} . bfd_arch_last . }; - - */ /* - SUBSECTION bfd_arch_info @@ -220,7 +261,7 @@ DESCRIPTION within BFD. . -.typedef struct bfd_arch_info +.typedef struct bfd_arch_info .{ . int bits_per_word; . int bits_per_address; @@ -230,8 +271,8 @@ DESCRIPTION . const char *arch_name; . const char *printable_name; . unsigned int section_align_power; -. {* true if this is the default machine for the architecture *} -. boolean the_default; +. {* True if this is the default machine for the architecture. *} +. boolean the_default; . const struct bfd_arch_info * (*compatible) . PARAMS ((const struct bfd_arch_info *a, . const struct bfd_arch_info *b)); @@ -246,6 +287,7 @@ extern const bfd_arch_info_type bfd_a29k_arch; extern const bfd_arch_info_type bfd_alpha_arch; extern const bfd_arch_info_type bfd_arc_arch; extern const bfd_arch_info_type bfd_arm_arch; +extern const bfd_arch_info_type bfd_cris_arch; extern const bfd_arch_info_type bfd_d10v_arch; extern const bfd_arch_info_type bfd_d30v_arch; extern const bfd_arch_info_type bfd_h8300_arch; @@ -256,6 +298,8 @@ extern const bfd_arch_info_type bfd_i386_arch; extern const bfd_arch_info_type bfd_i860_arch; extern const bfd_arch_info_type bfd_i960_arch; extern const bfd_arch_info_type bfd_m32r_arch; +extern const bfd_arch_info_type bfd_m68hc11_arch; +extern const bfd_arch_info_type bfd_m68hc12_arch; extern const bfd_arch_info_type bfd_m68k_arch; extern const bfd_arch_info_type bfd_m88k_arch; extern const bfd_arch_info_type bfd_mips_arch; @@ -267,6 +311,7 @@ extern const bfd_arch_info_type bfd_pj_arch; extern const bfd_arch_info_type bfd_sh_arch; extern const bfd_arch_info_type bfd_sparc_arch; extern const bfd_arch_info_type bfd_tic30_arch; +extern const bfd_arch_info_type bfd_tic54x_arch; extern const bfd_arch_info_type bfd_tic80_arch; extern const bfd_arch_info_type bfd_vax_arch; extern const bfd_arch_info_type bfd_we32k_arch; @@ -277,9 +322,9 @@ extern const bfd_arch_info_type bfd_v850_arch; extern const bfd_arch_info_type bfd_fr30_arch; extern const bfd_arch_info_type bfd_mcore_arch; extern const bfd_arch_info_type bfd_avr_arch; +extern const bfd_arch_info_type bfd_ia64_arch; -static const bfd_arch_info_type * const bfd_archures_list[] = -{ +static const bfd_arch_info_type * const bfd_archures_list[] = { #ifdef SELECT_ARCHITECTURES SELECT_ARCHITECTURES, #else @@ -287,6 +332,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_alpha_arch, &bfd_arc_arch, &bfd_arm_arch, + &bfd_cris_arch, &bfd_d10v_arch, &bfd_d30v_arch, &bfd_h8300_arch, @@ -297,6 +343,8 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_i860_arch, &bfd_i960_arch, &bfd_m32r_arch, + &bfd_m68hc11_arch, + &bfd_m68hc12_arch, &bfd_m68k_arch, &bfd_m88k_arch, &bfd_mips_arch, @@ -307,6 +355,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_sh_arch, &bfd_sparc_arch, &bfd_tic30_arch, + &bfd_tic54x_arch, &bfd_tic80_arch, &bfd_vax_arch, &bfd_we32k_arch, @@ -317,6 +366,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_fr30_arch, &bfd_mcore_arch, &bfd_avr_arch, + &bfd_ia64_arch, #endif 0 }; @@ -341,8 +391,6 @@ bfd_printable_name (abfd) return abfd->arch_info->printable_name; } - - /* FUNCTION bfd_scan_arch @@ -354,7 +402,6 @@ DESCRIPTION Figure out if BFD supports any cpu which could be described with the name @var{string}. Return a pointer to an <> structure if a machine is found, otherwise NULL. - */ const bfd_arch_info_type * @@ -363,7 +410,7 @@ bfd_scan_arch (string) { const bfd_arch_info_type * const *app, *ap; - /* Look through all the installed architectures */ + /* Look through all the installed architectures. */ for (app = bfd_archures_list; *app != NULL; app++) { for (ap = *app; ap != NULL; ap = ap->next) @@ -376,8 +423,6 @@ bfd_scan_arch (string) return NULL; } - - /* FUNCTION bfd_arch_list @@ -388,7 +433,6 @@ SYNOPSIS DESCRIPTION Return a freshly malloced NULL-terminated vector of the names of all the valid BFD architectures. Do not modify the names. - */ const char ** @@ -399,7 +443,7 @@ bfd_arch_list () const char **name_list; const bfd_arch_info_type * const *app; - /* Determine the number of architectures */ + /* Determine the number of architectures. */ vec_length = 0; for (app = bfd_archures_list; *app != NULL; app++) { @@ -410,12 +454,12 @@ bfd_arch_list () } } - name_list = (CONST char **) + name_list = (const char **) bfd_malloc ((vec_length + 1) * sizeof (char **)); if (name_list == NULL) return NULL; - /* Point the list at each of the names */ + /* Point the list at each of the names. */ name_ptr = name_list; for (app = bfd_archures_list; *app != NULL; app++) { @@ -431,8 +475,6 @@ bfd_arch_list () return name_list; } - - /* FUNCTION bfd_arch_get_compatible @@ -458,15 +500,14 @@ bfd_arch_get_compatible (abfd, bbfd) /* If either architecture is unknown, then all we can do is assume the user knows what he's doing. */ if (abfd->arch_info->arch == bfd_arch_unknown) - return bbfd->arch_info; + return bbfd->arch_info; if (bbfd->arch_info->arch == bfd_arch_unknown) - return abfd->arch_info; + return abfd->arch_info; /* Otherwise architecture-specific code has to decide. */ return abfd->arch_info->compatible (abfd->arch_info, bbfd->arch_info); } - /* INTERNAL_DEFINITION bfd_default_arch_struct @@ -479,15 +520,13 @@ DESCRIPTION architecture of the file. .extern const bfd_arch_info_type bfd_default_arch_struct; - */ -const bfd_arch_info_type bfd_default_arch_struct = -{ - 32,32,8,bfd_arch_unknown,0,"unknown","unknown",2,true, - bfd_default_compatible, - bfd_default_scan, - 0, +const bfd_arch_info_type bfd_default_arch_struct = { + 32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, true, + bfd_default_compatible, + bfd_default_scan, + 0, }; /* @@ -522,7 +561,7 @@ DESCRIPTION Set the architecture and machine type in BFD @var{abfd} to @var{arch} and @var{mach}. Find the correct pointer to a structure and insert it into the <> - pointer. + pointer. */ boolean @@ -552,7 +591,6 @@ bfd_default_set_arch_mach (abfd, arch, mach) return false; } - /* FUNCTION bfd_get_arch @@ -563,14 +601,13 @@ SYNOPSIS DESCRIPTION Return the enumerated type which describes the BFD @var{abfd}'s architecture. - */ enum bfd_architecture bfd_get_arch (abfd) bfd *abfd; { - return abfd->arch_info->arch; + return abfd->arch_info->arch; } /* @@ -585,11 +622,11 @@ DESCRIPTION machine. */ -unsigned long +unsigned long bfd_get_mach (abfd) bfd *abfd; { - return abfd->arch_info->mach; + return abfd->arch_info->mach; } /* @@ -602,7 +639,6 @@ SYNOPSIS DESCRIPTION Return the number of bits in one of the BFD @var{abfd}'s architecture's bytes. - */ unsigned int @@ -631,9 +667,8 @@ bfd_arch_bits_per_address (abfd) return abfd->arch_info->bits_per_address; } - /* -INTERNAL_FUNCTION +INTERNAL_FUNCTION bfd_default_compatible SYNOPSIS @@ -646,7 +681,7 @@ DESCRIPTION */ const bfd_arch_info_type * -bfd_default_compatible (a,b) +bfd_default_compatible (a, b) const bfd_arch_info_type *a; const bfd_arch_info_type *b; { @@ -662,7 +697,6 @@ bfd_default_compatible (a,b) return a; } - /* INTERNAL_FUNCTION bfd_default_scan @@ -675,7 +709,7 @@ DESCRIPTION architecture hit and a machine hit. */ -boolean +boolean bfd_default_scan (info, string) const struct bfd_arch_info *info; const char *string; @@ -687,17 +721,17 @@ bfd_default_scan (info, string) const char *printable_name_colon; /* Exact match of the architecture name (ARCH_NAME) and also the - default architecture? */ + default architecture? */ if (strcasecmp (string, info->arch_name) == 0 && info->the_default) return true; - /* Exact match of the machine name (PRINTABLE_NAME)? */ + /* Exact match of the machine name (PRINTABLE_NAME)? */ if (strcasecmp (string, info->printable_name) == 0) return true; - + /* Given that printable_name contains no colon, attempt to match: - ARCH_NAME [ ":" ] PRINTABLE_NAME? */ + ARCH_NAME [ ":" ] PRINTABLE_NAME? */ printable_name_colon = strchr (info->printable_name, ':'); if (printable_name_colon == NULL) { @@ -720,7 +754,7 @@ bfd_default_scan (info, string) } /* Given that PRINTABLE_NAME has the form: ":" ; - Attempt to match: ? */ + Attempt to match: ? */ if (printable_name_colon != NULL) { int colon_index = printable_name_colon - info->printable_name; @@ -732,48 +766,61 @@ bfd_default_scan (info, string) /* Given that PRINTABLE_NAME has the form: ":" ; Do not attempt to match just , it could be ambigious. This test - is left until later. */ + is left until later. */ - /* NOTE: The below is retained for compatibility only. Please do not - add to this code */ + /* NOTE: The below is retained for compatibility only. Please do + not add to this code. */ /* See how much of the supplied string matches with the architecture, eg the string m68k:68020 would match the 68k entry - up to the :, then we get left with the machine number */ + up to the :, then we get left with the machine number. */ - for (ptr_src = string, ptr_tst = info->arch_name; + for (ptr_src = string, ptr_tst = info->arch_name; *ptr_src && *ptr_tst; - ptr_src++, ptr_tst++) + ptr_src++, ptr_tst++) { - if (*ptr_src != *ptr_tst) break; + if (*ptr_src != *ptr_tst) + break; } /* Chewed up as much of the architecture as will match, skip any - colons */ + colons. */ if (*ptr_src == ':') ptr_src++; - + if (*ptr_src == 0) { - /* nothing more, then only keep this one if it is the default - machine for this architecture */ + /* Nothing more, then only keep this one if it is the default + machine for this architecture. */ return info->the_default; } number = 0; while (isdigit ((unsigned char) *ptr_src)) { - number = number * 10 + *ptr_src - '0'; + number = number * 10 + *ptr_src - '0'; ptr_src++; } /* NOTE: The below is retained for compatibility only. - PLEASE DO NOT ADD TO THIS CODE. */ + PLEASE DO NOT ADD TO THIS CODE. */ - switch (number) + switch (number) { /* FIXME: These are needed to parse IEEE objects. */ - case 68000: + /* The following seven case's are here only for compatibility with + older binutils (at least IEEE objects from binutils 2.9.1 require + them). */ + case bfd_mach_m68000: + case bfd_mach_m68010: + case bfd_mach_m68020: + case bfd_mach_m68030: + case bfd_mach_m68040: + case bfd_mach_m68060: + case bfd_mach_cpu32: + arch = bfd_arch_m68k; + break; + case 68000: arch = bfd_arch_m68k; number = bfd_mach_m68000; break; @@ -840,11 +887,11 @@ bfd_default_scan (info, string) number = bfd_mach_sh4; break; - default: + default: return false; } - if (arch != info->arch) + if (arch != info->arch) return false; if (number != info->mach) @@ -853,7 +900,6 @@ bfd_default_scan (info, string) return true; } - /* FUNCTION bfd_get_arch_info @@ -872,7 +918,6 @@ bfd_get_arch_info (abfd) return abfd->arch_info; } - /* FUNCTION bfd_lookup_arch @@ -890,7 +935,7 @@ DESCRIPTION default. */ -const bfd_arch_info_type * +const bfd_arch_info_type * bfd_lookup_arch (arch, machine) enum bfd_architecture arch; unsigned long machine; @@ -911,7 +956,6 @@ bfd_lookup_arch (arch, machine) return NULL; } - /* FUNCTION bfd_printable_arch_mach @@ -922,7 +966,7 @@ SYNOPSIS DESCRIPTION Return a printable string representing the architecture and - machine type. + machine type. This routine is depreciated. */ @@ -932,11 +976,11 @@ bfd_printable_arch_mach (arch, machine) enum bfd_architecture arch; unsigned long machine; { - const bfd_arch_info_type * ap = bfd_lookup_arch (arch, machine); + const bfd_arch_info_type *ap = bfd_lookup_arch (arch, machine); - if (ap) - return ap->printable_name; - return "UNKNOWN!"; + if (ap) + return ap->printable_name; + return "UNKNOWN!"; } /* @@ -950,15 +994,14 @@ DESCRIPTION Return the number of octets (8-bit quantities) per target byte (minimum addressable unit). In most cases, this will be one, but some DSP targets have 16, 32, or even 48 bits per byte. - */ unsigned int bfd_octets_per_byte (abfd) - bfd * abfd; + bfd *abfd; { - return bfd_arch_mach_octets_per_byte (bfd_get_arch (abfd), - bfd_get_mach (abfd)); + return bfd_arch_mach_octets_per_byte (bfd_get_arch (abfd), + bfd_get_mach (abfd)); } /* @@ -971,19 +1014,19 @@ SYNOPSIS DESCRIPTION See bfd_octets_per_byte. - + This routine is provided for those cases where a bfd * is not available */ unsigned int bfd_arch_mach_octets_per_byte (arch, mach) - enum bfd_architecture arch; - unsigned long mach; + enum bfd_architecture arch; + unsigned long mach; { - const bfd_arch_info_type * ap = bfd_lookup_arch (arch, mach); - - if (ap) - return ap->bits_per_byte / 8; - return 1; + const bfd_arch_info_type *ap = bfd_lookup_arch (arch, mach); + + if (ap) + return ap->bits_per_byte / 8; + return 1; } diff --git a/contrib/binutils/bfd/armnetbsd.c b/contrib/binutils/bfd/armnetbsd.c index 3e6ee47..05d8ad0 100644 --- a/contrib/binutils/bfd/armnetbsd.c +++ b/contrib/binutils/bfd/armnetbsd.c @@ -15,7 +15,7 @@ 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. */ +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define BYTES_IN_WORD 4 #undef TARGET_IS_BIG_ENDIAN_P diff --git a/contrib/binutils/bfd/bfd-in.h b/contrib/binutils/bfd/bfd-in.h index 09753c2..683aa0f 100644 --- a/contrib/binutils/bfd/bfd-in.h +++ b/contrib/binutils/bfd/bfd-in.h @@ -23,7 +23,7 @@ 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. */ -/* bfd.h -- The only header file required by users of the bfd library +/* bfd.h -- The only header file required by users of the bfd library The bfd.h file is generated from bfd-in.h and various .c files; if you change it, your changes will probably be lost. @@ -84,7 +84,7 @@ typedef struct _bfd bfd; /* General rules: functions which are boolean return true on success and false on failure (unless they're a predicate). -- bfd.doc */ /* I'm sure this is going to break something and someone is going to - force me to change it. */ + force me to change it. */ /* typedef enum boolean {false, true} boolean; */ /* Yup, SVR4 has a "typedef enum boolean" in -fnf */ /* It gets worse if the host also defines a true/false enum... -sts */ @@ -93,7 +93,7 @@ typedef struct _bfd bfd; #define TRUE_FALSE_ALREADY_DEFINED #endif #ifdef MPW -/* Pre-emptive strike - get the file with the enum. */ +/* Pre-emptive strike - get the file with the enum. */ #include #define TRUE_FALSE_ALREADY_DEFINED #endif /* MPW */ @@ -109,7 +109,7 @@ typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean; /* FIXME: This should be using off_t from . For now, try to avoid breaking stuff by not including here. This will break on systems with 64-bit file offsets (e.g. 4.4BSD). - Probably the best long-term answer is to avoid using file_ptr AND off_t + Probably the best long-term answer is to avoid using file_ptr AND off_t in this header file, and to handle this in the BFD implementation rather than in its interface. */ /* typedef off_t file_ptr; */ @@ -177,8 +177,8 @@ typedef unsigned long symvalue; typedef unsigned long bfd_size_type; /* Print a bfd_vma x on stream s. */ -#define fprintf_vma(s,x) fprintf(s, "%08lx", x) -#define sprintf_vma(s,x) sprintf(s, "%08lx", x) +#define fprintf_vma(s,x) fprintf (s, "%08lx", x) +#define sprintf_vma(s,x) sprintf (s, "%08lx", x) #endif /* not BFD64 */ @@ -284,19 +284,17 @@ typedef struct carsym { file_ptr file_offset; /* look here to find the file */ } carsym; /* to make these you call a carsymogen */ - /* Used in generating armaps (archive tables of contents). Perhaps just a forward definition would do? */ struct orl { /* output ranlib */ - char **name; /* symbol name */ + char **name; /* symbol name */ file_ptr pos; /* bfd* or file position */ int namidx; /* index into string table */ }; - /* Linenumber stuff */ typedef struct lineno_cache_entry { - unsigned int line_number; /* Linenumber from start of function*/ + unsigned int line_number; /* Linenumber from start of function*/ union { struct symbol_cache_entry *sym; /* Function name */ unsigned long offset; /* Offset into section */ @@ -327,15 +325,15 @@ typedef struct sec *sec_ptr; #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true) #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) -typedef struct stat stat_type; +typedef struct stat stat_type; typedef enum bfd_print_symbol -{ +{ bfd_print_symbol_name, bfd_print_symbol_more, bfd_print_symbol_all } bfd_print_symbol_type; - + /* Information about a symbol that nm needs. */ typedef struct _symbol_info @@ -344,7 +342,7 @@ typedef struct _symbol_info char type; CONST char *name; /* Symbol name. */ unsigned char stab_type; /* Stab type. */ - char stab_other; /* Stab other. */ + char stab_other; /* Stab other. */ short stab_desc; /* Stab desc. */ CONST char *stab_name; /* String for stab type. */ } symbol_info; @@ -481,7 +479,6 @@ extern long bfd_tell PARAMS ((bfd *abfd)); extern int bfd_flush PARAMS ((bfd *abfd)); extern int bfd_stat PARAMS ((bfd *abfd, struct stat *)); - /* Cast from const char * to char * so that caller can assign to a char * without a warning. */ #define bfd_get_filename(abfd) ((char *) (abfd)->filename) @@ -489,6 +486,9 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *)); #define bfd_get_format(abfd) ((abfd)->format) #define bfd_get_target(abfd) ((abfd)->xvec->name) #define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) +#define bfd_family_coff(abfd) \ + (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ + bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) #define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) #define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) #define bfd_header_big_endian(abfd) \ @@ -511,7 +511,7 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *)); #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean)(bool)), true) +#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true) extern boolean bfd_record_phdr PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma, @@ -537,6 +537,11 @@ void bfd_putb32 PARAMS ((bfd_vma, unsigned char *)); void bfd_putl32 PARAMS ((bfd_vma, unsigned char *)); void bfd_putb16 PARAMS ((bfd_vma, unsigned char *)); void bfd_putl16 PARAMS ((bfd_vma, unsigned char *)); + +/* Byte swapping routines which take size and endiannes as arguments. */ + +bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean)); +void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean)); /* Externally visible ECOFF routines. */ @@ -624,7 +629,10 @@ extern boolean bfd_elf64_size_dynamic_sections const char * const *, struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *)); extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *)); +extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *)); extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *)); +extern struct bfd_link_needed_list *bfd_elf_get_runpath_list + PARAMS ((bfd *, struct bfd_link_info *)); /* Return an upper bound on the number of bytes required to store a copy of ABFD's program header table entries. Return -1 if an error @@ -640,6 +648,16 @@ extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd)); error occurs; bfd_get_error will return an appropriate code. */ extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs)); +/* Return the arch_size field of an elf bfd, or -1 if not elf. */ +extern int bfd_get_arch_size PARAMS ((bfd *)); + +/* Return true if address "naturally" sign extends, or -1 if not elf. */ +extern int bfd_get_sign_extend_vma PARAMS ((bfd *)); + +extern boolean bfd_m68k_elf32_create_embedded_relocs + PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, + char **)); + /* SunOS shared library support routines for the linker. */ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list @@ -718,6 +736,10 @@ extern boolean bfd_coff_get_auxent extern boolean bfd_coff_set_symbol_class PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int)); +extern boolean bfd_m68k_coff_create_embedded_relocs + PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, + char **)); + /* ARM Interworking support. Called from linker. */ extern boolean bfd_arm_allocate_interworking_sections PARAMS ((struct bfd_link_info *)); @@ -748,4 +770,11 @@ extern boolean bfd_elf32_arm_process_before_allocation extern boolean bfd_elf32_arm_get_bfd_for_interworking PARAMS ((bfd *, struct bfd_link_info *)); +/* TI COFF load page support. */ +extern void bfd_ticoff_set_section_load_page + PARAMS ((struct sec *, int)); + +extern int bfd_ticoff_get_section_load_page + PARAMS ((struct sec *)); + /* And more from the source. */ diff --git a/contrib/binutils/bfd/bfd-in2.h b/contrib/binutils/bfd/bfd-in2.h index 4c3eea0..b8e864b 100644 --- a/contrib/binutils/bfd/bfd-in2.h +++ b/contrib/binutils/bfd/bfd-in2.h @@ -23,7 +23,7 @@ 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. */ -/* bfd.h -- The only header file required by users of the bfd library +/* bfd.h -- The only header file required by users of the bfd library The bfd.h file is generated from bfd-in.h and various .c files; if you change it, your changes will probably be lost. @@ -84,7 +84,7 @@ typedef struct _bfd bfd; /* General rules: functions which are boolean return true on success and false on failure (unless they're a predicate). -- bfd.doc */ /* I'm sure this is going to break something and someone is going to - force me to change it. */ + force me to change it. */ /* typedef enum boolean {false, true} boolean; */ /* Yup, SVR4 has a "typedef enum boolean" in -fnf */ /* It gets worse if the host also defines a true/false enum... -sts */ @@ -93,7 +93,7 @@ typedef struct _bfd bfd; #define TRUE_FALSE_ALREADY_DEFINED #endif #ifdef MPW -/* Pre-emptive strike - get the file with the enum. */ +/* Pre-emptive strike - get the file with the enum. */ #include #define TRUE_FALSE_ALREADY_DEFINED #endif /* MPW */ @@ -109,7 +109,7 @@ typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean; /* FIXME: This should be using off_t from . For now, try to avoid breaking stuff by not including here. This will break on systems with 64-bit file offsets (e.g. 4.4BSD). - Probably the best long-term answer is to avoid using file_ptr AND off_t + Probably the best long-term answer is to avoid using file_ptr AND off_t in this header file, and to handle this in the BFD implementation rather than in its interface. */ /* typedef off_t file_ptr; */ @@ -177,8 +177,8 @@ typedef unsigned long symvalue; typedef unsigned long bfd_size_type; /* Print a bfd_vma x on stream s. */ -#define fprintf_vma(s,x) fprintf(s, "%08lx", x) -#define sprintf_vma(s,x) sprintf(s, "%08lx", x) +#define fprintf_vma(s,x) fprintf (s, "%08lx", x) +#define sprintf_vma(s,x) sprintf (s, "%08lx", x) #endif /* not BFD64 */ @@ -284,19 +284,17 @@ typedef struct carsym { file_ptr file_offset; /* look here to find the file */ } carsym; /* to make these you call a carsymogen */ - /* Used in generating armaps (archive tables of contents). Perhaps just a forward definition would do? */ struct orl { /* output ranlib */ - char **name; /* symbol name */ + char **name; /* symbol name */ file_ptr pos; /* bfd* or file position */ int namidx; /* index into string table */ }; - /* Linenumber stuff */ typedef struct lineno_cache_entry { - unsigned int line_number; /* Linenumber from start of function*/ + unsigned int line_number; /* Linenumber from start of function*/ union { struct symbol_cache_entry *sym; /* Function name */ unsigned long offset; /* Offset into section */ @@ -327,15 +325,15 @@ typedef struct sec *sec_ptr; #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true) #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true) -typedef struct stat stat_type; +typedef struct stat stat_type; typedef enum bfd_print_symbol -{ +{ bfd_print_symbol_name, bfd_print_symbol_more, bfd_print_symbol_all } bfd_print_symbol_type; - + /* Information about a symbol that nm needs. */ typedef struct _symbol_info @@ -344,7 +342,7 @@ typedef struct _symbol_info char type; CONST char *name; /* Symbol name. */ unsigned char stab_type; /* Stab type. */ - char stab_other; /* Stab other. */ + char stab_other; /* Stab other. */ short stab_desc; /* Stab desc. */ CONST char *stab_name; /* String for stab type. */ } symbol_info; @@ -481,7 +479,6 @@ extern long bfd_tell PARAMS ((bfd *abfd)); extern int bfd_flush PARAMS ((bfd *abfd)); extern int bfd_stat PARAMS ((bfd *abfd, struct stat *)); - /* Cast from const char * to char * so that caller can assign to a char * without a warning. */ #define bfd_get_filename(abfd) ((char *) (abfd)->filename) @@ -489,6 +486,9 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *)); #define bfd_get_format(abfd) ((abfd)->format) #define bfd_get_target(abfd) ((abfd)->xvec->name) #define bfd_get_flavour(abfd) ((abfd)->xvec->flavour) +#define bfd_family_coff(abfd) \ + (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \ + bfd_get_flavour (abfd) == bfd_target_xcoff_flavour) #define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG) #define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE) #define bfd_header_big_endian(abfd) \ @@ -511,7 +511,7 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *)); #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) -#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean)(bool)), true) +#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true) extern boolean bfd_record_phdr PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma, @@ -537,6 +537,11 @@ void bfd_putb32 PARAMS ((bfd_vma, unsigned char *)); void bfd_putl32 PARAMS ((bfd_vma, unsigned char *)); void bfd_putb16 PARAMS ((bfd_vma, unsigned char *)); void bfd_putl16 PARAMS ((bfd_vma, unsigned char *)); + +/* Byte swapping routines which take size and endiannes as arguments. */ + +bfd_vma bfd_get_bits PARAMS ((bfd_byte *, int, boolean)); +void bfd_put_bits PARAMS ((bfd_vma, bfd_byte *, int, boolean)); /* Externally visible ECOFF routines. */ @@ -624,7 +629,10 @@ extern boolean bfd_elf64_size_dynamic_sections const char * const *, struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *)); extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *)); +extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *)); extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *)); +extern struct bfd_link_needed_list *bfd_elf_get_runpath_list + PARAMS ((bfd *, struct bfd_link_info *)); /* Return an upper bound on the number of bytes required to store a copy of ABFD's program header table entries. Return -1 if an error @@ -640,6 +648,16 @@ extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd)); error occurs; bfd_get_error will return an appropriate code. */ extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs)); +/* Return the arch_size field of an elf bfd, or -1 if not elf. */ +extern int bfd_get_arch_size PARAMS ((bfd *)); + +/* Return true if address "naturally" sign extends, or -1 if not elf. */ +extern int bfd_get_sign_extend_vma PARAMS ((bfd *)); + +extern boolean bfd_m68k_elf32_create_embedded_relocs + PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, + char **)); + /* SunOS shared library support routines for the linker. */ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list @@ -718,6 +736,10 @@ extern boolean bfd_coff_get_auxent extern boolean bfd_coff_set_symbol_class PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int)); +extern boolean bfd_m68k_coff_create_embedded_relocs + PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *, + char **)); + /* ARM Interworking support. Called from linker. */ extern boolean bfd_arm_allocate_interworking_sections PARAMS ((struct bfd_link_info *)); @@ -748,8 +770,15 @@ extern boolean bfd_elf32_arm_process_before_allocation extern boolean bfd_elf32_arm_get_bfd_for_interworking PARAMS ((bfd *, struct bfd_link_info *)); +/* TI COFF load page support. */ +extern void bfd_ticoff_set_section_load_page + PARAMS ((struct sec *, int)); + +extern int bfd_ticoff_get_section_load_page + PARAMS ((struct sec *)); + /* And more from the source. */ -void +void bfd_init PARAMS ((void)); bfd * @@ -764,32 +793,32 @@ bfd_openstreamr PARAMS ((const char *, const char *, PTR)); bfd * bfd_openw PARAMS ((CONST char *filename, CONST char *target)); -boolean +boolean bfd_close PARAMS ((bfd *abfd)); -boolean +boolean bfd_close_all_done PARAMS ((bfd *)); bfd * bfd_create PARAMS ((CONST char *filename, bfd *templ)); -boolean +boolean bfd_make_writable PARAMS ((bfd *abfd)); -boolean +boolean bfd_make_readable PARAMS ((bfd *abfd)); - /* Byte swapping macros for user section data. */ +/* Byte swapping macros for user section data. */ #define bfd_put_8(abfd, val, ptr) \ - ((void) (*((unsigned char *)(ptr)) = (unsigned char)(val))) + ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val))) #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(unsigned char *)(ptr)) + (*(unsigned char *) (ptr)) #define bfd_get_signed_8(abfd, ptr) \ - ((*(unsigned char *)(ptr) ^ 0x80) - 0x80) + ((*(unsigned char *) (ptr) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND(abfd, bfd_putx16, ((val),(ptr))) @@ -833,7 +862,7 @@ bfd_make_readable PARAMS ((bfd *abfd)); : (abort (), (void) 0)) - /* Byte swapping macros for file header data. */ +/* Byte swapping macros for file header data. */ #define bfd_h_put_8(abfd, val, ptr) \ bfd_put_8 (abfd, val, ptr) @@ -871,355 +900,377 @@ bfd_make_readable PARAMS ((bfd *abfd)); #define bfd_h_get_signed_64(abfd, ptr) \ BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr)) - /* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ +/* This structure is used for a comdat section, as in PE. A comdat + section is associated with a particular symbol. When the linker + sees a comdat section, it keeps only one of the sections with a + given name and associated with a given symbol. */ struct bfd_comdat_info { - /* The name of the symbol associated with a comdat section. */ + /* The name of the symbol associated with a comdat section. */ const char *name; - /* The local symbol table index of the symbol associated with a + /* The local symbol table index of the symbol associated with a comdat section. This is only meaningful to the object file format specific code; it is not an index into the list returned by bfd_canonicalize_symtab. */ long symbol; - - /* If this section is being discarded, the linker uses this field - to point to the input section which is being kept. */ - struct sec *sec; }; typedef struct sec { - /* The name of the section; the name isn't a copy, the pointer is - the same as that passed to bfd_make_section. */ + /* The name of the section; the name isn't a copy, the pointer is + the same as that passed to bfd_make_section. */ - CONST char *name; + const char *name; - /* Which section is it; 0..nth. */ + /* A unique sequence number. */ - int index; + int id; - /* The next section in the list belonging to the BFD, or NULL. */ + /* Which section is it; 0..nth. */ - struct sec *next; + int index; - /* The field flags contains attributes of the section. Some - flags are read in from the object file, and some are - synthesized from other information. */ + /* The next section in the list belonging to the BFD, or NULL. */ - flagword flags; + struct sec *next; + + /* The field flags contains attributes of the section. Some + flags are read in from the object file, and some are + synthesized from other information. */ + + flagword flags; #define SEC_NO_FLAGS 0x000 - /* Tells the OS to allocate space for this section when loading. - This is clear for a section containing debug information - only. */ + /* Tells the OS to allocate space for this section when loading. + This is clear for a section containing debug information only. */ #define SEC_ALLOC 0x001 - /* Tells the OS to load the section from the file when loading. - This is clear for a .bss section. */ + /* Tells the OS to load the section from the file when loading. + This is clear for a .bss section. */ #define SEC_LOAD 0x002 - /* The section contains data still to be relocated, so there is - some relocation information too. */ + /* The section contains data still to be relocated, so there is + some relocation information too. */ #define SEC_RELOC 0x004 -#if 0 /* Obsolete ? */ +#if 0 /* Obsolete ? */ #define SEC_BALIGN 0x008 #endif - /* A signal to the OS that the section contains read only - data. */ + /* A signal to the OS that the section contains read only data. */ #define SEC_READONLY 0x010 - /* The section contains code only. */ + /* The section contains code only. */ #define SEC_CODE 0x020 - /* The section contains data only. */ + /* The section contains data only. */ #define SEC_DATA 0x040 - /* The section will reside in ROM. */ + /* The section will reside in ROM. */ #define SEC_ROM 0x080 - /* The section contains constructor information. This section - type is used by the linker to create lists of constructors and - destructors used by <>. When a back end sees a symbol - which should be used in a constructor list, it creates a new - section for the type of name (e.g., <<__CTOR_LIST__>>), attaches - the symbol to it, and builds a relocation. To build the lists - of constructors, all the linker has to do is catenate all the - sections called <<__CTOR_LIST__>> and relocate the data - contained within - exactly the operations it would peform on - standard data. */ + /* The section contains constructor information. This section + type is used by the linker to create lists of constructors and + destructors used by <>. When a back end sees a symbol + which should be used in a constructor list, it creates a new + section for the type of name (e.g., <<__CTOR_LIST__>>), attaches + the symbol to it, and builds a relocation. To build the lists + of constructors, all the linker has to do is catenate all the + sections called <<__CTOR_LIST__>> and relocate the data + contained within - exactly the operations it would peform on + standard data. */ #define SEC_CONSTRUCTOR 0x100 - /* The section is a constructor, and should be placed at the - end of the text, data, or bss section(?). */ + /* The section is a constructor, and should be placed at the + end of the text, data, or bss section(?). */ #define SEC_CONSTRUCTOR_TEXT 0x1100 #define SEC_CONSTRUCTOR_DATA 0x2100 #define SEC_CONSTRUCTOR_BSS 0x3100 - /* The section has contents - a data section could be - <> | <>; a debug section could be - <> */ + /* The section has contents - a data section could be + <> | <>; a debug section could be + <> */ #define SEC_HAS_CONTENTS 0x200 - /* An instruction to the linker to not output the section - even if it has information which would normally be written. */ + /* An instruction to the linker to not output the section + even if it has information which would normally be written. */ #define SEC_NEVER_LOAD 0x400 - /* The section is a COFF shared library section. This flag is - only for the linker. If this type of section appears in - the input file, the linker must copy it to the output file - without changing the vma or size. FIXME: Although this - was originally intended to be general, it really is COFF - specific (and the flag was renamed to indicate this). It - might be cleaner to have some more general mechanism to - allow the back end to control what the linker does with - sections. */ + /* The section is a COFF shared library section. This flag is + only for the linker. If this type of section appears in + the input file, the linker must copy it to the output file + without changing the vma or size. FIXME: Although this + was originally intended to be general, it really is COFF + specific (and the flag was renamed to indicate this). It + might be cleaner to have some more general mechanism to + allow the back end to control what the linker does with + sections. */ #define SEC_COFF_SHARED_LIBRARY 0x800 - /* The section contains common symbols (symbols may be defined - multiple times, the value of a symbol is the amount of - space it requires, and the largest symbol value is the one - used). Most targets have exactly one of these (which we - translate to bfd_com_section_ptr), but ECOFF has two. */ + /* The section has GOT references. This flag is only for the + linker, and is currently only used by the elf32-hppa back end. + It will be set if global offset table references were detected + in this section, which indicate to the linker that the section + contains PIC code, and must be handled specially when doing a + static link. */ +#define SEC_HAS_GOT_REF 0x4000 + + /* The section contains common symbols (symbols may be defined + multiple times, the value of a symbol is the amount of + space it requires, and the largest symbol value is the one + used). Most targets have exactly one of these (which we + translate to bfd_com_section_ptr), but ECOFF has two. */ #define SEC_IS_COMMON 0x8000 - /* The section contains only debugging information. For - example, this is set for ELF .debug and .stab sections. - strip tests this flag to see if a section can be - discarded. */ + /* The section contains only debugging information. For + example, this is set for ELF .debug and .stab sections. + strip tests this flag to see if a section can be + discarded. */ #define SEC_DEBUGGING 0x10000 - /* The contents of this section are held in memory pointed to - by the contents field. This is checked by - bfd_get_section_contents, and the data is retrieved from - memory if appropriate. */ + /* The contents of this section are held in memory pointed to + by the contents field. This is checked by bfd_get_section_contents, + and the data is retrieved from memory if appropriate. */ #define SEC_IN_MEMORY 0x20000 - /* The contents of this section are to be excluded by the - linker for executable and shared objects unless those - objects are to be further relocated. */ + /* The contents of this section are to be excluded by the + linker for executable and shared objects unless those + objects are to be further relocated. */ #define SEC_EXCLUDE 0x40000 - /* The contents of this section are to be sorted by the - based on the address specified in the associated symbol - table. */ + /* The contents of this section are to be sorted by the + based on the address specified in the associated symbol + table. */ #define SEC_SORT_ENTRIES 0x80000 - /* When linking, duplicate sections of the same name should be - discarded, rather than being combined into a single section as - is usually done. This is similar to how common symbols are - handled. See SEC_LINK_DUPLICATES below. */ + /* When linking, duplicate sections of the same name should be + discarded, rather than being combined into a single section as + is usually done. This is similar to how common symbols are + handled. See SEC_LINK_DUPLICATES below. */ #define SEC_LINK_ONCE 0x100000 - /* If SEC_LINK_ONCE is set, this bitfield describes how the linker - should handle duplicate sections. */ + /* If SEC_LINK_ONCE is set, this bitfield describes how the linker + should handle duplicate sections. */ #define SEC_LINK_DUPLICATES 0x600000 - /* This value for SEC_LINK_DUPLICATES means that duplicate - sections with the same name should simply be discarded. */ + /* This value for SEC_LINK_DUPLICATES means that duplicate + sections with the same name should simply be discarded. */ #define SEC_LINK_DUPLICATES_DISCARD 0x0 - /* This value for SEC_LINK_DUPLICATES means that the linker - should warn if there are any duplicate sections, although - it should still only link one copy. */ + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if there are any duplicate sections, although + it should still only link one copy. */ #define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000 - /* This value for SEC_LINK_DUPLICATES means that the linker - should warn if any duplicate sections are a different size. */ + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if any duplicate sections are a different size. */ #define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000 - /* This value for SEC_LINK_DUPLICATES means that the linker - should warn if any duplicate sections contain different - contents. */ + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if any duplicate sections contain different + contents. */ #define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000 - /* This section was created by the linker as part of dynamic - relocation or other arcane processing. It is skipped when - going through the first-pass output, trusting that someone - else up the line will take care of it later. */ + /* This section was created by the linker as part of dynamic + relocation or other arcane processing. It is skipped when + going through the first-pass output, trusting that someone + else up the line will take care of it later. */ #define SEC_LINKER_CREATED 0x800000 - /* This section should not be subject to garbage collection. */ + /* This section should not be subject to garbage collection. */ #define SEC_KEEP 0x1000000 - /* This section contains "short" data, and should be placed - "near" the GP. */ + /* This section contains "short" data, and should be placed + "near" the GP. */ #define SEC_SMALL_DATA 0x2000000 - /* This section contains data which may be shared with other - executables or shared objects. */ + /* This section contains data which may be shared with other + executables or shared objects. */ #define SEC_SHARED 0x4000000 - /* End of section flags. */ + /* When a section with this flag is being linked, then if the size of + the input section is less than a page, it should not cross a page + boundary. If the size of the input section is one page or more, it + should be aligned on a page boundary. */ +#define SEC_BLOCK 0x8000000 + + /* Conditionally link this section; do not link if there are no + references found to any symbol in the section. */ +#define SEC_CLINK 0x10000000 - /* Some internal packed boolean fields. */ + /* End of section flags. */ - /* See the vma field. */ - unsigned int user_set_vma : 1; + /* Some internal packed boolean fields. */ - /* Whether relocations have been processed. */ - unsigned int reloc_done : 1; + /* See the vma field. */ + unsigned int user_set_vma : 1; - /* A mark flag used by some of the linker backends. */ - unsigned int linker_mark : 1; + /* Whether relocations have been processed. */ + unsigned int reloc_done : 1; - /* A mark flag used by some linker backends for garbage collection. */ - unsigned int gc_mark : 1; + /* A mark flag used by some of the linker backends. */ + unsigned int linker_mark : 1; - /* End of internal packed boolean fields. */ + /* A mark flag used by some linker backends for garbage collection. */ + unsigned int gc_mark : 1; - /* The virtual memory address of the section - where it will be - at run time. The symbols are relocated against this. The - user_set_vma flag is maintained by bfd; if it's not set, the - backend can assign addresses (for example, in <>, where - the default address for <<.data>> is dependent on the specific - target and various flags). */ + /* Used by the ELF code to mark sections which have been allocated to segments. */ + unsigned int segment_mark : 1; - bfd_vma vma; + /* End of internal packed boolean fields. */ - /* The load address of the section - where it would be in a - rom image; really only used for writing section header - information. */ + /* The virtual memory address of the section - where it will be + at run time. The symbols are relocated against this. The + user_set_vma flag is maintained by bfd; if it's not set, the + backend can assign addresses (for example, in <>, where + the default address for <<.data>> is dependent on the specific + target and various flags). */ - bfd_vma lma; + bfd_vma vma; - /* The size of the section in octets, as it will be output. - Contains a value even if the section has no contents (e.g., the - size of <<.bss>>). This will be filled in after relocation. */ + /* The load address of the section - where it would be in a + rom image; really only used for writing section header + information. */ - bfd_size_type _cooked_size; + bfd_vma lma; - /* The original size on disk of the section, in octets. Normally this - value is the same as the size, but if some relaxing has - been done, then this value will be bigger. */ + /* The size of the section in octets, as it will be output. + Contains a value even if the section has no contents (e.g., the + size of <<.bss>>). This will be filled in after relocation. */ - bfd_size_type _raw_size; + bfd_size_type _cooked_size; - /* If this section is going to be output, then this value is the - offset in *bytes* into the output section of the first byte in the - input section (byte ==> smallest addressable unit on the - target). In most cases, if this was going to start at the - 100th octet (8-bit quantity) in the output section, this value - would be 100. However, if the target byte size is 16 bits - (bfd_octets_per_byte is "2"), this value would be 50. */ + /* The original size on disk of the section, in octets. Normally this + value is the same as the size, but if some relaxing has + been done, then this value will be bigger. */ - bfd_vma output_offset; + bfd_size_type _raw_size; - /* The output section through which to map on output. */ + /* If this section is going to be output, then this value is the + offset in *bytes* into the output section of the first byte in the + input section (byte ==> smallest addressable unit on the + target). In most cases, if this was going to start at the + 100th octet (8-bit quantity) in the output section, this value + would be 100. However, if the target byte size is 16 bits + (bfd_octets_per_byte is "2"), this value would be 50. */ - struct sec *output_section; + bfd_vma output_offset; - /* The alignment requirement of the section, as an exponent of 2 - - e.g., 3 aligns to 2^3 (or 8). */ + /* The output section through which to map on output. */ - unsigned int alignment_power; + struct sec *output_section; - /* If an input section, a pointer to a vector of relocation - records for the data in this section. */ + /* The alignment requirement of the section, as an exponent of 2 - + e.g., 3 aligns to 2^3 (or 8). */ - struct reloc_cache_entry *relocation; + unsigned int alignment_power; - /* If an output section, a pointer to a vector of pointers to - relocation records for the data in this section. */ + /* If an input section, a pointer to a vector of relocation + records for the data in this section. */ - struct reloc_cache_entry **orelocation; + struct reloc_cache_entry *relocation; - /* The number of relocation records in one of the above */ + /* If an output section, a pointer to a vector of pointers to + relocation records for the data in this section. */ - unsigned reloc_count; + struct reloc_cache_entry **orelocation; - /* Information below is back end specific - and not always used - or updated. */ + /* The number of relocation records in one of the above */ - /* File position of section data */ + unsigned reloc_count; - file_ptr filepos; + /* Information below is back end specific - and not always used + or updated. */ - /* File position of relocation info */ + /* File position of section data. */ - file_ptr rel_filepos; + file_ptr filepos; - /* File position of line data */ + /* File position of relocation info. */ - file_ptr line_filepos; + file_ptr rel_filepos; - /* Pointer to data for applications */ + /* File position of line data. */ - PTR userdata; + file_ptr line_filepos; - /* If the SEC_IN_MEMORY flag is set, this points to the actual - contents. */ - unsigned char *contents; + /* Pointer to data for applications. */ - /* Attached line number information */ + PTR userdata; - alent *lineno; + /* If the SEC_IN_MEMORY flag is set, this points to the actual + contents. */ + unsigned char *contents; - /* Number of line number records */ + /* Attached line number information. */ - unsigned int lineno_count; + alent *lineno; - /* Optional information about a COMDAT entry; NULL if not COMDAT */ + /* Number of line number records. */ - struct bfd_comdat_info *comdat; + unsigned int lineno_count; - /* When a section is being output, this value changes as more - linenumbers are written out */ + /* Optional information about a COMDAT entry; NULL if not COMDAT. */ - file_ptr moving_line_filepos; + struct bfd_comdat_info *comdat; - /* What the section number is in the target world */ + /* Points to the kept section if this section is a link-once section, + and is discarded. */ + struct sec *kept_section; - int target_index; + /* When a section is being output, this value changes as more + linenumbers are written out. */ - PTR used_by_bfd; + file_ptr moving_line_filepos; - /* If this is a constructor section then here is a list of the - relocations created to relocate items within it. */ + /* What the section number is in the target world. */ - struct relent_chain *constructor_chain; + int target_index; - /* The BFD which owns the section. */ + PTR used_by_bfd; - bfd *owner; + /* If this is a constructor section then here is a list of the + relocations created to relocate items within it. */ - /* A symbol which points at this section only */ - struct symbol_cache_entry *symbol; - struct symbol_cache_entry **symbol_ptr_ptr; + struct relent_chain *constructor_chain; - struct bfd_link_order *link_order_head; - struct bfd_link_order *link_order_tail; + /* The BFD which owns the section. */ + + bfd *owner; + + /* A symbol which points at this section only */ + struct symbol_cache_entry *symbol; + struct symbol_cache_entry **symbol_ptr_ptr; + + struct bfd_link_order *link_order_head; + struct bfd_link_order *link_order_tail; } asection ; - /* These sections are global, and are managed by BFD. The application - and target back end are not permitted to change the values in - these sections. New code should use the section_ptr macros rather - than referring directly to the const sections. The const sections - may eventually vanish. */ +/* These sections are global, and are managed by BFD. The application + and target back end are not permitted to change the values in + these sections. New code should use the section_ptr macros rather + than referring directly to the const sections. The const sections + may eventually vanish. */ #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" #define BFD_COM_SECTION_NAME "*COM*" #define BFD_IND_SECTION_NAME "*IND*" - /* the absolute section */ +/* the absolute section */ extern const asection bfd_abs_section; #define bfd_abs_section_ptr ((asection *) &bfd_abs_section) #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) - /* Pointer to the undefined section */ +/* Pointer to the undefined section */ extern const asection bfd_und_section; #define bfd_und_section_ptr ((asection *) &bfd_und_section) #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) - /* Pointer to the common section */ +/* Pointer to the common section */ extern const asection bfd_com_section; #define bfd_com_section_ptr ((asection *) &bfd_com_section) - /* Pointer to the indirect section */ +/* Pointer to the indirect section */ extern const asection bfd_ind_section; #define bfd_ind_section_ptr ((asection *) &bfd_ind_section) #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) @@ -1235,58 +1286,60 @@ extern const struct symbol_cache_entry * const bfd_ind_symbol; ((section)->reloc_done ? (section)->_cooked_size \ : (abort (), (bfd_size_type) 1)) asection * -bfd_get_section_by_name PARAMS ((bfd *abfd, CONST char *name)); +bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name)); + +char * +bfd_get_unique_section_name PARAMS ((bfd *abfd, + const char *templat, + int *count)); asection * -bfd_make_section_old_way PARAMS ((bfd *abfd, CONST char *name)); +bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name)); asection * -bfd_make_section_anyway PARAMS ((bfd *abfd, CONST char *name)); +bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name)); asection * -bfd_make_section PARAMS ((bfd *, CONST char *name)); +bfd_make_section PARAMS ((bfd *, const char *name)); -boolean +boolean bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags)); -void +void bfd_map_over_sections PARAMS ((bfd *abfd, - void (*func)(bfd *abfd, + void (*func) (bfd *abfd, asection *sect, PTR obj), PTR obj)); -boolean +boolean bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val)); -boolean -bfd_set_section_contents - PARAMS ((bfd *abfd, +boolean +bfd_set_section_contents PARAMS ((bfd *abfd, asection *section, PTR data, file_ptr offset, bfd_size_type count)); -boolean -bfd_get_section_contents - PARAMS ((bfd *abfd, asection *section, PTR location, +boolean +bfd_get_section_contents PARAMS ((bfd *abfd, asection *section, PTR location, file_ptr offset, bfd_size_type count)); -boolean +boolean bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, asection *osec)); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ BFD_SEND (obfd, _bfd_copy_private_section_data, \ (ibfd, isection, obfd, osection)) -void -_bfd_strip_section_from_output - PARAMS ((struct bfd_link_info *info, asection *section)); +void +_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section)); -enum bfd_architecture +enum bfd_architecture { - bfd_arch_unknown, /* File arch not known */ - bfd_arch_obscure, /* Arch known, not one of these */ - bfd_arch_m68k, /* Motorola 68xxx */ + bfd_arch_unknown, /* File arch not known */ + bfd_arch_obscure, /* Arch known, not one of these */ + bfd_arch_m68k, /* Motorola 68xxx */ #define bfd_mach_m68000 1 #define bfd_mach_m68008 2 #define bfd_mach_m68010 3 @@ -1295,14 +1348,14 @@ enum bfd_architecture #define bfd_mach_m68040 6 #define bfd_mach_m68060 7 #define bfd_mach_cpu32 8 - bfd_arch_vax, /* DEC Vax */ - bfd_arch_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that + bfd_arch_vax, /* DEC Vax */ + bfd_arch_i960, /* Intel 960 */ + /* The order of the following is important. + lower number indicates a machine type that only accepts a subset of the instructions available to machines with higher numbers. The exception is the "ca", which is - incompatible with all other machines except + incompatible with all other machines except "core". */ #define bfd_mach_i960_core 1 @@ -1314,21 +1367,24 @@ enum bfd_architecture #define bfd_mach_i960_jx 7 #define bfd_mach_i960_hx 8 - bfd_arch_a29k, /* AMD 29000 */ - bfd_arch_sparc, /* SPARC */ + bfd_arch_a29k, /* AMD 29000 */ + bfd_arch_sparc, /* SPARC */ #define bfd_mach_sparc 1 - /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ +/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ #define bfd_mach_sparc_sparclet 2 #define bfd_mach_sparc_sparclite 3 #define bfd_mach_sparc_v8plus 4 -#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */ +#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */ #define bfd_mach_sparc_sparclite_le 6 #define bfd_mach_sparc_v9 7 -#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */ - /* Nonzero if MACH has the v9 instruction set. */ +#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */ +#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns */ +#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns */ +/* Nonzero if MACH has the v9 instruction set. */ #define bfd_mach_sparc_v9_p(mach) \ - ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a) - bfd_arch_mips, /* MIPS Rxxxx */ + ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \ + && (mach) != bfd_mach_sparc_sparclite_le) + bfd_arch_mips, /* MIPS Rxxxx */ #define bfd_mach_mips3000 3000 #define bfd_mach_mips3900 3900 #define bfd_mach_mips4000 4000 @@ -1344,36 +1400,66 @@ enum bfd_architecture #define bfd_mach_mips8000 8000 #define bfd_mach_mips10000 10000 #define bfd_mach_mips16 16 - bfd_arch_i386, /* Intel 386 */ +#define bfd_mach_mips32 32 +#define bfd_mach_mips32_4k 3204113 /* 32, 04, octal 'K' */ +#define bfd_mach_mips5 5 +#define bfd_mach_mips64 64 +#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ + bfd_arch_i386, /* Intel 386 */ #define bfd_mach_i386_i386 0 #define bfd_mach_i386_i8086 1 #define bfd_mach_i386_i386_intel_syntax 2 - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_alliant, /* Alliant */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - bfd_arch_pyramid, /* Pyramid Technology */ - bfd_arch_h8300, /* Hitachi H8/300 */ +#define bfd_mach_x86_64 3 +#define bfd_mach_x86_64_intel_syntax 4 + bfd_arch_we32k, /* AT&T WE32xxx */ + bfd_arch_tahoe, /* CCI/Harris Tahoe */ + bfd_arch_i860, /* Intel 860 */ + bfd_arch_i370, /* IBM 360/370 Mainframes */ + bfd_arch_romp, /* IBM ROMP PC/RT */ + bfd_arch_alliant, /* Alliant */ + bfd_arch_convex, /* Convex */ + bfd_arch_m88k, /* Motorola 88xxx */ + bfd_arch_pyramid, /* Pyramid Technology */ + bfd_arch_h8300, /* Hitachi H8/300 */ #define bfd_mach_h8300 1 #define bfd_mach_h8300h 2 #define bfd_mach_h8300s 3 - bfd_arch_powerpc, /* PowerPC */ - bfd_arch_rs6000, /* IBM RS/6000 */ - bfd_arch_hppa, /* HP PA RISC */ - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_powerpc, /* PowerPC */ +#define bfd_mach_ppc 0 +#define bfd_mach_ppc_403 403 +#define bfd_mach_ppc_403gc 4030 +#define bfd_mach_ppc_505 505 +#define bfd_mach_ppc_601 601 +#define bfd_mach_ppc_602 602 +#define bfd_mach_ppc_603 603 +#define bfd_mach_ppc_ec603e 6031 +#define bfd_mach_ppc_604 604 +#define bfd_mach_ppc_620 620 +#define bfd_mach_ppc_630 630 +#define bfd_mach_ppc_750 750 +#define bfd_mach_ppc_860 860 +#define bfd_mach_ppc_a35 35 +#define bfd_mach_ppc_rs64ii 642 +#define bfd_mach_ppc_rs64iii 643 +#define bfd_mach_ppc_7400 7400 + bfd_arch_rs6000, /* IBM RS/6000 */ +#define bfd_mach_rs6k 0 +#define bfd_mach_rs6k_rs1 6001 +#define bfd_mach_rs6k_rsc 6003 +#define bfd_mach_rs6k_rs2 6002 + bfd_arch_hppa, /* HP PA RISC */ + bfd_arch_d10v, /* Mitsubishi D10V */ #define bfd_mach_d10v 0 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_d30v, /* Mitsubishi D30V */ + bfd_arch_m68hc11, /* Motorola 68HC11 */ + bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_z8k, /* Zilog Z8000 */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Hitachi H8/500 */ - bfd_arch_sh, /* Hitachi SH */ + bfd_arch_h8500, /* Hitachi H8/500 */ + bfd_arch_sh, /* Hitachi SH */ #define bfd_mach_sh 0 #define bfd_mach_sh2 0x20 #define bfd_mach_sh_dsp 0x2d @@ -1381,11 +1467,11 @@ enum bfd_architecture #define bfd_mach_sh3_dsp 0x3d #define bfd_mach_sh3e 0x3e #define bfd_mach_sh4 0x40 - bfd_arch_alpha, /* Dec Alpha */ + bfd_arch_alpha, /* Dec Alpha */ #define bfd_mach_alpha_ev4 0x10 #define bfd_mach_alpha_ev5 0x20 #define bfd_mach_alpha_ev6 0x30 - bfd_arch_arm, /* Advanced Risc Machines ARM */ + bfd_arch_arm, /* Advanced Risc Machines ARM */ #define bfd_mach_arm_2 1 #define bfd_mach_arm_2a 2 #define bfd_mach_arm_3 3 @@ -1394,36 +1480,47 @@ enum bfd_architecture #define bfd_mach_arm_4T 6 #define bfd_mach_arm_5 7 #define bfd_mach_arm_5T 8 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ +#define bfd_mach_arm_5TE 9 +#define bfd_mach_arm_XScale 10 + bfd_arch_ns32k, /* National Semiconductors ns32000 */ + bfd_arch_w65, /* WDC 65816 */ + bfd_arch_tic30, /* Texas Instruments TMS320C30 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ + bfd_arch_tic80, /* TI TMS320c80 (MVP) */ + bfd_arch_v850, /* NEC V850 */ #define bfd_mach_v850 0 #define bfd_mach_v850e 'E' #define bfd_mach_v850ea 'A' - bfd_arch_arc, /* Argonaut RISC Core */ -#define bfd_mach_arc_base 0 - bfd_arch_m32r, /* Mitsubishi M32R/D */ -#define bfd_mach_m32r 0 /* backwards compatibility */ + bfd_arch_arc, /* ARC Cores */ +#define bfd_mach_arc_5 0 +#define bfd_mach_arc_6 1 +#define bfd_mach_arc_7 2 +#define bfd_mach_arc_8 3 + bfd_arch_m32r, /* Mitsubishi M32R/D */ +#define bfd_mach_m32r 0 /* backwards compatibility */ #define bfd_mach_m32rx 'x' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ + bfd_arch_mn10200, /* Matsushita MN10200 */ + bfd_arch_mn10300, /* Matsushita MN10300 */ #define bfd_mach_mn10300 300 #define bfd_mach_am33 330 bfd_arch_fr30, #define bfd_mach_fr30 0x46523330 bfd_arch_mcore, + bfd_arch_ia64, /* HP/Intel ia64 */ +#define bfd_mach_ia64_elf64 0 +#define bfd_mach_ia64_elf32 1 bfd_arch_pj, - bfd_arch_avr, /* Atmel AVR microcontrollers */ + bfd_arch_avr, /* Atmel AVR microcontrollers */ #define bfd_mach_avr1 1 #define bfd_mach_avr2 2 #define bfd_mach_avr3 3 #define bfd_mach_avr4 4 +#define bfd_mach_avr5 5 + bfd_arch_cris, /* Axis CRIS */ bfd_arch_last }; -typedef struct bfd_arch_info +typedef struct bfd_arch_info { int bits_per_word; int bits_per_address; @@ -1433,8 +1530,8 @@ typedef struct bfd_arch_info const char *arch_name; const char *printable_name; unsigned int section_align_power; - /* true if this is the default machine for the architecture */ - boolean the_default; + /* True if this is the default machine for the architecture. */ + boolean the_default; const struct bfd_arch_info * (*compatible) PARAMS ((const struct bfd_arch_info *a, const struct bfd_arch_info *b)); @@ -1457,65 +1554,63 @@ bfd_arch_get_compatible PARAMS (( const bfd *abfd, const bfd *bbfd)); -void +void bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg)); -enum bfd_architecture +enum bfd_architecture bfd_get_arch PARAMS ((bfd *abfd)); -unsigned long +unsigned long bfd_get_mach PARAMS ((bfd *abfd)); -unsigned int +unsigned int bfd_arch_bits_per_byte PARAMS ((bfd *abfd)); -unsigned int +unsigned int bfd_arch_bits_per_address PARAMS ((bfd *abfd)); -const bfd_arch_info_type * +const bfd_arch_info_type * bfd_get_arch_info PARAMS ((bfd *abfd)); const bfd_arch_info_type * -bfd_lookup_arch - PARAMS ((enum bfd_architecture +bfd_lookup_arch PARAMS ((enum bfd_architecture arch, unsigned long machine)); const char * -bfd_printable_arch_mach - PARAMS ((enum bfd_architecture arch, unsigned long machine)); +bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine)); -unsigned int +unsigned int bfd_octets_per_byte PARAMS ((bfd *abfd)); -unsigned int +unsigned int bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch, unsigned long machine)); typedef enum bfd_reloc_status { - /* No errors detected */ + /* No errors detected */ bfd_reloc_ok, - /* The relocation was performed, but there was an overflow. */ + /* The relocation was performed, but there was an overflow. */ bfd_reloc_overflow, - /* The address to relocate was not within the section supplied. */ + /* The address to relocate was not within the section supplied. */ bfd_reloc_outofrange, - /* Used by special functions */ + /* Used by special functions */ bfd_reloc_continue, - /* Unsupported relocation size requested. */ + /* Unsupported relocation size requested. */ bfd_reloc_notsupported, - /* Unused */ + /* Unused */ bfd_reloc_other, - /* The symbol to relocate against was undefined. */ + /* The symbol to relocate against was undefined. */ bfd_reloc_undefined, - /* The relocation was performed, but may not be ok - presently + /* The relocation was performed, but may not be ok - presently generated only when linking i960 coff files with i960 b.out symbols. If this type is returned, the error_message argument to bfd_perform_relocation will be set. */ @@ -1526,40 +1621,40 @@ typedef enum bfd_reloc_status typedef struct reloc_cache_entry { - /* A pointer into the canonical table of pointers */ + /* A pointer into the canonical table of pointers */ struct symbol_cache_entry **sym_ptr_ptr; - /* offset in section */ + /* offset in section */ bfd_size_type address; - /* addend for relocation value */ + /* addend for relocation value */ bfd_vma addend; - /* Pointer to how to perform the required relocation */ + /* Pointer to how to perform the required relocation */ reloc_howto_type *howto; } arelent; enum complain_overflow { - /* Do not complain on overflow. */ + /* Do not complain on overflow. */ complain_overflow_dont, - /* Complain if the bitfield overflows, whether it is considered + /* Complain if the bitfield overflows, whether it is considered as signed or unsigned. */ complain_overflow_bitfield, - /* Complain if the value overflows when considered as signed + /* Complain if the value overflows when considered as signed number. */ complain_overflow_signed, - /* Complain if the value overflows when considered as an + /* Complain if the value overflows when considered as an unsigned number. */ complain_overflow_unsigned }; struct reloc_howto_struct { - /* The type field has mainly a documentary use - the back end can + /* The type field has mainly a documentary use - the back end can do what it wants with it, though normally the back end's external idea of what a reloc number is stored in this field. For example, a PC relative word relocation @@ -1567,34 +1662,34 @@ struct reloc_howto_struct what the outside world calls a R_PCRWORD reloc. */ unsigned int type; - /* The value the final relocation is shifted right by. This drops + /* The value the final relocation is shifted right by. This drops unwanted data from the relocation. */ unsigned int rightshift; - /* The size of the item to be relocated. This is *not* a + /* The size of the item to be relocated. This is *not* a power-of-two measure. To get the number of bytes operated on by a type of relocation, use bfd_get_reloc_size. */ int size; - /* The number of bits in the item to be relocated. This is used + /* The number of bits in the item to be relocated. This is used when doing overflow checking. */ unsigned int bitsize; - /* Notes that the relocation is relative to the location in the + /* Notes that the relocation is relative to the location in the data section of the addend. The relocation function will subtract from the relocation value the address of the location being relocated. */ boolean pc_relative; - /* The bit position of the reloc value in the destination. + /* The bit position of the reloc value in the destination. The relocated value is left shifted by this amount. */ unsigned int bitpos; - /* What type of overflow error should be checked for when + /* What type of overflow error should be checked for when relocating. */ enum complain_overflow complain_on_overflow; - /* If this field is non null, then the supplied function is + /* If this field is non null, then the supplied function is called rather than the normal function. This allows really strange relocation methods to be accomodated (e.g., i960 callj instructions). */ @@ -1607,10 +1702,10 @@ struct reloc_howto_struct bfd *output_bfd, char **error_message)); - /* The textual name of the relocation type. */ + /* The textual name of the relocation type. */ char *name; - /* Some formats record a relocation addend in the section contents + /* Some formats record a relocation addend in the section contents rather than with the relocation. For ELF formats this is the distinction between USE_REL and USE_RELA (though the code checks for USE_REL == 1/0). The value of this field is TRUE if the @@ -1627,7 +1722,7 @@ struct reloc_howto_struct links (e.g. GOT stuff) it doesn't matter what this is set to. */ boolean partial_inplace; - /* The src_mask selects which parts of the read in data + /* The src_mask selects which parts of the read in data are to be used in the relocation sum. E.g., if this was an 8 bit byte of data which we read and relocated, this would be 0x000000ff. When we have relocs which have an addend, such as @@ -1636,13 +1731,13 @@ struct reloc_howto_struct the mask would be 0x00000000. */ bfd_vma src_mask; - /* The dst_mask selects which parts of the instruction are replaced + /* The dst_mask selects which parts of the instruction are replaced into the instruction. In most cases src_mask == dst_mask, except in the above special case, where dst_mask would be 0x000000ff, and src_mask would be 0x00000000. */ bfd_vma dst_mask; - /* When some formats create PC relative instructions, they leave + /* When some formats create PC relative instructions, they leave the value of the pc of the place being relocated in the offset slot of the instruction, so that a PC relative relocation can be made just by adding in an ordinary offset (e.g., sun3 a.out). @@ -1669,26 +1764,22 @@ struct reloc_howto_struct } \ } \ } -unsigned int -bfd_get_reloc_size PARAMS ((reloc_howto_type *)); +unsigned int +bfd_get_reloc_size PARAMS ((reloc_howto_type *)); typedef struct relent_chain { arelent relent; struct relent_chain *next; } arelent_chain; bfd_reloc_status_type - -bfd_check_overflow - PARAMS ((enum complain_overflow how, +bfd_check_overflow PARAMS ((enum complain_overflow how, unsigned int bitsize, unsigned int rightshift, unsigned int addrsize, bfd_vma relocation)); bfd_reloc_status_type - -bfd_perform_relocation - PARAMS ((bfd *abfd, +bfd_perform_relocation PARAMS ((bfd *abfd, arelent *reloc_entry, PTR data, asection *input_section, @@ -1696,9 +1787,7 @@ bfd_perform_relocation char **error_message)); bfd_reloc_status_type - -bfd_install_relocation - PARAMS ((bfd *abfd, +bfd_install_relocation PARAMS ((bfd *abfd, arelent *reloc_entry, PTR data, bfd_vma data_start, asection *input_section, @@ -1972,6 +2061,16 @@ to compensate for the borrow when the low bits are added. */ BFD_RELOC_386_GOTOFF, BFD_RELOC_386_GOTPC, +/* x86-64/elf relocations */ + BFD_RELOC_X86_64_GOT32, + BFD_RELOC_X86_64_PLT32, + BFD_RELOC_X86_64_COPY, + BFD_RELOC_X86_64_GLOB_DAT, + BFD_RELOC_X86_64_JUMP_SLOT, + BFD_RELOC_X86_64_RELATIVE, + BFD_RELOC_X86_64_GOTPCREL, + BFD_RELOC_X86_64_32S, + /* ns32k relocations */ BFD_RELOC_NS32K_IMM_8, BFD_RELOC_NS32K_IMM_16, @@ -2038,6 +2137,16 @@ It generally does map to one of the other relocation types. */ not stored in the instruction. */ BFD_RELOC_ARM_PCREL_BRANCH, +/* ARM 26 bit pc-relative branch. The lowest bit must be zero and is +not stored in the instruction. The 2nd lowest bit comes from a 1 bit +field in the instruction. */ + BFD_RELOC_ARM_PCREL_BLX, + +/* Thumb 22 bit pc-relative branch. The lowest bit must be zero and is +not stored in the instruction. The 2nd lowest bit comes from a 1 bit +field in the instruction. */ + BFD_RELOC_THUMB_PCREL_BLX, + /* These relocs are only used within the ARM assembler. They are not (at present) written to any object files. */ BFD_RELOC_ARM_IMMEDIATE, @@ -2086,6 +2195,13 @@ not stored in the instruction. */ BFD_RELOC_SH_CODE, BFD_RELOC_SH_DATA, BFD_RELOC_SH_LABEL, + BFD_RELOC_SH_LOOP_START, + BFD_RELOC_SH_LOOP_END, + BFD_RELOC_SH_COPY, + BFD_RELOC_SH_GLOB_DAT, + BFD_RELOC_SH_JMP_SLOT, + BFD_RELOC_SH_RELATIVE, + BFD_RELOC_SH_GOTPC, /* Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must be zero and is not stored in the instruction. */ @@ -2093,7 +2209,7 @@ be zero and is not stored in the instruction. */ BFD_RELOC_THUMB_PCREL_BRANCH12, BFD_RELOC_THUMB_PCREL_BRANCH23, -/* Argonaut RISC Core (ARC) relocs. +/* ARC Cores relocs. ARC 22 bit pc-relative branch. The lowest two bits must be zero and are not stored in the instruction. The high 20 bits are installed in bits 26 through 7 of the instruction. */ @@ -2269,6 +2385,29 @@ significant 8 bits of a 24 bit word are placed into the least significant 8 bits of the opcode. */ BFD_RELOC_TIC30_LDP, +/* This is a 7bit reloc for the tms320c54x, where the least +significant 7 bits of a 16 bit word are placed into the least +significant 7 bits of the opcode. */ + BFD_RELOC_TIC54X_PARTLS7, + +/* This is a 9bit DP reloc for the tms320c54x, where the most +significant 9 bits of a 16 bit word are placed into the least +significant 9 bits of the opcode. */ + BFD_RELOC_TIC54X_PARTMS9, + +/* This is an extended address 23-bit reloc for the tms320c54x. */ + BFD_RELOC_TIC54X_23, + +/* This is a 16-bit reloc for the tms320c54x, where the least +significant 16 bits of a 23-bit extended address are placed into +the opcode. */ + BFD_RELOC_TIC54X_16_OF_23, + +/* This is a reloc for the tms320c54x, where the most +significant 7 bits of a 23-bit extended address are placed into +the opcode. */ + BFD_RELOC_TIC54X_MS7_OF_23, + /* This is a 48 bit reloc for the FR30 that stores 32 bits. */ BFD_RELOC_FR30_48, @@ -2395,19 +2534,138 @@ is stored in the reloc's addend. For Rel hosts, we are forced to put this offset in the reloc's section offset. */ BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY, + +/* Intel IA64 Relocations. */ + BFD_RELOC_IA64_IMM14, + BFD_RELOC_IA64_IMM22, + BFD_RELOC_IA64_IMM64, + BFD_RELOC_IA64_DIR32MSB, + BFD_RELOC_IA64_DIR32LSB, + BFD_RELOC_IA64_DIR64MSB, + BFD_RELOC_IA64_DIR64LSB, + BFD_RELOC_IA64_GPREL22, + BFD_RELOC_IA64_GPREL64I, + BFD_RELOC_IA64_GPREL32MSB, + BFD_RELOC_IA64_GPREL32LSB, + BFD_RELOC_IA64_GPREL64MSB, + BFD_RELOC_IA64_GPREL64LSB, + BFD_RELOC_IA64_LTOFF22, + BFD_RELOC_IA64_LTOFF64I, + BFD_RELOC_IA64_PLTOFF22, + BFD_RELOC_IA64_PLTOFF64I, + BFD_RELOC_IA64_PLTOFF64MSB, + BFD_RELOC_IA64_PLTOFF64LSB, + BFD_RELOC_IA64_FPTR64I, + BFD_RELOC_IA64_FPTR32MSB, + BFD_RELOC_IA64_FPTR32LSB, + BFD_RELOC_IA64_FPTR64MSB, + BFD_RELOC_IA64_FPTR64LSB, + BFD_RELOC_IA64_PCREL21B, + BFD_RELOC_IA64_PCREL21BI, + BFD_RELOC_IA64_PCREL21M, + BFD_RELOC_IA64_PCREL21F, + BFD_RELOC_IA64_PCREL22, + BFD_RELOC_IA64_PCREL60B, + BFD_RELOC_IA64_PCREL64I, + BFD_RELOC_IA64_PCREL32MSB, + BFD_RELOC_IA64_PCREL32LSB, + BFD_RELOC_IA64_PCREL64MSB, + BFD_RELOC_IA64_PCREL64LSB, + BFD_RELOC_IA64_LTOFF_FPTR22, + BFD_RELOC_IA64_LTOFF_FPTR64I, + BFD_RELOC_IA64_LTOFF_FPTR64MSB, + BFD_RELOC_IA64_LTOFF_FPTR64LSB, + BFD_RELOC_IA64_SEGREL32MSB, + BFD_RELOC_IA64_SEGREL32LSB, + BFD_RELOC_IA64_SEGREL64MSB, + BFD_RELOC_IA64_SEGREL64LSB, + BFD_RELOC_IA64_SECREL32MSB, + BFD_RELOC_IA64_SECREL32LSB, + BFD_RELOC_IA64_SECREL64MSB, + BFD_RELOC_IA64_SECREL64LSB, + BFD_RELOC_IA64_REL32MSB, + BFD_RELOC_IA64_REL32LSB, + BFD_RELOC_IA64_REL64MSB, + BFD_RELOC_IA64_REL64LSB, + BFD_RELOC_IA64_LTV32MSB, + BFD_RELOC_IA64_LTV32LSB, + BFD_RELOC_IA64_LTV64MSB, + BFD_RELOC_IA64_LTV64LSB, + BFD_RELOC_IA64_IPLTMSB, + BFD_RELOC_IA64_IPLTLSB, + BFD_RELOC_IA64_COPY, + BFD_RELOC_IA64_TPREL22, + BFD_RELOC_IA64_TPREL64MSB, + BFD_RELOC_IA64_TPREL64LSB, + BFD_RELOC_IA64_LTOFF_TP22, + BFD_RELOC_IA64_LTOFF22X, + BFD_RELOC_IA64_LDXMOV, + +/* Motorola 68HC11 reloc. +This is the 8 bits high part of an absolute address. */ + BFD_RELOC_M68HC11_HI8, + +/* Motorola 68HC11 reloc. +This is the 8 bits low part of an absolute address. */ + BFD_RELOC_M68HC11_LO8, + +/* Motorola 68HC11 reloc. +This is the 3 bits of a value. */ + BFD_RELOC_M68HC11_3B, + +/* These relocs are only used within the CRIS assembler. They are not +(at present) written to any object files. */ + BFD_RELOC_CRIS_BDISP8, + BFD_RELOC_CRIS_UNSIGNED_5, + BFD_RELOC_CRIS_SIGNED_6, + BFD_RELOC_CRIS_UNSIGNED_6, + BFD_RELOC_CRIS_UNSIGNED_4, + +/* Intel i860 Relocations. */ + BFD_RELOC_860_COPY, + BFD_RELOC_860_GLOB_DAT, + BFD_RELOC_860_JUMP_SLOT, + BFD_RELOC_860_RELATIVE, + BFD_RELOC_860_PC26, + BFD_RELOC_860_PLT26, + BFD_RELOC_860_PC16, + BFD_RELOC_860_LOW0, + BFD_RELOC_860_SPLIT0, + BFD_RELOC_860_LOW1, + BFD_RELOC_860_SPLIT1, + BFD_RELOC_860_LOW2, + BFD_RELOC_860_SPLIT2, + BFD_RELOC_860_LOW3, + BFD_RELOC_860_LOGOT0, + BFD_RELOC_860_SPGOT0, + BFD_RELOC_860_LOGOT1, + BFD_RELOC_860_SPGOT1, + BFD_RELOC_860_LOGOTOFF0, + BFD_RELOC_860_SPGOTOFF0, + BFD_RELOC_860_LOGOTOFF1, + BFD_RELOC_860_SPGOTOFF1, + BFD_RELOC_860_LOGOTOFF2, + BFD_RELOC_860_LOGOTOFF3, + BFD_RELOC_860_LOPC, + BFD_RELOC_860_HIGHADJ, + BFD_RELOC_860_HAGOT, + BFD_RELOC_860_HAGOTOFF, + BFD_RELOC_860_HAPC, + BFD_RELOC_860_HIGH, + BFD_RELOC_860_HIGOT, + BFD_RELOC_860_HIGOTOFF, BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; reloc_howto_type * - -bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); +bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); const char * -bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code)); +bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code)); typedef struct symbol_cache_entry { - /* A pointer to the BFD which owns the symbol. This information + /* A pointer to the BFD which owns the symbol. This information is necessary so that a back end can work out what additional information (invisible to the application writer) is carried with the symbol. @@ -2417,65 +2675,65 @@ typedef struct symbol_cache_entry bfd_{abs,com,und}_section. This could be fixed by making these globals be per-bfd (or per-target-flavor). FIXME. */ - struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */ + struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */ - /* The text of the symbol. The name is left alone, and not copied; the + /* The text of the symbol. The name is left alone, and not copied; the application may not alter it. */ CONST char *name; - /* The value of the symbol. This really should be a union of a + /* The value of the symbol. This really should be a union of a numeric value with a pointer, since some flags indicate that a pointer to another symbol is stored here. */ symvalue value; - /* Attributes of a symbol: */ + /* Attributes of a symbol: */ #define BSF_NO_FLAGS 0x00 - /* The symbol has local scope; <> in <>. The value + /* The symbol has local scope; <> in <>. The value is the offset into the section of the data. */ #define BSF_LOCAL 0x01 - /* The symbol has global scope; initialized data in <>. The + /* The symbol has global scope; initialized data in <>. The value is the offset into the section of the data. */ #define BSF_GLOBAL 0x02 - /* The symbol has global scope and is exported. The value is + /* The symbol has global scope and is exported. The value is the offset into the section of the data. */ -#define BSF_EXPORT BSF_GLOBAL /* no real difference */ +#define BSF_EXPORT BSF_GLOBAL /* no real difference */ - /* A normal C symbol would be one of: + /* A normal C symbol would be one of: <>, <>, <> or <> */ - /* The symbol is a debugging record. The value has an arbitary + /* The symbol is a debugging record. The value has an arbitary meaning, unless BSF_DEBUGGING_RELOC is also set. */ #define BSF_DEBUGGING 0x08 - /* The symbol denotes a function entry point. Used in ELF, + /* The symbol denotes a function entry point. Used in ELF, perhaps others someday. */ #define BSF_FUNCTION 0x10 - /* Used by the linker. */ + /* Used by the linker. */ #define BSF_KEEP 0x20 #define BSF_KEEP_G 0x40 - /* A weak global symbol, overridable without warnings by + /* A weak global symbol, overridable without warnings by a regular global symbol of the same name. */ #define BSF_WEAK 0x80 - /* This symbol was created to point to a section, e.g. ELF's + /* This symbol was created to point to a section, e.g. ELF's STT_SECTION symbols. */ #define BSF_SECTION_SYM 0x100 - /* The symbol used to be a common symbol, but now it is + /* The symbol used to be a common symbol, but now it is allocated. */ #define BSF_OLD_COMMON 0x200 - /* The default value for common data. */ + /* The default value for common data. */ #define BFD_FORT_COMM_DEFAULT_VALUE 0 - /* In some files the type of a symbol sometimes alters its + /* In some files the type of a symbol sometimes alters its location in an output file - ie in coff a <> symbol which is also <> symbol appears where it was declared and not at the end of a section. This bit is set @@ -2483,43 +2741,43 @@ typedef struct symbol_cache_entry #define BSF_NOT_AT_END 0x400 - /* Signal that the symbol is the label of constructor section. */ + /* Signal that the symbol is the label of constructor section. */ #define BSF_CONSTRUCTOR 0x800 - /* Signal that the symbol is a warning symbol. The name is a + /* Signal that the symbol is a warning symbol. The name is a warning. The name of the next symbol is the one to warn about; if a reference is made to a symbol with the same name as the next symbol, a warning is issued by the linker. */ #define BSF_WARNING 0x1000 - /* Signal that the symbol is indirect. This symbol is an indirect + /* Signal that the symbol is indirect. This symbol is an indirect pointer to the symbol with the same name as the next symbol. */ #define BSF_INDIRECT 0x2000 - /* BSF_FILE marks symbols that contain a file name. This is used + /* BSF_FILE marks symbols that contain a file name. This is used for ELF STT_FILE symbols. */ #define BSF_FILE 0x4000 - /* Symbol is from dynamic linking information. */ + /* Symbol is from dynamic linking information. */ #define BSF_DYNAMIC 0x8000 - /* The symbol denotes a data object. Used in ELF, and perhaps + /* The symbol denotes a data object. Used in ELF, and perhaps others someday. */ #define BSF_OBJECT 0x10000 - /* This symbol is a debugging symbol. The value is the offset + /* This symbol is a debugging symbol. The value is the offset into the section of the data. BSF_DEBUGGING should be set as well. */ #define BSF_DEBUGGING_RELOC 0x20000 flagword flags; - /* A pointer to the section to which this symbol is + /* A pointer to the section to which this symbol is relative. This will always be non NULL, there are special sections for undefined and absolute symbols. */ struct sec *section; - /* Back end special data. */ + /* Back end special data. */ union { PTR p; @@ -2529,10 +2787,10 @@ typedef struct symbol_cache_entry } asymbol; #define bfd_get_symtab_upper_bound(abfd) \ BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) -boolean +boolean bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym)); -boolean +boolean bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name)); #define bfd_is_local_label_name(abfd, name) \ @@ -2540,40 +2798,40 @@ bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name)); #define bfd_canonicalize_symtab(abfd, location) \ BFD_SEND (abfd, _bfd_canonicalize_symtab,\ (abfd, location)) -boolean -bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count)); +boolean +bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count)); -void +void bfd_print_symbol_vandf PARAMS ((PTR file, asymbol *symbol)); #define bfd_make_empty_symbol(abfd) \ BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd)) #define bfd_make_debug_symbol(abfd,ptr,size) \ BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) -int +int bfd_decode_symclass PARAMS ((asymbol *symbol)); -boolean -bfd_is_undefined_symclass PARAMS ((int symclass)); +boolean +bfd_is_undefined_symclass PARAMS ((int symclass)); -void +void bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret)); -boolean +boolean bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym)); #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ BFD_SEND (obfd, _bfd_copy_private_symbol_data, \ (ibfd, isymbol, obfd, osymbol)) -struct _bfd +struct _bfd { - /* The filename the application opened the BFD with. */ - CONST char *filename; + /* The filename the application opened the BFD with. */ + CONST char *filename; - /* A pointer to the target jump table. */ + /* A pointer to the target jump table. */ const struct bfd_target *xvec; - /* To avoid dragging too many header files into every file that + /* To avoid dragging too many header files into every file that includes `<>', IOSTREAM has been declared as a "char *", and MTIME as a "long". Their correct types, to which they are cast when used, are "FILE *" and "time_t". The iostream @@ -2582,105 +2840,105 @@ struct _bfd to a bfd_in_memory struct. */ PTR iostream; - /* Is the file descriptor being cached? That is, can it be closed as + /* Is the file descriptor being cached? That is, can it be closed as needed, and re-opened when accessed later? */ boolean cacheable; - /* Marks whether there was a default target specified when the + /* Marks whether there was a default target specified when the BFD was opened. This is used to select which matching algorithm to use to choose the back end. */ boolean target_defaulted; - /* The caching routines use these to maintain a + /* The caching routines use these to maintain a least-recently-used list of BFDs */ struct _bfd *lru_prev, *lru_next; - /* When a file is closed by the caching routines, BFD retains + /* When a file is closed by the caching routines, BFD retains state information on the file here: */ - file_ptr where; + file_ptr where; - /* and here: (``once'' means at least once) */ + /* and here: (``once'' means at least once) */ boolean opened_once; - /* Set if we have a locally maintained mtime value, rather than + /* Set if we have a locally maintained mtime value, rather than getting it from the file each time: */ boolean mtime_set; - /* File modified time, if mtime_set is true: */ + /* File modified time, if mtime_set is true: */ - long mtime; + long mtime; - /* Reserved for an unimplemented file locking extension.*/ + /* Reserved for an unimplemented file locking extension.*/ int ifd; - /* The format which belongs to the BFD. (object, core, etc.) */ + /* The format which belongs to the BFD. (object, core, etc.) */ bfd_format format; - /* The direction the BFD was opened with*/ + /* The direction the BFD was opened with*/ enum bfd_direction {no_direction = 0, read_direction = 1, write_direction = 2, both_direction = 3} direction; - /* Format_specific flags*/ + /* Format_specific flags*/ - flagword flags; + flagword flags; - /* Currently my_archive is tested before adding origin to + /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of origin, with origin set to 0 for non archive files. */ - file_ptr origin; + file_ptr origin; - /* Remember when output has begun, to stop strange things + /* Remember when output has begun, to stop strange things from happening. */ boolean output_has_begun; - /* Pointer to linked list of sections*/ + /* Pointer to linked list of sections*/ struct sec *sections; - /* The number of sections */ + /* The number of sections */ unsigned int section_count; - /* Stuff only useful for object files: + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; - /* Used for input and output*/ + /* Used for input and output*/ unsigned int symcount; - /* Symbol table for output BFD (with symcount entries) */ - struct symbol_cache_entry **outsymbols; + /* Symbol table for output BFD (with symcount entries) */ + struct symbol_cache_entry **outsymbols; - /* Pointer to structure which contains architecture information*/ + /* Pointer to structure which contains architecture information*/ const struct bfd_arch_info *arch_info; - /* Stuff only useful for archives:*/ - PTR arelt_data; - struct _bfd *my_archive; /* The containing archive BFD. */ - struct _bfd *next; /* The next BFD in the archive. */ - struct _bfd *archive_head; /* The first BFD in the archive. */ - boolean has_armap; + /* Stuff only useful for archives:*/ + PTR arelt_data; + struct _bfd *my_archive; /* The containing archive BFD. */ + struct _bfd *next; /* The next BFD in the archive. */ + struct _bfd *archive_head; /* The first BFD in the archive. */ + boolean has_armap; - /* A chain of BFD structures involved in a link. */ + /* A chain of BFD structures involved in a link. */ struct _bfd *link_next; - /* A field used by _bfd_generic_link_add_archive_symbols. This will + /* A field used by _bfd_generic_link_add_archive_symbols. This will be used only for archive elements. */ int archive_pass; - /* Used by the back end to hold private data. */ + /* Used by the back end to hold private data. */ - union + union { struct aout_data_struct *aout_data; struct artdata *aout_ar_data; @@ -2712,11 +2970,11 @@ struct _bfd struct netbsd_core_struct *netbsd_core_data; PTR any; } tdata; - - /* Used by the application to hold private data*/ + + /* Used by the application to hold private data*/ PTR usrdata; - /* Where all the allocated stuff under this BFD goes. This is a + /* Where all the allocated stuff under this BFD goes. This is a struct objalloc *, but we use PTR to avoid requiring the inclusion of objalloc.h. */ PTR memory; @@ -2745,79 +3003,83 @@ typedef enum bfd_error bfd_error_invalid_error_code } bfd_error_type; -bfd_error_type -bfd_get_error PARAMS ((void)); +bfd_error_type +bfd_get_error PARAMS ((void)); -void -bfd_set_error PARAMS ((bfd_error_type error_tag)); +void +bfd_set_error PARAMS ((bfd_error_type error_tag)); CONST char * -bfd_errmsg PARAMS ((bfd_error_type error_tag)); +bfd_errmsg PARAMS ((bfd_error_type error_tag)); -void -bfd_perror PARAMS ((CONST char *message)); +void +bfd_perror PARAMS ((CONST char *message)); typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...)); -bfd_error_handler_type -bfd_set_error_handler PARAMS ((bfd_error_handler_type)); +bfd_error_handler_type +bfd_set_error_handler PARAMS ((bfd_error_handler_type)); -void -bfd_set_error_program_name PARAMS ((const char *)); +void +bfd_set_error_program_name PARAMS ((const char *)); -bfd_error_handler_type -bfd_get_error_handler PARAMS ((void)); +bfd_error_handler_type +bfd_get_error_handler PARAMS ((void)); -long +long bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect)); -long -bfd_canonicalize_reloc - PARAMS ((bfd *abfd, +long +bfd_canonicalize_reloc PARAMS ((bfd *abfd, asection *sec, arelent **loc, asymbol **syms)); -void -bfd_set_reloc - PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count) +void +bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count) ); -boolean +boolean bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags)); -boolean +int +bfd_get_arch_size PARAMS ((bfd *abfd)); + +int +bfd_get_sign_extend_vma PARAMS ((bfd *abfd)); + +boolean bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma)); -long +long bfd_get_mtime PARAMS ((bfd *abfd)); -long +long bfd_get_size PARAMS ((bfd *abfd)); -int +int bfd_get_gp_size PARAMS ((bfd *abfd)); -void +void bfd_set_gp_size PARAMS ((bfd *abfd, int i)); -bfd_vma +bfd_vma bfd_scan_vma PARAMS ((CONST char *string, CONST char **end, int base)); -boolean +boolean bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd)); #define bfd_copy_private_bfd_data(ibfd, obfd) \ BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ (ibfd, obfd)) -boolean +boolean bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd)); #define bfd_merge_private_bfd_data(ibfd, obfd) \ BFD_SEND (obfd, _bfd_merge_private_bfd_data, \ (ibfd, obfd)) -boolean +boolean bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags)); #define bfd_set_private_flags(abfd, flags) \ @@ -2829,7 +3091,7 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags)); #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line)) - /* Do these three do anything useful at all, for any back end? */ + /* Do these three do anything useful at all, for any back end? */ #define bfd_debug_info_start(abfd) \ BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) @@ -2887,10 +3149,10 @@ extern bfd_byte *bfd_get_relocated_section_contents struct bfd_link_order *, bfd_byte *, boolean, asymbol **)); -symindex +symindex bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym)); -boolean +boolean bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head)); bfd * @@ -2899,12 +3161,11 @@ bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous)); CONST char * bfd_core_file_failing_command PARAMS ((bfd *abfd)); -int +int bfd_core_file_failing_signal PARAMS ((bfd *abfd)); -boolean -core_file_matches_executable_p - PARAMS ((bfd *core_bfd, bfd *exec_bfd)); +boolean +core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd)); #define BFD_SEND(bfd, message, arglist) \ ((*((bfd)->xvec->message)) arglist) @@ -2917,13 +3178,13 @@ core_file_matches_executable_p (bfd_assert (__FILE__,__LINE__), NULL)) #endif #define BFD_SEND_FMT(bfd, message, arglist) \ - (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) + (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) #ifdef DEBUG_BFD_SEND #undef BFD_SEND_FMT #define BFD_SEND_FMT(bfd, message, arglist) \ (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ - (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \ + (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \ (bfd_assert (__FILE__,__LINE__), NULL)) #endif enum bfd_flavour { @@ -2931,6 +3192,7 @@ enum bfd_flavour { bfd_target_aout_flavour, bfd_target_coff_flavour, bfd_target_ecoff_flavour, + bfd_target_xcoff_flavour, bfd_target_elf_flavour, bfd_target_ieee_flavour, bfd_target_nlm_flavour, @@ -2948,7 +3210,7 @@ enum bfd_flavour { enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; - /* Forward declaration. */ +/* Forward declaration. */ typedef struct bfd_link_info _bfd_link_info; typedef struct bfd_target @@ -2957,10 +3219,10 @@ typedef struct bfd_target enum bfd_flavour flavour; enum bfd_endian byteorder; enum bfd_endian header_byteorder; - flagword object_flags; + flagword object_flags; flagword section_flags; char symbol_leading_char; - char ar_pad_char; + char ar_pad_char; unsigned short ar_max_namelen; bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *)); bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *)); @@ -2984,7 +3246,7 @@ typedef struct bfd_target boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *)); boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *)); - /* Generic entry points. */ + /* Generic entry points. */ #define BFD_JUMP_TABLE_GENERIC(NAME)\ CAT(NAME,_close_and_cleanup),\ CAT(NAME,_bfd_free_cached_info),\ @@ -2992,20 +3254,20 @@ CAT(NAME,_new_section_hook),\ CAT(NAME,_get_section_contents),\ CAT(NAME,_get_section_contents_in_window) - /* Called when the BFD is being closed to do any necessary cleanup. */ + /* Called when the BFD is being closed to do any necessary cleanup. */ boolean (*_close_and_cleanup) PARAMS ((bfd *)); - /* Ask the BFD to free all cached information. */ + /* Ask the BFD to free all cached information. */ boolean (*_bfd_free_cached_info) PARAMS ((bfd *)); - /* Called when a new section is created. */ + /* Called when a new section is created. */ boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr)); - /* Read the contents of a section. */ - boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, + /* Read the contents of a section. */ + boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type)); boolean (*_bfd_get_section_contents_in_window) PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type)); - /* Entry points to copy private data. */ + /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME)\ CAT(NAME,_bfd_copy_private_bfd_data),\ CAT(NAME,_bfd_merge_private_bfd_data),\ @@ -3013,27 +3275,27 @@ CAT(NAME,_bfd_copy_private_section_data),\ CAT(NAME,_bfd_copy_private_symbol_data),\ CAT(NAME,_bfd_set_private_flags),\ CAT(NAME,_bfd_print_private_bfd_data)\ - /* Called to copy BFD general private data from one object file + /* Called to copy BFD general private data from one object file to another. */ boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *)); - /* Called to merge BFD general private data from one object file + /* Called to merge BFD general private data from one object file to a common output file when linking. */ boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *)); - /* Called to copy BFD private section data from one object file + /* Called to copy BFD private section data from one object file to another. */ boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr, bfd *, sec_ptr)); - /* Called to copy BFD private symbol data from one symbol + /* Called to copy BFD private symbol data from one symbol to another. */ boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *, bfd *, asymbol *)); - /* Called to set private backend flags */ + /* Called to set private backend flags */ boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword)); - /* Called to print private BFD data */ + /* Called to print private BFD data */ boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR)); - /* Core file entry points. */ + /* Core file entry points. */ #define BFD_JUMP_TABLE_CORE(NAME)\ CAT(NAME,_core_file_failing_command),\ CAT(NAME,_core_file_failing_signal),\ @@ -3042,7 +3304,7 @@ CAT(NAME,_core_file_matches_executable_p) int (*_core_file_failing_signal) PARAMS ((bfd *)); boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *)); - /* Archive entry points. */ + /* Archive entry points. */ #define BFD_JUMP_TABLE_ARCHIVE(NAME)\ CAT(NAME,_slurp_armap),\ CAT(NAME,_slurp_extended_name_table),\ @@ -3059,10 +3321,10 @@ CAT(NAME,_update_armap_timestamp) boolean (*_bfd_construct_extended_name_table) PARAMS ((bfd *, char **, bfd_size_type *, const char **)); void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *)); - boolean (*write_armap) PARAMS ((bfd *arch, + boolean (*write_armap) PARAMS ((bfd *arch, unsigned int elength, struct orl *map, - unsigned int orl_count, + unsigned int orl_count, int stridx)); PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *)); bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev)); @@ -3071,7 +3333,7 @@ CAT(NAME,_update_armap_timestamp) int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *)); boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *)); - /* Entry points used for symbols. */ + /* Entry points used for symbols. */ #define BFD_JUMP_TABLE_SYMBOLS(NAME)\ CAT(NAME,_get_symtab_upper_bound),\ CAT(NAME,_get_symtab),\ @@ -3104,7 +3366,7 @@ CAT(NAME,_minisymbol_to_symbol) struct sec *section, struct symbol_cache_entry **symbols, bfd_vma offset, CONST char **file, CONST char **func, unsigned int *line)); - /* Back-door to allow format-aware applications to create debug symbols + /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ asymbol * (*_bfd_make_debug_symbol) PARAMS (( @@ -3120,7 +3382,7 @@ CAT(NAME,_minisymbol_to_symbol) asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR, asymbol *)); - /* Routines for relocs. */ + /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME)\ CAT(NAME,_get_reloc_upper_bound),\ CAT(NAME,_canonicalize_reloc),\ @@ -3128,12 +3390,12 @@ CAT(NAME,_bfd_reloc_type_lookup) long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr)); long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, struct symbol_cache_entry **)); - /* See documentation on reloc types. */ + /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); - /* Routines used when writing an object file. */ + /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME)\ CAT(NAME,_set_arch_mach),\ CAT(NAME,_set_section_contents) @@ -3142,7 +3404,7 @@ CAT(NAME,_set_section_contents) boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type)); - /* Routines used by the linker. */ + /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME)\ CAT(NAME,_sizeof_headers),\ CAT(NAME,_bfd_get_relocated_section_contents),\ @@ -3161,48 +3423,48 @@ CAT(NAME,_bfd_gc_sections) boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *, struct bfd_link_info *, boolean *again)); - /* Create a hash table for the linker. Different backends store + /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *)); - /* Add symbols from this object file into the hash table. */ + /* Add symbols from this object file into the hash table. */ boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *)); - /* Do a link based on the link_order structures attached to each + /* Do a link based on the link_order structures attached to each section of the BFD. */ boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *)); - /* Should this section be split up into smaller pieces during linking. */ + /* Should this section be split up into smaller pieces during linking. */ boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *)); - /* Remove sections that are not referenced from the output. */ + /* Remove sections that are not referenced from the output. */ boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *)); - /* Routines to handle dynamic symbols and relocs. */ + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME)\ CAT(NAME,_get_dynamic_symtab_upper_bound),\ CAT(NAME,_canonicalize_dynamic_symtab),\ CAT(NAME,_get_dynamic_reloc_upper_bound),\ CAT(NAME,_canonicalize_dynamic_reloc) - /* Get the amount of memory required to hold the dynamic symbols. */ + /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *)); - /* Read in the dynamic symbols. */ + /* Read in the dynamic symbols. */ long (*_bfd_canonicalize_dynamic_symtab) PARAMS ((bfd *, struct symbol_cache_entry **)); - /* Get the amount of memory required to hold the dynamic relocs. */ + /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *)); - /* Read in the dynamic relocs. */ + /* Read in the dynamic relocs. */ long (*_bfd_canonicalize_dynamic_reloc) PARAMS ((bfd *, arelent **, struct symbol_cache_entry **)); - /* Opposite endian version of this target. */ + /* Opposite endian version of this target. */ const struct bfd_target * alternative_target; - + PTR backend_data; - + } bfd_target; -boolean -bfd_set_default_target PARAMS ((const char *name)); +boolean +bfd_set_default_target PARAMS ((const char *name)); const bfd_target * bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd)); @@ -3210,16 +3472,16 @@ bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd)); const char ** bfd_target_list PARAMS ((void)); -const bfd_target * -bfd_search_for_target PARAMS ((int (* search_func)(const bfd_target *, void *), void *)); +const bfd_target * +bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *)); -boolean +boolean bfd_check_format PARAMS ((bfd *abfd, bfd_format format)); -boolean +boolean bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching)); -boolean +boolean bfd_set_format PARAMS ((bfd *abfd, bfd_format format)); CONST char * diff --git a/contrib/binutils/bfd/bfd.c b/contrib/binutils/bfd/bfd.c index e04172f..2e172c9 100644 --- a/contrib/binutils/bfd/bfd.c +++ b/contrib/binutils/bfd/bfd.c @@ -33,10 +33,10 @@ SECTION CODE_FRAGMENT . -.struct _bfd +.struct _bfd .{ . {* The filename the application opened the BFD with. *} -. CONST char *filename; +. CONST char *filename; . . {* A pointer to the target jump table. *} . const struct bfd_target *xvec; @@ -69,7 +69,7 @@ CODE_FRAGMENT . {* When a file is closed by the caching routines, BFD retains . state information on the file here: *} . -. file_ptr where; +. file_ptr where; . . {* and here: (``once'' means at least once) *} . @@ -82,7 +82,7 @@ CODE_FRAGMENT . . {* File modified time, if mtime_set is true: *} . -. long mtime; +. long mtime; . . {* Reserved for an unimplemented file locking extension.*} . @@ -101,13 +101,13 @@ CODE_FRAGMENT . . {* Format_specific flags*} . -. flagword flags; +. flagword flags; . . {* Currently my_archive is tested before adding origin to . anything. I believe that this can become always an add of . origin, with origin set to 0 for non archive files. *} . -. file_ptr origin; +. file_ptr origin; . . {* Remember when output has begun, to stop strange things . from happening. *} @@ -119,7 +119,7 @@ CODE_FRAGMENT . {* The number of sections *} . unsigned int section_count; . -. {* Stuff only useful for object files: +. {* Stuff only useful for object files: . The start address. *} . bfd_vma start_address; . @@ -127,17 +127,17 @@ CODE_FRAGMENT . unsigned int symcount; . . {* Symbol table for output BFD (with symcount entries) *} -. struct symbol_cache_entry **outsymbols; +. struct symbol_cache_entry **outsymbols; . . {* Pointer to structure which contains architecture information*} . const struct bfd_arch_info *arch_info; . . {* Stuff only useful for archives:*} -. PTR arelt_data; +. PTR arelt_data; . struct _bfd *my_archive; {* The containing archive BFD. *} . struct _bfd *next; {* The next BFD in the archive. *} . struct _bfd *archive_head; {* The first BFD in the archive. *} -. boolean has_armap; +. boolean has_armap; . . {* A chain of BFD structures involved in a link. *} . struct _bfd *link_next; @@ -148,7 +148,7 @@ CODE_FRAGMENT . . {* Used by the back end to hold private data. *} . -. union +. union . { . struct aout_data_struct *aout_data; . struct artdata *aout_ar_data; @@ -180,7 +180,7 @@ CODE_FRAGMENT . struct netbsd_core_struct *netbsd_core_data; . PTR any; . } tdata; -. +. . {* Used by the application to hold private data*} . PTR usrdata; . @@ -218,8 +218,6 @@ CODE_FRAGMENT struct which ultimately gets passed in to the bfd. When it arrives, copy it to the following struct so that the data will be available in coffcode.h where it is needed. The typedef's used are defined in bfd.h */ - - /* SECTION @@ -376,7 +374,7 @@ bfd_perror (message) CONST char *message; { if (bfd_get_error () == bfd_error_system_call) - perror((char *)message); /* must be system error then... */ + perror((char *)message); /* must be system error then... */ else { if (message == NULL || *message == '\0') fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ())); @@ -510,7 +508,6 @@ bfd_set_error_program_name (name) _bfd_error_program_name = name; } - /* FUNCTION bfd_get_error_handler @@ -547,7 +544,6 @@ DESCRIPTION */ - long bfd_get_reloc_upper_bound (abfd, asect) bfd *abfd; @@ -584,7 +580,6 @@ DESCRIPTION The @var{syms} table is also needed for horrible internal magic reasons. - */ long bfd_canonicalize_reloc (abfd, asect, location, symbols) @@ -615,7 +610,7 @@ DESCRIPTION The argument @var{abfd} is ignored. */ -/*ARGSUSED*/ + void bfd_set_reloc (ignore_abfd, asect, location, count) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -706,6 +701,65 @@ _bfd_abort (file, line, fn) /* FUNCTION + bfd_get_arch_size + +SYNOPSIS + int bfd_get_arch_size (bfd *abfd); + +DESCRIPTION + Returns the architecture address size, in bits, as determined + by the object file's format. For ELF, this information is + included in the header. + +RETURNS + Returns the arch size in bits if known, <<-1>> otherwise. +*/ + +int +bfd_get_arch_size (abfd) + bfd *abfd; +{ + if (abfd->xvec->flavour == bfd_target_elf_flavour) + return (get_elf_backend_data (abfd))->s->arch_size; + + bfd_set_error (bfd_error_wrong_format); + return -1; +} + +/* +FUNCTION + bfd_get_sign_extend_vma + +SYNOPSIS + int bfd_get_sign_extend_vma (bfd *abfd); + +DESCRIPTION + Indicates if the target architecture "naturally" sign extends + an address. Some architectures implicitly sign extend address + values when they are converted to types larger than the size + of an address. For instance, bfd_get_start_address() will + return an address sign extended to fill a bfd_vma when this is + the case. + +RETURNS + Returns <<1>> if the target architecture is known to sign + extend addresses, <<0>> if the target architecture is known to + not sign extend addresses, and <<-1>> otherwise. +*/ + +int +bfd_get_sign_extend_vma (abfd) + bfd *abfd; +{ + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) + return (get_elf_backend_data (abfd)->sign_extend_vma); + + bfd_set_error (bfd_error_wrong_format); + return -1; +} + +/* +FUNCTION bfd_set_start_address SYNOPSIS @@ -727,7 +781,6 @@ bfd_vma vma; return true; } - /* FUNCTION bfd_get_mtime @@ -779,7 +832,7 @@ DESCRIPTION Instead, we want to ask questions like "is this NNN byte sized object I'm about to try read from file offset YYY reasonable?" As as example of where we might do this, some object formats - use string tables for which the first <> bytes of the + use string tables for which the first <> bytes of the table contain the size of the table itself, including the size bytes. If an application tries to read what it thinks is one of these string tables, without some way to validate the size, and for @@ -926,7 +979,7 @@ bfd_scan_vma (string, end, base) int digit; /* Let the host do it if possible. */ - if (sizeof(bfd_vma) <= sizeof(unsigned long)) + if (sizeof (bfd_vma) <= sizeof (unsigned long)) return (bfd_vma) strtoul (string, (char **) end, base); /* A negative base makes no sense, and we only need to go as high as hex. */ @@ -950,7 +1003,7 @@ bfd_scan_vma (string, end, base) (string[0] == '0') && ((string[1] == 'x') || (string[1] == 'X'))) string += 2; /* XXX should we also skip over "0b" or "0B" if base is 2? */ - + /* Speed could be improved with a table like hex_value[] in gas. */ #define HEX_VALUE(c) \ (isxdigit ((unsigned char) c) \ @@ -978,7 +1031,7 @@ SYNOPSIS boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd); DESCRIPTION - Copy private BFD information from the BFD @var{ibfd} to the + Copy private BFD information from the BFD @var{ibfd} to the the BFD @var{obfd}. Return <> on success, <> on error. Possible error returns are: @@ -999,7 +1052,7 @@ SYNOPSIS boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd); DESCRIPTION - Merge private BFD information from the BFD @var{ibfd} to the + Merge private BFD information from the BFD @var{ibfd} to the the output file BFD @var{obfd} when linking. Return <> on success, <> on error. Possible error returns are: diff --git a/contrib/binutils/bfd/binary.c b/contrib/binutils/bfd/binary.c index c2980b0..771e431 100644 --- a/contrib/binutils/bfd/binary.c +++ b/contrib/binutils/bfd/binary.c @@ -255,6 +255,9 @@ binary_set_section_contents (abfd, sec, data, offset, size) file_ptr offset; bfd_size_type size; { + if (size == 0) + return true; + if (! abfd->output_has_begun) { boolean found_low; @@ -270,6 +273,7 @@ binary_set_section_contents (abfd, sec, data, offset, size) if (((s->flags & (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC | SEC_NEVER_LOAD)) == (SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC)) + && (s->_raw_size > 0) && (! found_low || s->lma < low)) { low = s->lma; @@ -281,17 +285,18 @@ binary_set_section_contents (abfd, sec, data, offset, size) s->filepos = s->lma - low; /* Skip following warning check for sections that will not - occupy file space. */ + occupy file space. */ if ((s->flags & (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_NEVER_LOAD)) - != (SEC_HAS_CONTENTS | SEC_ALLOC)) + != (SEC_HAS_CONTENTS | SEC_ALLOC) + || (s->_raw_size == 0)) continue; /* If attempting to generate a binary file from a bfd with LMA's all over the place, huge (sparse?) binary files may result. This condition attempts to detect this situation and print a warning. Better heuristics would be nice to - have. */ + have. */ if (s->filepos < 0) (*_bfd_error_handler) @@ -383,6 +388,6 @@ const bfd_target binary_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + NULL }; diff --git a/contrib/binutils/bfd/cache.c b/contrib/binutils/bfd/cache.c index 91b6c61..063373c 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 + Copyright 1990, 91, 92, 93, 94, 95, 1996, 2000, 2001 Free Software Foundation, Inc. Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com). @@ -32,7 +32,7 @@ SECTION <>, which runs around and makes sure that the required BFD is open. If not, then it chooses a file to close, closes it and opens the one wanted, returning its file - handle. + handle. */ @@ -79,19 +79,18 @@ bfd *bfd_last_cache; /* INTERNAL_FUNCTION bfd_cache_lookup - + DESCRIPTION Check to see if the required BFD is the same as the last one looked up. If so, then it can use the stream in the BFD with impunity, since it can't have changed since the last lookup; otherwise, it has to perform the complicated lookup function. - + .#define bfd_cache_lookup(x) \ . ((x)==bfd_last_cache? \ - . (FILE*)(bfd_last_cache->iostream): \ + . (FILE*) (bfd_last_cache->iostream): \ . bfd_cache_lookup_worker(x)) - - + */ /* Insert a BFD into the cache. */ @@ -262,7 +261,7 @@ FILE * bfd_open_file (abfd) bfd *abfd; { - abfd->cacheable = true; /* Allow it to be closed later. */ + abfd->cacheable = true; /* Allow it to be closed later. */ if (open_files >= BFD_CACHE_MAX_OPEN) { @@ -312,7 +311,7 @@ bfd_open_file (abfd) if (stat (abfd->filename, &s) == 0 && s.st_size != 0) unlink (abfd->filename); #endif - abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WB); + abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WUB); abfd->opened_once = true; } break; @@ -339,7 +338,7 @@ DESCRIPTION quick answer. Find a file descriptor for @var{abfd}. If necessary, it open it. If there are already more than <> files open, it tries to close one first, to - avoid running out of file descriptors. + avoid running out of file descriptors. */ FILE * @@ -349,7 +348,7 @@ bfd_cache_lookup_worker (abfd) if ((abfd->flags & BFD_IN_MEMORY) != 0) abort (); - if (abfd->my_archive) + if (abfd->my_archive) abfd = abfd->my_archive; if (abfd->iostream != NULL) diff --git a/contrib/binutils/bfd/coff-alpha.c b/contrib/binutils/bfd/coff-alpha.c index 6bbc279..41e4710 100644 --- a/contrib/binutils/bfd/coff-alpha.c +++ b/contrib/binutils/bfd/coff-alpha.c @@ -924,7 +924,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order, does not cause anything to happen, itself. */ rel->address += input_section->output_offset; break; - + case ALPHA_R_GPDISP: /* This marks the ldah of an ldah/lda pair which loads the gp register with the difference of the gp value and the @@ -980,7 +980,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order, rel->address += input_section->output_offset; } break; - + case ALPHA_R_OP_PUSH: /* Push a value on the reloc evaluation stack. */ { @@ -1106,7 +1106,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order, stack[tos - 1] >>= relocation; } break; - + case ALPHA_R_GPVALUE: /* I really don't know if this does the right thing. */ gp = rel->addend; @@ -1126,7 +1126,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order, os->reloc_count++; } - if (r != bfd_reloc_ok) + if (r != bfd_reloc_ok) { switch (r) { @@ -1136,7 +1136,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order, input_bfd, input_section, rel->address, true))) goto error_return; break; - case bfd_reloc_dangerous: + case bfd_reloc_dangerous: if (! ((*link_info->callbacks->reloc_dangerous) (link_info, err, input_bfd, input_section, rel->address))) @@ -1332,7 +1332,7 @@ alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h) r_symndx = RELOC_SECTION_XDATA; break; } - + if (r_symndx == -1) abort (); @@ -1437,7 +1437,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section, pointer. To support large programs, we need to allow multiple global pointers. This works as long as each input .lita section is <64KB big. This implies that when producing relocatable - output, the .lita section is limited to 64KB. . */ + output, the .lita section is limited to 64KB. . */ lita_sec = symndx_to_section[RELOC_SECTION_LITA]; gp = _bfd_get_gp_value (output_bfd); @@ -1619,7 +1619,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section, /* See ALPHA_R_LITERAL above for the uses of this reloc. It does not cause anything to happen, itself. */ break; - + case ALPHA_R_GPDISP: /* This marks the ldah of an ldah/lda pair which loads the gp register with the difference of the gp value and the @@ -1679,7 +1679,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section, gp_usedp = true; } break; - + case ALPHA_R_OP_PUSH: case ALPHA_R_OP_PSUB: case ALPHA_R_OP_PRSHIFT: @@ -2008,7 +2008,6 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section, /* Do final adjustments to the filehdr and the aouthdr. This routine sets the dynamic bits in the file header. */ -/*ARGSUSED*/ static boolean alpha_adjust_headers (abfd, fhdr, ahdr) bfd *abfd; @@ -2136,7 +2135,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos) left = size; - /* I don't know what the next eight bytes are for. */ + /* I don't know what the next eight bytes are for. */ if (bfd_read (ab, 1, 8, nbfd) != 8) goto error_return; @@ -2201,7 +2200,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos) error_return: if (nbfd != NULL) bfd_close (nbfd); - return NULL; + return NULL; } /* Open the next archived file. */ @@ -2229,7 +2228,7 @@ alpha_ecoff_openr_next_archived_file (archive, last_file) /* Pad to an even boundary... Note that last_file->origin can be odd in the case of - BSD-4.4-style element with a long odd size. */ + BSD-4.4-style element with a long odd size. */ filestart = last_file->origin + size; filestart += filestart % 2; } @@ -2266,7 +2265,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = (unsigned (*) PARAMS ((bfd *,PTR,PTR))) bfd_void, /* reloc_out */ alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out, alpha_ecoff_swap_scnhdr_out, - FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4, + FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, false, 4, false, 2, alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in, alpha_ecoff_swap_scnhdr_in, NULL, alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, @@ -2400,6 +2399,6 @@ const bfd_target ecoffalpha_little_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + (PTR) &alpha_ecoff_backend_data }; diff --git a/contrib/binutils/bfd/coff-arm.c b/contrib/binutils/bfd/coff-arm.c index 2b89b84..7ec7b8e 100644 --- a/contrib/binutils/bfd/coff-arm.c +++ b/contrib/binutils/bfd/coff-arm.c @@ -51,13 +51,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef NUM_ELEM #define NUM_ELEM(a) ((sizeof (a)) / sizeof ((a)[0])) #endif - + typedef enum {bunknown, b9, b12, b23} thumb_pcrel_branchtype; /* some typedefs for holding instructions */ typedef unsigned long int insn32; typedef unsigned short int insn16; - /* Forward declarations for stupid compilers. */ static boolean coff_arm_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, @@ -77,7 +76,7 @@ static bfd_reloc_status_type coff_arm_reloc static boolean coff_arm_adjust_symndx PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, struct internal_reloc *, boolean *)); -static reloc_howto_type * coff_arm_rtype_to_howto +static reloc_howto_type * coff_arm_rtype_to_howto PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *)); static bfd_reloc_status_type coff_thumb_pcrel_common @@ -119,14 +118,14 @@ static boolean coff_arm_final_link_postscript Given a function name, and its type, the stub can be found. The name can be changed. The only requirement is the %s be present. */ - + #define THUMB2ARM_GLUE_SECTION_NAME ".glue_7t" #define THUMB2ARM_GLUE_ENTRY_NAME "__%s_from_thumb" #define ARM2THUMB_GLUE_SECTION_NAME ".glue_7" #define ARM2THUMB_GLUE_ENTRY_NAME "__%s_from_arm" -/* Used by the assembler. */ +/* Used by the assembler. */ static bfd_reloc_status_type coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message) @@ -232,14 +231,14 @@ coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, #define ARM_SECREL 15 #endif -static reloc_howto_type aoutarm_std_reloc_howto[] = +static reloc_howto_type aoutarm_std_reloc_howto[] = { /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */ #ifdef ARM_WINCE EMPTY_HOWTO (-1), - HOWTO (ARM_32, + HOWTO (ARM_32, 0, - 2, + 2, 32, false, 0, @@ -250,9 +249,9 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0xffffffff, 0xffffffff, PCRELOFFSET), - HOWTO (ARM_RVA32, + HOWTO (ARM_RVA32, 0, - 2, + 2, 32, false, 0, @@ -274,7 +273,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = "ARM_26", false, 0x00ffffff, - 0x00ffffff, + 0x00ffffff, PCRELOFFSET), HOWTO (ARM_THUMB12, 1, @@ -287,16 +286,16 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = "ARM_THUMB12", false, 0x000007ff, - 0x000007ff, + 0x000007ff, PCRELOFFSET), - HOWTO (ARM_26D, - 2, + HOWTO (ARM_26D, + 2, 2, 24, false, 0, complain_overflow_dont, - aoutarm_fix_pcrel_26_done, + aoutarm_fix_pcrel_26_done, "ARM_26D", true, 0x00ffffff, @@ -310,22 +309,22 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), - HOWTO (ARM_SECTION, - 0, - 1, - 16, + HOWTO (ARM_SECTION, + 0, + 1, + 16, false, 0, complain_overflow_bitfield, coff_arm_reloc, - "ARM_16", + "ARM_16", true, 0x0000ffff, - 0x0000ffff, + 0x0000ffff, PCRELOFFSET), - HOWTO (ARM_SECREL, + HOWTO (ARM_SECREL, 0, - 2, + 2, 32, false, 0, @@ -350,22 +349,22 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ PCRELOFFSET /* pcrel_offset */), - HOWTO(ARM_16, - 0, - 1, - 16, + HOWTO(ARM_16, + 0, + 1, + 16, false, 0, complain_overflow_bitfield, coff_arm_reloc, - "ARM_16", + "ARM_16", true, 0x0000ffff, - 0x0000ffff, + 0x0000ffff, PCRELOFFSET), - HOWTO(ARM_32, + HOWTO(ARM_32, 0, - 2, + 2, 32, false, 0, @@ -387,28 +386,28 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = "ARM_26", false, 0x00ffffff, - 0x00ffffff, + 0x00ffffff, PCRELOFFSET), - HOWTO(ARM_DISP8, + HOWTO(ARM_DISP8, 0, 0, - 8, + 8, true, 0, - complain_overflow_signed, + complain_overflow_signed, coff_arm_reloc, - "ARM_DISP8", + "ARM_DISP8", true, 0x000000ff, 0x000000ff, true), - HOWTO( ARM_DISP16, + HOWTO( ARM_DISP16, 0, 1, 16, true, 0, - complain_overflow_signed, + complain_overflow_signed, coff_arm_reloc, "ARM_DISP16", true, @@ -421,21 +420,21 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 32, true, 0, - complain_overflow_signed, + complain_overflow_signed, coff_arm_reloc, "ARM_DISP32", true, 0xffffffff, 0xffffffff, true), - HOWTO( ARM_26D, - 2, + HOWTO( ARM_26D, + 2, 2, 24, false, 0, complain_overflow_dont, - aoutarm_fix_pcrel_26_done, + aoutarm_fix_pcrel_26_done, "ARM_26D", true, 0x00ffffff, @@ -448,16 +447,16 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = -1, 16, false, - 0, + 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_NEG16", - true, + true, + 0x0000ffff, 0x0000ffff, - 0x0000ffff, false), - HOWTO( ARM_NEG32, - 0, + HOWTO( ARM_NEG32, + 0, -2, 32, false, @@ -469,9 +468,9 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0xffffffff, 0xffffffff, false), - HOWTO( ARM_RVA32, + HOWTO( ARM_RVA32, 0, - 2, + 2, 32, false, 0, @@ -493,7 +492,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = "ARM_THUMB9", false, 0x000000ff, - 0x000000ff, + 0x000000ff, PCRELOFFSET), HOWTO( ARM_THUMB12, 1, @@ -506,7 +505,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = "ARM_THUMB12", false, 0x000007ff, - 0x000007ff, + 0x000007ff, PCRELOFFSET), HOWTO( ARM_THUMB23, 1, @@ -519,7 +518,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = "ARM_THUMB23", false, 0x07ff07ff, - 0x07ff07ff, + 0x07ff07ff, PCRELOFFSET) #endif /* not ARM_WINCE */ }; @@ -528,7 +527,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = #ifdef COFF_WITH_PE /* Return true if this relocation should - appear in the output .reloc section. */ + appear in the output .reloc section. */ static boolean in_reloc_p (abfd, howto) @@ -536,7 +535,7 @@ in_reloc_p (abfd, howto) reloc_howto_type * howto; { return !howto->pc_relative && howto->type != ARM_RVA32; -} +} #endif #define RTYPE2HOWTO(cache_ptr, dst) \ @@ -560,7 +559,7 @@ coff_arm_rtype_to_howto (abfd, sec, rel, h, sym, addendp) if (rel->r_type >= NUM_RELOCS) return NULL; - + howto = aoutarm_std_reloc_howto + rel->r_type; if (rel->r_type == ARM_RVA32) @@ -568,7 +567,7 @@ coff_arm_rtype_to_howto (abfd, sec, rel, h, sym, addendp) return howto; } -/* Used by the assembler. */ +/* Used by the assembler. */ static bfd_reloc_status_type aoutarm_fix_pcrel_26_done (abfd, reloc_entry, symbol, data, input_section, @@ -585,7 +584,7 @@ aoutarm_fix_pcrel_26_done (abfd, reloc_entry, symbol, data, input_section, return bfd_reloc_ok; } -/* Used by the assembler. */ +/* Used by the assembler. */ static bfd_reloc_status_type aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section, @@ -602,7 +601,7 @@ aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section, bfd_size_type addr = reloc_entry->address; long target = bfd_get_32 (abfd, (bfd_byte *) data + addr); bfd_reloc_status_type flag = bfd_reloc_ok; - + /* If this is an undefined symbol, return error */ if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0) @@ -623,7 +622,7 @@ aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section, relocation -= input_section->output_section->vma; relocation -= input_section->output_offset; relocation -= addr; - + if (relocation & 3) return bfd_reloc_overflow; @@ -693,7 +692,7 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section, default: abort (); } - + /* If this is an undefined symbol, return error */ if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0) @@ -768,7 +767,7 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section, /* Now the ARM magic... Change the reloc type so that it is marked as done. Strictly this is only necessary if we are doing a partial relocation. */ reloc_entry->howto = & aoutarm_std_reloc_howto [ARM_26D]; - + /* TODO: We should possibly have DONE entries for the THUMB PCREL relocations */ return flag; } @@ -818,14 +817,13 @@ coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section, input_section, output_bfd, error_message, b9); } - static CONST struct reloc_howto_struct * coff_arm_reloc_type_lookup (abfd, code) bfd * abfd; bfd_reloc_code_real_type code; { #define ASTD(i,j) case i: return aoutarm_std_reloc_howto + j - + if (code == BFD_RELOC_CTOR) switch (bfd_get_arch_info (abfd)->bits_per_address) { @@ -847,6 +845,7 @@ coff_arm_reloc_type_lookup (abfd, code) ASTD (BFD_RELOC_16, ARM_16); ASTD (BFD_RELOC_32, ARM_32); ASTD (BFD_RELOC_ARM_PCREL_BRANCH, ARM_26); + ASTD (BFD_RELOC_ARM_PCREL_BLX, ARM_26); ASTD (BFD_RELOC_8_PCREL, ARM_DISP8); ASTD (BFD_RELOC_16_PCREL, ARM_DISP16); ASTD (BFD_RELOC_32_PCREL, ARM_DISP32); @@ -854,7 +853,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); -#endif +#endif default: return (CONST struct reloc_howto_struct *) 0; } } @@ -874,17 +873,17 @@ struct coff_arm_link_hash_table { /* The original coff_link_hash_table structure. MUST be first field. */ struct coff_link_hash_table root; - + /* The size in bytes of the section containg the Thumb-to-ARM glue. */ long int thumb_glue_size; - + /* The size in bytes of the section containg the ARM-to-Thumb glue. */ long int arm_glue_size; /* An arbitary input BFD chosen to hold the glue sections. */ bfd * bfd_of_glue_owner; - /* Support interworking with old, non-interworking aware ARM code. */ + /* Support interworking with old, non-interworking aware ARM code. */ int support_old_code; }; @@ -939,16 +938,16 @@ arm_emit_base_file_entry (info, output_bfd, input_section, reloc_offset) /* The thumb form of a long branch is a bit finicky, because the offset encoding is split over two fields, each in it's own instruction. They - can occur in any order. So given a thumb form of long branch, and an + can occur in any order. So given a thumb form of long branch, and an offset, insert the offset into the thumb branch and return finished - instruction. + instruction. - It takes two thumb instructions to encode the target address. Each has + It takes two thumb instructions to encode the target address. Each has 11 bits to invest. The upper 11 bits are stored in one (identifed by - H-0.. see below), the lower 11 bits are stored in the other (identified - by H-1). + H-0.. see below), the lower 11 bits are stored in the other (identified + by H-1). - Combine together and shifted left by 1 (it's a half word address) and + Combine together and shifted left by 1 (it's a half word address) and there you have it. Op: 1111 = F, @@ -956,7 +955,7 @@ arm_emit_base_file_entry (info, output_bfd, input_section, reloc_offset) Op: 1111 = F, H-1, lower address-0 = 800 - They can be ordered either way, but the arm tools I've seen always put + They can be ordered either way, but the arm tools I've seen always put the lower one first. It probably doesn't matter. krk@cygnus.com XXX: Actually the order does matter. The second instruction (H-1) @@ -976,7 +975,6 @@ insert_thumb_branch (br_insn, rel_off) unsigned int low_bits; unsigned int high_bits; - BFD_ASSERT((rel_off & 1) != 1); rel_off >>= 1; /* half word aligned address */ @@ -988,13 +986,12 @@ insert_thumb_branch (br_insn, rel_off) else if ((br_insn & HI_LOW_ORDER) == HI_LOW_ORDER) br_insn = HI_LOW_ORDER | (high_bits << 16) | low_bits; else - abort(); /* error - not a valid branch instruction form */ + abort (); /* error - not a valid branch instruction form */ /* FIXME: abort is probably not the right call. krk@cygnus.com */ return br_insn; } - static struct coff_link_hash_entry * find_thumb_glue (info, name, input_bfd) @@ -1011,15 +1008,15 @@ find_thumb_glue (info, name, input_bfd) BFD_ASSERT (tmp_name); sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name); - + myh = coff_link_hash_lookup (coff_hash_table (info), tmp_name, false, false, true); - + if (myh == NULL) /* xgettext:c-format */ _bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"), bfd_get_filename (input_bfd), tmp_name, name); - + free (tmp_name); return myh; @@ -1040,7 +1037,7 @@ find_arm_glue (info, name, input_bfd) BFD_ASSERT (tmp_name); sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name); - + myh = coff_link_hash_lookup (coff_hash_table (info), tmp_name, false, false, true); @@ -1048,7 +1045,7 @@ find_arm_glue (info, name, input_bfd) /* xgettext:c-format */ _bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"), bfd_get_filename (input_bfd), tmp_name, name); - + free (tmp_name); return myh; @@ -1085,7 +1082,7 @@ static const insn32 a2t3_func_addr_insn = 0x00000001; ldmia r13! {r6, lr} bx lr __func_addr: - .word func + .word func */ #define THUMB2ARM_GLUE_SIZE (globals->support_old_code ? 20 : 8) @@ -1128,10 +1125,10 @@ static const insn32 t2a6_bx_insn = 0xe12fff1e; instruction we should generate a trampoline stub (needed to address the complete 32bit address space). */ -/* The standard COFF backend linker does not cope with the special +/* The standard COFF backend linker does not cope with the special Thumb BRANCH23 relocation. The alternative would be to split the BRANCH23 into seperate HI23 and LO23 relocations. However, it is a - bit simpler simply providing our own relocation driver. */ + bit simpler simply providing our own relocation driver. */ /* The reloc processing routine for the ARM/Thumb COFF linker. NOTE: This code is a very slightly modified copy of @@ -1179,7 +1176,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, sym = NULL; } else - { + { h = obj_coff_sym_hashes (input_bfd)[symndx]; sym = syms + symndx; } @@ -1194,7 +1191,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, else addend = 0; - howto = coff_rtype_to_howto (input_bfd, input_section, rel, h, sym, &addend); if (howto == NULL) @@ -1212,7 +1208,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, || h->root.type == bfd_link_hash_defweak) && h->root.u.def.section->output_section == input_section->output_section) { - static reloc_howto_type fake_arm26_reloc = + static reloc_howto_type fake_arm26_reloc = HOWTO (ARM_26, 2, 2, @@ -1224,7 +1220,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, "ARM_26", false, 0x00ffffff, - 0x00ffffff, + 0x00ffffff, false); addend -= rel->r_vaddr - input_section->vma; @@ -1233,11 +1229,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, #ifdef ARM_WINCE /* MS ARM-CE makes the reloc relative to the opcode's pc, not - the next opcode's pc, so is off by one. */ + the next opcode's pc, so is off by one. */ if (howto->pc_relative && !info->relocateable) addend -= 8; #endif - + /* If we are doing a relocateable link, then we can just ignore a PC relative reloc that is pcrel_offset. It will already have the correct value. If this is not a relocateable link, @@ -1246,8 +1242,15 @@ 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. */ if (sym != NULL && sym->n_scnum != 0) addend += sym->n_value; +#endif } val = 0; @@ -1277,14 +1280,14 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, relocatable output file, since we may as well leave the stub generation to the final linker pass. If we fail to verify that the name is defined, we'll try to build stubs - for an undefined name... */ + for an undefined name... */ if (! info->relocateable && ( h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak)) { asection * h_sec = h->root.u.def.section; const char * name = h->root.root.string; - + /* h locates the symbol referenced in the reloc. */ h_val = (h->root.u.def.value + h_sec->output_section->vma @@ -1300,9 +1303,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, long int my_offset; asection * s; long int ret_offset; - struct coff_link_hash_entry * myh; + struct coff_link_hash_entry * myh; struct coff_arm_link_hash_table * globals; - + myh = find_arm_glue (info, name, input_bfd); if (myh == NULL) return false; @@ -1311,10 +1314,10 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, BFD_ASSERT (globals != NULL); BFD_ASSERT (globals->bfd_of_glue_owner != NULL); - + my_offset = myh->root.u.def.value; - - s = bfd_get_section_by_name (globals->bfd_of_glue_owner, + + s = bfd_get_section_by_name (globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME); BFD_ASSERT (s != NULL); BFD_ASSERT (s->contents != NULL); @@ -1341,16 +1344,16 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, bfd_put_32 (output_bfd, a2t1_ldr_insn, s->contents + my_offset); - + bfd_put_32 (output_bfd, a2t2_bx_r12_insn, s->contents + my_offset + 4); - + /* It's a thumb address. Add the low order bit. */ bfd_put_32 (output_bfd, h_val | a2t3_func_addr_insn, s->contents + my_offset + 8); if (info->base_file) - arm_emit_base_file_entry (info, output_bfd, s, + arm_emit_base_file_entry (info, output_bfd, s, my_offset + 8); } @@ -1359,32 +1362,32 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, tmp = bfd_get_32 (input_bfd, contents + rel->r_vaddr - input_section->vma); - + tmp = tmp & 0xFF000000; - /* Somehow these are both 4 too far, so subtract 8. */ + /* Somehow these are both 4 too far, so subtract 8. */ ret_offset = s->output_offset - + my_offset + + my_offset + s->output_section->vma - (input_section->output_offset - + input_section->output_section->vma + + input_section->output_section->vma + rel->r_vaddr) - 8; tmp = tmp | ((ret_offset >> 2) & 0x00FFFFFF); - + bfd_put_32 (output_bfd, tmp, contents + rel->r_vaddr - input_section->vma); done = 1; } } - + #ifndef ARM_WINCE /* Note: We used to check for ARM_THUMB9 and ARM_THUMB12 */ else if (howto->type == ARM_THUMB23) { - if ( h->class == C_EXT + if ( h->class == C_EXT || h->class == C_STAT || h->class == C_LABEL) { @@ -1401,19 +1404,19 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, return false; globals = coff_arm_hash_table (info); - + BFD_ASSERT (globals != NULL); BFD_ASSERT (globals->bfd_of_glue_owner != NULL); - + my_offset = myh->root.u.def.value; - - s = bfd_get_section_by_name (globals->bfd_of_glue_owner, + + s = bfd_get_section_by_name (globals->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME); - + BFD_ASSERT (s != NULL); BFD_ASSERT (s->contents != NULL); BFD_ASSERT (s->output_section != NULL); - + if ((my_offset & 0x01) == 0x01) { if (h_sec->owner != NULL @@ -1432,7 +1435,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, _bfd_error_handler (_(" consider relinking with --support-old-code enabled")); } - + -- my_offset; myh->root.u.def.value = my_offset; @@ -1440,7 +1443,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, { bfd_put_16 (output_bfd, t2a1_push_insn, s->contents + my_offset); - + bfd_put_16 (output_bfd, t2a2_ldr_insn, s->contents + my_offset + 2); @@ -1449,13 +1452,13 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, bfd_put_16 (output_bfd, t2a4_bx_insn, s->contents + my_offset + 6); - + bfd_put_32 (output_bfd, t2a5_pop_insn, s->contents + my_offset + 8); - + bfd_put_32 (output_bfd, t2a6_bx_insn, s->contents + my_offset + 12); - + /* Store the address of the function in the last word of the stub. */ bfd_put_32 (output_bfd, h_val, s->contents + my_offset + 16); @@ -1467,10 +1470,10 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, { bfd_put_16 (output_bfd, t2a1_bx_pc_insn, s->contents + my_offset); - + bfd_put_16 (output_bfd, t2a2_noop_insn, s->contents + my_offset + 2); - + ret_offset = ((bfd_signed_vma) h_val) /* Address of destination of the stub */ - ((bfd_signed_vma) @@ -1479,7 +1482,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, + s->output_section->vma) /* Address of the start of the current section. */ + 4 /* The branch instruction is 4 bytes into the stub. */ + 8); /* ARM branches work from the pc of the instruction + 8. */ - + bfd_put_32 (output_bfd, t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF), s->contents + my_offset + 4); @@ -1497,7 +1500,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, - (input_section->output_offset + rel->r_vaddr) -4; - + tmp = bfd_get_32 (input_bfd, contents + rel->r_vaddr - input_section->vma); @@ -1505,20 +1508,20 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, insert_thumb_branch (tmp, ret_offset), contents + rel->r_vaddr - input_section->vma); - + done = 1; } } #endif } - + /* If the relocation type and destination symbol does not fall into one of the above categories, then we can just - perform a direct link. */ + perform a direct link. */ if (done) rstat = bfd_reloc_ok; - else + else #endif /* THUMBEXTENSION */ if ( h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) @@ -1542,11 +1545,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, if (info->base_file) { - /* Emit a reloc if the backend thinks it needs it. */ + /* Emit a reloc if the backend thinks it needs it. */ if (sym && pe_data(output_bfd)->in_reloc_p(output_bfd, howto)) arm_emit_base_file_entry (info, output_bfd, input_section, rel->r_vaddr); } - + #if 1 /* THUMBEXTENSION */ if (done) rstat = bfd_reloc_ok; @@ -1562,9 +1565,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, instruction. Again, it would probably be simpler adding a ThumbBRANCH23 specific macro expansion into the default code. */ - + bfd_vma address = rel->r_vaddr - input_section->vma; - + if (address > input_section->_raw_size) rstat = bfd_reloc_outofrange; else @@ -1583,21 +1586,21 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, bfd_signed_vma signed_add; BFD_ASSERT (size == 4); - + /* 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 */ relocation -= address; - - /* No need to negate the relocation with BRANCH23. */ + + /* 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. */ - + check = relocation >> howto->rightshift; - + /* If this is a signed value, the rightshift just dropped leading 1 bits (assuming twos complement). */ if ((bfd_signed_vma) relocation >= 0) @@ -1606,7 +1609,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, signed_check = (check | ((bfd_vma) - 1 & ~((bfd_vma) - 1 >> howto->rightshift))); - + /* Get the value from the object file. */ if (bfd_big_endian (input_bfd)) { @@ -1625,16 +1628,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; - + /* 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; @@ -1644,9 +1647,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, if ( signed_check > reloc_signed_max || signed_check < reloc_signed_min) overflow = true; - + /* Put RELOCATION into the correct bits: */ - + if (bfd_big_endian (input_bfd)) { relocation = (((relocation & 0xffe) >> 1) | ((relocation << 4) & 0x07ff0000)); @@ -1655,7 +1658,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, { relocation = (((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff)); } - + /* Add RELOCATION to the correct bits of X: */ x = ((x & ~howto->dst_mask) | relocation); @@ -1673,7 +1676,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, rel->r_vaddr - input_section->vma, val, addend); #if 1 /* THUMBEXTENSION */ - /* FIXME: + /* FIXME: Is this the best way to fix up thumb addresses? krk@cygnus.com Probably not, but it works, and if it works it don't need fixing! nickc@cygnus.com */ /* Only perform this fix during the final link, not a relocatable link. nickc@cygnus.com */ @@ -1682,9 +1685,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, { /* Determine if we need to set the bottom bit of a relocated address because the address is the address of a Thumb code symbol. */ - + int patchit = false; - + if (h != NULL && ( h->class == C_THUMBSTATFUNC || h->class == C_THUMBEXTFUNC)) @@ -1709,8 +1712,8 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, bfd_put_32 (input_bfd, x | 1, location); } } -#endif /* THUMBEXTENSION */ - +#endif /* THUMBEXTENSION */ + switch (rstat) { default: @@ -1754,7 +1757,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, #ifndef COFF_IMAGE_WITH_PE boolean -bfd_arm_allocate_interworking_sections (info) +bfd_arm_allocate_interworking_sections (info) struct bfd_link_info * info; { asection * s; @@ -1765,24 +1768,24 @@ bfd_arm_allocate_interworking_sections (info) #endif globals = coff_arm_hash_table (info); - + BFD_ASSERT (globals != NULL); if (globals->arm_glue_size != 0) { BFD_ASSERT (globals->bfd_of_glue_owner != NULL); - + s = bfd_get_section_by_name (globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME); BFD_ASSERT (s != NULL); - + foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner, globals->arm_glue_size); #if 0 memset (foo, test_char, globals->arm_glue_size); #endif - + s->_raw_size = s->_cooked_size = globals->arm_glue_size; s->contents = foo; } @@ -1790,18 +1793,18 @@ bfd_arm_allocate_interworking_sections (info) if (globals->thumb_glue_size != 0) { BFD_ASSERT (globals->bfd_of_glue_owner != NULL); - + s = bfd_get_section_by_name (globals->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME); BFD_ASSERT (s != NULL); - + foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner, globals->thumb_glue_size); #if 0 memset (foo, test_char, globals->thumb_glue_size); #endif - + s->_raw_size = s->_cooked_size = globals->thumb_glue_size; s->contents = foo; } @@ -1836,10 +1839,10 @@ record_arm_to_thumb_glue (info, h) BFD_ASSERT (tmp_name); sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name); - + myh = coff_link_hash_lookup (coff_hash_table (info), tmp_name, false, false, true); - + if (myh != NULL) { free (tmp_name); @@ -1851,13 +1854,13 @@ record_arm_to_thumb_glue (info, h) it. */ bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name, - BSF_GLOBAL, + BSF_GLOBAL, s, globals->arm_glue_size + 1, - NULL, true, false, + NULL, true, false, (struct bfd_link_hash_entry **) & myh); - + free (tmp_name); - + globals->arm_glue_size += ARM2THUMB_GLUE_SIZE; return; @@ -1874,9 +1877,8 @@ record_thumb_to_arm_glue (info, h) struct coff_link_hash_entry * myh; struct coff_arm_link_hash_table * globals; - globals = coff_arm_hash_table (info); - + BFD_ASSERT (globals != NULL); BFD_ASSERT (globals->bfd_of_glue_owner != NULL); @@ -1893,7 +1895,7 @@ record_thumb_to_arm_glue (info, h) myh = coff_link_hash_lookup (coff_hash_table (info), tmp_name, false, false, true); - + if (myh != NULL) { free (tmp_name); @@ -1902,35 +1904,35 @@ record_thumb_to_arm_glue (info, h) bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name, BSF_GLOBAL, s, globals->thumb_glue_size + 1, - NULL, true, false, + NULL, true, false, (struct bfd_link_hash_entry **) & myh); - + /* If we mark it 'thumb', the disassembler will do a better job. */ myh->class = C_THUMBEXTFUNC; free (tmp_name); /* Allocate another symbol to mark where we switch to arm mode. */ - + #define CHANGE_TO_ARM "__%s_change_to_arm" #define BACK_FROM_ARM "__%s_back_from_arm" - + tmp_name = (char *) bfd_malloc (strlen (name) + strlen (CHANGE_TO_ARM) + 1); - + BFD_ASSERT (tmp_name); - + sprintf (tmp_name, globals->support_old_code ? BACK_FROM_ARM : CHANGE_TO_ARM, name); myh = NULL; - + bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name, BSF_LOCAL, s, globals->thumb_glue_size + (globals->support_old_code ? 8 : 4), - NULL, true, false, + NULL, true, false, (struct bfd_link_hash_entry **) & myh); - free (tmp_name); - + free (tmp_name); + globals->thumb_glue_size += THUMB2ARM_GLUE_SIZE; return; @@ -1948,27 +1950,27 @@ bfd_arm_get_bfd_for_interworking (abfd, info) struct coff_arm_link_hash_table * globals; flagword flags; asection * sec; - + /* If we are only performing a partial link do not bother getting a bfd to hold the glue. */ if (info->relocateable) return true; - + globals = coff_arm_hash_table (info); - + BFD_ASSERT (globals != NULL); if (globals->bfd_of_glue_owner != NULL) return true; - + sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME); - - if (sec == NULL) + + if (sec == NULL) { flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY; - + sec = bfd_make_section (abfd, ARM2THUMB_GLUE_SECTION_NAME); - + if (sec == NULL || ! bfd_set_section_flags (abfd, sec, flags) || ! bfd_set_section_alignment (abfd, sec, 2)) @@ -1977,21 +1979,21 @@ bfd_arm_get_bfd_for_interworking (abfd, info) sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME); - if (sec == NULL) + if (sec == NULL) { flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY; - + sec = bfd_make_section (abfd, THUMB2ARM_GLUE_SECTION_NAME); - + if (sec == NULL || ! bfd_set_section_flags (abfd, sec, flags) || ! bfd_set_section_alignment (abfd, sec, 2)) return false; } - + /* Save the bfd for later use. */ globals->bfd_of_glue_owner = abfd; - + return true; } @@ -2008,19 +2010,19 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code) to construct any glue. */ if (info->relocateable) return true; - + /* Here we have a bfd that is to be included on the link. We have a hook to do reloc rummaging, before section sizes are nailed down. */ _bfd_coff_get_external_symbols (abfd); globals = coff_arm_hash_table (info); - + BFD_ASSERT (globals != NULL); BFD_ASSERT (globals->bfd_of_glue_owner != NULL); globals->support_old_code = support_old_code; - + /* Rummage around all the relocs and map the glue vectors. */ sec = abfd->sections; @@ -2032,17 +2034,17 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code) struct internal_reloc * i; struct internal_reloc * rel; - if (sec->reloc_count == 0) + if (sec->reloc_count == 0) continue; /* Load the relocs. */ - /* FIXME: there may be a storage leak here. */ - + /* FIXME: there may be a storage leak here. */ + i = _bfd_coff_read_internal_relocs (abfd, sec, 1, 0, 0, 0); - + BFD_ASSERT (i != 0); - for (rel = i; rel < i + sec->reloc_count; ++rel) + for (rel = i; rel < i + sec->reloc_count; ++rel) { unsigned short r_type = rel->r_type; long symndx; @@ -2050,7 +2052,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code) symndx = rel->r_symndx; - /* If the relocation is not against a symbol it cannot concern us. */ + /* If the relocation is not against a symbol it cannot concern us. */ if (symndx == -1) continue; @@ -2061,7 +2063,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code) bfd_get_filename (abfd), symndx); continue; } - + h = obj_coff_sym_hashes (abfd)[symndx]; /* If the relocation is against a static symbol it must be within @@ -2075,11 +2077,11 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code) /* This one is a call from arm code. We need to look up the target of the call. If it is a thumb target, we insert glue. */ - + if (h->class == C_THUMBEXTFUNC) record_arm_to_thumb_glue (info, h); break; - + #ifndef ARM_WINCE case ARM_THUMB23: /* This one is a call from thumb code. We used to look @@ -2102,7 +2104,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code) } break; #endif - + default: break; } @@ -2126,7 +2128,6 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code) #define coff_bfd_copy_private_bfd_data coff_arm_copy_private_bfd_data #define coff_bfd_link_hash_table_create coff_arm_link_hash_table_create - /* When doing a relocateable link, we want to convert ARM26 relocs into ARM26D relocs. */ @@ -2194,7 +2195,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd) bfd_set_error (bfd_error_wrong_format); return false; } - + if (APCS_FLOAT_FLAG (obfd) != APCS_FLOAT_FLAG (ibfd)) { const char *msg; @@ -2205,14 +2206,14 @@ coff_arm_merge_private_bfd_data (ibfd, obfd) else /* xgettext: c-format */ msg = _("%s: ERROR: passes floats in integer registers whereas target %s uses float registers"); - + _bfd_error_handler (msg, bfd_get_filename (ibfd), bfd_get_filename (obfd)); bfd_set_error (bfd_error_wrong_format); return false; } - + if (PIC_FLAG (obfd) != PIC_FLAG (ibfd)) { const char * msg; @@ -2233,7 +2234,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd) else { SET_APCS_FLAGS (obfd, APCS_26_FLAG (ibfd) | APCS_FLOAT_FLAG (ibfd) | PIC_FLAG (ibfd)); - + /* Set up the arch and fields as well as these are probably wrong. */ bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); } @@ -2255,7 +2256,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd) else /* xgettext: c-format */ msg = _("Warning: input file %s does not support interworking, whereas %s does."); - + _bfd_error_handler (msg, bfd_get_filename (ibfd), bfd_get_filename (obfd)); } @@ -2269,7 +2270,6 @@ coff_arm_merge_private_bfd_data (ibfd, obfd) return true; } - /* Display the flags field. */ static boolean @@ -2278,12 +2278,12 @@ coff_arm_print_private_bfd_data (abfd, ptr) PTR ptr; { FILE * file = (FILE *) ptr; - + BFD_ASSERT (abfd != NULL && ptr != NULL); - + /* xgettext:c-format */ fprintf (file, _("private flags = %x:"), coff_data (abfd)->flags); - + if (APCS_SET (abfd)) { /* xgettext: APCS is ARM Prodecure Call Standard, it should not be translated. */ @@ -2299,20 +2299,19 @@ coff_arm_print_private_bfd_data (abfd, ptr) else fprintf (file, _(" [absolute position]")); } - + if (! INTERWORK_SET (abfd)) fprintf (file, _(" [interworking flag not initialised]")); else if (INTERWORK_FLAG (abfd)) fprintf (file, _(" [interworking supported]")); else fprintf (file, _(" [interworking not supported]")); - + fputc ('\n', file); - + return true; } - /* Copies the given flags into the coff_tdata.flags field. Typically these flags come from the f_flags[] field of the COFF filehdr structure, which contains important, @@ -2330,7 +2329,7 @@ _bfd_coff_arm_set_private_flags (abfd, flags) BFD_ASSERT (abfd != NULL); flag = (flags & F_APCS26) ? F_APCS_26 : 0; - + /* Make sure that the APCS field has not been initialised to the opposite value. */ if (APCS_SET (abfd) @@ -2341,11 +2340,11 @@ _bfd_coff_arm_set_private_flags (abfd, flags) return false; flag |= (flags & (F_APCS_FLOAT | F_PIC)); - + SET_APCS_FLAGS (abfd, flag); flag = (flags & F_INTERWORK); - + /* If the BFD has already had its interworking flag set, but it is different from the value that we have been asked to set, then assume that that merged code will not support interworking @@ -2368,7 +2367,6 @@ _bfd_coff_arm_set_private_flags (abfd, flags) return true; } - /* Copy the important parts of the target specific data from one instance of a BFD to another. */ @@ -2378,7 +2376,7 @@ coff_arm_copy_private_bfd_data (src, dest) bfd * dest; { BFD_ASSERT (src != NULL && dest != NULL); - + if (src == dest) return true; @@ -2395,10 +2393,10 @@ coff_arm_copy_private_bfd_data (src, dest) /* If the src and dest have different APCS flag bits set, fail. */ if (APCS_26_FLAG (dest) != APCS_26_FLAG (src)) return false; - + if (APCS_FLOAT_FLAG (dest) != APCS_FLOAT_FLAG (src)) return false; - + if (PIC_FLAG (dest) != PIC_FLAG (src)) return false; } @@ -2422,7 +2420,7 @@ coff_arm_copy_private_bfd_data (src, dest) bfd_get_filename (dest), bfd_get_filename (src)); } - + SET_INTERWORK_FLAG (dest, 0); } } @@ -2436,8 +2434,8 @@ coff_arm_copy_private_bfd_data (src, dest) } /* Note: the definitions here of LOCAL_LABEL_PREFIX and USER_LABEL_PREIFX - *must* match the definitions in gcc/config/arm/coff.h and semi.h */ -#define LOCAL_LABEL_PREFIX "." + *must* match the definitions in gcc/config/arm/{coff|semi|aout}.h. */ +#define LOCAL_LABEL_PREFIX "" #ifndef USER_LABEL_PREFIX #define USER_LABEL_PREFIX "_" #endif @@ -2462,28 +2460,28 @@ coff_arm_is_local_label_name (abfd, name) #ifdef LOCAL_LABEL_PREFIX /* If there is a prefix for local labels then look for this. - If the prefix exists, but it is empty, then ignore the test. */ - + If the prefix exists, but it is empty, then ignore the test. */ + if (LOCAL_LABEL_PREFIX[0] != 0) { int len = strlen (LOCAL_LABEL_PREFIX); - + if (strncmp (name, LOCAL_LABEL_PREFIX, len) != 0) return false; - + /* Perform the checks below for the rest of the name. */ name += len; } #endif - + return name[0] == 'L'; } /* This piece of machinery exists only to guarantee that the bfd that holds - the glue section is written last. + the glue section is written last. This does depend on bfd_make_section attaching a new section to the - end of the section list for the bfd. + end of the section list for the bfd. krk@cygnus.com */ @@ -2504,17 +2502,17 @@ coff_arm_final_link_postscript (abfd, pfinfo) struct coff_arm_link_hash_table * globals; globals = coff_arm_hash_table (pfinfo->info); - + BFD_ASSERT (globals != NULL); - + if (globals->bfd_of_glue_owner != NULL) { if (! _bfd_coff_link_input_bfd (pfinfo, globals->bfd_of_glue_owner)) return false; - + globals->bfd_of_glue_owner->output_has_begun = true; } - + return true; } @@ -2537,11 +2535,13 @@ coff_arm_final_link_postscript (abfd, pfinfo) #define TARGET_UNDERSCORE 0 #endif +#ifndef EXTRA_S_FLAGS #ifdef COFF_WITH_PE #define EXTRA_S_FLAGS (SEC_LINK_ONCE | SEC_LINK_DUPLICATES) #else #define EXTRA_S_FLAGS 0 #endif +#endif /* Forward declaration for use initialising alternative_target field. */ extern const bfd_target TARGET_BIG_SYM ; @@ -2549,4 +2549,3 @@ extern const bfd_target TARGET_BIG_SYM ; /* Target vectors. */ CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM) CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM) - diff --git a/contrib/binutils/bfd/coff-aux.c b/contrib/binutils/bfd/coff-aux.c index 6966392..5bc9b8b 100644 --- a/contrib/binutils/bfd/coff-aux.c +++ b/contrib/binutils/bfd/coff-aux.c @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* 4k pages */ #define COFF_PAGE_SIZE 0x1000 -/* On AUX, a STYP_NOLOAD|STYP_BSS section is part of a shared library. */ +/* On AUX, a STYP_NOLOAD|STYP_BSS section is part of a shared library. */ #define BSS_NOLOAD_IS_SHARED_LIBRARY #define STATIC_RELOCS @@ -41,8 +41,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "sysdep.h" static boolean coff_m68k_aux_link_add_one_symbol - PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword, - asection *, bfd_vma, const char *, boolean, boolean, + PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword, + asection *, bfd_vma, const char *, boolean, boolean, struct bfd_link_hash_entry **)); #define coff_link_add_one_symbol coff_m68k_aux_link_add_one_symbol @@ -54,7 +54,7 @@ static boolean coff_m68k_aux_link_add_one_symbol mirrors Apple's "solution" to let a static library symbol override a shared library symbol. On the whole not a good thing, given how shared libraries work here, but can work if you are careful with - what you include in the shared object. */ + what you include in the shared object. */ static boolean coff_m68k_aux_link_add_one_symbol (info, abfd, name, flags, section, value, diff --git a/contrib/binutils/bfd/coff-i386.c b/contrib/binutils/bfd/coff-i386.c index 84d4d14..83d67c4 100644 --- a/contrib/binutils/bfd/coff-i386.c +++ b/contrib/binutils/bfd/coff-i386.c @@ -73,8 +73,10 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, { symvalue diff; +#ifndef COFF_WITH_PE if (output_bfd == (bfd *) NULL) return bfd_reloc_continue; +#endif if (bfd_is_com_section (symbol->section)) { @@ -102,7 +104,26 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, ignores the addend for a COFF target when producing relocateable output. This seems to be always wrong for 386 COFF, so we handle the addend here instead. */ - diff = reloc_entry->addend; +#ifdef COFF_WITH_PE + if (output_bfd == (bfd *) NULL) + { + reloc_howto_type *howto = reloc_entry->howto; + + /* Although PC relative relocations are very similar between + PE and non-PE formats, but they are off by 1 << howto->size + bytes. For the external relocation, PE is very different + from others. See md_apply_fix3 () in gas/config/tc-i386.c. + When we link PE and non-PE object files together to + generate a non-PE executable, we have to compensate it + here. */ + if (howto->pc_relative == true && howto->pcrel_offset == true) + diff = -(1 << howto->size); + else + diff = -reloc_entry->addend; + } + else +#endif + diff = reloc_entry->addend; } #ifdef COFF_WITH_PE @@ -155,19 +176,17 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, } #ifdef COFF_WITH_PE - /* Return true if this relocation should appear in the output .reloc section. */ static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *)); static boolean in_reloc_p (abfd, howto) - bfd *abfd ATTRIBUTE_UNUSED; + bfd * abfd ATTRIBUTE_UNUSED; reloc_howto_type *howto; { return ! howto->pc_relative && howto->type != R_IMAGEBASE; } - #endif /* COFF_WITH_PE */ #ifndef PCRELOFFSET @@ -575,7 +594,7 @@ const bfd_target bfd_getl32, bfd_getl_signed_32, bfd_putl32, bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */ -/* Note that we allow an object file to be treated as a core file as well. */ +/* Note that we allow an object file to be treated as a core file as well. */ {_bfd_dummy_target, coff_object_p, /* bfd_check_format */ bfd_generic_archive_p, coff_object_p}, {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */ diff --git a/contrib/binutils/bfd/coff-ppc.c b/contrib/binutils/bfd/coff-ppc.c index c5e695d..798399d 100644 --- a/contrib/binutils/bfd/coff-ppc.c +++ b/contrib/binutils/bfd/coff-ppc.c @@ -5,7 +5,7 @@ Original version pieced together by Kim Knuttila (krk@cygnus.com) There is nothing new under the sun. This file draws a lot on other - coff files, in particular, those for the rs/6000, alpha, mips, and + coff files, in particular, those for the rs/6000, alpha, mips, and intel backends, and the PE work for the arm. This file is part of BFD, the Binary File Descriptor library. @@ -29,11 +29,10 @@ Boston, MA 02111-1307, USA. */ - objdump works - relocs generated by gas - ld will link files, but they do not run. - - dlltool will not produce correct output in some .reloc cases, and will + - dlltool will not produce correct output in some .reloc cases, and will not produce the right glue code for dll function calls. */ - #include "bfd.h" #include "sysdep.h" @@ -75,7 +74,6 @@ extern void dump_toc PARAMS ((PTR)); #define MARK_AS_WRITTEN(x) ((x) |= 1) #define MAKE_ADDR_AGAIN(x) ((x) &= ~1) - /* Turn on this check if you suspect something amiss in the hash tables */ #ifdef DEBUG_HASH @@ -87,13 +85,12 @@ extern void dump_toc PARAMS ((PTR)); #define HASH_CHECK(addr) \ if (strcmp(addr->eye_catcher, EYE) != 0) \ { \ - fprintf(stderr,\ + fprintf (stderr,\ _("File %s, line %d, Hash check failure, bad eye %8s\n"), \ __FILE__, __LINE__, addr->eye_catcher); \ - abort(); \ + abort (); \ } - #else #define HASH_CHECK_DCL @@ -105,7 +102,7 @@ extern void dump_toc PARAMS ((PTR)); /* In order not to add an int to every hash table item for every coff linker, we define our own hash table, derived from the coff one */ -/* PE linker hash table entries. */ +/* PE linker hash table entries. */ struct ppc_coff_link_hash_entry { @@ -120,7 +117,6 @@ struct ppc_coff_link_hash_entry HASH_CHECK_DCL }; - /* PE linker hash table. */ struct ppc_coff_link_hash_table @@ -154,14 +150,14 @@ ppc_coff_link_hash_newfunc (entry, table, string) struct bfd_hash_table *table; const char *string; { - struct ppc_coff_link_hash_entry *ret = + struct ppc_coff_link_hash_entry *ret = (struct ppc_coff_link_hash_entry *) entry; /* Allocate the structure if it has not already been allocated by a subclass. */ if (ret == (struct ppc_coff_link_hash_entry *) NULL) ret = (struct ppc_coff_link_hash_entry *) - bfd_hash_allocate (table, + bfd_hash_allocate (table, sizeof (struct ppc_coff_link_hash_entry)); if (ret == (struct ppc_coff_link_hash_entry *) NULL) @@ -169,7 +165,7 @@ ppc_coff_link_hash_newfunc (entry, table, string) /* Call the allocation method of the superclass. */ ret = ((struct ppc_coff_link_hash_entry *) - _bfd_coff_link_hash_newfunc ((struct bfd_hash_entry *) ret, + _bfd_coff_link_hash_newfunc ((struct bfd_hash_entry *) ret, table, string)); if (ret) @@ -222,7 +218,6 @@ ppc_coff_link_hash_table_create (abfd) /* Now, tailor coffcode.h to use our hash stuff */ #define coff_bfd_link_hash_table_create ppc_coff_link_hash_table_create - /* The nt loader points the toc register to &toc + 32768, in order to */ /* use the complete range of a 16-bit displacement. We have to adjust */ @@ -238,7 +233,7 @@ ppc_coff_link_hash_table_create (abfd) from smaller values. Start with zero, widen, *then* decrement. */ #define MINUS_ONE (((bfd_vma)0) - 1) -/* these should definitely go in a header file somewhere... */ +/* these should definitely go in a header file somewhere... */ /* NOP */ #define IMAGE_REL_PPC_ABSOLUTE 0x0000 @@ -320,7 +315,6 @@ ppc_coff_link_hash_table_create (abfd) #define EXTRACT_FLAGS(x) ((x) & IMAGE_REL_PPC_FLAGMASK) #define EXTRACT_JUNK(x) \ ((x) & ~(IMAGE_REL_PPC_TYPEMASK | IMAGE_REL_PPC_FLAGMASK)) - /* static helper functions to make relocation work */ /* (Work In Progress) */ @@ -348,7 +342,6 @@ static bfd_reloc_status_type ppc_pair_reloc PARAMS ((bfd *abfd, asection *section, bfd *output_bfd, char **error)); - static bfd_reloc_status_type ppc_toc16_reloc PARAMS ((bfd *abfd, arelent *reloc, @@ -391,10 +384,7 @@ static bfd_reloc_status_type ppc_imglue_reloc PARAMS ((bfd *abfd, bfd *output_bfd, char **error)); - - static boolean in_reloc_p PARAMS((bfd *abfd, reloc_howto_type *howto)); - /* FIXME: It'll take a while to get through all of these. I only need a few to get us started, so those I'll make sure work. Those marked FIXME are either @@ -418,7 +408,7 @@ static boolean in_reloc_p PARAMS((bfd *abfd, reloc_howto_type *howto)); /* the address of the SYM will be inserted at link time. */ /* TOCREL16 : 16 bit displacement field referring to a slot in */ /* toc. */ -/* TOCREL14 : 16 bit displacement field, similar to REL14 or ADDR14. */ +/* TOCREL14 : 16 bit displacement field, similar to REL14 or ADDR14. */ /* ADDR32NB : 32 bit address relative to the virtual origin. */ /* (On the alpha, this is always a linker generated thunk)*/ /* (i.e. 32bit addr relative to the image base) */ @@ -438,32 +428,32 @@ static reloc_howto_type ppc_coff_howto_table[] = { /* IMAGE_REL_PPC_ABSOLUTE 0x0000 NOP */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_ABSOLUTE, /* type */ - 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ - 0, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_ABSOLUTE, /* type */ + 0, /* rightshift */ + 0, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_dont, /* dont complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "ABSOLUTE", /* name */ - false, /* partial_inplace */ - 0x00, /* src_mask */ - 0x00, /* dst_mask */ + false, /* partial_inplace */ + 0x00, /* src_mask */ + 0x00, /* dst_mask */ false), /* pcrel_offset */ - + /* IMAGE_REL_PPC_ADDR64 0x0001 64-bit address */ /* Unused: */ - HOWTO(IMAGE_REL_PPC_ADDR64, /* type */ - 0, /* rightshift */ - 3, /* size (0 = byte, 1 = short, 2 = long) */ - 64, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO(IMAGE_REL_PPC_ADDR64, /* type */ + 0, /* rightshift */ + 3, /* size (0 = byte, 1 = short, 2 = long) */ + 64, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "ADDR64", /* name */ - true, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ false), /* pcrel_offset */ @@ -471,314 +461,311 @@ static reloc_howto_type ppc_coff_howto_table[] = /* IMAGE_REL_PPC_ADDR32 0x0002 32-bit address */ /* Used: */ HOWTO (IMAGE_REL_PPC_ADDR32, /* type */ - 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "ADDR32", /* name */ - true, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + /* IMAGE_REL_PPC_ADDR24 0x0003 26-bit address, shifted left 2 (branch absolute) */ /* the LI field is in bit 6 through bit 29 is 24 bits, + 2 for the shift */ /* Of course, That's the IBM approved bit numbering, which is not what */ - /* anyone else uses.... The li field is in bit 2 thru 25 */ + /* anyone else uses.... The li field is in bit 2 thru 25 */ /* Used: */ HOWTO (IMAGE_REL_PPC_ADDR24, /* type */ - 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "ADDR24", /* name */ - true, /* partial_inplace */ - 0x07fffffc, /* src_mask */ - 0x07fffffc, /* dst_mask */ + true, /* partial_inplace */ + 0x07fffffc, /* src_mask */ + 0x07fffffc, /* dst_mask */ false), /* pcrel_offset */ - + /* IMAGE_REL_PPC_ADDR16 0x0004 16-bit address */ /* Used: */ - HOWTO (IMAGE_REL_PPC_ADDR16, /* type */ - 0, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_ADDR16, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "ADDR16", /* name */ - true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ false), /* pcrel_offset */ - + /* IMAGE_REL_PPC_ADDR14 0x0005 */ /* 16-bit address, shifted left 2 (load doubleword) */ /* FIXME: the mask is likely wrong, and the bit position may be as well */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_ADDR14, /* type */ - 1, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_ADDR14, /* type */ + 1, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "ADDR16", /* name */ - true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ false), /* pcrel_offset */ - + /* IMAGE_REL_PPC_REL24 0x0006 */ /* 26-bit PC-relative offset, shifted left 2 (branch relative) */ /* Used: */ HOWTO (IMAGE_REL_PPC_REL24, /* type */ - 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 26, /* bitsize */ - true, /* pc_relative */ - 0, /* bitpos */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 26, /* bitsize */ + true, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "REL24", /* name */ - true, /* partial_inplace */ - 0x3fffffc, /* src_mask */ - 0x3fffffc, /* dst_mask */ + true, /* partial_inplace */ + 0x3fffffc, /* src_mask */ + 0x3fffffc, /* dst_mask */ false), /* pcrel_offset */ - + /* IMAGE_REL_PPC_REL14 0x0007 */ /* 16-bit PC-relative offset, shifted left 2 (br cond relative) */ /* FIXME: the mask is likely wrong, and the bit position may be as well */ /* FIXME: how does it know how far to shift? */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_ADDR14, /* type */ - 1, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_ADDR14, /* type */ + 1, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "ADDR16", /* name */ - true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ true), /* pcrel_offset */ - + /* IMAGE_REL_PPC_TOCREL16 0x0008 */ /* 16-bit offset from TOC base */ /* Used: */ - HOWTO (IMAGE_REL_PPC_TOCREL16,/* type */ - 0, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_TOCREL16,/* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - ppc_toc16_reloc, /* special_function */ + ppc_toc16_reloc, /* special_function */ "TOCREL16", /* name */ - false, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ false), /* pcrel_offset */ - + /* IMAGE_REL_PPC_TOCREL14 0x0009 */ /* 16-bit offset from TOC base, shifted left 2 (load doubleword) */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_TOCREL14,/* type */ - 1, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_TOCREL14,/* type */ + 1, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "TOCREL14", /* name */ - false, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ false), /* pcrel_offset */ - + /* IMAGE_REL_PPC_ADDR32NB 0x000A */ /* 32-bit addr w/ image base */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_ADDR32NB,/* type */ - 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_ADDR32NB,/* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "ADDR32NB", /* name */ - true, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + /* IMAGE_REL_PPC_SECREL 0x000B */ /* va of containing section (as in an image sectionhdr) */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_SECREL,/* type */ - 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_SECREL,/* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - ppc_secrel_reloc, /* special_function */ + ppc_secrel_reloc, /* special_function */ "SECREL", /* name */ - true, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ /* IMAGE_REL_PPC_SECTION 0x000C */ /* sectionheader number */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_SECTION,/* type */ - 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_SECTION,/* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - ppc_section_reloc, /* special_function */ + ppc_section_reloc, /* special_function */ "SECTION", /* name */ - true, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ /* IMAGE_REL_PPC_IFGLUE 0x000D */ /* substitute TOC restore instruction iff symbol is glue code */ /* Used: */ - HOWTO (IMAGE_REL_PPC_IFGLUE,/* type */ - 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_IFGLUE,/* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "IFGLUE", /* name */ - true, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ /* IMAGE_REL_PPC_IMGLUE 0x000E */ /* symbol is glue code; virtual address is TOC restore instruction */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_IMGLUE,/* type */ - 0, /* rightshift */ - 2, /* size (0 = byte, 1 = short, 2 = long) */ - 32, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_IMGLUE,/* type */ + 0, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 32, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - ppc_imglue_reloc, /* special_function */ + ppc_imglue_reloc, /* special_function */ "IMGLUE", /* name */ - false, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ + false, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ /* IMAGE_REL_PPC_SECREL16 0x000F */ /* va of containing section (limited to 16 bits) */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_SECREL16,/* type */ - 0, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_SECREL16,/* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "SECREL16", /* name */ - true, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ true), /* pcrel_offset */ /* IMAGE_REL_PPC_REFHI 0x0010 */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_REFHI, /* type */ - 0, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_REFHI, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - ppc_refhi_reloc, /* special_function */ + ppc_refhi_reloc, /* special_function */ "REFHI", /* name */ - true, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ /* IMAGE_REL_PPC_REFLO 0x0011 */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_REFLO, /* type */ - 0, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_REFLO, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - ppc_refhi_reloc, /* special_function */ + ppc_refhi_reloc, /* special_function */ "REFLO", /* name */ - true, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ /* IMAGE_REL_PPC_PAIR 0x0012 */ /* Unused: */ - HOWTO (IMAGE_REL_PPC_PAIR, /* type */ - 0, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO (IMAGE_REL_PPC_PAIR, /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ - ppc_pair_reloc, /* special_function */ + ppc_pair_reloc, /* special_function */ "PAIR", /* name */ - true, /* partial_inplace */ - 0xffffffff, /* src_mask */ - 0xffffffff, /* dst_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ + 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ /* IMAGE_REL_PPC_TOCREL16_DEFN 0x0013 */ /* 16-bit offset from TOC base, without causing a definition */ /* Used: */ - HOWTO ( (IMAGE_REL_PPC_TOCREL16 | IMAGE_REL_PPC_TOCDEFN), /* type */ - 0, /* rightshift */ - 1, /* size (0 = byte, 1 = short, 2 = long) */ - 16, /* bitsize */ - false, /* pc_relative */ - 0, /* bitpos */ + HOWTO ( (IMAGE_REL_PPC_TOCREL16 | IMAGE_REL_PPC_TOCDEFN), /* type */ + 0, /* rightshift */ + 1, /* size (0 = byte, 1 = short, 2 = long) */ + 16, /* bitsize */ + false, /* pc_relative */ + 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ - 0, /* special_function */ + 0, /* special_function */ "TOCREL16, TOCDEFN", /* name */ - false, /* partial_inplace */ - 0xffff, /* src_mask */ - 0xffff, /* dst_mask */ + false, /* partial_inplace */ + 0xffff, /* src_mask */ + 0xffff, /* dst_mask */ false), /* pcrel_offset */ }; - - - /* Some really cheezy macros that can be turned on to test stderr :-) */ #ifdef DEBUG_RELOC @@ -788,19 +775,19 @@ static reloc_howto_type ppc_coff_howto_table[] = if (i == 0) \ { \ i = 1; \ - fprintf(stderr,_("Unimplemented Relocation -- %s\n"),x); \ + fprintf (stderr,_("Unimplemented Relocation -- %s\n"),x); \ } \ } #define DUMP_RELOC(n,r) \ { \ - fprintf(stderr,"%s sym %d, addr %d, addend %d\n", \ + fprintf (stderr,"%s sym %d, addr %d, addend %d\n", \ n, (*(r->sym_ptr_ptr))->name, \ r->address, r->addend); \ } -/* Given a reloc name, n, and a pointer to an internal_reloc, - dump out interesting information on the contents +/* Given a reloc name, n, and a pointer to an internal_reloc, + dump out interesting information on the contents #define n_name _n._n_name #define n_zeroes _n._n_n._n_zeroes @@ -810,7 +797,7 @@ static reloc_howto_type ppc_coff_howto_table[] = #define DUMP_RELOC2(n,r) \ { \ - fprintf(stderr,"%s sym %d, r_vaddr %d %s\n", \ + fprintf (stderr,"%s sym %d, r_vaddr %d %s\n", \ n, r->r_symndx, r->r_vaddr,\ (((r->r_type) & IMAGE_REL_PPC_TOCDEFN) == 0) \ ?" ":" TOCDEFN" ); \ @@ -821,8 +808,6 @@ static reloc_howto_type ppc_coff_howto_table[] = #define DUMP_RELOC(n,r) #define DUMP_RELOC2(n,r) #endif - - /* toc construction and management routines */ @@ -924,16 +909,16 @@ ppc_record_toc_entry(abfd, info, sec, sym, toc_kind) HASH_CHECK(h); } - if (h == 0) - { + if (h == 0) + { local_syms = obj_coff_local_toc_table(abfd); if (local_syms == 0) { unsigned int i; /* allocate a table */ - local_syms = - (int *) bfd_zalloc (abfd, - obj_raw_syment_count(abfd) * sizeof(int)); + local_syms = + (int *) bfd_zalloc (abfd, + obj_raw_syment_count(abfd) * sizeof (int)); if (local_syms == 0) return false; obj_coff_local_toc_table(abfd) = local_syms; @@ -943,7 +928,7 @@ ppc_record_toc_entry(abfd, info, sec, sym, toc_kind) } } - if (IS_UNALLOCATED(local_syms[sym])) + if (IS_UNALLOCATED(local_syms[sym])) { local_syms[sym] = global_toc_size; global_toc_size += 4; @@ -1002,20 +987,19 @@ ppc_mark_symbol_as_glue(abfd, sym, rel) #endif /* COFF_IMAGE_WITH_PE */ - /* Return true if this relocation should - appear in the output .reloc section. */ + appear in the output .reloc section. */ static boolean in_reloc_p(abfd, howto) bfd * abfd ATTRIBUTE_UNUSED; reloc_howto_type *howto; { - return - (! howto->pc_relative) + return + (! howto->pc_relative) && (howto->type != IMAGE_REL_PPC_ADDR32NB) && (howto->type != IMAGE_REL_PPC_TOCREL16) && (howto->type != IMAGE_REL_PPC_IMGLUE) - && (howto->type != IMAGE_REL_PPC_IFGLUE) + && (howto->type != IMAGE_REL_PPC_IFGLUE) && (howto->type != IMAGE_REL_PPC_SECREL) && (howto->type != IMAGE_REL_PPC_SECTION) && (howto->type != IMAGE_REL_PPC_SECREL16) @@ -1023,7 +1007,7 @@ static boolean in_reloc_p(abfd, howto) && (howto->type != IMAGE_REL_PPC_REFLO) && (howto->type != IMAGE_REL_PPC_PAIR) && (howto->type != IMAGE_REL_PPC_TOCREL16_DEFN) ; -} +} #if 0 @@ -1050,39 +1034,38 @@ pe_ppc_reloc (abfd, reloc_entry, symbol_in, data, input_section, output_bfd, unsigned long sym_value; unsigned short r_type; unsigned long addr = reloc_entry->address ; /*+ input_section->vma*/ - + r_type = reloc_entry->howto->type; - if (output_bfd) + if (output_bfd) { /* Partial linking - do nothing */ reloc_entry->address += input_section->output_offset; - return bfd_reloc_ok; + return bfd_reloc_ok; } if (symbol_in != NULL && bfd_is_und_section (symbol_in->section)) { /* Keep the state machine happy in case we're called again */ - if (r_type == IMAGE_REL_PPC_REFHI) + if (r_type == IMAGE_REL_PPC_REFHI) { part1_consth_active = true; part1_consth_value = 0; } return(bfd_reloc_undefined); } - - if ((part1_consth_active) && (r_type != IMAGE_REL_PPC_PAIR)) + + if ((part1_consth_active) && (r_type != IMAGE_REL_PPC_PAIR)) { part1_consth_active = false; *error_message = (char *) _("Missing PAIR"); return(bfd_reloc_dangerous); } - sym_value = get_symbol_value(symbol_in); - - return(bfd_reloc_ok); + + return(bfd_reloc_ok); } #endif /* 0 */ @@ -1108,13 +1091,13 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, asection *toc_section = 0; bfd_vma relocation; reloc_howto_type *howto = 0; - + /* If we are performing a relocateable link, we don't need to do a thing. The caller will take care of adjusting the reloc addresses and symbol indices. */ if (info->relocateable) return true; - + hihalf = false; hihalf_val = 0; @@ -1133,7 +1116,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, unsigned short r_type = EXTRACT_TYPE (rel->r_type); unsigned short r_flags = EXTRACT_FLAGS(rel->r_type); - + symndx = rel->r_symndx; loc = contents + rel->r_vaddr - input_section->vma; @@ -1147,9 +1130,9 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, } else { - h = (struct ppc_coff_link_hash_entry *) + h = (struct ppc_coff_link_hash_entry *) (obj_coff_sym_hashes (input_bfd)[symndx]); - if (h != 0) + if (h != 0) { HASH_CHECK(h); } @@ -1159,8 +1142,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, if (r_type == IMAGE_REL_PPC_IMGLUE && h == 0) { - /* An IMGLUE reloc must have a name. Something is very wrong. */ - abort(); + /* An IMGLUE reloc must have a name. Something is very wrong. */ + abort (); } sec = NULL; @@ -1203,7 +1186,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, } rstat = bfd_reloc_ok; - + /* Each case must do its own relocation, setting rstat appropriately */ switch (r_type) { @@ -1220,19 +1203,19 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, DUMP_RELOC2(howto->name, rel); - if (toc_section == 0) + if (toc_section == 0) { - toc_section = bfd_get_section_by_name (bfd_of_toc_owner, + toc_section = bfd_get_section_by_name (bfd_of_toc_owner, TOC_SECTION_NAME); - if ( toc_section == NULL ) + if ( toc_section == NULL ) { - /* There is no toc section. Something is very wrong. */ - abort(); + /* There is no toc section. Something is very wrong. */ + abort (); } } - /* + /* * Amazing bit tricks present. As we may have seen earlier, we * use the 1 bit to tell us whether or not a toc offset has been * allocated. Now that they've all been allocated, we will use @@ -1253,7 +1236,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, if (IS_WRITTEN(our_toc_offset)) { - /* if it has been written out, it is marked with the + /* if it has been written out, it is marked with the 1 bit. Fix up our offset, but do not write it out again. */ @@ -1262,12 +1245,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, else { /* write out the toc entry */ - record_toc(toc_section, - our_toc_offset, - priv, + record_toc(toc_section, + our_toc_offset, + priv, strdup(name)); - bfd_put_32(output_bfd, + bfd_put_32 (output_bfd, val, toc_section->contents + our_toc_offset); @@ -1280,33 +1263,33 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, const char *name = h->root.root.root.string; our_toc_offset = h->toc_offset; - if ((r_flags & IMAGE_REL_PPC_TOCDEFN) + if ((r_flags & IMAGE_REL_PPC_TOCDEFN) == IMAGE_REL_PPC_TOCDEFN ) { - /* This is unbelievable cheese. Some knowledgable asm - hacker has decided to use r2 as a base for loading - a value. He/She does this by setting the tocdefn bit, - and not supplying a toc definition. The behaviour is - then to use the difference between the value of the - symbol and the actual location of the toc as the toc - index. + /* This is unbelievable cheese. Some knowledgable asm + hacker has decided to use r2 as a base for loading + a value. He/She does this by setting the tocdefn bit, + and not supplying a toc definition. The behaviour is + then to use the difference between the value of the + symbol and the actual location of the toc as the toc + index. In fact, what is usually happening is, because the Import Address Table is mapped immediately following the toc, some trippy library code trying for speed on - dll linkage, takes advantage of that and considers + dll linkage, takes advantage of that and considers the IAT to be part of the toc, thus saving a load. */ - our_toc_offset = val - - (toc_section->output_section->vma + + our_toc_offset = val - + (toc_section->output_section->vma + toc_section->output_offset); /* The size must still fit in a 16bit displacment */ if (our_toc_offset >= 65535) { (*_bfd_error_handler) - (_("%s: Relocation for %s of %x exceeds Toc size limit"), + (_("%s: Relocation for %s of %x exceeds Toc size limit"), bfd_get_filename (input_bfd), name, our_toc_offset); bfd_set_error (bfd_error_bad_value); return false; @@ -1316,7 +1299,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, } else if (IS_WRITTEN(our_toc_offset)) { - /* if it has been written out, it is marked with the + /* if it has been written out, it is marked with the 1 bit. Fix up our offset, but do not write it out again. */ @@ -1327,7 +1310,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, record_toc(toc_section, our_toc_offset, pub, strdup(name)); /* write out the toc entry */ - bfd_put_32(output_bfd, + bfd_put_32 (output_bfd, val, toc_section->contents + our_toc_offset); @@ -1338,31 +1321,30 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, } } - if (fixit && info->base_file) + if (fixit && info->base_file) { /* So if this is non pcrelative, and is referenced to a section or a common symbol, then it needs a reloc */ /* relocation to a symbol in a section which - isn't absolute - we output the address here + isn't absolute - we output the address here to a file */ bfd_vma addr = toc_section->output_section->vma + toc_section->output_offset + our_toc_offset; - + if (coff_data(output_bfd)->pe) addr -= pe_data(output_bfd)->pe_opthdr.ImageBase; fwrite (&addr, 1,4, (FILE *) info->base_file); } - /* FIXME: this test is conservative */ if ( (r_flags & IMAGE_REL_PPC_TOCDEFN) != IMAGE_REL_PPC_TOCDEFN && our_toc_offset > toc_section->_raw_size) { (*_bfd_error_handler) - (_("%s: Relocation exceeds allocated TOC (%x)"), + (_("%s: Relocation exceeds allocated TOC (%x)"), bfd_get_filename (input_bfd), toc_section->_raw_size); bfd_set_error (bfd_error_bad_value); @@ -1372,18 +1354,18 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, /* Now we know the relocation for this toc reference */ relocation = our_toc_offset + TOC_LOAD_ADJUSTMENT; rstat = _bfd_relocate_contents (howto, - input_bfd, - relocation, + input_bfd, + relocation, loc); } break; case IMAGE_REL_PPC_IFGLUE: { /* To solve this, we need to know whether or not the symbol */ - /* appearing on the call instruction is a glue function or not. */ + /* appearing on the call instruction is a glue function or not. */ /* A glue function must announce itself via a IMGLUE reloc, and */ /* the reloc contains the required toc restore instruction */ - + bfd_vma x; const char *my_name; DUMP_RELOC2(howto->name, rel); @@ -1391,18 +1373,18 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, if (h != 0) { my_name = h->root.root.root.string; - if (h->symbol_is_glue == 1) + if (h->symbol_is_glue == 1) { - x = bfd_get_32(input_bfd, loc); - bfd_put_32(input_bfd, h->glue_insn, loc); + x = bfd_get_32 (input_bfd, loc); + bfd_put_32 (input_bfd, h->glue_insn, loc); } } } break; case IMAGE_REL_PPC_SECREL: /* Unimplemented: codeview debugging information */ - /* For fast access to the header of the section - containing the item. */ + /* For fast access to the header of the section + containing the item. */ break; case IMAGE_REL_PPC_SECTION: /* Unimplemented: codeview debugging information */ @@ -1420,15 +1402,15 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, my_name = h->root.root.root.string; } - fprintf(stderr, - _("Warning: unsupported reloc %s \n"), + fprintf (stderr, + _("Warning: unsupported reloc %s \n"), howto->name, bfd_get_filename(input_bfd), input_section->name); - fprintf(stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n", + fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n", rel->r_symndx, my_name, (long) rel->r_vaddr, - (unsigned long) rel->r_vaddr); + (unsigned long) rel->r_vaddr); } break; case IMAGE_REL_PPC_IMGLUE: @@ -1436,12 +1418,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, /* There is nothing to do now. This reloc was noted in the first pass over the relocs, and the glue instruction extracted */ const char *my_name; - if (h->symbol_is_glue == 1) + if (h->symbol_is_glue == 1) break; my_name = h->root.root.root.string; (*_bfd_error_handler) - (_("%s: Out of order IMGLUE reloc for %s"), + (_("%s: Out of order IMGLUE reloc for %s"), bfd_get_filename (input_bfd), my_name); bfd_set_error (bfd_error_bad_value); return false; @@ -1461,16 +1443,16 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, myh = coff_link_hash_lookup (coff_hash_table (info), "__idata5_magic__", false, false, true); - first_thunk_address = myh->root.u.def.value + - sec->output_section->vma + - sec->output_offset - + first_thunk_address = myh->root.u.def.value + + sec->output_section->vma + + sec->output_offset - pe_data(output_bfd)->pe_opthdr.ImageBase; - + idata5offset = myh->root.u.def.value; myh = coff_link_hash_lookup (coff_hash_table (info), "__idata6_magic__", false, false, true); - + thunk_size = myh->root.u.def.value - idata5offset; myh = coff_link_hash_lookup (coff_hash_table (info), "__idata4_magic__", @@ -1502,13 +1484,13 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, myh = coff_link_hash_lookup (coff_hash_table (info), target, false, false, true); - if (myh == 0) + if (myh == 0) { - /* Missing magic cookies. Something is very wrong. */ - abort(); + /* Missing magic cookies. Something is very wrong. */ + abort (); } - - val = myh->root.u.def.value + + + val = myh->root.u.def.value + sec->output_section->vma + sec->output_offset; if (first_thunk_address == 0) { @@ -1516,16 +1498,16 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, myh = coff_link_hash_lookup (coff_hash_table (info), "__idata5_magic__", false, false, true); - first_thunk_address = myh->root.u.def.value + - sec->output_section->vma + - sec->output_offset - + first_thunk_address = myh->root.u.def.value + + sec->output_section->vma + + sec->output_offset - pe_data(output_bfd)->pe_opthdr.ImageBase; - + idata5offset = myh->root.u.def.value; myh = coff_link_hash_lookup (coff_hash_table (info), "__idata6_magic__", false, false, true); - + thunk_size = myh->root.u.def.value - idata5offset; myh = coff_link_hash_lookup (coff_hash_table (info), "__idata4_magic__", @@ -1536,8 +1518,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, } rstat = _bfd_relocate_contents (howto, - input_bfd, - val - + input_bfd, + val - pe_data(output_bfd)->pe_opthdr.ImageBase, loc); } @@ -1549,8 +1531,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, + input_section->output_offset); rstat = _bfd_relocate_contents (howto, - input_bfd, - val, + input_bfd, + val, loc); break; case IMAGE_REL_PPC_ADDR16: @@ -1558,8 +1540,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, case IMAGE_REL_PPC_ADDR32: DUMP_RELOC2(howto->name, rel); rstat = _bfd_relocate_contents (howto, - input_bfd, - val, + input_bfd, + val, loc); break; } @@ -1571,11 +1553,11 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, if (sym && pe_data(output_bfd)->in_reloc_p(output_bfd, howto)) { /* relocation to a symbol in a section which - isn't absolute - we output the address here + isn't absolute - we output the address here to a file */ - bfd_vma addr = rel->r_vaddr - - input_section->vma - + input_section->output_offset + bfd_vma addr = rel->r_vaddr + - input_section->vma + + input_section->output_offset + input_section->output_section->vma; if (coff_data(output_bfd)->pe) @@ -1614,7 +1596,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, } if (! ((*info->callbacks->reloc_overflow) - (info, name, howto->name, + (info, name, howto->name, (bfd_vma) 0, input_bfd, input_section, rel->r_vaddr - input_section->vma))) { @@ -1623,7 +1605,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section, } } - } + } return true; } @@ -1659,11 +1641,11 @@ dump_toc (vfile) FILE *file = (FILE *) vfile; struct list_ele *t; - fprintf(file, _(h1)); - fprintf(file, _(h2)); - fprintf(file, _(h3)); + fprintf (file, _(h1)); + fprintf (file, _(h2)); + fprintf (file, _(h3)); - for(t = head; t != 0; t=t->next) + for (t = head; t != 0; t=t->next) { const char *cat = ""; @@ -1680,26 +1662,26 @@ dump_toc (vfile) cat = _("IAT reference "); else { - fprintf(file, + fprintf (file, _("**** global_toc_size %ld(%lx), thunk_size %ld(%lx)\n"), global_toc_size, global_toc_size, thunk_size, thunk_size); cat = _("Out of bounds!"); } } - fprintf(file, + fprintf (file, " %04lx (%d)", (unsigned long) t->offset, t->offset - 32768); - fprintf(file, + fprintf (file, " %s %s\n", cat, t->name); } - fprintf(file, "\n"); + fprintf (file, "\n"); } boolean -ppc_allocate_toc_section (info) +ppc_allocate_toc_section (info) struct bfd_link_info *info ATTRIBUTE_UNUSED; { asection *s; @@ -1711,15 +1693,15 @@ ppc_allocate_toc_section (info) if (bfd_of_toc_owner == 0) { - /* No toc owner? Something is very wrong. */ - abort(); + /* No toc owner? Something is very wrong. */ + abort (); } s = bfd_get_section_by_name ( bfd_of_toc_owner , TOC_SECTION_NAME); - if (s == NULL) + if (s == NULL) { - /* No toc section? Something is very wrong. */ - abort(); + /* No toc section? Something is very wrong. */ + abort (); } foo = (bfd_byte *) bfd_alloc(bfd_of_toc_owner, global_toc_size); @@ -1740,7 +1722,7 @@ ppc_process_before_allocation (abfd, info) struct internal_reloc *i, *rel; /* here we have a bfd that is to be included on the link. We have a hook - to do reloc rummaging, before section sizes are nailed down. */ + to do reloc rummaging, before section sizes are nailed down. */ _bfd_coff_get_external_symbols(abfd); @@ -1754,17 +1736,17 @@ ppc_process_before_allocation (abfd, info) for (; sec != 0; sec = sec->next) { - if (sec->reloc_count == 0) + if (sec->reloc_count == 0) continue; /* load the relocs */ /* FIXME: there may be a storage leak here */ i=_bfd_coff_read_internal_relocs(abfd,sec,1,0,0,0); - + if (i == 0) - abort(); + abort (); - for (rel=i;relreloc_count;++rel) + for (rel=i;relreloc_count;++rel) { unsigned short r_type = EXTRACT_TYPE (rel->r_type); unsigned short r_flags = EXTRACT_FLAGS(rel->r_type); @@ -1772,13 +1754,13 @@ ppc_process_before_allocation (abfd, info) DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel); - switch(r_type) + switch(r_type) { case IMAGE_REL_PPC_TOCREL16: /* if TOCDEFN is on, ignore as someone else has allocated the toc entry */ if ( (r_flags & IMAGE_REL_PPC_TOCDEFN) != IMAGE_REL_PPC_TOCDEFN ) - ok = ppc_record_toc_entry(abfd, info, sec, + ok = ppc_record_toc_entry(abfd, info, sec, rel->r_symndx, default_toc); if (!ok) return false; @@ -1797,7 +1779,6 @@ ppc_process_before_allocation (abfd, info) #endif - static bfd_reloc_status_type ppc_refhi_reloc (abfd, reloc_entry, @@ -1876,7 +1857,6 @@ ppc_pair_reloc (abfd, return bfd_reloc_undefined; } - static bfd_reloc_status_type ppc_toc16_reloc (abfd, @@ -2011,15 +1991,12 @@ ppc_imglue_reloc (abfd, return bfd_reloc_ok; } - - #define MAX_RELOC_INDEX \ - (sizeof(ppc_coff_howto_table) / sizeof(ppc_coff_howto_table[0]) - 1) - + (sizeof (ppc_coff_howto_table) / sizeof (ppc_coff_howto_table[0]) - 1) /* FIXME: There is a possiblity that when we read in a reloc from a file, - that there are some bits encoded in the upper portion of the + that there are some bits encoded in the upper portion of the type field. Not yet implemented. */ static void ppc_coff_rtype2howto PARAMS ((arelent *relent, @@ -2029,7 +2006,7 @@ static void ppc_coff_rtype2howto (relent, internal) arelent *relent; struct internal_reloc *internal; -{ +{ /* We can encode one of three things in the type field, aside from the type: @@ -2046,15 +2023,15 @@ ppc_coff_rtype2howto (relent, internal) unsigned short r_flags = EXTRACT_FLAGS(internal->r_type); unsigned short junk = EXTRACT_JUNK (internal->r_type); - /* the masking process only slices off the bottom byte for r_type. */ - if ( r_type > MAX_RELOC_INDEX ) - abort(); + /* the masking process only slices off the bottom byte for r_type. */ + if ( r_type > MAX_RELOC_INDEX ) + abort (); /* check for absolute crap */ if ( junk != 0 ) - abort(); + abort (); - switch(r_type) + switch(r_type) { case IMAGE_REL_PPC_ADDR16: case IMAGE_REL_PPC_REL24: @@ -2079,16 +2056,16 @@ ppc_coff_rtype2howto (relent, internal) howto = ppc_coff_howto_table + IMAGE_REL_PPC_TOCREL16; break; default: - fprintf(stderr, + fprintf (stderr, _("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"), ppc_coff_howto_table[r_type].name, r_type); - howto = ppc_coff_howto_table + r_type; + howto = ppc_coff_howto_table + r_type; break; } - + relent->howto = howto; - + } static reloc_howto_type * @@ -2117,15 +2094,15 @@ coff_ppc_rtype_to_howto (abfd, sec, rel, h, sym, addendp) unsigned short r_flags = EXTRACT_FLAGS(rel->r_type); unsigned short junk = EXTRACT_JUNK (rel->r_type); - /* the masking process only slices off the bottom byte for r_type. */ - if ( r_type > MAX_RELOC_INDEX ) - abort(); - + /* the masking process only slices off the bottom byte for r_type. */ + if ( r_type > MAX_RELOC_INDEX ) + abort (); + /* check for absolute crap */ if ( junk != 0 ) - abort(); - - switch(r_type) + abort (); + + switch(r_type) { case IMAGE_REL_PPC_ADDR32NB: DUMP_RELOC2(ppc_coff_howto_table[r_type].name, rel); @@ -2154,18 +2131,17 @@ coff_ppc_rtype_to_howto (abfd, sec, rel, h, sym, addendp) howto = ppc_coff_howto_table + r_type; break; default: - fprintf(stderr, + fprintf (stderr, _("Warning: Unsupported reloc %s [%d] used -- it may not work.\n"), ppc_coff_howto_table[r_type].name, r_type); howto = ppc_coff_howto_table + r_type; break; } - + return howto; } - /* a cheesy little macro to make the code a little more readable */ #define HOW2MAP(bfd_rtype,ppc_rtype) \ case bfd_rtype: return &ppc_coff_howto_table[ppc_rtype] @@ -2189,16 +2165,15 @@ ppc_coff_reloc_type_lookup (abfd, code) HOW2MAP(BFD_RELOC_16_GOTOFF, IMAGE_REL_PPC_TOCREL16_DEFN); HOW2MAP(BFD_RELOC_32, IMAGE_REL_PPC_ADDR32); HOW2MAP(BFD_RELOC_RVA, IMAGE_REL_PPC_ADDR32NB); - default: + default: return NULL; } /*NOTREACHED*/ } #undef HOW2MAP - -/* Tailor coffcode.h -- macro heaven. */ +/* Tailor coffcode.h -- macro heaven. */ #define RTYPE2HOWTO(cache_ptr, dst) ppc_coff_rtype2howto (cache_ptr, dst) @@ -2211,7 +2186,7 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR)); #define coff_bfd_reloc_type_lookup ppc_coff_reloc_type_lookup #define coff_rtype_to_howto coff_ppc_rtype_to_howto #define coff_relocate_section coff_ppc_relocate_section -#define coff_bfd_final_link ppc_bfd_coff_final_link +#define coff_bfd_final_link ppc_bfd_coff_final_link #ifndef COFF_IMAGE_WITH_PE /* FIXME: This no longer works. */ @@ -2242,12 +2217,10 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR)); COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 1 } #include "coffcode.h" - - #ifndef COFF_IMAGE_WITH_PE /* FIXME: - What we're trying to do here is allocate a toc section (early), and attach + What we're trying to do here is allocate a toc section (early), and attach it to the last bfd to be processed. This avoids the problem of having a toc written out before all files have been processed. This code allocates a toc section for every file, and records the last one seen. There are @@ -2277,7 +2250,7 @@ ppc_coff_swap_sym_in_hook (abfd, ext1, in1) register asection *s; s = bfd_get_section_by_name ( abfd , TOC_SECTION_NAME); - if (s != NULL) + if (s != NULL) { return; } @@ -2291,7 +2264,7 @@ ppc_coff_swap_sym_in_hook (abfd, ext1, in1) || !bfd_set_section_alignment (abfd, s, 2)) { /* FIXME: set appropriate bfd error */ - abort(); + abort (); } /* save the bfd for later allocation */ @@ -2324,18 +2297,17 @@ ppc_get_last() } /* this piece of machinery exists only to guarantee that the bfd that holds - the toc section is written last. + the toc section is written last. This does depend on bfd_make_section attaching a new section to the - end of the section list for the bfd. + end of the section list for the bfd. - This is otherwise intended to be functionally the same as - cofflink.c:_bfd_coff_final_link(). It is specifically different only - where the POWERPC_LE_PE macro modifies the code. It is left in as a + This is otherwise intended to be functionally the same as + cofflink.c:_bfd_coff_final_link(). It is specifically different only + where the POWERPC_LE_PE macro modifies the code. It is left in as a precise form of comment. krk@cygnus.com */ - /* Do the final link step. */ boolean @@ -2840,13 +2812,12 @@ ppc_bfd_coff_final_link (abfd, info) } #endif - /* Forward declaration for use by alternative_target field. */ #ifdef TARGET_BIG_SYM extern const bfd_target TARGET_BIG_SYM; #endif -/* The transfer vectors that lead the outside world to all of the above. */ +/* The transfer vectors that lead the outside world to all of the above. */ #ifdef TARGET_LITTLE_SYM const bfd_target TARGET_LITTLE_SYM = @@ -2859,7 +2830,7 @@ const bfd_target TARGET_LITTLE_SYM = (HAS_RELOC | EXEC_P | /* FIXME: object flags */ HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED), - + #ifndef COFF_WITH_PE (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */ #else @@ -2878,14 +2849,14 @@ const bfd_target TARGET_LITTLE_SYM = bfd_getl64, bfd_getl_signed_64, bfd_putl64, bfd_getl32, bfd_getl_signed_32, bfd_putl32, bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */ - + {_bfd_dummy_target, coff_object_p, /* bfd_check_format */ bfd_generic_archive_p, /* _bfd_dummy_target */ coff_object_p }, {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */ bfd_false}, {bfd_false, coff_write_object_contents, /* bfd_write_contents */ _bfd_write_archive_contents, bfd_false}, - + BFD_JUMP_TABLE_GENERIC (coff), BFD_JUMP_TABLE_COPY (coff), BFD_JUMP_TABLE_CORE (_bfd_nocore), @@ -2902,7 +2873,7 @@ const bfd_target TARGET_LITTLE_SYM = #else NULL, #endif - + COFF_SWAP_TABLE }; #endif @@ -2911,7 +2882,7 @@ const bfd_target TARGET_LITTLE_SYM = const bfd_target TARGET_BIG_SYM = { TARGET_BIG_NAME, - bfd_target_coff_flavour, + bfd_target_coff_flavour, BFD_ENDIAN_BIG, /* data byte order is big */ BFD_ENDIAN_BIG, /* header byte order is big */ @@ -2955,14 +2926,13 @@ const bfd_target TARGET_BIG_SYM = BFD_JUMP_TABLE_LINK (coff), BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), - /* Alternative_target. */ #ifdef TARGET_LITTLE_SYM & TARGET_LITTLE_SYM, #else NULL, #endif - + COFF_SWAP_TABLE }; diff --git a/contrib/binutils/bfd/coff-sparc.c b/contrib/binutils/bfd/coff-sparc.c index 5e919da..9367770 100644 --- a/contrib/binutils/bfd/coff-sparc.c +++ b/contrib/binutils/bfd/coff-sparc.c @@ -36,8 +36,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ enum reloc_type { R_SPARC_NONE = 0, - R_SPARC_8, R_SPARC_16, R_SPARC_32, - R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32, + R_SPARC_8, R_SPARC_16, R_SPARC_32, + R_SPARC_DISP8, R_SPARC_DISP16, R_SPARC_DISP32, R_SPARC_WDISP30, R_SPARC_WDISP22, R_SPARC_HI22, R_SPARC_22, R_SPARC_13, R_SPARC_LO10, @@ -96,7 +96,7 @@ bfd_coff_generic_reloc (abfd, reloc_entry, symbol, data, input_section, return bfd_reloc_continue; } -static reloc_howto_type coff_sparc_howto_table[] = +static reloc_howto_type coff_sparc_howto_table[] = { HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_coff_generic_reloc,"R_SPARC_NONE", false,0,0x00000000,true), HOWTO(R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,bfd_coff_generic_reloc,"R_SPARC_8", false,0,0x000000ff,true), @@ -197,7 +197,7 @@ rtype2howto (cache_ptr, dst) #define __A_MAGIC_SET__ -/* Enable Sparc-specific hacks in coffcode.h. */ +/* Enable Sparc-specific hacks in coffcode.h. */ #define COFF_SPARC diff --git a/contrib/binutils/bfd/coff-tic30.c b/contrib/binutils/bfd/coff-tic30.c index a971f76..267ca97 100644 --- a/contrib/binutils/bfd/coff-tic30.c +++ b/contrib/binutils/bfd/coff-tic30.c @@ -49,7 +49,7 @@ reloc_howto_type tic30_coff_howto_table[] = /* For the case statement use the code values used in tc_gen_reloc to map to the howto table entries that match those in both the aout - and coff implementations. */ + and coff implementations. */ reloc_howto_type * tic30_coff_reloc_type_lookup (abfd, code) bfd *abfd ATTRIBUTE_UNUSED; @@ -86,7 +86,6 @@ coff_tic30_select_reloc (howto) #define SELECT_RELOC(x,howto) x.r_type = coff_tic30_select_reloc(howto) - #define BADMAG(x) TIC30BADMAG(x) #define TIC30 1 /* Customize coffcode.h */ #define __A_MAGIC_SET__ @@ -97,7 +96,7 @@ coff_tic30_select_reloc (howto) #define SWAP_OUT_RELOC_EXTRA(abfd, src, dst) dst->r_stuff[0] = 'S'; \ dst->r_stuff[1] = 'C'; -/* Code to turn a r_type into a howto ptr, uses the above howto table. */ +/* Code to turn a r_type into a howto ptr, uses the above howto table. */ static void rtype2howto (internal, dst) @@ -134,7 +133,6 @@ rtype2howto (internal, dst) #define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \ cache_ptr->addend = ext_reloc.r_offset; - #define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \ reloc_processing(relent, reloc, symbols, abfd, section) @@ -203,6 +201,6 @@ const bfd_target tic30_coff_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + COFF_SWAP_TABLE }; diff --git a/contrib/binutils/bfd/coff-z8k.c b/contrib/binutils/bfd/coff-z8k.c index 21f29a8..7ad0630 100644 --- a/contrib/binutils/bfd/coff-z8k.c +++ b/contrib/binutils/bfd/coff-z8k.c @@ -54,7 +54,7 @@ HOWTO (R_JR, 0, 1, 8, true, 0, complain_overflow_signed, 0, /* Turn a howto into a reloc number */ -static int +static int coff_z8k_select_reloc (howto) reloc_howto_type *howto; { @@ -63,13 +63,10 @@ coff_z8k_select_reloc (howto) #define SELECT_RELOC(x,howto) x.r_type = coff_z8k_select_reloc(howto) - #define BADMAG(x) Z8KBADMAG(x) #define Z8K 1 /* Customize coffcode.h */ #define __A_MAGIC_SET__ - - /* Code to swap in the reloc */ #define SWAP_IN_RELOC_OFFSET bfd_h_get_32 #define SWAP_OUT_RELOC_OFFSET bfd_h_put_32 @@ -110,18 +107,15 @@ rtype2howto (internal, dst) #define RTYPE2HOWTO(internal, relocentry) rtype2howto(internal,relocentry) - /* Perform any necessary magic to the addend in a reloc entry */ - #define CALC_ADDEND(abfd, symbol, ext_reloc, cache_ptr) \ cache_ptr->addend = ext_reloc.r_offset; - #define RELOC_PROCESSING(relent,reloc,symbols,abfd,section) \ reloc_processing(relent, reloc, symbols, abfd, section) -static void +static void reloc_processing (relent, reloc, symbols, abfd, section) arelent * relent; struct internal_reloc *reloc; @@ -141,7 +135,6 @@ reloc_processing (relent, reloc, symbols, abfd, section) relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; } - relent->addend = reloc->r_offset; relent->address -= section->vma; } @@ -178,7 +171,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr) case R_IMM4L: bfd_put_8 (in_abfd, - ((bfd_get_8 (in_abfd, data + *dst_ptr) & 0xf0) + ((bfd_get_8 (in_abfd, data + *dst_ptr) & 0xf0) | (0x0f & bfd_coff_reloc16_get_value (reloc, link_info, input_section))), @@ -230,7 +223,6 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr) #include "coffcode.h" - #undef coff_bfd_get_relocated_section_contents #undef coff_bfd_relax_section #define coff_bfd_get_relocated_section_contents \ diff --git a/contrib/binutils/bfd/coffcode.h b/contrib/binutils/bfd/coffcode.h index 73081a7..fce0491 100644 --- a/contrib/binutils/bfd/coffcode.h +++ b/contrib/binutils/bfd/coffcode.h @@ -175,7 +175,6 @@ SUBSUBSECTION the file in the string table. This pass moves all strings into memory and replaces them with pointers to the strings. - The symbol table is massaged once again, this time to create the canonical table used by the BFD application. Each symbol is inspected in turn, and a decision made (using the @@ -301,7 +300,6 @@ CODE_FRAGMENT .boolean done_lineno; .} coff_symbol_type; - */ #ifdef COFF_WITH_PE @@ -351,6 +349,19 @@ static PTR coff_mkobject_hook PARAMS ((bfd *, PTR, PTR)); #ifndef COFF_WITH_PE +/* Macros for setting debugging flags. */ +#ifdef STYP_DEBUG +#define STYP_XCOFF_DEBUG STYP_DEBUG +#else +#define STYP_XCOFF_DEBUG STYP_INFO +#endif + +#ifdef COFF_ALIGN_IN_S_FLAGS +#define STYP_DEBUG_INFO STYP_DSECT +#else +#define STYP_DEBUG_INFO STYP_INFO +#endif + static long sec_to_styp_flags (sec_name, sec_flags) CONST char *sec_name; @@ -388,18 +399,24 @@ sec_to_styp_flags (sec_name, sec_flags) styp_flags = STYP_LIT; #endif /* _LIT */ } - else if (!strcmp (sec_name, ".debug")) + else if (!strncmp (sec_name, ".debug", 6)) { -#ifdef STYP_DEBUG - styp_flags = STYP_DEBUG; -#else - styp_flags = STYP_INFO; -#endif + /* Handle the XCOFF debug section and DWARF2 debug sections. */ + if (!sec_name[6]) + styp_flags = STYP_XCOFF_DEBUG; + else + styp_flags = STYP_DEBUG_INFO; } else if (!strncmp (sec_name, ".stab", 5)) { - styp_flags = STYP_INFO; + styp_flags = STYP_DEBUG_INFO; + } +#ifdef COFF_LONG_SECTION_NAMES + else if (!strncmp (sec_name, ".gnu.linkonce.wi.", 17)) + { + styp_flags = STYP_DEBUG_INFO; } +#endif #ifdef RS6000COFF_C else if (!strcmp (sec_name, _PAD)) { @@ -436,6 +453,16 @@ sec_to_styp_flags (sec_name, sec_flags) styp_flags = STYP_BSS; } +#ifdef STYP_CLINK + if (sec_flags & SEC_CLINK) + styp_flags |= STYP_CLINK; +#endif + +#ifdef STYP_BLOCK + if (sec_flags & SEC_BLOCK) + styp_flags |= STYP_BLOCK; +#endif + #ifdef STYP_NOLOAD if ((sec_flags & (SEC_NEVER_LOAD | SEC_COFF_SHARED_LIBRARY)) != 0) styp_flags |= STYP_NOLOAD; @@ -493,8 +520,8 @@ sec_to_styp_flags (sec_name, sec_flags) styp_flags |= IMAGE_SCN_LNK_REMOVE; /* skip IN_MEMORY */ /* skip SORT */ - if (sec_flags & SEC_LINK_ONCE) - styp_flags |= IMAGE_SCN_LNK_COMDAT; + if (sec_flags & SEC_LINK_ONCE) + styp_flags |= IMAGE_SCN_LNK_COMDAT; /* skip LINK_DUPLICATES */ /* skip LINKER_CREATED */ @@ -502,7 +529,7 @@ sec_to_styp_flags (sec_name, sec_flags) though the semantics don't quite match. The bits from the input are retained in pei_section_data(abfd, section)->pe_flags */ - styp_flags |= IMAGE_SCN_MEM_READ; /* always readable. */ + styp_flags |= IMAGE_SCN_MEM_READ; /* always readable. */ if ((sec_flags & SEC_READONLY) == 0) styp_flags |= IMAGE_SCN_MEM_WRITE; /* Invert READONLY for write */ if (sec_flags & SEC_CODE) @@ -510,7 +537,7 @@ sec_to_styp_flags (sec_name, sec_flags) if (sec_flags & SEC_SHARED) styp_flags |= IMAGE_SCN_MEM_SHARED; /* Shared remains meaningful */ - return styp_flags; + return styp_flags; } #endif /* COFF_WITH_PE */ @@ -533,6 +560,16 @@ styp_to_sec_flags (abfd, hdr, name, section) long styp_flags = internal_s->s_flags; flagword sec_flags = 0; +#ifdef STYP_BLOCK + if (styp_flags & STYP_BLOCK) + sec_flags |= SEC_BLOCK; +#endif + +#ifdef STYP_CLINK + if (styp_flags & STYP_CLINK) + sec_flags |= SEC_CLINK; +#endif + #ifdef STYP_NOLOAD if (styp_flags & STYP_NOLOAD) { @@ -604,10 +641,13 @@ styp_to_sec_flags (abfd, hdr, name, section) #endif sec_flags |= SEC_ALLOC; } - else if (strcmp (name, ".debug") == 0 + else if (strncmp (name, ".debug", 6) == 0 #ifdef _COMMENT || strcmp (name, _COMMENT) == 0 #endif +#ifdef COFF_LONG_SECTION_NAMES + || strncmp (name, ".gnu.linkonce.wi.", 17) == 0 +#endif || strncmp (name, ".stab", 5) == 0) { #ifdef COFF_PAGE_SIZE @@ -730,7 +770,7 @@ styp_to_sec_flags (abfd, hdr, name, section) 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. */ + /* 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; @@ -849,7 +889,7 @@ styp_to_sec_flags (abfd, hdr, name, section) if (strcmp (name, symname) != 0) abort (); - + /* This is the section symbol. */ bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)), @@ -884,7 +924,7 @@ styp_to_sec_flags (abfd, hdr, name, section) switch (aux.x_scn.x_comdat) { case IMAGE_COMDAT_SELECT_NODUPLICATES: -#ifdef STRICT_PE_FORMAT +#ifdef STRICT_PE_FORMAT sec_flags |= SEC_LINK_DUPLICATES_ONE_ONLY; #else sec_flags &= ~SEC_LINK_ONCE; @@ -936,7 +976,7 @@ styp_to_sec_flags (abfd, hdr, name, section) #define TARGET_UNDERSCORE 0 #endif /* Is this the name we're looking for? */ - if (strcmp (target_name, + if (strcmp (target_name, symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0) { /* Not the name we're looking for */ @@ -944,7 +984,7 @@ styp_to_sec_flags (abfd, hdr, name, section) continue; } /* Fall through. */ - case 1: + case 1: /* MSVC mode: the lexically second symbol (or drop through from the above). */ { @@ -955,7 +995,7 @@ styp_to_sec_flags (abfd, hdr, name, section) Intel puts the two adjacent, but Alpha (at least) spreads them out. */ - section->comdat = + section->comdat = bfd_alloc (abfd, sizeof (struct bfd_comdat_info)); if (section->comdat == NULL) abort (); @@ -977,7 +1017,9 @@ styp_to_sec_flags (abfd, hdr, name, section) esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); } - breakloop: + breakloop: + /* SunOS requires a statement after any label. */ + ; } } @@ -1100,6 +1142,8 @@ dependent COFF routines: . boolean _bfd_coff_long_filenames; . boolean _bfd_coff_long_section_names; . unsigned int _bfd_coff_default_section_alignment_power; +. boolean _bfd_coff_force_symnames_in_strings; +. unsigned int _bfd_coff_debug_string_prefix_length; . void (*_bfd_coff_swap_filehdr_in) PARAMS (( . bfd *abfd, . PTR ext, @@ -1202,12 +1246,12 @@ dependent COFF routines: . struct bfd_link_info *info, . bfd *abfd, . const char *name, -. flagword flags, +. flagword flags, . asection *section, . bfd_vma value, . const char *string, . boolean copy, -. boolean collect, +. boolean collect, . struct bfd_link_hash_entry **hashp)); . . boolean (*_bfd_coff_link_output_has_begun) PARAMS (( @@ -1297,6 +1341,12 @@ dependent COFF routines: .#define bfd_coff_symname_in_debug(abfd, sym)\ . ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym)) . +.#define bfd_coff_force_symnames_in_strings(abfd)\ +. (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings) +. +.#define bfd_coff_debug_string_prefix_length(abfd)\ +. (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length) +. .#define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\ . ((coff_backend_info (abfd)->_bfd_coff_print_aux)\ . (abfd, file, base, symbol, aux, indaux)) @@ -1434,8 +1484,8 @@ static const unsigned int coff_section_alignment_table_size = static boolean coff_new_section_hook (abfd, section) - bfd *abfd; - asection *section; + bfd * abfd; + asection * section; { combined_entry_type *native; @@ -1500,10 +1550,17 @@ coff_set_alignment_hook (abfd, section, scnhdr) break; #endif #ifdef TIC80COFF - /* TI tools hijack bits 8-11 for the alignment */ + /* TI tools puts the alignment power in bits 8-11 */ i = (hdr->s_flags >> 8) & 0xF ; #endif +#ifdef COFF_DECODE_ALIGNMENT + i = COFF_DECODE_ALIGNMENT(hdr->s_flags); +#endif section->alignment_power = i; + +#ifdef coff_set_section_load_page + coff_set_section_load_page (section, hdr->s_page); +#endif } #else /* ! COFF_ALIGN_IN_SECTION_HEADER */ @@ -1568,6 +1625,23 @@ coff_set_alignment_hook (abfd, section, scnhdr) pei_section_data (abfd, section)->pe_flags = hdr->s_flags; section->lma = hdr->s_vaddr; + + /* check for extended relocs */ + if (hdr->s_flags & IMAGE_SCN_LNK_NRELOC_OVFL) + { + struct external_reloc dst; + struct internal_reloc n; + int oldpos = bfd_tell (abfd); + bfd_seek (abfd, hdr->s_relptr, 0); + if (bfd_read ((PTR) & dst, 1, bfd_coff_relsz (abfd), abfd) + != bfd_coff_relsz (abfd)) + return; + + coff_swap_reloc_in (abfd, &dst, &n); + bfd_seek (abfd, oldpos, 0); + section->reloc_count = + hdr->s_nreloc = n.r_vaddr; + } } #undef ALIGN_SET #undef ELIFALIGN_SET @@ -1692,6 +1766,11 @@ coff_mkobject_hook (abfd, filehdr, aouthdr) struct xcoff_tdata *xcoff; xcoff = xcoff_data (abfd); +# ifdef U803XTOCMAGIC + xcoff->xcoff64 = internal_f->f_magic == U803XTOCMAGIC; +# else + xcoff->xcoff64 = 0; +# endif xcoff->full_aouthdr = true; xcoff->toc = internal_a->o_toc; xcoff->sntoc = internal_a->o_sntoc; @@ -1705,12 +1784,12 @@ coff_mkobject_hook (abfd, filehdr, aouthdr) } #endif -#ifdef ARM +#ifdef ARM /* Set the flags field from the COFF header read in */ if (! _bfd_coff_arm_set_private_flags (abfd, internal_f->f_flags)) coff->flags = 0; #endif - + #ifdef COFF_WITH_PE /* FIXME: I'm not sure this is ever executed, since peicode.h defines coff_mkobject_hook. */ @@ -1745,7 +1824,7 @@ coff_set_arch_mach_hook (abfd, filehdr) case PPCMAGIC: arch = bfd_arch_powerpc; machine = 0; /* what does this mean? (krk) */ - break; + break; #endif #ifdef I386MAGIC case I386MAGIC: @@ -1756,6 +1835,12 @@ coff_set_arch_mach_hook (abfd, filehdr) machine = 0; break; #endif +#ifdef IA64MAGIC + case IA64MAGIC: + arch = bfd_arch_ia64; + machine = 0; + break; +#endif #ifdef A29K_MAGIC_BIG case A29K_MAGIC_BIG: case A29K_MAGIC_LITTLE: @@ -1864,9 +1949,13 @@ coff_set_arch_mach_hook (abfd, filehdr) #endif #ifdef RS6000COFF_C +#ifdef XCOFF64 + case U803XTOCMAGIC: +#else case U802ROMAGIC: case U802WRMAGIC: case U802TOCMAGIC: +#endif { int cputype; @@ -1887,13 +1976,13 @@ coff_set_arch_mach_hook (abfd, filehdr) buf = (bfd_byte *) bfd_malloc (bfd_coff_symesz (abfd)); if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0 - || (bfd_read (buf, 1, bfd_coff_symesz (abfd), abfd) + || (bfd_read (buf, 1, bfd_coff_symesz (abfd), abfd) != bfd_coff_symesz (abfd))) { free (buf); return false; } - coff_swap_sym_in (abfd, (PTR) buf, (PTR) &sym); + bfd_coff_swap_sym_in (abfd, (PTR) buf, (PTR) &sym); if (sym.n_sclass == C_FILE) cputype = sym.n_type & 0xff; else @@ -1912,28 +2001,33 @@ coff_set_arch_mach_hook (abfd, filehdr) (because that's how they were bootstrapped originally), but they are always PowerPC architecture. */ arch = bfd_arch_powerpc; - machine = 0; + machine = bfd_mach_ppc; +#else +#ifdef XCOFF64 + arch = bfd_arch_powerpc; + machine = bfd_mach_ppc_620; #else arch = bfd_arch_rs6000; - machine = 6000; + machine = bfd_mach_rs6k; +#endif #endif /* POWERMAC */ break; case 1: arch = bfd_arch_powerpc; - machine = 601; + machine = bfd_mach_ppc_601; break; case 2: /* 64 bit PowerPC */ arch = bfd_arch_powerpc; - machine = 620; + machine = bfd_mach_ppc_620; break; case 3: arch = bfd_arch_powerpc; - machine = 0; + machine = bfd_mach_ppc; break; case 4: arch = bfd_arch_rs6000; - machine = 6000; + machine = bfd_mach_rs6k; break; } } @@ -2015,6 +2109,37 @@ coff_set_arch_mach_hook (abfd, filehdr) break; #endif +#ifdef TICOFF0MAGIC +#ifdef TICOFF_TARGET_ARCH + /* this TI COFF section should be used by all new TI COFF v0 targets */ + case TICOFF0MAGIC: + arch = TICOFF_TARGET_ARCH; + break; +#endif +#endif + +#ifdef TICOFF1MAGIC + /* this TI COFF section should be used by all new TI COFF v1/2 targets */ + /* TI COFF1 and COFF2 use the target_id field to specify which arch */ + case TICOFF1MAGIC: + case TICOFF2MAGIC: + switch (internal_f->f_target_id) + { +#ifdef TI_TARGET_ID + case TI_TARGET_ID: + arch = TICOFF_TARGET_ARCH; + break; +#endif + default: + arch = bfd_arch_obscure; + (*_bfd_error_handler) + (_("Unrecognized TI COFF target id '0x%x'"), + internal_f->f_target_id); + break; + } + break; +#endif + #ifdef TIC80_ARCH_MAGIC case TIC80_ARCH_MAGIC: arch = bfd_arch_tic80; @@ -2057,6 +2182,10 @@ symname_in_debug_hook (abfd, sym) #ifdef RS6000COFF_C +#ifdef XCOFF64 +#define FORCE_SYMNAMES_IN_STRINGS +#endif + /* Handle the csect auxent of a C_EXT or C_HIDEXT symbol. */ static boolean coff_pointerize_aux_hook @@ -2242,6 +2371,22 @@ coff_write_relocs (abfd, first_undef) if (bfd_seek (abfd, s->rel_filepos, SEEK_SET) != 0) return false; + +#ifdef COFF_WITH_PE + if (s->reloc_count > 0xffff) + { + /* encode real count here as first reloc */ + struct internal_reloc n; + memset ((PTR) & n, 0, sizeof (n)); + /* add one to count *this* reloc (grr) */ + n.r_vaddr = s->reloc_count + 1; + coff_swap_reloc_out (abfd, &n, &dst); + if (bfd_write ((PTR) & dst, 1, bfd_coff_relsz (abfd), abfd) + != bfd_coff_relsz (abfd)) + return false; + } +#endif + for (i = 0; i < s->reloc_count; i++) { struct internal_reloc n; @@ -2256,7 +2401,7 @@ coff_write_relocs (abfd, first_undef) place). This is a bad thing,'cause the symbols attached to the output bfd are indexed, so that the relocation entries know which symbol index they point to. So we - have to look up the output symbol here. */ + have to look up the output symbol here. */ if (q->sym_ptr_ptr[0]->the_bfd != abfd) { @@ -2407,6 +2552,33 @@ coff_set_flags (abfd, magicp, flagsp) *magicp = TIC30MAGIC; return true; #endif + +#ifdef TICOFF_DEFAULT_MAGIC + case TICOFF_TARGET_ARCH: + /* if there's no indication of which version we want, use the default */ + if (!abfd->xvec ) + *magicp = TICOFF_DEFAULT_MAGIC; + else + { + /* we may want to output in a different COFF version */ + switch (abfd->xvec->name[4]) + { + case '0': + *magicp = TICOFF0MAGIC; + break; + case '1': + *magicp = TICOFF1MAGIC; + break; + case '2': + *magicp = TICOFF2MAGIC; + break; + default: + return false; + } + } + return true; +#endif + #ifdef TIC80_ARCH_MAGIC case bfd_arch_tic80: *magicp = TIC80_ARCH_MAGIC; @@ -2424,10 +2596,10 @@ coff_set_flags (abfd, magicp, flagsp) { if (APCS_26_FLAG (abfd)) * flagsp |= F_APCS26; - + if (APCS_FLOAT_FLAG (abfd)) * flagsp |= F_APCS_FLOAT; - + if (PIC_FLAG (abfd)) * flagsp |= F_PIC; } @@ -2442,7 +2614,10 @@ coff_set_flags (abfd, magicp, flagsp) case bfd_mach_arm_4: * flagsp |= F_ARM_4; break; case bfd_mach_arm_4T: * flagsp |= F_ARM_4T; break; case bfd_mach_arm_5: * flagsp |= F_ARM_5; break; - case bfd_mach_arm_5T: * flagsp |= F_ARM_5; break; /* XXX - we do not have an F_ARM_5T */ + /* FIXME: we do not have F_ARM vaues greater than F_ARM_5. */ + case bfd_mach_arm_5T: * flagsp |= F_ARM_5; break; + case bfd_mach_arm_5TE: * flagsp |= F_ARM_5; break; + case bfd_mach_arm_XScale: * flagsp |= F_ARM_5; break; } return true; #endif @@ -2456,7 +2631,7 @@ coff_set_flags (abfd, magicp, flagsp) case bfd_arch_i386: *magicp = I386MAGIC; #ifdef LYNXOS - /* Just overwrite the usual value if we're doing Lynx. */ + /* Just overwrite the usual value if we're doing Lynx. */ *magicp = LYNXCOFFMAGIC; #endif return true; @@ -2468,6 +2643,12 @@ coff_set_flags (abfd, magicp, flagsp) return true; break; #endif +#ifdef IA64MAGIC + case bfd_arch_ia64: + *magicp = IA64MAGIC; + return true; + break; +#endif #ifdef MC68MAGIC case bfd_arch_m68k: #ifdef APOLLOM68KMAGIC @@ -2481,7 +2662,7 @@ coff_set_flags (abfd, magicp, flagsp) #endif #endif #ifdef LYNXOS - /* Just overwrite the usual value if we're doing Lynx. */ + /* Just overwrite the usual value if we're doing Lynx. */ *magicp = LYNXCOFFMAGIC; #endif return true; @@ -2536,7 +2717,7 @@ coff_set_flags (abfd, magicp, flagsp) case bfd_arch_sparc: *magicp = SPARCMAGIC; #ifdef LYNXOS - /* Just overwrite the usual value if we're doing Lynx. */ + /* Just overwrite the usual value if we're doing Lynx. */ *magicp = LYNXCOFFMAGIC; #endif return true; @@ -2566,12 +2747,19 @@ coff_set_flags (abfd, magicp, flagsp) break; #endif -#ifdef U802TOCMAGIC +#ifdef RS6000COFF_C case bfd_arch_rs6000: #ifndef PPCMAGIC case bfd_arch_powerpc: #endif - *magicp = U802TOCMAGIC; +#ifdef XCOFF64 + if (bfd_get_mach (abfd) == bfd_mach_ppc_620 + && !strncmp (abfd->xvec->name,"aix", 3)) + *magicp = U803XTOCMAGIC; + else +#else + *magicp = U802TOCMAGIC; +#endif return true; break; #endif @@ -2581,23 +2769,22 @@ coff_set_flags (abfd, magicp, flagsp) * magicp = MCOREMAGIC; return true; #endif - + #ifdef W65MAGIC case bfd_arch_w65: *magicp = W65MAGIC; return true; #endif - default: /* Unknown architecture */ - /* return false; -- fall through to "return false" below, to avoid - "statement never reached" errors on the one below. */ + default: /* Unknown architecture. */ + /* Fall through to "return false" below, to avoid + "statement never reached" errors on the one below. */ break; } return false; } - static boolean coff_set_arch_mach (abfd, arch, machine) bfd * abfd; @@ -2614,7 +2801,7 @@ coff_set_arch_mach (abfd, arch, machine) coff_set_flags (abfd, &dummy1, &dummy2) != true) return false; /* We can't represent this type */ - return true; /* We're easy ... */ + return true; /* We're easy ... */ } #ifdef COFF_IMAGE_WITH_PE @@ -2642,12 +2829,12 @@ sort_by_secaddr (arg1, arg2) #endif /* COFF_IMAGE_WITH_PE */ -/* Calculate the file position for each section. */ +/* Calculate the file position for each section. */ #ifndef I960 #define ALIGN_SECTIONS_IN_FILE #endif -#ifdef TIC80COFF +#if defined(TIC80COFF) || defined(TICOFF) #undef ALIGN_SECTIONS_IN_FILE #endif @@ -2685,8 +2872,8 @@ coff_compute_section_file_positions (abfd) size_t len; len = strlen (bfd_asymbol_name (*symp)); - if (len > SYMNMLEN) - sz += len + 3; + if (len > SYMNMLEN || bfd_coff_force_symnames_in_strings (abfd)) + sz += len + 1 + bfd_coff_debug_string_prefix_length (abfd); } } if (sz > 0) @@ -2704,7 +2891,7 @@ coff_compute_section_file_positions (abfd) #ifdef COFF_IMAGE_WITH_PE int page_size; - if (coff_data (abfd)->link_info) + if (coff_data (abfd)->link_info) { page_size = pe_data (abfd)->pe_opthdr.FileAlignment; } @@ -2853,7 +3040,7 @@ coff_compute_section_file_positions (abfd) /* Align the sections in the file to the same boundary on which they are aligned in virtual memory. I960 doesn't do this (FIXME) so we can stay in sync with Intel. 960 - doesn't yet page from files... */ + doesn't yet page from files... */ #ifdef ALIGN_SECTIONS_IN_FILE if ((abfd->flags & EXEC_P) != 0) { @@ -3042,7 +3229,7 @@ coff_write_object_contents (abfd) file_ptr reloc_base; file_ptr lineno_base; file_ptr sym_base; - unsigned long reloc_size = 0; + unsigned long reloc_size = 0, reloc_count = 0; unsigned long lnno_size = 0; boolean long_section_names; asection *text_sec = NULL; @@ -3073,7 +3260,16 @@ coff_write_object_contents (abfd) for (current = abfd->sections; current != NULL; current = current->next) - reloc_size += current->reloc_count * bfd_coff_relsz (abfd); + { +#ifdef COFF_WITH_PE + /* we store the actual reloc count in the first reloc's addr */ + if (current->reloc_count > 0xffff) + reloc_count ++; +#endif + reloc_count += current->reloc_count; + } + + reloc_size = reloc_count * bfd_coff_relsz (abfd); lineno_base = reloc_base + reloc_size; sym_base = lineno_base + lnno_size; @@ -3096,6 +3292,11 @@ coff_write_object_contents (abfd) { current->rel_filepos = reloc_base; reloc_base += current->reloc_count * bfd_coff_relsz (abfd); +#ifdef COFF_WITH_PE + /* extra reloc to hold real count */ + if (current->reloc_count > 0xffff) + reloc_base += bfd_coff_relsz (abfd); +#endif } else { @@ -3170,6 +3371,9 @@ coff_write_object_contents (abfd) section.s_vaddr = current->vma; section.s_paddr = current->lma; section.s_size = current->_raw_size; +#ifdef coff_get_section_load_page + section.s_page = coff_get_section_load_page (current); +#endif #ifdef COFF_WITH_PE section.s_paddr = 0; @@ -3212,6 +3416,7 @@ coff_write_object_contents (abfd) hasdebug = true; #ifdef RS6000COFF_C +#ifndef XCOFF64 /* Indicate the use of an XCOFF overflow section header. */ if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff) { @@ -3219,6 +3424,7 @@ coff_write_object_contents (abfd) section.s_nlnno = 0xffff; } #endif +#endif section.s_flags = sec_to_styp_flags (current->name, current->flags); @@ -3239,10 +3445,13 @@ coff_write_object_contents (abfd) section.s_align = (current->alignment_power ? 1 << current->alignment_power : 0); -#else +#endif #ifdef TIC80COFF + /* TI COFF puts the alignment power in bits 8-11 of the flags */ section.s_flags |= (current->alignment_power & 0xF) << 8; #endif +#ifdef COFF_ENCODE_ALIGNMENT + COFF_ENCODE_ALIGNMENT(section, current->alignment_power); #endif #ifdef COFF_IMAGE_WITH_PE @@ -3259,7 +3468,7 @@ coff_write_object_contents (abfd) SCNHDR buff; if (coff_swap_scnhdr_out (abfd, §ion, &buff) == 0 || bfd_write ((PTR) (&buff), 1, bfd_coff_scnhsz (abfd), abfd) - != bfd_coff_scnhsz (abfd)) + != bfd_coff_scnhsz (abfd)) return false; } @@ -3381,13 +3590,13 @@ coff_write_object_contents (abfd) scnhdr.s_flags = STYP_OVRFLO; if (coff_swap_scnhdr_out (abfd, &scnhdr, &buff) == 0 || bfd_write ((PTR) &buff, 1, bfd_coff_scnhsz (abfd), abfd) - != bfd_coff_scnhsz (abfd)) + != bfd_coff_scnhsz (abfd)) return false; } } #endif - /* OK, now set up the filehdr... */ + /* OK, now set up the filehdr... */ /* Don't include the internal abs section in the section count */ @@ -3432,6 +3641,11 @@ coff_write_object_contents (abfd) internal_f.f_flags |= F_AR32W; #endif +#ifdef TI_TARGET_ID + /* target id is used in TI COFF v1 and later; COFF0 won't use this field, + but it doesn't hurt to set it internally */ + internal_f.f_target_id = TI_TARGET_ID; +#endif #ifdef TIC80_TARGET_ID internal_f.f_target_id = TIC80_TARGET_ID; #endif @@ -3458,7 +3672,7 @@ coff_write_object_contents (abfd) coff_set_flags (abfd, &magic, &flags); internal_f.f_magic = magic; internal_f.f_flags |= flags; - /* ...and the "opt"hdr... */ + /* ...and the "opt"hdr... */ #ifdef A29K #ifdef ULTRA3 /* NYU's machine */ @@ -3473,6 +3687,10 @@ coff_write_object_contents (abfd) internal_a.magic = NMAGIC; /* Assume separate i/d */ #define __A_MAGIC_SET__ #endif /* A29K */ +#ifdef TICOFF_AOUT_MAGIC + internal_a.magic = TICOFF_AOUT_MAGIC; +#define __A_MAGIC_SET__ +#endif #ifdef TIC80COFF internal_a.magic = TIC80_ARCH_MAGIC; #define __A_MAGIC_SET__ @@ -3516,7 +3734,7 @@ coff_write_object_contents (abfd) #if defined(ARM) #define __A_MAGIC_SET__ internal_a.magic = ZMAGIC; -#endif +#endif #if defined(PPC_PE) #define __A_MAGIC_SET__ @@ -3526,7 +3744,7 @@ coff_write_object_contents (abfd) #if defined MCORE_PE #define __A_MAGIC_SET__ internal_a.magic = IMAGE_NT_OPTIONAL_HDR_MAGIC; -#endif +#endif #if defined(I386) #define __A_MAGIC_SET__ @@ -3537,6 +3755,11 @@ coff_write_object_contents (abfd) #endif /* LYNXOS */ #endif /* I386 */ +#if defined(IA64) +#define __A_MAGIC_SET__ + internal_a.magic = ZMAGIC; +#endif /* IA64 */ + #if defined(SPARC) #define __A_MAGIC_SET__ #if defined(LYNXOS) @@ -3592,7 +3815,7 @@ coff_write_object_contents (abfd) return false; } #ifdef COFF_LONG_SECTION_NAMES - else if (long_section_names) + else if (long_section_names && ! obj_coff_strings_written (abfd)) { /* If we have long section names we have to write out the string table even if there are no symbols. */ @@ -3733,40 +3956,40 @@ coff_write_object_contents (abfd) /* now write them */ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) return false; - + { char * buff; bfd_size_type amount; - + buff = bfd_malloc (bfd_coff_filhsz (abfd)); - if (buff == NULL) + if (buff == NULL) return false; - + coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff); amount = bfd_write ((PTR) buff, 1, bfd_coff_filhsz (abfd), abfd); - + free (buff); - + if (amount != bfd_coff_filhsz (abfd)) return false; } - + if (abfd->flags & EXEC_P) { - /* Note that peicode.h fills in a PEAOUTHDR, not an AOUTHDR. - include/coff/pe.h sets AOUTSZ == sizeof(PEAOUTHDR)) */ + /* Note that peicode.h fills in a PEAOUTHDR, not an AOUTHDR. + include/coff/pe.h sets AOUTSZ == sizeof (PEAOUTHDR)) */ char * buff; bfd_size_type amount; buff = bfd_malloc (bfd_coff_aoutsz (abfd)); - if (buff == NULL) + if (buff == NULL) return false; - + coff_swap_aouthdr_out (abfd, (PTR) & internal_a, (PTR) buff); amount = bfd_write ((PTR) buff, 1, bfd_coff_aoutsz (abfd), abfd); - + free (buff); - + if (amount != bfd_coff_aoutsz (abfd)) return false; } @@ -3824,7 +4047,7 @@ coff_set_section_contents (abfd, section, location, offset, count) to write a section which doesn't follow these assumptions. The code has been tested on ISC 4.1 by me, and on SCO by Robert Lipe (Thanks!). - + Gvran Uddeborg */ if (strcmp (section->name, _LIB) == 0) @@ -3845,7 +4068,7 @@ coff_set_section_contents (abfd, section, location, offset, count) #endif /* Don't write out bss sections - one way to do this is to - see if the filepos has not been set. */ + see if the filepos has not been set. */ if (section->filepos == 0) return true; @@ -3953,7 +4176,7 @@ coff_slurp_line_table (abfd, asect) while (counter < asect->lineno_count) { struct internal_lineno dst; - coff_swap_lineno_in (abfd, src, &dst); + bfd_coff_swap_lineno_in (abfd, src, &dst); cache_ptr->line_number = dst.l_lnno; if (cache_ptr->line_number == 0) @@ -4002,7 +4225,7 @@ coff_slurp_line_table (abfd, asect) } asect->lineno = lineno_cache; - /* FIXME, free native_lineno here, or use alloca or something. */ + /* FIXME, free native_lineno here, or use alloca or something. */ return true; } @@ -4122,7 +4345,7 @@ coff_slurp_symbol_table (abfd) case COFF_SYMBOL_UNDEFINED: dst->symbol.section = bfd_und_section_ptr; dst->symbol.value = 0; - break; + break; case COFF_SYMBOL_PE_SECTION: dst->symbol.flags |= BSF_EXPORT | BSF_SECTION_SYM; @@ -4169,7 +4392,7 @@ coff_slurp_symbol_table (abfd) #ifdef I960 case C_LEAFSTAT: /* static leaf procedure */ #endif -#if defined ARM +#if defined ARM case C_THUMBSTAT: /* Thumb static */ case C_THUMBLABEL: /* Thumb label */ case C_THUMBSTATFUNC:/* Thumb static function */ @@ -4206,7 +4429,8 @@ coff_slurp_symbol_table (abfd) #endif case C_REGPARM: /* register parameter */ case C_REG: /* register variable */ -#ifndef TIC80COFF + /* C_AUTOARG conflictes with TI COFF C_UEXT */ +#if !defined (TIC80COFF) && !defined (TICOFF) #ifdef C_AUTOARG case C_AUTOARG: /* 960-specific storage class */ #endif @@ -4287,7 +4511,7 @@ coff_slurp_symbol_table (abfd) #endif case C_BLOCK: /* ".bb" or ".eb" */ - case C_FCN: /* ".bf" or ".ef" (or PE ".lf") */ + case C_FCN: /* ".bf" or ".ef" (or PE ".lf") */ case C_EFCN: /* physical end of function */ #if defined COFF_WITH_PE /* PE sets the symbol to a value relative to the start @@ -4310,6 +4534,11 @@ coff_slurp_symbol_table (abfd) #endif break; + case C_STATLAB: /* Static load time label */ + dst->symbol.value = src->u.syment.n_value; + dst->symbol.flags = BSF_GLOBAL; + break; + case C_NULL: /* PE DLLs sometimes have zeroed out symbols for some reason. Just ignore them without a warning. */ @@ -4328,11 +4557,10 @@ coff_slurp_symbol_table (abfd) /* NT uses 0x67 for a weak symbol, not C_ALIAS. */ case C_ALIAS: /* duplicate tag */ #endif - /* New storage classes for TIc80 */ -#ifdef TIC80COFF + /* New storage classes for TI COFF */ +#if defined(TIC80COFF) || defined(TICOFF) case C_UEXT: /* Tentative external definition */ #endif - case C_STATLAB: /* Static load time label */ case C_EXTLAB: /* External load time label */ case C_HIDDEN: /* ext symbol in dmert public lib */ default: @@ -4502,7 +4730,6 @@ SUBSUBSECTION into a howto table vector; the 88k subtracts a number from the @code{r_type} field and creates an addend field. - */ #ifndef CALC_ADDEND @@ -4557,7 +4784,6 @@ coff_slurp_reloc_table (abfd, asect, symbols) if (reloc_cache == NULL) return false; - for (idx = 0; idx < asect->reloc_count; idx++) { struct internal_reloc dst; @@ -4678,7 +4904,6 @@ coff_canonicalize_reloc (abfd, section, relptr, symbols) arelent *tblptr = section->relocation; unsigned int count = 0; - if (section->flags & SEC_CONSTRUCTOR) { /* this section has relocs made up by us, they are not in the @@ -4701,8 +4926,6 @@ coff_canonicalize_reloc (abfd, section, relptr, symbols) for (; count++ < section->reloc_count;) *relptr++ = tblptr++; - - } *relptr = 0; return section->reloc_count; @@ -4890,6 +5113,16 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table = false, #endif COFF_DEFAULT_SECTION_ALIGNMENT_POWER, +#ifdef COFF_FORCE_SYMBOLS_IN_STRINGS + true, +#else + false, +#endif +#ifdef COFF_DEBUG_STRING_WIDE_PREFIX + 4, +#else + 2, +#endif coff_SWAP_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, coff_SWAP_reloc_in, coff_bad_format_hook, coff_set_arch_mach_hook, coff_mkobject_hook, styp_to_sec_flags, coff_set_alignment_hook, @@ -4921,7 +5154,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table = #define coff_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data #endif -#ifndef coff_bfd_copy_private_bfd_data +#ifndef coff_bfd_copy_private_bfd_data #define coff_bfd_copy_private_bfd_data _bfd_generic_bfd_copy_private_bfd_data #endif @@ -4933,7 +5166,7 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table = #define coff_bfd_set_private_flags _bfd_generic_bfd_set_private_flags #endif -#ifndef coff_bfd_print_private_bfd_data +#ifndef coff_bfd_print_private_bfd_data #define coff_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data #endif diff --git a/contrib/binutils/bfd/coffgen.c b/contrib/binutils/bfd/coffgen.c index f2410d9..35e8f71 100644 --- a/contrib/binutils/bfd/coffgen.c +++ b/contrib/binutils/bfd/coffgen.c @@ -60,7 +60,7 @@ static void coff_pointerize_aux static boolean make_a_section_from_file PARAMS ((bfd *, struct internal_scnhdr *, unsigned int)); static const bfd_target *coff_real_object_p - PARAMS ((bfd *, unsigned, struct internal_filehdr *, + PARAMS ((bfd *, unsigned, struct internal_filehdr *, struct internal_aouthdr *)); static void fixup_symbol_value PARAMS ((bfd *, coff_symbol_type *, struct internal_syment *)); @@ -212,7 +212,7 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a) goto fail; /* Set the arch/mach *before* swapping in sections; section header swapping - may depend on arch/mach info. */ + may depend on arch/mach info. */ if (bfd_coff_set_arch_mach_hook (abfd, (PTR) internal_f) == false) goto fail; @@ -340,7 +340,6 @@ coff_get_symtab_upper_bound (abfd) return (bfd_get_symcount (abfd) + 1) * (sizeof (coff_symbol_type *)); } - /* Canonicalize a COFF symbol table. */ long @@ -525,7 +524,7 @@ coff_count_linenumbers (abfd) { asymbol *q_maybe = *p; - if (bfd_asymbol_flavour (q_maybe) == bfd_target_coff_flavour) + if (bfd_family_coff (bfd_asymbol_bfd (q_maybe))) { coff_symbol_type *q = coffsymbol (q_maybe); @@ -558,13 +557,12 @@ coff_count_linenumbers (abfd) /* Takes a bfd and a symbol, returns a pointer to the coff specific area of the symbol if there is one. */ -/*ARGSUSED*/ coff_symbol_type * coff_symbol_from (ignore_abfd, symbol) bfd *ignore_abfd ATTRIBUTE_UNUSED; asymbol *symbol; { - if (bfd_asymbol_flavour (symbol) != bfd_target_coff_flavour) + if (!bfd_family_coff (bfd_asymbol_bfd (symbol))) return (coff_symbol_type *) NULL; if (bfd_asymbol_bfd (symbol)->tdata.coff_obj_data == (coff_data_type *) NULL) @@ -608,8 +606,11 @@ fixup_symbol_value (abfd, coff_symbol_ptr, syment) syment->n_value = (coff_symbol_ptr->symbol.value + coff_symbol_ptr->symbol.section->output_offset); if (! obj_pe (abfd)) - syment->n_value += - coff_symbol_ptr->symbol.section->output_section->vma; + { + syment->n_value += (syment->n_sclass == C_STATLAB) + ? coff_symbol_ptr->symbol.section->output_section->lma + : coff_symbol_ptr->symbol.section->output_section->vma; + } } else { @@ -689,7 +690,7 @@ coff_renumber_symbols (bfd_ptr, first_undef) for (symbol_index = 0; symbol_index < symbol_count; symbol_index++) { coff_symbol_type *coff_symbol_ptr = coff_symbol_from (bfd_ptr, symbol_ptr_ptr[symbol_index]); - symbol_ptr_ptr[symbol_index]->udata.i = symbol_index; + symbol_ptr_ptr[symbol_index]->udata.i = symbol_index; if (coff_symbol_ptr && coff_symbol_ptr->native) { combined_entry_type *s = coff_symbol_ptr->native; @@ -816,7 +817,16 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p, { unsigned int filnmlen; - strncpy (native->u.syment._n._n_name, ".file", SYMNMLEN); + if (bfd_coff_force_symnames_in_strings (abfd)) + { + native->u.syment._n._n_n._n_offset = + (*string_size_p + STRING_SIZE_SIZE); + native->u.syment._n._n_n._n_zeroes = 0; + *string_size_p += 6; /* strlen(".file") + 1 */ + } + else + strncpy (native->u.syment._n._n_name, ".file", SYMNMLEN); + auxent = &(native + 1)->u.auxent; filnmlen = bfd_coff_filnmlen (abfd); @@ -843,7 +853,7 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p, } else { - if (name_length <= SYMNMLEN) + if (name_length <= SYMNMLEN && !bfd_coff_force_symnames_in_strings (abfd)) { /* This name will fit into the symbol neatly */ strncpy (native->u.syment._n._n_name, symbol->name, SYMNMLEN); @@ -858,7 +868,8 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p, else { long filepos; - bfd_byte buf[2]; + bfd_byte buf[4]; + int prefix_len = bfd_coff_debug_string_prefix_length (abfd); /* This name should be written into the .debug section. For some reason each name is preceded by a two byte length @@ -868,24 +879,29 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p, if (*debug_string_section_p == (asection *) NULL) *debug_string_section_p = bfd_get_section_by_name (abfd, ".debug"); filepos = bfd_tell (abfd); - bfd_put_16 (abfd, name_length + 1, buf); + if (prefix_len == 4) + bfd_put_32 (abfd, name_length + 1, buf); + else + bfd_put_16 (abfd, name_length + 1, buf); + if (!bfd_set_section_contents (abfd, *debug_string_section_p, (PTR) buf, (file_ptr) *debug_string_size_p, - (bfd_size_type) 2) + (bfd_size_type) prefix_len) || !bfd_set_section_contents (abfd, *debug_string_section_p, (PTR) symbol->name, ((file_ptr) *debug_string_size_p - + 2), + + prefix_len), (bfd_size_type) name_length + 1)) abort (); if (bfd_seek (abfd, filepos, SEEK_SET) != 0) abort (); - native->u.syment._n._n_n._n_offset = *debug_string_size_p + 2; + native->u.syment._n._n_n._n_offset = + *debug_string_size_p + prefix_len; native->u.syment._n._n_n._n_zeroes = 0; - *debug_string_size_p += name_length + 3; + *debug_string_size_p += name_length + 1 + prefix_len; } } } @@ -1085,7 +1101,7 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p, while (lineno[count].line_number != 0) { #if 0 - /* 13 april 92. sac + /* 13 april 92. sac I've been told this, but still need proof: > The second bug is also in `bfd/coffcode.h'. This bug > causes the linker to screw up the pc-relocations for @@ -1241,7 +1257,7 @@ coff_write_symbols (abfd) { /* This is not a COFF symbol, so it certainly is not a file name, nor does it go in the .debug section. */ - maxlen = SYMNMLEN; + maxlen = bfd_coff_force_symnames_in_strings (abfd) ? 0 : SYMNMLEN; } else if (bfd_coff_symname_in_debug (abfd, &c_symbol->native->u.syment)) @@ -1252,9 +1268,13 @@ coff_write_symbols (abfd) } else if (c_symbol->native->u.syment.n_sclass == C_FILE && c_symbol->native->u.syment.n_numaux > 0) - maxlen = bfd_coff_filnmlen (abfd); + { + if (bfd_coff_force_symnames_in_strings (abfd)) + bfd_write (".file", 1, 6, abfd); + maxlen = bfd_coff_filnmlen (abfd); + } else - maxlen = SYMNMLEN; + maxlen = bfd_coff_force_symnames_in_strings (abfd) ? 0 : SYMNMLEN; if (name_length > maxlen) { @@ -1354,7 +1374,6 @@ coff_write_linenumbers (abfd) return true; } -/*ARGSUSED */ alent * coff_get_lineno (ignore_abfd, symbol) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -1465,7 +1484,7 @@ coff_pointerize_aux (abfd, table_base, symbol, indaux, auxent) /* Allocate space for the ".debug" section, and read it. We did not read the debug section until now, because - we didn't want to go to the trouble until someone needed it. */ + we didn't want to go to the trouble until someone needed it. */ static char * build_debug_section (abfd) @@ -1487,7 +1506,7 @@ build_debug_section (abfd) if (debug_section == NULL) return NULL; - /* Seek to the beginning of the `.debug' section and read it. + /* Seek to the beginning of the `.debug' section and read it. Save the current position first; it is needed by our caller. Then read debug section and reset the file pointer. */ @@ -1501,7 +1520,6 @@ build_debug_section (abfd) return debug_section; } - /* Return a pointer to a malloc'd copy of 'name'. 'name' may not be \0-terminated, but will not exceed 'maxlen' characters. The copy *will* be \0-terminated. */ @@ -1589,7 +1607,7 @@ _bfd_coff_read_string_table (abfd) + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd)), SEEK_SET) != 0) return NULL; - + if (bfd_read (extstrsize, sizeof extstrsize, 1, abfd) != sizeof extstrsize) { if (bfd_get_error () != bfd_error_file_truncated) @@ -1790,7 +1808,7 @@ coff_get_normalized_symtab (abfd) { break; } /* if end of string */ - } /* possible lengths of this string. */ + } /* possible lengths of this string. */ if ((newstring = (PTR) bfd_alloc (abfd, ++i)) == NULL) return (NULL); @@ -1888,7 +1906,6 @@ coff_bfd_make_debug_symbol (abfd, ptr, sz) return &new->symbol; } -/*ARGSUSED */ void coff_get_symbol_info (abfd, symbol, ret) bfd *abfd; @@ -2141,7 +2158,7 @@ _bfd_coff_is_local_label_name (abfd, name) /* Provided a BFD, a section and an offset (in bytes, not octets) into the section, calculate and return the name of the source file and the line nearest to the wanted location. */ -/*ARGSUSED*/ + boolean coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr, functionname_ptr, line_ptr) @@ -2168,17 +2185,25 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr, if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, &found, filename_ptr, functionname_ptr, line_ptr, - &coff_data (abfd)->line_info)) + &coff_data(abfd)->line_info)) return false; + if (found) return true; + /* Also try examining DWARF2 debugging information. */ + if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, + filename_ptr, functionname_ptr, + line_ptr, 0, + &coff_data(abfd)->dwarf2_find_line_info)) + return true; + *filename_ptr = 0; *functionname_ptr = 0; *line_ptr = 0; /* Don't try and find line numbers in a non coff file */ - if (abfd->xvec->flavour != bfd_target_coff_flavour) + if (!bfd_family_coff (abfd)) return false; if (cof == NULL) @@ -2385,7 +2410,7 @@ bfd_coff_set_symbol_class (abfd, symbol, class) We cheat here by creating a fake native entry for it and then filling in the class. This code is based on that in coff_write_alien_symbol(). */ - + combined_entry_type * native; native = (combined_entry_type *) bfd_alloc (abfd, sizeof (* native)); @@ -2393,10 +2418,10 @@ bfd_coff_set_symbol_class (abfd, symbol, class) return false; memset (native, 0, sizeof (* native)); - + native->u.syment.n_type = T_NULL; native->u.syment.n_sclass = class; - + if (bfd_is_und_section (symbol->section)) { native->u.syment.n_scnum = N_UNDEF; @@ -2415,19 +2440,18 @@ bfd_coff_set_symbol_class (abfd, symbol, class) + symbol->section->output_offset); if (! obj_pe (abfd)) native->u.syment.n_value += symbol->section->output_section->vma; - + /* Copy the any flags from the the file header into the symbol. FIXME: Why? */ native->u.syment.n_flags = bfd_asymbol_bfd (& csym->symbol)->flags; } - + csym->native = native; } else { csym->native->u.syment.n_sclass = class; } - + return true; } - diff --git a/contrib/binutils/bfd/cofflink.c b/contrib/binutils/bfd/cofflink.c index 609f665..223ccbf 100644 --- a/contrib/binutils/bfd/cofflink.c +++ b/contrib/binutils/bfd/cofflink.c @@ -40,6 +40,15 @@ static int process_embedded_commands PARAMS ((bfd *, struct bfd_link_info *, bfd *)); static void mark_relocs PARAMS ((struct coff_final_link_info *, bfd *)); +/* Return true if SYM is a weak, external symbol. */ +#define IS_WEAK_EXTERNAL(abfd, sym) \ + ((sym).n_sclass == C_WEAKEXT \ + || (obj_pe (abfd) && (sym).n_sclass == C_NT_WEAK)) + +/* Return true if SYM is an external symbol. */ +#define IS_EXTERNAL(abfd, sym) \ + ((sym).n_sclass == C_EXT || IS_WEAK_EXTERNAL (abfd, sym)) + /* Define macros so that the ISFCN, et. al., macros work correctly. These macros are defined in include/coff/internal.h in terms of N_TMASK, etc. These definitions require a user to define local @@ -395,8 +404,7 @@ coff_link_add_symbols (abfd, info) break; } - if (sym.n_sclass == C_WEAKEXT - || (obj_pe (abfd) && sym.n_sclass == C_NT_WEAK)) + if (IS_WEAK_EXTERNAL (abfd, sym)) flags = BSF_WEAK; addit = true; @@ -894,8 +902,7 @@ _bfd_coff_final_link (abfd, info) for (p = o->link_order_head; p != NULL; p = p->next) { if (p->type == bfd_indirect_link_order - && (bfd_get_flavour (p->u.indirect.section->owner) - == bfd_target_coff_flavour)) + && bfd_family_coff (p->u.indirect.section->owner)) { sub = p->u.indirect.section->owner; if (! bfd_coff_link_output_has_begun (sub, & finfo)) @@ -921,7 +928,7 @@ _bfd_coff_final_link (abfd, info) if (! bfd_coff_final_link_postscript (abfd, & finfo)) goto error_return; - + /* Free up the buffers used by _bfd_coff_link_input_bfd. */ coff_debug_merge_hash_table_free (&finfo.debug_merge); @@ -982,7 +989,7 @@ _bfd_coff_final_link (abfd, info) /* If doing task linking (ld --task-link) then make a pass through the global symbols, writing out any that are defined, and making them - static. */ + static. */ if (info->task_link) { finfo.failed = false; @@ -1095,6 +1102,8 @@ _bfd_coff_final_link (abfd, info) if (! _bfd_stringtab_emit (abfd, finfo.strtab)) return false; + + obj_coff_strings_written (abfd) = true; } _bfd_stringtab_free (finfo.strtab); @@ -1152,7 +1161,7 @@ dores_com (ptr, output_bfd, heap) bfd *output_bfd; int heap; { - if (coff_data(output_bfd)->pe) + if (coff_data(output_bfd)->pe) { int val = strtoul (ptr, &ptr, 0); if (heap) @@ -1160,7 +1169,7 @@ dores_com (ptr, output_bfd, heap) else pe_data(output_bfd)->pe_opthdr.SizeOfStackReserve =val; - if (ptr[0] == ',') + if (ptr[0] == ',') { int val = strtoul (ptr+1, &ptr, 0); if (heap) @@ -1186,7 +1195,7 @@ char **dst; } /* Process any magic embedded commands in a section called .drectve */ - + static int process_embedded_commands (output_bfd, info, abfd) bfd *output_bfd; @@ -1197,19 +1206,19 @@ process_embedded_commands (output_bfd, info, abfd) char *s; char *e; char *copy; - if (!sec) + if (!sec) return 1; - + copy = bfd_malloc ((size_t) sec->_raw_size); - if (!copy) + if (!copy) return 0; - if (! bfd_get_section_contents(abfd, sec, copy, 0, sec->_raw_size)) + if (! bfd_get_section_contents(abfd, sec, copy, 0, sec->_raw_size)) { free (copy); return 0; } e = copy + sec->_raw_size; - for (s = copy; s < e ; ) + for (s = copy; s < e ; ) { if (s[0]!= '-') { s++; @@ -1230,7 +1239,7 @@ process_embedded_commands (output_bfd, info, abfd) s = get_name(s, &name); s = get_name(s, &attribs); while (loop) { - switch (*attribs++) + switch (*attribs++) { case 'W': had_write = 1; @@ -1264,7 +1273,7 @@ process_embedded_commands (output_bfd, info, abfd) { s = dores_com (s+6, output_bfd, 0); } - else + else s++; } free (copy); @@ -1274,7 +1283,7 @@ process_embedded_commands (output_bfd, info, abfd) /* Place a marker against all symbols which are used by relocations. This marker can be picked up by the 'do we skip this symbol ?' loop in _bfd_coff_link_input_bfd() and used to prevent skipping - that symbol. + that symbol. */ static void @@ -1286,14 +1295,13 @@ mark_relocs (finfo, input_bfd) if ((bfd_get_file_flags (input_bfd) & HAS_SYMS) == 0) return; - + for (a = input_bfd->sections; a != (asection *) NULL; a = a->next) { struct internal_reloc * internal_relocs; struct internal_reloc * irel; struct internal_reloc * irelend; - if ((a->flags & SEC_RELOC) == 0 || a->reloc_count < 1) continue; @@ -1306,7 +1314,7 @@ mark_relocs (finfo, input_bfd) ? (finfo->section_info[ a->output_section->target_index ].relocs + a->output_section->reloc_count) : finfo->internal_relocs) ); - + if (internal_relocs == NULL) continue; @@ -1317,7 +1325,7 @@ mark_relocs (finfo, input_bfd) been initialised to 0) for all of the symbols that are used in the relocation table. This will then be picked up in the skip/don't pass */ - + for (; irel < irelend; irel++) { finfo->sym_indices[ irel->r_symndx ] = -1; @@ -1400,8 +1408,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd) && finfo->info->relocateable) { /* mark the symbol array as 'not-used' */ - memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp); - + memset (indexp, 0, obj_raw_syment_count (input_bfd) * sizeof * indexp); + mark_relocs (finfo, input_bfd); } @@ -1448,7 +1456,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd) dont_skip_symbol = *indexp; else dont_skip_symbol = false; - + *indexp = -1; skip = false; @@ -1834,12 +1842,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd) } /* If doing task linking, convert normal global function symbols to - static functions. */ - - if (finfo->info->task_link - && (isym.n_sclass == C_EXT - || isym.n_sclass == C_WEAKEXT - || (obj_pe (input_bfd) && isym.n_sclass == C_NT_WEAK))) + static functions. */ + if (finfo->info->task_link && IS_EXTERNAL (input_bfd, isym)) isym.n_sclass = C_STAT; /* Output the symbol. */ @@ -2202,7 +2206,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd) is.n_numaux, auxptr); } - skipping = false; + skipping = false; } iline.l_addr.l_symndx = indx; @@ -2400,8 +2404,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd) /* This reloc is against a symbol we are stripping. This should have been handled by the 'dont_skip_symbol' code in the while - loop at the top of this function. */ - + loop at the top of this function. */ + is = finfo->internal_syms + irel->r_symndx; name = (_bfd_coff_internal_syment_name @@ -2425,9 +2429,9 @@ _bfd_coff_link_input_bfd (finfo, input_bfd) if (secdata == NULL || secdata->stab_info == NULL) { if (! bfd_set_section_contents (output_bfd, o->output_section, - contents, - (file_ptr) - (o->output_offset * + contents, + (file_ptr) + (o->output_offset * bfd_octets_per_byte (output_bfd)), (o->_cooked_size != 0 ? o->_cooked_size @@ -2549,20 +2553,25 @@ _bfd_coff_write_global_sym (h, data) /* If doing task linking and this is the pass where we convert defined globals to statics, then do that conversion now. If the symbol is not being converted, just ignore it and it will be - output during a later pass. */ + output during a later pass. */ if (finfo->global_to_static) { - if (isym.n_sclass != C_EXT - && isym.n_sclass != C_WEAKEXT - && (! obj_pe (output_bfd) || isym.n_sclass != C_NT_WEAK)) - { - return true; - } + if (! IS_EXTERNAL (output_bfd, isym)) + return true; + isym.n_sclass = C_STAT; } + /* When a weak symbol is not overriden by a strong one, + turn it into an external symbol when not building a + shared or relocateable object. */ + if (! finfo->info->shared + && ! finfo->info->relocateable + && IS_WEAK_EXTERNAL (finfo->output_bfd, isym)) + isym.n_sclass = C_EXT; + isym.n_numaux = h->numaux; - + bfd_coff_swap_sym_out (output_bfd, (PTR) &isym, (PTR) finfo->outsyms); symesz = bfd_coff_symesz (output_bfd); @@ -2654,7 +2663,7 @@ _bfd_coff_write_global_sym (h, data) /* Write out task global symbols, converting them to statics. Called via coff_link_hash_traverse. Calls bfd_coff_write_global_sym to do - the dirty work, if the symbol we are processing needs conversion. */ + the dirty work, if the symbol we are processing needs conversion. */ boolean _bfd_coff_write_task_globals (h, data) @@ -2740,7 +2749,7 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order) break; } ok = bfd_set_section_contents (output_bfd, output_section, (PTR) buf, - (file_ptr) + (file_ptr) (link_order->offset * bfd_octets_per_byte (output_bfd)), size); free (buf); @@ -2862,7 +2871,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, return false; } else - { + { h = obj_coff_sym_hashes (input_bfd)[symndx]; sym = syms + symndx; } @@ -2877,7 +2886,6 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, else addend = 0; - howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h, sym, &addend); if (howto == NULL) @@ -2929,6 +2937,9 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, + sec->output_offset); } + else if (h->root.type == bfd_link_hash_undefweak) + val = 0; + else if (! info->relocateable) { if (! ((*info->callbacks->undefined_symbol) @@ -2940,7 +2951,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, if (info->base_file) { - /* Emit a reloc if the backend thinks it needs it. */ + /* Emit a reloc if the backend thinks it needs it. */ if (sym && pe_data (output_bfd)->in_reloc_p (output_bfd, howto)) { /* Relocation to a symbol in a section which isn't @@ -2949,9 +2960,9 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, reloc section. Note that the base file is not portable between systems. We write out a long here, and dlltool reads in a long. */ - long addr = (rel->r_vaddr - - input_section->vma - + input_section->output_offset + long addr = (rel->r_vaddr + - input_section->vma + + input_section->output_offset + input_section->output_section->vma); if (coff_data (output_bfd)->pe) addr -= pe_data(output_bfd)->pe_opthdr.ImageBase; @@ -2963,7 +2974,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, } } } - + rstat = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_vaddr - input_section->vma, @@ -3007,4 +3018,3 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, } return true; } - diff --git a/contrib/binutils/bfd/coffswap.h b/contrib/binutils/bfd/coffswap.h index d7d090f..2f89afb 100644 --- a/contrib/binutils/bfd/coffswap.h +++ b/contrib/binutils/bfd/coffswap.h @@ -168,12 +168,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef GET_SCNHDR_NRELOC #define GET_SCNHDR_NRELOC bfd_h_get_16 #endif +#ifndef MAX_SCNHDR_NRELOC +#define MAX_SCNHDR_NRELOC 0xffff +#endif #ifndef PUT_SCNHDR_NRELOC #define PUT_SCNHDR_NRELOC bfd_h_put_16 #endif #ifndef GET_SCNHDR_NLNNO #define GET_SCNHDR_NLNNO bfd_h_get_16 #endif +#ifndef MAX_SCNHDR_NLNNO +#define MAX_SCNHDR_NLNNO 0xffff +#endif #ifndef PUT_SCNHDR_NLNNO #define PUT_SCNHDR_NLNNO bfd_h_put_16 #endif @@ -184,6 +190,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define PUT_SCNHDR_FLAGS bfd_h_put_32 #endif +#ifndef GET_RELOC_VADDR +#define GET_RELOC_VADDR bfd_h_get_32 +#endif +#ifndef PUT_RELOC_VADDR +#define PUT_RELOC_VADDR bfd_h_put_32 +#endif static void coff_swap_aouthdr_in PARAMS ((bfd *, PTR, PTR)); static unsigned int coff_swap_aouthdr_out PARAMS ((bfd *, PTR, PTR)); @@ -217,7 +229,7 @@ coff_swap_reloc_in (abfd, src, dst) RELOC *reloc_src = (RELOC *) src; struct internal_reloc *reloc_dst = (struct internal_reloc *) dst; - reloc_dst->r_vaddr = bfd_h_get_32(abfd, (bfd_byte *)reloc_src->r_vaddr); + reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, (bfd_byte *)reloc_src->r_vaddr); reloc_dst->r_symndx = bfd_h_get_signed_32(abfd, (bfd_byte *) reloc_src->r_symndx); #ifdef RS6000COFF_C @@ -241,7 +253,7 @@ coff_swap_reloc_out (abfd, src, dst) { struct internal_reloc *reloc_src = (struct internal_reloc *)src; struct external_reloc *reloc_dst = (struct external_reloc *)dst; - bfd_h_put_32(abfd, reloc_src->r_vaddr, (bfd_byte *) reloc_dst->r_vaddr); + PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, (bfd_byte *) reloc_dst->r_vaddr); bfd_h_put_32(abfd, reloc_src->r_symndx, (bfd_byte *) reloc_dst->r_symndx); #ifdef RS6000COFF_C @@ -324,7 +336,6 @@ coff_swap_filehdr_out (abfd, in, out) return bfd_coff_filhsz (abfd); } - #ifndef NO_COFF_SYMBOLS static void @@ -347,9 +358,9 @@ coff_swap_sym_in (abfd, ext1, in1) memcpy(in->_n._n_name, ext->e.e_name, SYMNMLEN); #endif } - in->n_value = bfd_h_get_32(abfd, (bfd_byte *) ext->e_value); + 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){ + if (sizeof (ext->e_type) == 2){ in->n_type = bfd_h_get_16(abfd, (bfd_byte *) ext->e_type); } else { @@ -383,7 +394,7 @@ coff_swap_sym_out (abfd, inp, extp) } 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) + if (sizeof (ext->e_type) == 2) { bfd_h_put_16(abfd, in->n_type , (bfd_byte *) ext->e_type); } @@ -419,7 +430,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) 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 = + in->x_file.x_n.x_offset = bfd_h_get_32(abfd, (bfd_byte *) ext->x_file.x_n.x_offset); } else { #if FILNMLEN != E_FILNMLEN @@ -439,28 +450,6 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) } goto end; - /* RS/6000 "csect" auxents */ -#ifdef RS6000COFF_C - case C_EXT: - case C_HIDEXT: - if (indx + 1 == numaux) - { - in->x_csect.x_scnlen.l = bfd_h_get_32 (abfd, ext->x_csect.x_scnlen); - in->x_csect.x_parmhash = bfd_h_get_32 (abfd, - ext->x_csect.x_parmhash); - in->x_csect.x_snhash = bfd_h_get_16 (abfd, ext->x_csect.x_snhash); - /* We don't have to hack bitfields in x_smtyp because it's - defined by shifts-and-ands, which are equivalent on all - byte orders. */ - in->x_csect.x_smtyp = bfd_h_get_8 (abfd, ext->x_csect.x_smtyp); - in->x_csect.x_smclas = bfd_h_get_8 (abfd, ext->x_csect.x_smclas); - in->x_csect.x_stab = bfd_h_get_32 (abfd, ext->x_csect.x_stab); - in->x_csect.x_snstab = bfd_h_get_16 (abfd, ext->x_csect.x_snstab); - goto end; - } - break; -#endif - case C_STAT: #ifdef C_LEAFSTAT case C_LEAFSTAT: @@ -517,7 +506,7 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1) end: ; /* the semicolon is because MSVC doesn't like labels at - end of block. */ + end of block. */ #ifdef COFF_ADJUST_AUX_IN_POST COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1); @@ -558,27 +547,6 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp) } goto end; -#ifdef RS6000COFF_C - /* RS/6000 "csect" auxents */ - case C_EXT: - case C_HIDEXT: - if (indx + 1 == numaux) - { - PUTWORD (abfd, in->x_csect.x_scnlen.l, ext->x_csect.x_scnlen); - PUTWORD (abfd, in->x_csect.x_parmhash, ext->x_csect.x_parmhash); - PUTHALF (abfd, in->x_csect.x_snhash, ext->x_csect.x_snhash); - /* We don't have to hack bitfields in x_smtyp because it's - defined by shifts-and-ands, which are equivalent on all - byte orders. */ - PUTBYTE (abfd, in->x_csect.x_smtyp, ext->x_csect.x_smtyp); - PUTBYTE (abfd, in->x_csect.x_smclas, ext->x_csect.x_smclas); - PUTWORD (abfd, in->x_csect.x_stab, ext->x_csect.x_stab); - PUTHALF (abfd, in->x_csect.x_snstab, ext->x_csect.x_snstab); - goto end; - } - break; -#endif - case C_STAT: #ifdef C_LEAFSTAT case C_LEAFSTAT: @@ -703,9 +671,12 @@ coff_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1) bfd_h_put_32(abfd, aouthdr_int->vid[1], (bfd_byte *) aouthdr_ext->vid + 4); #endif - #ifdef RS6000COFF_C +#ifdef XCOFF64 + aouthdr_int->o_toc = bfd_h_get_64(abfd, aouthdr_ext->o_toc); +#else aouthdr_int->o_toc = bfd_h_get_32(abfd, aouthdr_ext->o_toc); +#endif aouthdr_int->o_snentry = bfd_h_get_16(abfd, aouthdr_ext->o_snentry); aouthdr_int->o_sntext = bfd_h_get_16(abfd, aouthdr_ext->o_sntext); aouthdr_int->o_sndata = bfd_h_get_16(abfd, aouthdr_ext->o_sndata); @@ -716,9 +687,14 @@ coff_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1) aouthdr_int->o_algndata = bfd_h_get_16(abfd, aouthdr_ext->o_algndata); aouthdr_int->o_modtype = bfd_h_get_16(abfd, aouthdr_ext->o_modtype); aouthdr_int->o_cputype = bfd_h_get_16(abfd, aouthdr_ext->o_cputype); +#ifdef XCOFF64 + aouthdr_int->o_maxstack = bfd_h_get_64(abfd, aouthdr_ext->o_maxstack); + aouthdr_int->o_maxdata = bfd_h_get_64(abfd, aouthdr_ext->o_maxdata); +#else aouthdr_int->o_maxstack = bfd_h_get_32(abfd, aouthdr_ext->o_maxstack); aouthdr_int->o_maxdata = bfd_h_get_32(abfd, aouthdr_ext->o_maxdata); #endif +#endif #ifdef MIPSECOFF aouthdr_int->bss_start = bfd_h_get_32(abfd, aouthdr_ext->bss_start); @@ -763,7 +739,11 @@ coff_swap_aouthdr_out (abfd, in, out) #endif #ifdef RS6000COFF_C +#ifdef XCOFF64 + bfd_h_put_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); +#else bfd_h_put_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc); +#endif bfd_h_put_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry); bfd_h_put_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext); bfd_h_put_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata); @@ -774,9 +754,18 @@ coff_swap_aouthdr_out (abfd, in, out) bfd_h_put_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata); bfd_h_put_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype); bfd_h_put_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype); +#ifdef XCOFF64 + bfd_h_put_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); + bfd_h_put_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); +#else bfd_h_put_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack); bfd_h_put_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata); +#endif memset (aouthdr_out->o_resv2, 0, sizeof aouthdr_out->o_resv2); +#ifdef XCOFF64 + memset (aouthdr_out->o_debugger, 0, sizeof aouthdr_out->o_debugger); + memset (aouthdr_out->o_resv3, 0, sizeof aouthdr_out->o_resv3); +#endif #endif #ifdef MIPSECOFF @@ -814,7 +803,7 @@ coff_swap_scnhdr_in (abfd, ext, in) #ifdef COFF_ADJUST_SCNHDR_IN_PRE COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in); #endif - memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof(scnhdr_int->s_name)); + memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name)); scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, (bfd_byte *) scnhdr_ext->s_vaddr); scnhdr_int->s_paddr = @@ -856,12 +845,11 @@ coff_swap_scnhdr_out (abfd, in, out) #ifdef COFF_ADJUST_SCNHDR_OUT_PRE COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); #endif - memcpy(scnhdr_ext->s_name, scnhdr_int->s_name, sizeof(scnhdr_int->s_name)); + memcpy(scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name)); PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, (bfd_byte *) scnhdr_ext->s_vaddr); - PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, (bfd_byte *) scnhdr_ext->s_paddr); PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, @@ -879,8 +867,9 @@ coff_swap_scnhdr_out (abfd, in, out) PUTWORD(abfd, scnhdr_int->s_nlnno, (bfd_byte *) scnhdr_ext->s_nlnno); PUTWORD(abfd, scnhdr_int->s_nreloc, (bfd_byte *) scnhdr_ext->s_nreloc); #else - if (scnhdr_int->s_nlnno <= 0xffff) - PUTHALF(abfd, scnhdr_int->s_nlnno, (bfd_byte *) scnhdr_ext->s_nlnno); + if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO) + PUT_SCNHDR_NLNNO(abfd, scnhdr_int->s_nlnno, + (bfd_byte *) scnhdr_ext->s_nlnno); else { char buf[sizeof (scnhdr_int->s_name) + 1]; @@ -891,10 +880,11 @@ coff_swap_scnhdr_out (abfd, in, out) (_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"), bfd_get_filename (abfd), buf, scnhdr_int->s_nlnno); - PUTHALF (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nlnno); + PUT_SCNHDR_NLNNO(abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nlnno); } - if (scnhdr_int->s_nreloc <= 0xffff) - PUTHALF(abfd, scnhdr_int->s_nreloc, (bfd_byte *) scnhdr_ext->s_nreloc); + if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC) + PUT_SCNHDR_NRELOC(abfd, scnhdr_int->s_nreloc, + (bfd_byte *) scnhdr_ext->s_nreloc); else { char buf[sizeof (scnhdr_int->s_name) + 1]; @@ -905,7 +895,7 @@ coff_swap_scnhdr_out (abfd, in, out) bfd_get_filename (abfd), buf, scnhdr_int->s_nreloc); bfd_set_error (bfd_error_file_truncated); - PUTHALF (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc); + PUT_SCNHDR_NRELOC(abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc); ret = 0; } #endif diff --git a/contrib/binutils/bfd/config.bfd b/contrib/binutils/bfd/config.bfd index 3adc5ae..cd4abc3 100755 --- a/contrib/binutils/bfd/config.bfd +++ b/contrib/binutils/bfd/config.bfd @@ -32,10 +32,15 @@ alpha*) targ_archs=bfd_alpha_arch ;; arm*) targ_archs=bfd_arm_arch ;; strongarm*) targ_archs=bfd_arm_arch ;; thumb*) targ_archs=bfd_arm_arch ;; +xscale*) targ_archs=bfd_arm_arch ;; c30*) targ_archs=bfd_tic30_arch ;; +c54x*) targ_archs=bfd_tic54x_arch ;; hppa*) targ_archs=bfd_hppa_arch ;; +x86_64) targ_archs=bfd_i386_arch ;; i[3456]86) targ_archs=bfd_i386_arch ;; i370) targ_archs=bfd_i370_arch ;; +m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch" ;; +m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;; m68*) targ_archs=bfd_m68k_arch ;; m88*) targ_archs=bfd_m88k_arch ;; mips*) targ_archs=bfd_mips_arch ;; @@ -79,7 +84,15 @@ case "${targ}" in alpha*-*-*) targ_defvec=ecoffalpha_little_vec ;; - sparc64-*-netbsd*) + ia64*-*-freebsd* | ia64*-*-linux-gnu* | ia64*-*-elf*) + targ_defvec=bfd_elf64_ia64_little_vec + targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec" + ;; + ia64*-*-hpux*) + targ_defvec=bfd_elf64_ia64_big_vec + targ_selvecs="bfd_elf32_ia64_big_vec" + ;; + sparc64-*-freebsd* | sparc64-*-netbsd*) targ_defvec=bfd_elf64_sparc_vec targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" ;; @@ -113,7 +126,7 @@ case "${targ}" in targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec" targ_underscore=yes ;; - arm-*-aout | armel-*-aout) + arm-*-aout | armel-*-aout) targ_defvec=aout_arm_little_vec targ_selvecs=aout_arm_big_vec ;; @@ -126,11 +139,15 @@ case "${targ}" in targ_selvecs=armcoff_big_vec targ_underscore=yes ;; + arm-*-rtems*) + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; armeb-*-elf | arm*b-*-linux-gnu*) targ_defvec=bfd_elf32_bigarm_vec targ_selvecs=bfd_elf32_littlearm_vec ;; - arm-*-elf | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux*) + arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux*) targ_defvec=bfd_elf32_littlearm_vec targ_selvecs=bfd_elf32_bigarm_vec ;; @@ -171,9 +188,18 @@ case "${targ}" in targ_selvecs=armcoff_big_vec targ_underscore=yes ;; + xscale-*-elf) + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; + xscale-*-coff) + targ_defvec=armcoff_little_vec + targ_selvecs=armcoff_big_vec + targ_underscore=yes + ;; a29k-*-ebmon* | a29k-*-udi* | a29k-*-coff* | a29k-*-sym1* | \ - a29k-*-vxworks* | a29k-*-sysv*) + a29k-*-vxworks* | a29k-*-sysv* | a29k-*rtems*) targ_defvec=a29kcoff_big_vec targ_selvecs=sunos_big_vec targ_underscore=yes @@ -194,6 +220,18 @@ case "${targ}" in targ_defvec=tic30_coff_vec ;; + c54x*-*-*coff* | tic54x-*-*coff*) + targ_defvec=tic54x_coff1_vec + targ_selvecs="tic54x_coff1_beh_vec tic54x_coff2_vec tic54x_coff2_beh_vec tic54x_coff0_vec tic54x_coff0_beh_vec" + targ_underscore=yes + ;; + + cris-*-*) + targ_defvec=cris_aout_vec + targ_selvecs="bfd_elf32_us_cris_vec bfd_elf32_cris_vec ieee_vec" + targ_underscore=yes # Note: not true for bfd_elf32_cris_vec. + ;; + d10v-*-*) targ_defvec=bfd_elf32_d10v_vec ;; @@ -217,27 +255,39 @@ case "${targ}" in targ_underscore=yes ;; -#if 0 /* HPPA ELF does not work currently. */ - hppa*-*-*elf* | hppa*-*-linux-gnu* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems*) - targ_defvec=bfd_elf32_hppa_vec +#ifdef BFD64 + hppa*64*-*-linux-gnu*) + targ_defvec=bfd_elf64_hppa_linux_vec + targ_selvecs=bfd_elf64_hppa_vec + ;; + hppa*64*-*-hpux11*) + targ_defvec=bfd_elf64_hppa_vec + targ_selvecs=bfd_elf64_hppa_linux_vec + targ_cflags=-DHPUX_LARGE_AR_IDS ;; #endif + + hppa*-*-linux-gnu*) + targ_defvec=bfd_elf32_hppa_linux_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; + hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems*) + targ_defvec=bfd_elf32_hppa_vec + targ_selvecs=bfd_elf32_hppa_linux_vec + ;; + #if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) || defined (HOST_HPPAMPEIX) -#if 0 /* HPPA ELF does not work currently. */ hppa*-*-bsd*) targ_defvec=som_vec targ_selvecs=bfd_elf32_hppa_vec ;; -#endif hppa*-*-hpux* | hppa*-*-hiux* | hppa*-*-mpeix*) targ_defvec=som_vec ;; -#if 0 /* HPPA ELF does not work currently. */ hppa*-*-osf*) targ_defvec=som_vec targ_selvecs=bfd_elf32_hppa_vec ;; -#endif #endif /* defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF) */ i370-*-*) @@ -254,6 +304,13 @@ case "${targ}" in targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec ;; + i[3456]86-*-rtemself*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs="i386coff_vec i386aout_vec" + ;; + i[3456]86-*-chorus*) + targ_defvec=bfd_elf32_i386_vec + ;; i[3456]86-*-msdosdjgpp* | i[3456]*-*-go32* | i[3456]86-go32-rtems* ) targ_defvec=go32coff_vec targ_selvecs="go32stubbedcoff_vec i386aout_vec" @@ -262,14 +319,10 @@ case "${targ}" in i[3456]86-*-aix*) targ_defvec=i386coff_vec ;; - i[3456]86-*-rtemscoff*) + i[3456]86*-*-rtems*) targ_defvec=i386coff_vec targ_selvecs="bfd_elf32_i386_vec i386aout_vec" ;; - i[3456]86-*-rtemself* | i[3456]86*-*-rtems*) - targ_defvec=bfd_elf32_i386_vec - targ_selvecs="i386coff_vec i386aout_vec" - ;; i[3456]86-sequent-bsd*) targ_defvec=i386dynix_vec targ_underscore=yes @@ -288,9 +341,13 @@ case "${targ}" in targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec ;; - i[3456]86-*-netbsd* | i[3456]86-*-openbsd*) + i[3456]86-*-netbsdelf*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs=i386netbsd_vec + ;; + i[3456]86-*-netbsdaout* | i[3456]86-*-netbsd* | i[3456]86-*-openbsd*) targ_defvec=i386netbsd_vec - targ_selvecs=i386bsd_vec + targ_selvecs="bfd_elf32_i386_vec i386bsd_vec" targ_underscore=yes ;; i[3456]86-*-netware*) @@ -304,8 +361,18 @@ case "${targ}" in ;; i[3456]86-*-linux-gnu*) targ_defvec=bfd_elf32_i386_vec - targ_selvecs=i386linux_vec + targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec" ;; +#ifdef BFD64 + x86_64-*-freebsd*) + targ_defvec=bfd_elf64_x86_64_vec + targ_selvecs="bfd_elf32_i386_vec i386coff_vec bfd_efi_app_ia32_vec" + ;; + x86_64-*-linux-gnu*) + targ_defvec=bfd_elf64_x86_64_vec + targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec" + ;; +#endif i[3456]86-*-lynxos*) targ_defvec=i386lynx_coff_vec targ_selvecs=i386lynx_aout_vec @@ -357,10 +424,18 @@ case "${targ}" in targ_defvec=i386aout_vec targ_underscore=yes ;; + i[3456]86-*-chaos) + targ_defvec=bfd_elf32_i386_vec + targ_selfvecs=i386chaos_vec + ;; i860-*-mach3* | i860-*-osf1* | i860-*-coff*) targ_defvec=i860coff_vec ;; + i860-stardent-sysv4* | i860-stardent-elf*) + targ_defvec=bfd_elf32_i860_little_vec + targ_selvecs="bfd_elf32_i860_vec bfd_elf32_i860_little_vec" + ;; i860-*-sysv4* | i860-*-elf*) targ_defvec=bfd_elf32_i860_vec ;; @@ -370,12 +445,7 @@ case "${targ}" in targ_selvecs="b_out_vec_big_host icoff_little_vec icoff_big_vec ieee_vec" targ_underscore=yes ;; - i960-*-rtemself*) - targ_defvec=bfd_elf32_i960_vec - targ_selvecs="icoff_big_vec b_out_vec_little_host b_out_vec_big_host ieee_vec" - targ_underscore=yes - ;; - i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv* | i960-*-rtemscoff* | i960-*-rtems*) + i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv* | i960-*-rtems*) targ_defvec=icoff_little_vec targ_selvecs="icoff_big_vec b_out_vec_little_host b_out_vec_big_host ieee_vec" targ_underscore=yes @@ -394,6 +464,15 @@ case "${targ}" in targ_defvec=bfd_elf32_m32r_vec ;; + m68hc11-*-* | m6811-*-*) + targ_defvec=bfd_elf32_m68hc11_vec + targ_selvecs="bfd_elf32_m68hc11_vec bfd_elf32_m68hc12_vec" + ;; + m68hc12-*-* | m6812-*-*) + targ_defvec=bfd_elf32_m68hc12_vec + targ_selvecs="bfd_elf32_m68hc11_vec bfd_elf32_m68hc12_vec" + ;; + m68*-apollo-*) targ_defvec=apollocoff_vec ;; @@ -420,16 +499,10 @@ case "${targ}" in targ_defvec=bfd_elf32_m68k_vec targ_selvecs="m68kcoff_vec ieee_vec" ;; - m68*-*-rtemscoff*) - # same as m68k-coff with some extra targets + m68*-*-rtems*) targ_defvec=m68kcoff_vec targ_selvecs="m68kcoff_vec versados_vec ieee_vec aout0_big_vec" ;; - m68*-*-rtems* | m68*-*-rtemself*) - # same as m68k-elf with some extra targets - targ_defvec=bfd_elf32_m68k_vec - targ_selvecs="m68kcoff_vec versados_vec ieee_vec aout0_big_vec" - ;; m68*-*-coff* | m68*-*-sysv*) targ_defvec=m68kcoff_vec targ_selvecs="m68kcoff_vec versados_vec ieee_vec" @@ -565,14 +638,14 @@ case "${targ}" in targ_underscore=yes ;; mips*-*-sysv4*) - targ_defvec=bfd_elf32_bigmips_vec - targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec" + targ_defvec=bfd_elf32_tradbigmips_vec + targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" ;; mips*-*-sysv* | mips*-*-riscos*) targ_defvec=ecoff_big_vec targ_selvecs=ecoff_little_vec ;; - mips*el-*-elf* | mips*el-*-rtems* | mips*el-*-vxworks*) + mips*el-*-elf* | mips*el-*-rtems* | mips*el-*-vxworks* | mips*-*-chorus*) targ_defvec=bfd_elf32_littlemips_vec targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec" ;; @@ -622,10 +695,11 @@ case "${targ}" in powerpc-*-aix* | powerpc-*-beos*) targ_defvec=rs6000coff_vec + targ_selvecs="rs6000coff64_vec" ;; powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \ - powerpc-*-vxworks*) + powerpc-*-chorus* | powerpc-*-vxworks*) targ_defvec=bfd_elf32_powerpc_vec targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec" ;; @@ -652,6 +726,11 @@ case "${targ}" in targ_defvec=rs6000coff_vec ;; + sh-*-linux*) + targ_defvec=bfd_elf32_shblin_vec + targ_selvecs=bfd_elf32_shlin_vec + ;; + sh-*-elf* | sh-*-rtemself*) targ_defvec=bfd_elf32_sh_vec targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" @@ -662,7 +741,7 @@ case "${targ}" in targ_selvecs="shlpe_vec shlpei_vec" targ_underscore=yes ;; - sh-*-* | sh-*-rtemscoff* | sh-*-rtems*) + sh-*-* | sh-*-rtems*) targ_defvec=shcoff_vec targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec" targ_underscore=yes @@ -680,6 +759,9 @@ case "${targ}" in sparclite-*-elf* | sparc86x-*-elf*) targ_defvec=bfd_elf32_sparc_vec ;; + sparc*-*-chorus*) + targ_defvec=bfd_elf32_sparc_vec + ;; sparc-*-linux*aout*) targ_defvec=sparclinux_vec targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" @@ -735,7 +817,7 @@ case "${targ}" in sparc64-*-elf*) targ_defvec=bfd_elf64_sparc_vec targ_selvecs=bfd_elf32_sparc_vec - ;; + ;; #endif /* BFD64 */ sparc*-*-coff*) targ_defvec=sparccoff_vec @@ -749,7 +831,7 @@ case "${targ}" in targ_defvec=bfd_elf32_sparc_vec targ_selvecs="sunos_big_vec sparccoff_vec" ;; - sparc*-*-*) + sparc*-*-* | sparc*-*-rtems*) targ_defvec=sunos_big_vec targ_underscore=yes ;; diff --git a/contrib/binutils/bfd/config.in b/contrib/binutils/bfd/config.in index 7383656..74af3d3 100644 --- a/contrib/binutils/bfd/config.in +++ b/contrib/binutils/bfd/config.in @@ -25,9 +25,6 @@ /* 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 @@ -211,21 +208,42 @@ /* Define if has prstatus_t. */ #undef HAVE_PRSTATUS_T +/* Define if has prstatus32_t. */ +#undef HAVE_PRSTATUS32_T + /* Define if has prstatus_t.pr_who. */ #undef HAVE_PRSTATUS_T_PR_WHO +/* Define if has prstatus32_t.pr_who. */ +#undef HAVE_PRSTATUS32_T_PR_WHO + /* Define if has pstatus_t. */ #undef HAVE_PSTATUS_T +/* Define if has pxstatus_t. */ +#undef HAVE_PXSTATUS_T + +/* Define if has pstatus32_t. */ +#undef HAVE_PSTATUS32_T + /* Define if has prpsinfo_t. */ #undef HAVE_PRPSINFO_T +/* Define if has prpsinfo32_t. */ +#undef HAVE_PRPSINFO32_T + /* Define if has psinfo_t. */ #undef HAVE_PSINFO_T +/* Define if has psinfo32_t. */ +#undef HAVE_PSINFO32_T + /* Define if has lwpstatus_t. */ #undef HAVE_LWPSTATUS_T +/* Define if has lwpxstatus_t. */ +#undef HAVE_LWPXSTATUS_T + /* Define if has lwpstatus_t.pr_context. */ #undef HAVE_LWPSTATUS_T_PR_CONTEXT diff --git a/contrib/binutils/bfd/configure b/contrib/binutils/bfd/configure index 89f979e..d348425 100755 --- a/contrib/binutils/bfd/configure +++ b/contrib/binutils/bfd/configure @@ -22,6 +22,8 @@ ac_help="$ac_help ac_help="$ac_help --disable-libtool-lock avoid locking (might break parallel builds)" ac_help="$ac_help + --with-pic try to use only PIC/non-PIC objects [default=use both]" +ac_help="$ac_help --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" ac_help="$ac_help --enable-targets alternative target configurations" @@ -30,6 +32,8 @@ ac_help="$ac_help ac_help="$ac_help --with-mmap try using mmap for BFD input files if available" ac_help="$ac_help + --enable-build-warnings Enable build-time compiler warnings if gcc is used" +ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" ac_help="$ac_help @@ -53,6 +57,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -167,6 +172,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -337,6 +343,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -502,12 +513,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -545,6 +560,68 @@ else ac_n= ac_c='\c' ac_t= fi +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:565: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:598: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes ac_aux_dir= @@ -594,7 +671,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:598: checking host system type" >&5 +echo "configure:675: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -615,7 +692,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:619: checking target system type" >&5 +echo "configure:696: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -633,7 +710,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:637: checking build system type" >&5 +echo "configure:714: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -655,316 +732,116 @@ 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:662: 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:692: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + 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 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. + ac_save_LIBS="$LIBS" +LIBS="-lcposix $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" 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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi +rm -f conftest* +LIBS="$ac_save_LIBS" + fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lcposix" 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:743: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./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 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+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 + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac 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 + IFS="$ac_save_IFS" + fi - ;; - esac + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi +echo "$ac_t""$INSTALL" 1>&6 -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:775: 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 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -cat > conftest.$ac_ext << EOF +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' -#line 786 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:791: \"$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:817: 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:822: 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:850: 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 - -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:882: 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 - 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 -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./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:915: 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 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:968: checking whether build environment is sane" >&5 +echo "configure:845: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1021,7 +898,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:1025: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:902: 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 @@ -1050,7 +927,7 @@ fi PACKAGE=bfd -VERSION=2.10.1 +VERSION=2.11 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; } @@ -1067,7 +944,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1071: checking for working aclocal" >&5 +echo "configure:948: 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. @@ -1080,7 +957,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1084: checking for working autoconf" >&5 +echo "configure:961: 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. @@ -1093,7 +970,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1097: checking for working automake" >&5 +echo "configure:974: 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. @@ -1106,7 +983,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1110: checking for working autoheader" >&5 +echo "configure:987: 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. @@ -1119,7 +996,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1123: checking for working makeinfo" >&5 +echo "configure:1000: 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. @@ -1142,7 +1019,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:1146: checking for $ac_word" >&5 +echo "configure:1023: 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 @@ -1174,7 +1051,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:1178: checking for $ac_word" >&5 +echo "configure:1055: 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 @@ -1206,7 +1083,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:1210: checking for $ac_word" >&5 +echo "configure:1087: 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 @@ -1309,187 +1186,866 @@ else enable_fast_install=yes fi -# Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 +# 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:1316: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then +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 "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. + 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_RANLIB="ranlib" + ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes -else - with_gnu_ld=no -fi - -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:1355: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1379: checking for GNU ld" >&5 -else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1382: checking for non-GNU ld" >&5 -fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+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: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 -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do + 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_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break + 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" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. +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" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +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 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case "$ac_prog" in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + 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 +else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +echo "configure:1457: 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 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + ac_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + ac_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + LD="$ac_cv_path_LD" if test -n "$LD"; then echo "$ac_t""$LD" 1>&6 else echo "$ac_t""no" 1>&6 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:1417: checking if the linker ($LD) is GNU ld" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then +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 +if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 +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 +if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_ld_reload_flag='-r' +fi + +echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 +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 +if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$NM"; then + # Let the user override the test. + ac_cv_path_NM="$NM" +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/${ac_tool_prefix}nm + if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then + ac_cv_path_NM="$tmp_nm -B" + break + elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$tmp_nm -p" + break + else + ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm +fi +fi + +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 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 +echo "configure:1580: 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 + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [regex]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given egrep regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case "$host_os" in +aix4*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi4*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin* | mingw* |pw32*) + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +freebsd* ) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case "$host_cpu" in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20*) + # TODO: Does this work for hpux-11 too? + lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + +irix5* | irix6*) + case "$host_os" in + irix5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case "$LD" in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux-gnu*) + case "$host_cpu" in + alpha* | i*86 | powerpc* | sparc* | ia64* ) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : + else + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case "$host_vendor" in + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + esac + ;; +esac + +fi + +echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 +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 +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 + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1749: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +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 + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# Only perform the check for file, if the check method requires it +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 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +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 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 else - ac_cv_prog_gnu_ld=no + echo "$ac_t""no" 1>&6 fi + + else + MAGIC_CMD=: + fi fi -echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + fi + ;; +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 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi -echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1433: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then +if test -z "$ac_cv_prog_RANLIB"; then +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 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + 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/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 fi -NM="$ac_cv_path_NM" -echo "$ac_t""$NM" 1>&6 +else + RANLIB=":" +fi +fi -echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1469: checking whether ln -s works" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then +# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1986: 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 - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else - ac_cv_prog_LN_S=ln + 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_STRIP="${ac_tool_prefix}strip" + break + fi + done + IFS="$ac_save_ifs" fi fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 else echo "$ac_t""no" 1>&6 fi -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac +if test -z "$ac_cv_prog_STRIP"; then +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 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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_STRIP="strip" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + STRIP=":" +fi +fi + # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" @@ -1509,13 +2065,24 @@ fi test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi + +test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" +test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" + # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$lt_target" in +case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1518 "configure"' > conftest.$ac_ext - if { (eval echo configure:1519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 2085 "configure"' > conftest.$ac_ext + if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1536,19 +2103,27 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1540: checking whether the C compiler needs -belf" >&5 +echo "configure:2107: 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 - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2127: \"$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 @@ -1558,6 +2133,13 @@ else lt_cv_cc_needs_belf=no fi rm -f 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 + fi echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 @@ -1621,12 +2203,14 @@ rm -f confcache # Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ +AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ +objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ +deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig @@ -1640,7 +2224,7 @@ fi # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -1650,6 +2234,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' exec 5>>./config.log + + + + + + # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given. if test "${enable_64_bit_bfd+set}" = set; then enableval="$enable_64_bit_bfd" @@ -1692,6 +2282,29 @@ else want_mmap=false fi +build_warnings="-W -Wall" +# Check whether --enable-build-warnings or --disable-build-warnings was given. +if test "${enable_build_warnings+set}" = set; then + enableval="$enable_build_warnings" + case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi +fi +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi + + @@ -1720,94 +2333,32 @@ 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:1724: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:2337: 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" USE_MAINTAINER_MODE=$enableval else - USE_MAINTAINER_MODE=no -fi - - echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 - - -if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - MAINT=$MAINTAINER_MODE_TRUE - - -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:1747: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:1780: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no + USE_MAINTAINER_MODE=no fi -rm -f conftest* -rm -f conftest* + + echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= fi + MAINT=$MAINTAINER_MODE_TRUE + -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1811: checking for executable suffix" >&5 +echo "configure:2362: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1817,10 +2368,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -1846,7 +2397,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:1850: checking for $ac_word" >&5 +echo "configure:2401: 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 @@ -1876,7 +2427,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:1880: checking for $ac_word" >&5 +echo "configure:2431: 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 @@ -1927,7 +2478,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:1931: checking for $ac_word" >&5 +echo "configure:2482: 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 @@ -1959,7 +2510,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2514: 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. @@ -1970,12 +2521,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1974 "configure" +#line 2525 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2530: \"$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 @@ -2001,12 +2552,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:2005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2556: 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:2010: checking whether we are using GNU C" >&5 +echo "configure:2561: 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 @@ -2015,7 +2566,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2019: \"$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:2570: \"$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 @@ -2034,7 +2585,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:2038: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2589: 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 @@ -2068,7 +2619,7 @@ fi ALL_LINGUAS= echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2072: checking how to run the C preprocessor" >&5 +echo "configure:2623: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2083,13 +2634,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:2093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2644: \"$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 : @@ -2100,13 +2651,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:2110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2661: \"$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 : @@ -2117,13 +2668,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:2127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2678: \"$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 : @@ -2147,13 +2698,43 @@ else fi 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 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2152: checking for ANSI C header files" >&5 +echo "configure:2733: 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 @@ -2161,7 +2742,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2746: \"$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* @@ -2178,7 +2759,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 @@ -2196,7 +2777,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 @@ -2217,7 +2798,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2228,7 +2809,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2252,18 +2833,18 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2256: checking for working const" >&5 +echo "configure:2837: 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:2891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2327,21 +2908,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2331: checking for inline" >&5 +echo "configure:2912: 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:2926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2367,12 +2948,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2371: checking for off_t" >&5 +echo "configure:2952: 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 @@ -2400,12 +2981,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2404: checking for size_t" >&5 +echo "configure:2985: 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 @@ -2435,19 +3016,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:2439: checking for working alloca.h" >&5 +echo "configure:3020: 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() { -void *p = alloca(2 * sizeof(int)); +char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3032: \"$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 @@ -2468,12 +3049,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2472: checking for alloca" >&5 +echo "configure:3053: 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:3086: \"$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 @@ -2533,12 +3114,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2537: checking whether alloca needs Cray hooks" >&5 +echo "configure:3118: 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:2567: checking for $ac_func" >&5 +echo "configure:3148: 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:3176: \"$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 @@ -2618,7 +3199,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2622: checking stack direction for C alloca" >&5 +echo "configure:3203: 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 @@ -2626,7 +3207,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:3230: \"$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 @@ -2670,17 +3251,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:2674: checking for $ac_hdr" >&5 +echo "configure:3255: 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:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3265: \"$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* @@ -2709,12 +3290,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2713: checking for $ac_func" >&5 +echo "configure:3294: 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:3322: \"$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 @@ -2762,7 +3343,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2766: checking for working mmap" >&5 +echo "configure:3347: 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 @@ -2770,7 +3351,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include #include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -2860,7 +3438,7 @@ main() /* * First, make a file with some known garbage in it. */ - data = (char*)malloc(pagesize); + data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) @@ -2881,7 +3459,7 @@ main() fd = open("conftestmmap", O_RDWR); if (fd < 0) exit(1); - data2 = (char*)malloc(2 * pagesize); + data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); @@ -2899,7 +3477,7 @@ main() */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; - data3 = (char*)malloc(pagesize); + data3 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) @@ -2913,7 +3491,7 @@ main() } EOF -if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3495: \"$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 @@ -2941,17 +3519,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:2945: checking for $ac_hdr" >&5 +echo "configure:3523: 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:2955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3533: \"$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* @@ -2981,12 +3559,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2985: checking for $ac_func" >&5 +echo "configure:3563: 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:3591: \"$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 @@ -3038,12 +3616,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3042: checking for $ac_func" >&5 +echo "configure:3620: 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:3648: \"$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 @@ -3100,19 +3678,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3104: checking for LC_MESSAGES" >&5 +echo "configure:3682: 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:3116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3694: \"$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 @@ -3133,7 +3711,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3137: checking whether NLS is requested" >&5 +echo "configure:3715: 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" @@ -3153,7 +3731,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3157: checking whether included gettext is requested" >&5 +echo "configure:3735: 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" @@ -3172,17 +3750,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3176: checking for libintl.h" >&5 +echo "configure:3754: 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:3186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3764: \"$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* @@ -3199,19 +3777,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:3203: checking for gettext in libc" >&5 +echo "configure:3781: 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:3215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3793: \"$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 @@ -3227,7 +3805,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:3231: checking for bindtextdomain in -lintl" >&5 +echo "configure:3809: 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 @@ -3235,7 +3813,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:3828: \"$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 @@ -3262,19 +3840,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:3266: checking for gettext in libintl" >&5 +echo "configure:3844: 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:3856: \"$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 @@ -3302,7 +3880,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:3306: checking for $ac_word" >&5 +echo "configure:3884: 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 @@ -3336,12 +3914,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3340: checking for $ac_func" >&5 +echo "configure:3918: 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:3946: \"$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 @@ -3391,7 +3969,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:3395: checking for $ac_word" >&5 +echo "configure:3973: 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 @@ -3427,7 +4005,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:3431: checking for $ac_word" >&5 +echo "configure:4009: 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 @@ -3459,7 +4037,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3499,7 +4077,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:3503: checking for $ac_word" >&5 +echo "configure:4081: 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 @@ -3533,7 +4111,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:3537: checking for $ac_word" >&5 +echo "configure:4115: 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 @@ -3569,7 +4147,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:3573: checking for $ac_word" >&5 +echo "configure:4151: 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 @@ -3659,7 +4237,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3663: checking for catalogs to be installed" >&5 +echo "configure:4241: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -3687,17 +4265,17 @@ echo "configure:3663: 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:3691: checking for linux/version.h" >&5 +echo "configure:4269: 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:3701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4279: \"$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* @@ -3775,7 +4353,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:3779: checking for a BSD compatible install" >&5 +echo "configure:4357: 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 @@ -3858,7 +4436,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:3862: checking for build system executable suffix" >&5 +echo "configure:4440: 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 @@ -3886,17 +4464,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:3890: checking for $ac_hdr" >&5 +echo "configure:4468: 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:3900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4478: \"$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* @@ -3926,17 +4504,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:3930: checking for $ac_hdr" >&5 +echo "configure:4508: 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:3940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4518: \"$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* @@ -3963,12 +4541,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3967: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:4545: 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 @@ -3977,7 +4555,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4002,12 +4580,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:4006: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4584: 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> @@ -4015,7 +4593,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4040,7 +4618,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:4044: checking for opendir in -ldir" >&5 +echo "configure:4622: 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 @@ -4048,7 +4626,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:4641: \"$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 @@ -4081,7 +4659,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:4085: checking for opendir in -lx" >&5 +echo "configure:4663: 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 @@ -4089,7 +4667,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:4682: \"$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 @@ -4125,12 +4703,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:4129: checking for $ac_func" >&5 +echo "configure:4707: 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:4735: \"$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 @@ -4188,12 +4766,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4192: checking whether strstr must be declared" >&5 +echo "configure:4770: 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 < @@ -4214,7 +4792,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4235,12 +4813,12 @@ EOF fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:4239: checking whether malloc must be declared" >&5 +echo "configure:4817: 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 < @@ -4261,7 +4839,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -4282,12 +4860,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:4286: checking whether realloc must be declared" >&5 +echo "configure:4864: 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 < @@ -4308,7 +4886,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -4329,12 +4907,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:4333: checking whether free must be declared" >&5 +echo "configure:4911: 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 < @@ -4355,7 +4933,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4937: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4376,12 +4954,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4380: checking whether getenv must be declared" >&5 +echo "configure:4958: 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 < @@ -4402,7 +4980,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -4429,13 +5007,16 @@ COREFLAG= TRAD_HEADER= if test "${target}" = "${host}"; then case "${host}" in + alpha*-*-freebsd*) + COREFILE='' + ;; alpha*-*-linux-gnu*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/alphalinux.h"' ;; alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;; - alpha*-*-freebsd*) ;; alpha*-*-*) COREFILE=osf-core.lo ;; + arm-*-freebsd*) COREFILE='' ;; arm-*-riscix) COREFILE=trad-core.lo ;; hppa*-*-hpux*) COREFILE=hpux-core.lo ;; hppa*-*-hiux*) COREFILE=hpux-core.lo ;; @@ -4456,10 +5037,14 @@ if test "${target}" = "${host}"; then COREFILE=trad-core.lo TRAD_HEADER='"hosts/symmetry.h"' ;; - i[3456]86-*-bsd* | i[3456]86-*-freebsd*) + i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/i386bsd.h"' ;; + i[3456]86-*-freebsd*) + COREFILE='' + TRAD_HEADER='"hosts/i386bsd.h"' + ;; i[3456]86-*-netbsd* | i[3456]86-*-openbsd*) COREFILE=netbsd-core.lo ;; @@ -4561,12 +5146,17 @@ if test "${target}" = "${host}"; then COREFILE=netbsd-core.lo ;; rs6000-*-lynx*) COREFILE=lynx-core.lo ;; + rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) + COREFILE=rs6000-core.lo + COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" + ;; 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 ;; sparc-*-netbsd* | sparc-*-openbsd*) COREFILE=netbsd-core.lo @@ -4609,17 +5199,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:4613: checking for $ac_hdr" >&5 +echo "configure:5203: 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:4623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5213: \"$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* @@ -4647,19 +5237,21 @@ 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:4651: checking for prstatus_t in sys/procfs.h" >&5 +echo "configure:5241: 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 < int main() { prstatus_t avar ; return 0; } EOF -if { (eval echo configure:4663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -4680,20 +5272,58 @@ EOF fi 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 + 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 < +int main() { +prstatus32_t avar +; return 0; } +EOF +if { (eval echo configure:5291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prstatus32_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prstatus32_t=no + +fi +rm -f conftest* +fi + + if test $bfd_cv_have_sys_procfs_type_prstatus32_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRSTATUS32_T 1 +EOF + + fi + 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:4685: checking for prstatus_t.pr_who in sys/procfs.h" >&5 +echo "configure:5313: 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 < int main() { prstatus_t avar; void* aref = (void*) &avar.pr_who ; return 0; } EOF -if { (eval echo configure:4697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5327: \"$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 @@ -4714,20 +5344,58 @@ EOF fi 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 + 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 < +int main() { +prstatus32_t avar; void* aref = (void*) &avar.pr_who +; return 0; } +EOF +if { (eval echo configure:5363: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=no + +fi +rm -f conftest* +fi + + if test $bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRSTATUS32_T_PR_WHO 1 +EOF + + fi + 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:4719: checking for pstatus_t in sys/procfs.h" >&5 +echo "configure:5385: 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 < int main() { pstatus_t avar ; return 0; } EOF -if { (eval echo configure:4731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -4748,20 +5416,94 @@ EOF fi 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 + 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 < +int main() { +pxstatus_t avar +; return 0; } +EOF +if { (eval echo configure:5435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_pxstatus_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_pxstatus_t=no + +fi +rm -f conftest* +fi + + if test $bfd_cv_have_sys_procfs_type_pxstatus_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PXSTATUS_T 1 +EOF + + fi + 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 + 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 < +int main() { +pstatus32_t avar +; return 0; } +EOF +if { (eval echo configure:5471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_pstatus32_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_pstatus32_t=no + +fi +rm -f conftest* +fi + + if test $bfd_cv_have_sys_procfs_type_pstatus32_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PSTATUS32_T 1 +EOF + + fi + 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:4753: checking for prpsinfo_t in sys/procfs.h" >&5 +echo "configure:5493: 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 < int main() { prpsinfo_t avar ; return 0; } EOF -if { (eval echo configure:4765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -4782,20 +5524,58 @@ EOF fi 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 + 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 < +int main() { +prpsinfo32_t avar +; return 0; } +EOF +if { (eval echo configure:5543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_prpsinfo32_t=no + +fi +rm -f conftest* +fi + + if test $bfd_cv_have_sys_procfs_type_prpsinfo32_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PRPSINFO32_T 1 +EOF + + fi + 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:4787: checking for psinfo_t in sys/procfs.h" >&5 +echo "configure:5565: 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 < int main() { psinfo_t avar ; return 0; } EOF -if { (eval echo configure:4799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -4816,20 +5596,58 @@ EOF fi 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 + 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 < +int main() { +psinfo32_t avar +; return 0; } +EOF +if { (eval echo configure:5615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_psinfo32_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_psinfo32_t=no + +fi +rm -f conftest* +fi + + if test $bfd_cv_have_sys_procfs_type_psinfo32_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PSINFO32_T 1 +EOF + + fi + 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:4821: checking for lwpstatus_t in sys/procfs.h" >&5 +echo "configure:5637: 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 < int main() { lwpstatus_t avar ; return 0; } EOF -if { (eval echo configure:4833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -4850,20 +5668,58 @@ EOF fi 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 + 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 < +int main() { +lwpxstatus_t avar +; return 0; } +EOF +if { (eval echo configure:5687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + bfd_cv_have_sys_procfs_type_lwpxstatus_t=no + +fi +rm -f conftest* +fi + + if test $bfd_cv_have_sys_procfs_type_lwpxstatus_t = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LWPXSTATUS_T 1 +EOF + + fi + 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:4855: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 +echo "configure:5709: 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 < int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_context ; return 0; } EOF -if { (eval echo configure:4867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5723: \"$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 @@ -4885,19 +5741,21 @@ 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:4889: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 +echo "configure:5745: 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 < int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_reg ; return 0; } EOF -if { (eval echo configure:4901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5759: \"$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 @@ -4919,19 +5777,21 @@ 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:4923: checking for win32_pstatus_t in sys/procfs.h" >&5 +echo "configure:5781: 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 < int main() { win32_pstatus_t avar ; return 0; } EOF -if { (eval echo configure:4935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -4956,10 +5816,12 @@ EOF fi -cat >> confdefs.h <> confdefs.h <&6 -echo "configure:5295: checking for $ac_hdr" >&5 +echo "configure:6189: 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:5305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6199: \"$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* @@ -5330,12 +6224,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5334: checking for $ac_func" >&5 +echo "configure:6228: 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:6256: \"$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 @@ -5383,7 +6277,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:5387: checking for working mmap" >&5 +echo "configure:6281: 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 @@ -5391,7 +6285,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include #include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -5481,7 +6372,7 @@ main() /* * First, make a file with some known garbage in it. */ - data = (char*)malloc(pagesize); + data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) @@ -5502,7 +6393,7 @@ main() fd = open("conftestmmap", O_RDWR); if (fd < 0) exit(1); - data2 = (char*)malloc(2 * pagesize); + data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); @@ -5520,7 +6411,7 @@ main() */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; - data3 = (char*)malloc(pagesize); + data3 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) @@ -5534,7 +6425,7 @@ main() } EOF -if { (eval echo configure:5538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6429: \"$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 @@ -5559,12 +6450,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5563: checking for $ac_func" >&5 +echo "configure:6454: 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:6482: \"$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 @@ -5767,7 +6658,6 @@ 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 @@ -5781,12 +6671,16 @@ 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 +s%@STRIP@%$STRIP%g s%@LIBTOOL@%$LIBTOOL%g +s%@WARN_CFLAGS@%$WARN_CFLAGS%g s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g -s%@EXEEXT@%$EXEEXT%g s%@CPP@%$CPP%g s%@ALLOCA@%$ALLOCA%g s%@USE_NLS@%$USE_NLS%g diff --git a/contrib/binutils/bfd/configure.host b/contrib/binutils/bfd/configure.host index e24cd60..c72a4b3 100644 --- a/contrib/binutils/bfd/configure.host +++ b/contrib/binutils/bfd/configure.host @@ -27,6 +27,8 @@ hppa*-*-mpeix*) HDEFINES=-DHOST_HPPAMPEIX ;; hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;; hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;; +ia64-*-linux*) host64=true; HOST_64BIT_TYPE=long ;; + i[3456]86-sequent-bsd*) HDEFINES=-Dshared=genshared ;; i[3456]86-sequent-sysv4*) ;; i[3456]86-sequent-sysv*) HDEFINES=-Dshared=genshared ;; @@ -46,6 +48,10 @@ mips*-*-riscos*) HDEFINES="-G 4" ;; m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;; +*-*-aix*) HOST_64BIT_TYPE="long long" + HOST_U_64BIT_TYPE="unsigned long long" + ;; + *-*-solaris*) HOST_64BIT_TYPE="long long" HOST_U_64BIT_TYPE="unsigned long long" ;; diff --git a/contrib/binutils/bfd/configure.in b/contrib/binutils/bfd/configure.in index eac0a9e..eeb3eb7 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.10.1) +AM_INIT_AUTOMAKE(bfd, 2.11) dnl These must be called before AM_PROG_LIBTOOL, because it may want dnl to call AC_CHECK_PROG. @@ -50,6 +50,27 @@ AC_ARG_WITH(mmap, *) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;; esac],[want_mmap=false])dnl +build_warnings="-W -Wall" +AC_ARG_ENABLE(build-warnings, +[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], +[case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi])dnl +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi +AC_SUBST(WARN_CFLAGS) + AM_CONFIG_HEADER(config.h:config.in) if test -z "$target" ; then @@ -114,13 +135,16 @@ COREFLAG= TRAD_HEADER= if test "${target}" = "${host}"; then case "${host}" in + alpha*-*-freebsd*) + COREFILE='' + ;; alpha*-*-linux-gnu*) COREFILE=trad-core.lo TRAD_HEADER='"hosts/alphalinux.h"' ;; alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;; - alpha*-*-freebsd*) ;; alpha*-*-*) COREFILE=osf-core.lo ;; + arm-*-freebsd*) COREFILE='' ;; arm-*-riscix) COREFILE=trad-core.lo ;; hppa*-*-hpux*) COREFILE=hpux-core.lo ;; hppa*-*-hiux*) COREFILE=hpux-core.lo ;; @@ -146,12 +170,18 @@ changequote([,])dnl TRAD_HEADER='"hosts/symmetry.h"' ;; changequote(,)dnl - i[3456]86-*-bsd* | i[3456]86-*-freebsd*) + i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*) changequote([,])dnl COREFILE=trad-core.lo TRAD_HEADER='"hosts/i386bsd.h"' ;; changequote(,)dnl + i[3456]86-*-freebsd*) +changequote([,])dnl + COREFILE='' + TRAD_HEADER='"hosts/i386bsd.h"' + ;; +changequote(,)dnl i[3456]86-*-netbsd* | i[3456]86-*-openbsd*) changequote([,])dnl COREFILE=netbsd-core.lo @@ -266,12 +296,19 @@ changequote([,])dnl COREFILE=netbsd-core.lo ;; rs6000-*-lynx*) COREFILE=lynx-core.lo ;; +changequote(,)dnl + rs6000-*-aix4.[3-9]* | powerpc-*-aix4.[3-9]*) +changequote([,])dnl + COREFILE=rs6000-core.lo + COREFLAG="$COREFLAG -DAIX_CORE_DUMPX_CORE" + ;; 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 ;; sparc-*-netbsd* | sparc-*-openbsd*) COREFILE=netbsd-core.lo @@ -313,11 +350,18 @@ changequote([,])dnl AC_CHECK_HEADERS(sys/procfs.h) if test "$ac_cv_header_sys_procfs_h" = yes; then BFD_HAVE_SYS_PROCFS_TYPE(prstatus_t) + BFD_HAVE_SYS_PROCFS_TYPE(prstatus32_t) BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus_t, pr_who) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(prstatus32_t, pr_who) BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t) + BFD_HAVE_SYS_PROCFS_TYPE(pxstatus_t) + BFD_HAVE_SYS_PROCFS_TYPE(pstatus32_t) BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo_t) + BFD_HAVE_SYS_PROCFS_TYPE(prpsinfo32_t) BFD_HAVE_SYS_PROCFS_TYPE(psinfo_t) + BFD_HAVE_SYS_PROCFS_TYPE(psinfo32_t) BFD_HAVE_SYS_PROCFS_TYPE(lwpstatus_t) + BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t) BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context) BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg) BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t) @@ -325,8 +369,10 @@ changequote([,])dnl fi AC_SUBST(COREFILE) AC_SUBST(COREFLAG) -AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER, - [Name of host specific header file to include in trad-core.c.]) +if test -n "$TRAD_HEADER"; then + AC_DEFINE_UNQUOTED(TRAD_HEADER, $TRAD_HEADER, + [Name of host specific header file to include in trad-core.c.]) +fi # Horrible hacks to build DLLs on Windows. WIN32LDFLAGS= @@ -410,7 +456,7 @@ selarchs="$f" # Target backend .o files. tb= -elf="elf.lo elflink.lo dwarf2.lo dwarf1.lo" +elf="elf.lo elflink.lo dwarf1.lo" for vec in $selvecs do @@ -438,8 +484,19 @@ do apollocoff_vec) tb="$tb coff-apollo.lo" ;; b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;; b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;; + bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;; + bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo peigen.lo cofflink.lo" + target64=true ;; bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf" target64=true ;; + bfd_elf64_hppa_vec | bfd_elf64_hppa_linux_vec) + tb="$tb elf64-hppa.lo elf64.lo $elf" + target64=true ;; + bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf" + target64=true ;; + bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf" + target64=true ;; + bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;; bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;; bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;; bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;; @@ -451,19 +508,27 @@ do bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo" target64=true ;; + bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; + bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;; bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;; bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; - bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; + bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec) + tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; + bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf" + target64=true ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; + bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;; bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;; bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo" target64=true ;; bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; + bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;; + bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;; bfd_elf32_m68k_vec) tb="$tb elf32-m68k.lo elf32.lo $elf" ;; bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;; bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;; @@ -476,7 +541,11 @@ do bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;; bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;; + bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; + bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;; bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;; + bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; + bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;; bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;; bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf" target64=true ;; @@ -486,6 +555,7 @@ do 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" ;; demo_64_vec) tb="$tb demo64.lo aout64.lo" target64=true ;; ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;; @@ -528,14 +598,16 @@ do m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;; m68ksysvcoff_vec) tb="$tb coff-svm68k.lo cofflink.lo" ;; m88kbcs_vec) tb="$tb coff-m88k.lo" ;; - mipslpe_vec) tb="$tb pe-mips.lo cofflink.lo" ;; - mipslpei_vec) tb="$tb pei-mips.lo cofflink.lo" ;; + mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;; + mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;; mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;; mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;; newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;; nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;; + rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo" + target64=true ;; nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;; nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo" target64=true ;; @@ -554,8 +626,8 @@ do shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;; shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;; - shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo cofflink.lo" ;; - shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo cofflink.lo" ;; + shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; + shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;; som_vec) tb="$tb som.lo" ;; sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;; sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;; @@ -569,6 +641,12 @@ do tekhex_vec) tb="$tb tekhex.lo" ;; tic30_aout_vec) tb="$tb aout-tic30.lo" ;; tic30_coff_vec) tb="$tb coff-tic30.lo" ;; + tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;; + tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;; tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;; versados_vec) tb="$tb versados.lo" ;; vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo" diff --git a/contrib/binutils/bfd/corefile.c b/contrib/binutils/bfd/corefile.c index 212f519..061383f 100644 --- a/contrib/binutils/bfd/corefile.c +++ b/contrib/binutils/bfd/corefile.c @@ -30,7 +30,6 @@ DESCRIPTION #include "sysdep.h" #include "libbfd.h" - /* FUNCTION bfd_core_file_failing_command @@ -78,7 +77,6 @@ bfd_core_file_failing_signal (abfd) return BFD_SEND (abfd, _core_file_failing_signal, (abfd)); } - /* FUNCTION core_file_matches_executable_p diff --git a/contrib/binutils/bfd/cpu-alpha.c b/contrib/binutils/bfd/cpu-alpha.c index b89900b..48a16e3 100644 --- a/contrib/binutils/bfd/cpu-alpha.c +++ b/contrib/binutils/bfd/cpu-alpha.c @@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define NN(index) (&arch_info_struct[index]) /* These exist only so that we can resonably disassemble PALcode. */ -static const bfd_arch_info_type arch_info_struct[] = +static const bfd_arch_info_type arch_info_struct[] = { N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", false, NN(1)), N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", false, NN(2)), diff --git a/contrib/binutils/bfd/cpu-arm.c b/contrib/binutils/bfd/cpu-arm.c index bda9c44..91507f8 100644 --- a/contrib/binutils/bfd/cpu-arm.c +++ b/contrib/binutils/bfd/cpu-arm.c @@ -47,7 +47,7 @@ compatible (a,b) it can be polymorphed into the other */ if (a->the_default) return b; - + if (b->the_default) return a; @@ -93,9 +93,10 @@ processors[] = { bfd_mach_arm_4, "strongarm"}, { bfd_mach_arm_4, "strongarm110" }, { bfd_mach_arm_4, "strongarm1100" }, + { bfd_mach_arm_XScale, "xscale" } }; -static boolean +static boolean scan (info, string) const struct bfd_arch_info * info; const char * string; @@ -119,16 +120,15 @@ scan (info, string) /* Finally check for the default architecture */ if (strcasecmp (string, "arm") == 0) return info->the_default; - + return false; } - #define N(number, print, default, next) \ { 32, 32, 8, bfd_arch_arm, number, "arm", print, 4, default, compatible, scan, next } static const bfd_arch_info_type arch_info_struct[] = -{ +{ N( bfd_mach_arm_2, "armv2", false, & arch_info_struct[1] ), N( bfd_mach_arm_2a, "armv2a", false, & arch_info_struct[2] ), N( bfd_mach_arm_3, "armv3", false, & arch_info_struct[3] ), @@ -136,7 +136,9 @@ static const bfd_arch_info_type arch_info_struct[] = N( bfd_mach_arm_4, "armv4", false, & arch_info_struct[5] ), N( bfd_mach_arm_4T, "armv4t", false, & arch_info_struct[6] ), N( bfd_mach_arm_5, "armv5", false, & arch_info_struct[7] ), - N( bfd_mach_arm_5T, "armv5t", false, NULL ) + N( bfd_mach_arm_5T, "armv5t", false, & arch_info_struct[8] ), + N( bfd_mach_arm_5TE, "armv5te", false, & arch_info_struct[9] ), + N( bfd_mach_arm_XScale, "xscale", false, NULL ) }; const bfd_arch_info_type bfd_arm_arch = diff --git a/contrib/binutils/bfd/cpu-i386.c b/contrib/binutils/bfd/cpu-i386.c index f5b9b18..c3e9baf 100644 --- a/contrib/binutils/bfd/cpu-i386.c +++ b/contrib/binutils/bfd/cpu-i386.c @@ -32,10 +32,25 @@ const bfd_arch_info_type bfd_i386_arch_intel_syntax = "i386:intel", 3, true, - bfd_default_compatible, + bfd_default_compatible, bfd_default_scan , 0, }; +const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = +{ + 64, /* 64 bits in a word */ + 64, /* 64 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i386, + bfd_mach_x86_64_intel_syntax, + "x86_64:intel", + "x86_64:intel", + 3, + true, + bfd_default_compatible, + bfd_default_scan , + &bfd_i386_arch_intel_syntax, +}; static const bfd_arch_info_type i8086_arch = { 32, /* 32 bits in a word */ @@ -47,9 +62,25 @@ static const bfd_arch_info_type i8086_arch = "i8086", 3, false, - bfd_default_compatible, + bfd_default_compatible, bfd_default_scan , - &bfd_i386_arch_intel_syntax, + &bfd_x86_64_arch_intel_syntax, +}; + +const bfd_arch_info_type bfd_x86_64_arch = +{ + 64, /* 32 bits in a word */ + 64, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_i386, + bfd_mach_x86_64, + "x86_64", + "x86_64", + 3, + true, + bfd_default_compatible, + bfd_default_scan , + &i8086_arch, }; const bfd_arch_info_type bfd_i386_arch = @@ -63,8 +94,7 @@ const bfd_arch_info_type bfd_i386_arch = "i386", 3, true, - bfd_default_compatible, + bfd_default_compatible, bfd_default_scan , - &i8086_arch, + &bfd_x86_64_arch }; - diff --git a/contrib/binutils/bfd/cpu-powerpc.c b/contrib/binutils/bfd/cpu-powerpc.c index 11f0f80..2e41899 100644 --- a/contrib/binutils/bfd/cpu-powerpc.c +++ b/contrib/binutils/bfd/cpu-powerpc.c @@ -54,12 +54,12 @@ static const bfd_arch_info_type arch_info_struct[] = 32, /* 32 bits in an address */ 8, /* 8 bits in a byte */ bfd_arch_powerpc, - 603, /* for the mpc603 */ + bfd_mach_ppc_603, "powerpc", "powerpc:603", 3, false, /* not the default */ - powerpc_compatible, + powerpc_compatible, bfd_default_scan, &arch_info_struct[1] }, @@ -68,12 +68,12 @@ static const bfd_arch_info_type arch_info_struct[] = 32, /* 32 bits in an address */ 8, /* 8 bits in a byte */ bfd_arch_powerpc, - 604, /* for the mpc604 */ + bfd_mach_ppc_ec603e, "powerpc", - "powerpc:604", + "powerpc:EC603e", 3, false, /* not the default */ - powerpc_compatible, + powerpc_compatible, bfd_default_scan, &arch_info_struct[2] }, @@ -82,12 +82,12 @@ static const bfd_arch_info_type arch_info_struct[] = 32, /* 32 bits in an address */ 8, /* 8 bits in a byte */ bfd_arch_powerpc, - 403, /* for the 403 */ + bfd_mach_ppc_604, "powerpc", - "powerpc:403", + "powerpc:604", 3, false, /* not the default */ - powerpc_compatible, + powerpc_compatible, bfd_default_scan, &arch_info_struct[3] }, @@ -96,12 +96,124 @@ static const bfd_arch_info_type arch_info_struct[] = 32, /* 32 bits in an address */ 8, /* 8 bits in a byte */ bfd_arch_powerpc, - 601, /* for the mpc601 */ + bfd_mach_ppc_403, + "powerpc", + "powerpc:403", + 3, + false, /* not the default */ + powerpc_compatible, + bfd_default_scan, + &arch_info_struct[4] + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc_601, "powerpc", "powerpc:601", 3, false, /* not the default */ - powerpc_compatible, + powerpc_compatible, + bfd_default_scan, + &arch_info_struct[5] + }, + { + 64, /* 64 bits in a word */ + 64, /* 64 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc_620, + "powerpc", + "powerpc:620", + 3, + false, /* not the default */ + powerpc_compatible, + bfd_default_scan, + &arch_info_struct[6] + }, + { + 64, /* 64 bits in a word */ + 64, /* 64 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc_630, + "powerpc", + "powerpc:630", + 3, + false, /* not the default */ + powerpc_compatible, + bfd_default_scan, + &arch_info_struct[7] + }, + { + 64, /* 64 bits in a word */ + 64, /* 64 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc_a35, + "powerpc", + "powerpc:a35", + 3, + false, /* not the default */ + powerpc_compatible, + bfd_default_scan, + &arch_info_struct[8] + }, + { + 64, /* 64 bits in a word */ + 64, /* 64 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc_rs64ii, + "powerpc", + "powerpc:rs64ii", + 3, + false, /* not the default */ + powerpc_compatible, + bfd_default_scan, + &arch_info_struct[9] + }, + { + 64, /* 64 bits in a word */ + 64, /* 64 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc_rs64iii, + "powerpc", + "powerpc:rs64iii", + 3, + false, /* not the default */ + powerpc_compatible, + bfd_default_scan, + &arch_info_struct[10] + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc_7400, + "powerpc", + "powerpc:7400", + 3, + false, /* not the default */ + powerpc_compatible, + bfd_default_scan, + &arch_info_struct[11] + }, + { + 32, /* 32 bits in a word */ + 32, /* 32 bits in an address */ + 8, /* 8 bits in a byte */ + bfd_arch_powerpc, + bfd_mach_ppc_860, + "powerpc", + "powerpc:MPC8XX", + 3, + false, /* not the default */ + powerpc_compatible, bfd_default_scan, 0 } @@ -113,12 +225,12 @@ const bfd_arch_info_type bfd_powerpc_arch = 32, /* 32 bits in an address */ 8, /* 8 bits in a byte */ bfd_arch_powerpc, - 0, /* for the POWER/PowerPC common architecture */ + bfd_mach_ppc, /* for the POWER/PowerPC common architecture */ "powerpc", "powerpc:common", 3, true, /* the default */ - powerpc_compatible, + powerpc_compatible, bfd_default_scan, &arch_info_struct[0] }; diff --git a/contrib/binutils/bfd/cpu-sparc.c b/contrib/binutils/bfd/cpu-sparc.c index 234bd92..5c777d2 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, 1997 Free Software Foundation, Inc. + Copyright (C) 1992, 94, 95, 96, 97, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -49,7 +49,7 @@ static const bfd_arch_info_type arch_info_struct[] = "sparc:sparclet", 3, false, - sparc_compatible, + sparc_compatible, bfd_default_scan, &arch_info_struct[1], }, @@ -63,7 +63,7 @@ static const bfd_arch_info_type arch_info_struct[] = "sparc:sparclite", 3, false, - sparc_compatible, + sparc_compatible, bfd_default_scan, &arch_info_struct[2], }, @@ -77,7 +77,7 @@ static const bfd_arch_info_type arch_info_struct[] = "sparc:v8plus", 3, false, - sparc_compatible, + sparc_compatible, bfd_default_scan, &arch_info_struct[3], }, @@ -91,7 +91,7 @@ static const bfd_arch_info_type arch_info_struct[] = "sparc:v8plusa", 3, false, - sparc_compatible, + sparc_compatible, bfd_default_scan, &arch_info_struct[4], }, @@ -105,7 +105,7 @@ static const bfd_arch_info_type arch_info_struct[] = "sparc:sparclite_le", 3, false, - sparc_compatible, + sparc_compatible, bfd_default_scan, &arch_info_struct[5], }, @@ -119,7 +119,7 @@ static const bfd_arch_info_type arch_info_struct[] = "sparc:v9", 3, false, - sparc_compatible, + sparc_compatible, bfd_default_scan, &arch_info_struct[6], }, @@ -133,7 +133,35 @@ static const bfd_arch_info_type arch_info_struct[] = "sparc:v9a", 3, false, - sparc_compatible, + sparc_compatible, + bfd_default_scan, + &arch_info_struct[7], + }, + { + 32, /* bits in a word */ + 32, /* bits in an address */ + 8, /* bits in a byte */ + bfd_arch_sparc, + bfd_mach_sparc_v8plusb, + "sparc", + "sparc:v8plusb", + 3, + false, + sparc_compatible, + bfd_default_scan, + &arch_info_struct[8], + }, + { + 64, /* bits in a word */ + 64, /* bits in an address */ + 8, /* bits in a byte */ + bfd_arch_sparc, + bfd_mach_sparc_v9b, + "sparc", + "sparc:v9b", + 3, + false, + sparc_compatible, bfd_default_scan, 0, } @@ -150,7 +178,7 @@ const bfd_arch_info_type bfd_sparc_arch = "sparc", 3, true, /* the default */ - sparc_compatible, + sparc_compatible, bfd_default_scan, &arch_info_struct[0], }; diff --git a/contrib/binutils/bfd/cpu-v850.c b/contrib/binutils/bfd/cpu-v850.c index 539413d..55606f8 100644 --- a/contrib/binutils/bfd/cpu-v850.c +++ b/contrib/binutils/bfd/cpu-v850.c @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include -static boolean +static boolean scan (info, string) const struct bfd_arch_info * info; const char * string; @@ -41,9 +41,9 @@ scan (info, string) architecture, eg the string m68k:68020 would match the m68k entry up to the :, then we get left with the machine number */ - for (ptr_src = string, ptr_tst = info->arch_name; + for (ptr_src = string, ptr_tst = info->arch_name; *ptr_src && *ptr_tst; - ptr_src++, ptr_tst++) + ptr_src++, ptr_tst++) { if (*ptr_src != *ptr_tst) break; } @@ -52,7 +52,7 @@ scan (info, string) colons */ if (*ptr_src == ':') ptr_src++; - + if (*ptr_src == 0) { /* nothing more, then only keep this one if it is the default @@ -67,15 +67,15 @@ scan (info, string) ptr_src++; } - switch (number) + switch (number) { case bfd_mach_v850e: arch = bfd_arch_v850; break; case bfd_mach_v850ea: arch = bfd_arch_v850; break; - default: + default: return false; } - if (arch != info->arch) + if (arch != info->arch) return false; if (number != info->mach) @@ -90,7 +90,7 @@ scan (info, string) #define NEXT NULL -static const bfd_arch_info_type arch_info_struct[] = +static const bfd_arch_info_type arch_info_struct[] = { N (bfd_mach_v850e, "v850e", false, &arch_info_struct[1]), N (bfd_mach_v850ea, "v850ea", false, NULL) diff --git a/contrib/binutils/bfd/cpu-z8k.c b/contrib/binutils/bfd/cpu-z8k.c index 5cce8eb..29682c1 100644 --- a/contrib/binutils/bfd/cpu-z8k.c +++ b/contrib/binutils/bfd/cpu-z8k.c @@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "sysdep.h" #include "libbfd.h" - #if 0 /* not used currently */ /* Relocations for the Z8K @@ -50,7 +49,6 @@ howto16_callback (abfd, reloc_entry, symbol_in, data, return bfd_reloc_ok; } - static bfd_reloc_status_type howto8_callback (abfd, reloc_entry, symbol_in, data, ignore_input_section, ignore_bfd) @@ -73,7 +71,6 @@ howto8_callback (abfd, reloc_entry, symbol_in, data, return bfd_reloc_ok; } - static bfd_reloc_status_type howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data, ignore_input_section, ignore_bfd) @@ -119,8 +116,6 @@ howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data, return bfd_reloc_ok; } - - static reloc_howto_type howto_16 = NEWHOWTO (howto16_callback, "abs16", 1, false, false); static reloc_howto_type howto_8 @@ -132,7 +127,6 @@ static reloc_howto_type howto_8_FFnn static reloc_howto_type howto_8_pcrel = NEWHOWTO (howto8_pcrel_callback, "pcrel8", 0, false, true); - static reloc_howto_type * local_bfd_reloc_type_lookup (arch, code) const struct bfd_arch_info *arch; @@ -172,7 +166,6 @@ scan_mach (info, string) return false; } - /* This routine is provided two arch_infos and returns whether they'd be compatible */ @@ -186,7 +179,6 @@ compatible (a, b) return a; } - static const bfd_arch_info_type arch_info_struct[] = { {32, 32, 8, bfd_arch_z8k, bfd_mach_z8001, "z8k", "z8001", 1, false, compatible, scan_mach, 0,}, diff --git a/contrib/binutils/bfd/dep-in.sed b/contrib/binutils/bfd/dep-in.sed index 9da181a..c3781f2 100644 --- a/contrib/binutils/bfd/dep-in.sed +++ b/contrib/binutils/bfd/dep-in.sed @@ -6,6 +6,7 @@ t loop s!\.o:!.lo:! s! @BFD_H@!!g s!@INCDIR@!$(INCDIR)!g +s!@SRCDIR@/../opcodes!$(srcdir)/../opcodes!g s!@SRCDIR@/!!g s! hosts/[^ ]*\.h! !g s/ sysdep.h//g diff --git a/contrib/binutils/bfd/doc/ChangeLog b/contrib/binutils/bfd/doc/ChangeLog index def932c..57326a9 100644 --- a/contrib/binutils/bfd/doc/ChangeLog +++ b/contrib/binutils/bfd/doc/ChangeLog @@ -1,3 +1,30 @@ +2001-01-25 Kazu Hirata + + * chew.c: Do not output trailing whitespaces in type and + functionname. Update copyright. + +2001-01-24 Kazu Hirata + + * chew.c: Do not output a trailing whitespace. + +2000-11-06 Nick Clifton + + * bfd.texinfo: Add GNU Free Documentation License. + +2000-07-09 Alan Modra + + * Makefile.in: Regenerate. + +2000-07-08 Alan Modra + + * chew.c (outputdots): Don't add a space before `/*'. + (courierize): Likewise. + +Wed May 24 12:03:25 2000 Hans-Peter Nilsson + + * bfdint.texi (BFD ELF processor required): Add paragraph about + target necessities for readelf. + 2000-04-30 Ben Elliston * bfdint.texi (BFD generated files): Fix another typo. @@ -6,6 +33,10 @@ * bfdint.texi (BFD_JUMP_TABLE macros): Fix typo. +Fri Apr 7 17:54:38 2000 Andrew Cagney + + * Makefile.in: Rebuild with current autoconf/automake. + Thu Feb 4 23:21:36 1999 Ian Lance Taylor * Makefile.in: Rebuild with current autoconf/automake. diff --git a/contrib/binutils/bfd/doc/Makefile.in b/contrib/binutils/bfd/doc/Makefile.in index acdc9bf..dfc33e1 100644 --- a/contrib/binutils/bfd/doc/Makefile.in +++ b/contrib/binutils/bfd/doc/Makefile.in @@ -75,10 +75,14 @@ CC = @CC@ CC_FOR_BUILD = @CC_FOR_BUILD@ COREFILE = @COREFILE@ COREFLAG = @COREFLAG@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ @@ -96,14 +100,17 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ +STRIP = @STRIP@ TDEFINES = @TDEFINES@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ WIN32LDFLAGS = @WIN32LDFLAGS@ WIN32LIBADD = @WIN32LIBADD@ all_backends = @all_backends@ @@ -187,7 +194,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/contrib/binutils/bfd/doc/aoutx.texi b/contrib/binutils/bfd/doc/aoutx.texi index d97e96a..d99fd05 100644 --- a/contrib/binutils/bfd/doc/aoutx.texi +++ b/contrib/binutils/bfd/doc/aoutx.texi @@ -148,7 +148,7 @@ Swap the information in an internal exec header structure @example const bfd_target *aout_@var{size}_some_aout_object_p (bfd *abfd, - const bfd_target *(*callback_to_real_object_p)()); + const bfd_target *(*callback_to_real_object_p) ()); @end example @strong{Description}@* Some a.out variant thinks that the file open in @var{abfd} diff --git a/contrib/binutils/bfd/doc/archures.texi b/contrib/binutils/bfd/doc/archures.texi index 6ee20e9..b363780 100644 --- a/contrib/binutils/bfd/doc/archures.texi +++ b/contrib/binutils/bfd/doc/archures.texi @@ -1,7 +1,7 @@ @section Architectures BFD keeps one atom in a BFD describing the architecture of the data attached to the BFD: a pointer to a -@code{bfd_arch_info_type}. +@code{bfd_arch_info_type}. Pointers to structures can be requested independently of a BFD so that an architecture's information can be interrogated @@ -11,13 +11,13 @@ The architecture information is provided by each architecture package. The set of default architectures is selected by the macro @code{SELECT_ARCHITECTURES}. This is normally set up in the @file{config/@var{target}.mt} file of your choice. If the name is not -defined, then all the architectures supported are included. +defined, then all the architectures supported are included. When BFD starts up, all the architectures are called with an initialize method. It is up to the architecture back end to insert as many items into the list of architectures as it wants to; generally this would be one for each machine and one for the -default case (an item with a machine field of 0). +default case (an item with a machine field of 0). BFD's idea of an architecture is implemented in @file{archures.c}. @@ -31,13 +31,13 @@ Another field indicates which processor within the family is in use. The machine gives a number which distinguishes different versions of the architecture, containing, for example, 2 and 3 for Intel i960 KA and i960 KB, -and 68020 and 68030 for Motorola 68020 and 68030. +and 68020 and 68030 for Motorola 68020 and 68030. @example -enum bfd_architecture +enum bfd_architecture @{ - bfd_arch_unknown, /* File arch not known */ - bfd_arch_obscure, /* Arch known, not one of these */ - bfd_arch_m68k, /* Motorola 68xxx */ + bfd_arch_unknown, /* File arch not known */ + bfd_arch_obscure, /* Arch known, not one of these */ + bfd_arch_m68k, /* Motorola 68xxx */ #define bfd_mach_m68000 1 #define bfd_mach_m68008 2 #define bfd_mach_m68010 3 @@ -46,14 +46,14 @@ enum bfd_architecture #define bfd_mach_m68040 6 #define bfd_mach_m68060 7 #define bfd_mach_cpu32 8 - bfd_arch_vax, /* DEC Vax */ - bfd_arch_i960, /* Intel 960 */ - /* The order of the following is important. - lower number indicates a machine type that + bfd_arch_vax, /* DEC Vax */ + bfd_arch_i960, /* Intel 960 */ + /* The order of the following is important. + lower number indicates a machine type that only accepts a subset of the instructions available to machines with higher numbers. The exception is the "ca", which is - incompatible with all other machines except + incompatible with all other machines except "core". */ #define bfd_mach_i960_core 1 @@ -65,21 +65,24 @@ enum bfd_architecture #define bfd_mach_i960_jx 7 #define bfd_mach_i960_hx 8 - bfd_arch_a29k, /* AMD 29000 */ - bfd_arch_sparc, /* SPARC */ + bfd_arch_a29k, /* AMD 29000 */ + bfd_arch_sparc, /* SPARC */ #define bfd_mach_sparc 1 - /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ +/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */ #define bfd_mach_sparc_sparclet 2 #define bfd_mach_sparc_sparclite 3 #define bfd_mach_sparc_v8plus 4 -#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */ +#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */ #define bfd_mach_sparc_sparclite_le 6 #define bfd_mach_sparc_v9 7 -#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */ - /* Nonzero if MACH has the v9 instruction set. */ +#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */ +#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns */ +#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns */ +/* Nonzero if MACH has the v9 instruction set. */ #define bfd_mach_sparc_v9_p(mach) \ - ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a) - bfd_arch_mips, /* MIPS Rxxxx */ + ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \ + && (mach) != bfd_mach_sparc_sparclite_le) + bfd_arch_mips, /* MIPS Rxxxx */ #define bfd_mach_mips3000 3000 #define bfd_mach_mips3900 3900 #define bfd_mach_mips4000 4000 @@ -95,36 +98,66 @@ enum bfd_architecture #define bfd_mach_mips8000 8000 #define bfd_mach_mips10000 10000 #define bfd_mach_mips16 16 - bfd_arch_i386, /* Intel 386 */ +#define bfd_mach_mips32 32 +#define bfd_mach_mips32_4k 3204113 /* 32, 04, octal 'K' */ +#define bfd_mach_mips5 5 +#define bfd_mach_mips64 64 +#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ + bfd_arch_i386, /* Intel 386 */ #define bfd_mach_i386_i386 0 #define bfd_mach_i386_i8086 1 #define bfd_mach_i386_i386_intel_syntax 2 - bfd_arch_we32k, /* AT&T WE32xxx */ - bfd_arch_tahoe, /* CCI/Harris Tahoe */ - bfd_arch_i860, /* Intel 860 */ - bfd_arch_i370, /* IBM 360/370 Mainframes */ - bfd_arch_romp, /* IBM ROMP PC/RT */ - bfd_arch_alliant, /* Alliant */ - bfd_arch_convex, /* Convex */ - bfd_arch_m88k, /* Motorola 88xxx */ - bfd_arch_pyramid, /* Pyramid Technology */ - bfd_arch_h8300, /* Hitachi H8/300 */ +#define bfd_mach_x86_64 3 +#define bfd_mach_x86_64_intel_syntax 4 + bfd_arch_we32k, /* AT&T WE32xxx */ + bfd_arch_tahoe, /* CCI/Harris Tahoe */ + bfd_arch_i860, /* Intel 860 */ + bfd_arch_i370, /* IBM 360/370 Mainframes */ + bfd_arch_romp, /* IBM ROMP PC/RT */ + bfd_arch_alliant, /* Alliant */ + bfd_arch_convex, /* Convex */ + bfd_arch_m88k, /* Motorola 88xxx */ + bfd_arch_pyramid, /* Pyramid Technology */ + bfd_arch_h8300, /* Hitachi H8/300 */ #define bfd_mach_h8300 1 #define bfd_mach_h8300h 2 #define bfd_mach_h8300s 3 - bfd_arch_powerpc, /* PowerPC */ - bfd_arch_rs6000, /* IBM RS/6000 */ - bfd_arch_hppa, /* HP PA RISC */ - bfd_arch_d10v, /* Mitsubishi D10V */ + bfd_arch_powerpc, /* PowerPC */ +#define bfd_mach_ppc 0 +#define bfd_mach_ppc_403 403 +#define bfd_mach_ppc_403gc 4030 +#define bfd_mach_ppc_505 505 +#define bfd_mach_ppc_601 601 +#define bfd_mach_ppc_602 602 +#define bfd_mach_ppc_603 603 +#define bfd_mach_ppc_ec603e 6031 +#define bfd_mach_ppc_604 604 +#define bfd_mach_ppc_620 620 +#define bfd_mach_ppc_630 630 +#define bfd_mach_ppc_750 750 +#define bfd_mach_ppc_860 860 +#define bfd_mach_ppc_a35 35 +#define bfd_mach_ppc_rs64ii 642 +#define bfd_mach_ppc_rs64iii 643 +#define bfd_mach_ppc_7400 7400 + bfd_arch_rs6000, /* IBM RS/6000 */ +#define bfd_mach_rs6k 0 +#define bfd_mach_rs6k_rs1 6001 +#define bfd_mach_rs6k_rsc 6003 +#define bfd_mach_rs6k_rs2 6002 + bfd_arch_hppa, /* HP PA RISC */ + bfd_arch_d10v, /* Mitsubishi D10V */ #define bfd_mach_d10v 0 #define bfd_mach_d10v_ts2 2 #define bfd_mach_d10v_ts3 3 - bfd_arch_d30v, /* Mitsubishi D30V */ - bfd_arch_z8k, /* Zilog Z8000 */ + bfd_arch_d30v, /* Mitsubishi D30V */ + bfd_arch_m68hc11, /* Motorola 68HC11 */ + bfd_arch_m68hc12, /* Motorola 68HC12 */ + bfd_arch_z8k, /* Zilog Z8000 */ #define bfd_mach_z8001 1 #define bfd_mach_z8002 2 - bfd_arch_h8500, /* Hitachi H8/500 */ - bfd_arch_sh, /* Hitachi SH */ + bfd_arch_h8500, /* Hitachi H8/500 */ + bfd_arch_sh, /* Hitachi SH */ #define bfd_mach_sh 0 #define bfd_mach_sh2 0x20 #define bfd_mach_sh_dsp 0x2d @@ -132,11 +165,11 @@ enum bfd_architecture #define bfd_mach_sh3_dsp 0x3d #define bfd_mach_sh3e 0x3e #define bfd_mach_sh4 0x40 - bfd_arch_alpha, /* Dec Alpha */ + bfd_arch_alpha, /* Dec Alpha */ #define bfd_mach_alpha_ev4 0x10 #define bfd_mach_alpha_ev5 0x20 #define bfd_mach_alpha_ev6 0x30 - bfd_arch_arm, /* Advanced Risc Machines ARM */ + bfd_arch_arm, /* Advanced Risc Machines ARM */ #define bfd_mach_arm_2 1 #define bfd_mach_arm_2a 2 #define bfd_mach_arm_3 3 @@ -145,32 +178,43 @@ enum bfd_architecture #define bfd_mach_arm_4T 6 #define bfd_mach_arm_5 7 #define bfd_mach_arm_5T 8 - bfd_arch_ns32k, /* National Semiconductors ns32000 */ - bfd_arch_w65, /* WDC 65816 */ - bfd_arch_tic30, /* Texas Instruments TMS320C30 */ - bfd_arch_tic80, /* TI TMS320c80 (MVP) */ - bfd_arch_v850, /* NEC V850 */ +#define bfd_mach_arm_5TE 9 +#define bfd_mach_arm_XScale 10 + bfd_arch_ns32k, /* National Semiconductors ns32000 */ + bfd_arch_w65, /* WDC 65816 */ + bfd_arch_tic30, /* Texas Instruments TMS320C30 */ + bfd_arch_tic54x, /* Texas Instruments TMS320C54X */ + bfd_arch_tic80, /* TI TMS320c80 (MVP) */ + bfd_arch_v850, /* NEC V850 */ #define bfd_mach_v850 0 #define bfd_mach_v850e 'E' #define bfd_mach_v850ea 'A' - bfd_arch_arc, /* Argonaut RISC Core */ -#define bfd_mach_arc_base 0 - bfd_arch_m32r, /* Mitsubishi M32R/D */ -#define bfd_mach_m32r 0 /* backwards compatibility */ + bfd_arch_arc, /* ARC Cores */ +#define bfd_mach_arc_5 0 +#define bfd_mach_arc_6 1 +#define bfd_mach_arc_7 2 +#define bfd_mach_arc_8 3 + bfd_arch_m32r, /* Mitsubishi M32R/D */ +#define bfd_mach_m32r 0 /* backwards compatibility */ #define bfd_mach_m32rx 'x' - bfd_arch_mn10200, /* Matsushita MN10200 */ - bfd_arch_mn10300, /* Matsushita MN10300 */ + bfd_arch_mn10200, /* Matsushita MN10200 */ + bfd_arch_mn10300, /* Matsushita MN10300 */ #define bfd_mach_mn10300 300 #define bfd_mach_am33 330 bfd_arch_fr30, #define bfd_mach_fr30 0x46523330 bfd_arch_mcore, + bfd_arch_ia64, /* HP/Intel ia64 */ +#define bfd_mach_ia64_elf64 0 +#define bfd_mach_ia64_elf32 1 bfd_arch_pj, - bfd_arch_avr, /* Atmel AVR microcontrollers */ + bfd_arch_avr, /* Atmel AVR microcontrollers */ #define bfd_mach_avr1 1 #define bfd_mach_avr2 2 #define bfd_mach_avr3 3 #define bfd_mach_avr4 4 +#define bfd_mach_avr5 5 + bfd_arch_cris, /* Axis CRIS */ bfd_arch_last @}; @end example @@ -183,7 +227,7 @@ This structure contains information on architectures for use within BFD. @example -typedef struct bfd_arch_info +typedef struct bfd_arch_info @{ int bits_per_word; int bits_per_address; @@ -193,8 +237,8 @@ typedef struct bfd_arch_info const char *arch_name; const char *printable_name; unsigned int section_align_power; - /* true if this is the default machine for the architecture */ - boolean the_default; + /* True if this is the default machine for the architecture. */ + boolean the_default; const struct bfd_arch_info * (*compatible) PARAMS ((const struct bfd_arch_info *a, const struct bfd_arch_info *b)); @@ -380,7 +424,7 @@ const char *bfd_printable_arch_mach @end example @strong{Description}@* Return a printable string representing the architecture and -machine type. +machine type. This routine is depreciated. @@ -404,6 +448,7 @@ unsigned int bfd_arch_mach_octets_per_byte(enum bfd_architecture arch, @end example @strong{Description}@* See bfd_octets_per_byte. + This routine is provided for those cases where a bfd * is not available diff --git a/contrib/binutils/bfd/doc/bfd.texinfo b/contrib/binutils/bfd/doc/bfd.texinfo index a302bcf..9803371 100644 --- a/contrib/binutils/bfd/doc/bfd.texinfo +++ b/contrib/binutils/bfd/doc/bfd.texinfo @@ -1,6 +1,6 @@ \input texinfo.tex @setfilename bfd.info -@c $Id: bfd.texinfo,v 1.1.1.1 1999/05/03 07:28:58 rth Exp $ +@c $Id: bfd.texinfo,v 1.2 2000/11/15 18:24:49 nickc Exp $ @tex % NOTE LOCAL KLUGE TO AVOID TOO MUCH WHITESPACE \global\long\def\example{% @@ -28,11 +28,14 @@ END-INFO-DIR-ENTRY @ifinfo This file documents the BFD library. -Copyright (C) 1991 Free Software Foundation, Inc. +Copyright (C) 1991, 2000 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + 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 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 "GNU Free Documentation License". @ignore Permission is granted to process this file through Tex and print the @@ -41,14 +44,6 @@ notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, subject to the terms -of the GNU General Public License, which includes the provision that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end ifinfo @iftex @c@finalout @@ -67,7 +62,7 @@ into another language, under the above conditions for modified versions. @tex \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ -\xdef\manvers{\$Revision: 1.1.1.1 $} % For use in headers, footers too +\xdef\manvers{\$Revision: 1.2 $} % For use in headers, footers too {\parskip=0pt \hfill Cygnus Support\par \hfill sac\@cygnus.com\par @@ -80,18 +75,13 @@ into another language, under the above conditions for modified versions. @vskip 0pt plus 1filll Copyright @copyright{} 1991 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + 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 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 "GNU Free Documentation License". -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, subject to the terms -of the GNU General Public License, which includes the provision that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end titlepage @end iftex @@ -104,6 +94,7 @@ This file documents the binary file descriptor library libbfd. * Overview:: Overview of BFD * BFD front end:: BFD front end * BFD back ends:: BFD back ends +* GNU Free Documentation License:: GNU Free Documentation License * Index:: Index @end menu @@ -298,7 +289,7 @@ structures. @node Hash Tables, , Linker Functions, BFD front end @include hash.texi -@node BFD back ends, Index, BFD front end, Top +@node BFD back ends, GNU Free Documentation License, BFD front end, Top @chapter BFD back ends @menu * What to Put Where:: @@ -325,7 +316,371 @@ All of BFD lives in one directory. @c Leave this out until the file has some actual contents... @c @include elfcode.texi -@node Index, , BFD back ends , Top +@node GNU Free Documentation License, Index, BFD back ends, Top +@chapter GNU Free Documentation License +@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. + + +0. PREAMBLE + +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. + +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. + +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. + + +1. APPLICABILITY AND DEFINITIONS + +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". + +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. + +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. + +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. + +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. + +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". + +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. + +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. + + +2. VERBATIM COPYING + +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. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +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. + +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. + +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. + +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. + + +4. MODIFICATIONS + +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: + +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. +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). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +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. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +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. +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. +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. +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. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +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. + +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. + +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. + +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. + + +5. COMBINING DOCUMENTS + +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. + +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. + +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." + + +6. COLLECTIONS OF DOCUMENTS + +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. + +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. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +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. + +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. + + +8. TRANSLATION + +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. + + +9. TERMINATION + +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. + + +10. FUTURE REVISIONS OF THIS LICENSE + +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/. + +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. + + +ADDENDUM: How to use this License for your documents + +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: + +@smallexample + 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". +@end smallexample + +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. + +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. + +@node Index, , GNU Free Documentation License , Top @unnumbered Index @printindex cp diff --git a/contrib/binutils/bfd/doc/bfdint.texi b/contrib/binutils/bfd/doc/bfdint.texi index 39eaacf..b0a0182 100644 --- a/contrib/binutils/bfd/doc/bfdint.texi +++ b/contrib/binutils/bfd/doc/bfdint.texi @@ -18,8 +18,7 @@ This document describes some BFD internal information which may be helpful when working on BFD. It is very incomplete. -This document is not updated regularly, and may be out of date. It was -last modified on $Date: 2000/04/30 15:07:52 $. +This document is not updated regularly, and may be out of date. The initial version of this document was written by Ian Lance Taylor @email{ian@@cygnus.com}. @@ -1607,6 +1606,10 @@ it should use the @samp{START_RELOC_NUMBERS}, @samp{RELOC_NUMBER}, macros to create a table mapping the number used to indentify a relocation to a name describing that relocation. +While not a BFD component, you probably also want to make the binutils +program @samp{readelf} parse your ELF objects. For this, you need to add +code for @code{EM_@var{cpu}} as appropriate in @file{binutils/readelf.c}. + @node BFD ELF processor linker @subsubsection Processor specific linker support diff --git a/contrib/binutils/bfd/doc/bfdt.texi b/contrib/binutils/bfd/doc/bfdt.texi index 98269fb..b9e6fb7 100644 --- a/contrib/binutils/bfd/doc/bfdt.texi +++ b/contrib/binutils/bfd/doc/bfdt.texi @@ -10,10 +10,10 @@ to the rest of the data. @example -struct _bfd +struct _bfd @{ /* The filename the application opened the BFD with. */ - CONST char *filename; + CONST char *filename; /* A pointer to the target jump table. */ const struct bfd_target *xvec; @@ -46,7 +46,7 @@ struct _bfd /* When a file is closed by the caching routines, BFD retains state information on the file here: */ - file_ptr where; + file_ptr where; /* and here: (``once'' means at least once) */ @@ -59,7 +59,7 @@ struct _bfd /* File modified time, if mtime_set is true: */ - long mtime; + long mtime; /* Reserved for an unimplemented file locking extension.*/ @@ -78,13 +78,13 @@ struct _bfd /* Format_specific flags*/ - flagword flags; + flagword flags; /* Currently my_archive is tested before adding origin to anything. I believe that this can become always an add of origin, with origin set to 0 for non archive files. */ - file_ptr origin; + file_ptr origin; /* Remember when output has begun, to stop strange things from happening. */ @@ -96,7 +96,7 @@ struct _bfd /* The number of sections */ unsigned int section_count; - /* Stuff only useful for object files: + /* Stuff only useful for object files: The start address. */ bfd_vma start_address; @@ -104,17 +104,17 @@ struct _bfd unsigned int symcount; /* Symbol table for output BFD (with symcount entries) */ - struct symbol_cache_entry **outsymbols; + struct symbol_cache_entry **outsymbols; /* Pointer to structure which contains architecture information*/ const struct bfd_arch_info *arch_info; /* Stuff only useful for archives:*/ - PTR arelt_data; + PTR arelt_data; struct _bfd *my_archive; /* The containing archive BFD. */ struct _bfd *next; /* The next BFD in the archive. */ struct _bfd *archive_head; /* The first BFD in the archive. */ - boolean has_armap; + boolean has_armap; /* A chain of BFD structures involved in a link. */ struct _bfd *link_next; @@ -125,7 +125,7 @@ struct _bfd /* Used by the back end to hold private data. */ - union + union @{ struct aout_data_struct *aout_data; struct artdata *aout_ar_data; @@ -157,7 +157,7 @@ struct _bfd struct netbsd_core_struct *netbsd_core_data; PTR any; @} tdata; - + /* Used by the application to hold private data*/ PTR usrdata; @@ -366,6 +366,39 @@ type of file. E.g., an attempt was made to set the @code{D_PAGED} bit on a BFD format which does not support demand paging. @end itemize +@findex bfd_get_arch_size +@subsubsection @code{bfd_get_arch_size} +@strong{Synopsis} +@example +int bfd_get_arch_size (bfd *abfd); +@end example +@strong{Description}@* +Returns the architecture address size, in bits, as determined +by the object file's format. For ELF, this information is +included in the header. + +@strong{Returns}@* +Returns the arch size in bits if known, @code{-1} otherwise. + +@findex bfd_get_sign_extend_vma +@subsubsection @code{bfd_get_sign_extend_vma} +@strong{Synopsis} +@example +int bfd_get_sign_extend_vma (bfd *abfd); +@end example +@strong{Description}@* +Indicates if the target architecture "naturally" sign extends +an address. Some architectures implicitly sign extend address +values when they are converted to types larger than the size +of an address. For instance, bfd_get_start_address() will +return an address sign extended to fill a bfd_vma when this is +the case. + +@strong{Returns}@* +Returns @code{1} if the target architecture is known to sign +extend addresses, @code{0} if the target architecture is known to +not sign extend addresses, and @code{-1} otherwise. + @findex bfd_set_start_address @subsubsection @code{bfd_set_start_address} @strong{Synopsis} @@ -407,7 +440,7 @@ it so that such results were guaranteed. Instead, we want to ask questions like "is this NNN byte sized object I'm about to try read from file offset YYY reasonable?" As as example of where we might do this, some object formats -use string tables for which the first @code{sizeof(long)} bytes of the +use string tables for which the first @code{sizeof (long)} bytes of the table contain the size of the table itself, including the size bytes. If an application tries to read what it thinks is one of these string tables, without some way to validate the size, and for @@ -466,7 +499,7 @@ Overflow is not detected. boolean bfd_copy_private_bfd_data(bfd *ibfd, bfd *obfd); @end example @strong{Description}@* -Copy private BFD information from the BFD @var{ibfd} to the +Copy private BFD information from the BFD @var{ibfd} to the the BFD @var{obfd}. Return @code{true} on success, @code{false} on error. Possible error returns are: @@ -489,7 +522,7 @@ Not enough memory exists to create private data for @var{obfd}. boolean bfd_merge_private_bfd_data(bfd *ibfd, bfd *obfd); @end example @strong{Description}@* -Merge private BFD information from the BFD @var{ibfd} to the +Merge private BFD information from the BFD @var{ibfd} to the the output file BFD @var{obfd} when linking. Return @code{true} on success, @code{false} on error. Possible error returns are: @@ -539,7 +572,7 @@ Stuff which should be documented: #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \ BFD_SEND (abfd, _bfd_find_nearest_line, (abfd, sec, syms, off, file, func, line)) - /* Do these three do anything useful at all, for any back end? */ + /* Do these three do anything useful at all, for any back end? */ #define bfd_debug_info_start(abfd) \ BFD_SEND (abfd, _bfd_debug_info_start, (abfd)) diff --git a/contrib/binutils/bfd/doc/cache.texi b/contrib/binutils/bfd/doc/cache.texi index 4aafb69..56d1f18 100644 --- a/contrib/binutils/bfd/doc/cache.texi +++ b/contrib/binutils/bfd/doc/cache.texi @@ -40,7 +40,7 @@ otherwise, it has to perform the complicated lookup function. @example #define bfd_cache_lookup(x) \ ((x)==bfd_last_cache? \ - (FILE*)(bfd_last_cache->iostream): \ + (FILE*) (bfd_last_cache->iostream): \ bfd_cache_lookup_worker(x)) @end example diff --git a/contrib/binutils/bfd/doc/chew.c b/contrib/binutils/bfd/doc/chew.c index eba69c2..7b98ccf 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 + Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1998, 2000, 2001 Free Software Foundation, Inc. Contributed by steve chamberlain @cygnus @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Yet another way of extracting documentation from source. No, I haven't finished it yet, but I hope you people like it better than the old way - + sac Basically, this is a sort of string forth, maybe we should call it @@ -81,7 +81,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foo. */ - #include #include "sysdep.h" #include @@ -96,16 +95,15 @@ int internal_mode; int warning; -/* Here is a string type ... */ +/* Here is a string type ... */ -typedef struct buffer +typedef struct buffer { char *ptr; unsigned long write_idx; unsigned long size; } string_type; - #ifdef __STDC__ static void init_string_with_size (string_type *, unsigned int); static void init_string (string_type *); @@ -121,100 +119,104 @@ static void cattext (string_type *, char *); static void catstr (string_type *, string_type *); #endif - -static void DEFUN(init_string_with_size,(buffer, size), - string_type *buffer AND - unsigned int size ) +static void +init_string_with_size (buffer, size) + string_type *buffer; + unsigned int size; { - buffer->write_idx = 0; - buffer->size = size; - buffer->ptr = malloc(size); + buffer->write_idx = 0; + buffer->size = size; + buffer->ptr = malloc (size); } -static void DEFUN(init_string,(buffer), - string_type *buffer) +static void +init_string (buffer) + string_type *buffer; { - init_string_with_size(buffer, DEF_SIZE); - + init_string_with_size (buffer, DEF_SIZE); } -static int DEFUN(find, (str, what), - string_type *str AND - char *what) +static int +find (str, what) + string_type *str; + char *what; { - unsigned int i; - char *p; - p = what; - for (i = 0; i < str->write_idx && *p; i++) + unsigned int i; + char *p; + p = what; + for (i = 0; i < str->write_idx && *p; i++) { - if (*p == str->ptr[i]) - p++; - else - p = what; + if (*p == str->ptr[i]) + p++; + else + p = what; } - return (*p == 0); - + return (*p == 0); } -static void DEFUN(write_buffer,(buffer, f), - string_type *buffer AND - FILE *f) +static void +write_buffer (buffer, f) + string_type *buffer; + FILE *f; { - fwrite(buffer->ptr, buffer->write_idx, 1, f); + fwrite (buffer->ptr, buffer->write_idx, 1, f); } - -static void DEFUN(delete_string,(buffer), - string_type *buffer) +static void +delete_string (buffer) + string_type *buffer; { - free(buffer->ptr); + free (buffer->ptr); } - -static char *DEFUN(addr, (buffer, idx), - string_type *buffer AND - unsigned int idx) +static char * +addr (buffer, idx) + string_type *buffer; + unsigned int idx; { - return buffer->ptr + idx; + return buffer->ptr + idx; } -static char DEFUN(at,(buffer, pos), - string_type *buffer AND - unsigned int pos) +static char +at (buffer, pos) + string_type *buffer; + unsigned int pos; { - if (pos >= buffer->write_idx) + if (pos >= buffer->write_idx) return 0; return buffer->ptr[pos]; } -static void DEFUN(catchar,(buffer, ch), - string_type *buffer AND - int ch) +static void +catchar (buffer, ch) + string_type *buffer; + int ch; { - if (buffer->write_idx == buffer->size) + if (buffer->write_idx == buffer->size) { - buffer->size *=2; - buffer->ptr = realloc(buffer->ptr, buffer->size); + buffer->size *= 2; + buffer->ptr = realloc (buffer->ptr, buffer->size); } - buffer->ptr[buffer->write_idx ++ ] = ch; + buffer->ptr[buffer->write_idx++] = ch; } - -static void DEFUN(overwrite_string,(dst, src), - string_type *dst AND - string_type *src) -{ - free(dst->ptr); - dst->size = src->size; - dst->write_idx = src->write_idx; - dst->ptr = src->ptr; +static void +overwrite_string (dst, src) + string_type *dst; + string_type *src; +{ + free (dst->ptr); + dst->size = src->size; + dst->write_idx = src->write_idx; + dst->ptr = src->ptr; } -static void DEFUN(catbuf,(buffer, buf, len), - string_type *buffer AND - char *buf AND - unsigned int len) +static void +catbuf (buffer, buf, len) + string_type *buffer; + char *buf; + unsigned int len; { if (buffer->write_idx + len >= buffer->size) { @@ -226,41 +228,41 @@ static void DEFUN(catbuf,(buffer, buf, len), buffer->write_idx += len; } -static void DEFUN(cattext,(buffer, string), - string_type *buffer AND - char *string) +static void +cattext (buffer, string) + string_type *buffer; + char *string; { catbuf (buffer, string, (unsigned int) strlen (string)); } -static void DEFUN(catstr,(dst, src), - string_type *dst AND - string_type *src) +static void +catstr (dst, src) + string_type *dst; + string_type *src; { catbuf (dst, src->ptr, src->write_idx); } - -static unsigned int -DEFUN(skip_white_and_stars,(src, idx), - string_type *src AND - unsigned int idx) +static unsigned int +skip_white_and_stars (src, idx) + string_type *src; + unsigned int idx; { char c; - while ((c = at(src,idx)), + while ((c = at (src, idx)), isspace ((unsigned char) c) || (c == '*' /* Don't skip past end-of-comment or star as first character on its line. */ - && at(src,idx +1) != '/' - && at(src,idx -1) != '\n')) + && at (src, idx +1) != '/' + && at (src, idx -1) != '\n')) idx++; return idx; } /***********************************************************************/ - string_type stack[STACK]; string_type *tos; @@ -275,19 +277,18 @@ long *isp = &istack[0]; typedef int *word_type; - - struct dict_struct { - char *word; - struct dict_struct *next; - stinst_type *code; - int code_length; - int code_end; - int var; - + char *word; + struct dict_struct *next; + stinst_type *code; + int code_length; + int code_end; + int var; }; + typedef struct dict_struct dict_type; + #define WORD(x) static void x() static void @@ -352,27 +353,28 @@ static void usage (void); static void chew_exit (void); #endif -static void DEFUN(exec,(word), - dict_type *word) +static void +exec (word) + dict_type *word; { pc = word->code; - while (*pc) - (*pc)(); + while (*pc) + (*pc) (); } -WORD(call) -{ - stinst_type *oldpc = pc; - dict_type *e; - e = (dict_type *)(pc [1]); - exec(e); - pc = oldpc + 2; - + +WORD (call) +{ + stinst_type *oldpc = pc; + dict_type *e; + e = (dict_type *) (pc[1]); + exec (e); + pc = oldpc + 2; } -WORD(remchar) +WORD (remchar) { if (tos->write_idx) - tos->write_idx--; + tos->write_idx--; pc++; } @@ -386,81 +388,80 @@ strip_trailing_newlines () pc++; } -WORD(push_number) +WORD (push_number) { - isp++; - icheck_range (); - pc++; - *isp = (long)(*pc); - pc++; + isp++; + icheck_range (); + pc++; + *isp = (long) (*pc); + pc++; } -WORD(push_text) +WORD (push_text) { - tos++; - check_range (); - init_string(tos); - pc++; - cattext(tos,*((char **)pc)); - pc++; - + tos++; + check_range (); + init_string (tos); + pc++; + cattext (tos, *((char **) pc)); + pc++; } - /* This function removes everything not inside comments starting on the first char of the line from the string, also when copying comments, removes blank space and leading *'s. Blank lines are turned into one blank line. */ -static void -DEFUN(remove_noncomments,(src,dst), - string_type *src AND - string_type *dst) +static void +remove_noncomments (src, dst) + string_type *src; + string_type *dst; { - unsigned int idx = 0; - - while (at(src,idx)) + unsigned int idx = 0; + + while (at (src, idx)) { - /* Now see if we have a comment at the start of the line */ - if (at(src,idx) == '\n' - && at(src,idx+1) == '/' - && at(src,idx+2) == '*') + /* Now see if we have a comment at the start of the line. */ + if (at (src, idx) == '\n' + && at (src, idx + 1) == '/' + && at (src, idx + 2) == '*') { - idx+=3; - - idx = skip_white_and_stars(src,idx); - - /* Remove leading dot */ - if (at(src, idx) == '.') - idx++; - - /* Copy to the end of the line, or till the end of the - comment */ - while (at(src, idx)) + idx += 3; + + idx = skip_white_and_stars (src, idx); + + /* Remove leading dot */ + if (at (src, idx) == '.') + idx++; + + /* Copy to the end of the line, or till the end of the + comment. */ + while (at (src, idx)) { - if (at(src, idx) == '\n') + if (at (src, idx) == '\n') { - /* end of line, echo and scrape of leading blanks */ - if (at(src,idx +1) == '\n') - catchar(dst,'\n'); - catchar(dst,'\n'); - idx++; - idx = skip_white_and_stars(src, idx); + /* end of line, echo and scrape of leading blanks */ + if (at (src, idx + 1) == '\n') + catchar (dst, '\n'); + catchar (dst, '\n'); + idx++; + idx = skip_white_and_stars (src, idx); } - else if (at(src, idx) == '*' && at(src,idx+1) == '/') + else if (at (src, idx) == '*' && at (src, idx + 1) == '/') { - idx +=2 ; - cattext(dst,"\nENDDD\n"); - break; + idx += 2; + cattext (dst, "\nENDDD\n"); + break; } - else + else { - catchar(dst, at(src, idx)); - idx++; + catchar (dst, at (src, idx)); + idx++; } } } - else idx++; + else + idx++; } } @@ -481,98 +482,103 @@ print_stack_level () */ static void -DEFUN_VOID(paramstuff) -{ - unsigned int openp; - unsigned int fname; - unsigned int idx; - string_type out; - init_string(&out); - - - /* make sure that it's not already param'd or proto'd */ - if(find(tos,"PARAMS") || find(tos,"PROTO") || !find(tos,"(")) { - catstr(&out,tos); - } - else - { - /* Find the open paren */ - for (openp = 0; at(tos, openp) != '(' && at(tos,openp); openp++) - ; +paramstuff (void) +{ + unsigned int openp; + unsigned int fname; + unsigned int idx; + unsigned int len; + string_type out; + init_string (&out); - fname = openp; - /* Step back to the fname */ + /* Make sure that it's not already param'd or proto'd. */ + if (find (tos, "PARAMS") || find (tos, "PROTO") || !find (tos, "(")) + { + catstr (&out, tos); + } + else + { + /* Find the open paren. */ + for (openp = 0; at (tos, openp) != '(' && at (tos, openp); openp++) + ; + + fname = openp; + /* Step back to the fname. */ + fname--; + while (fname && isspace ((unsigned char) at (tos, fname))) fname--; - while (fname && isspace((unsigned char) at(tos, fname))) - fname --; - while (fname - && !isspace((unsigned char) at(tos,fname)) - && at(tos,fname) != '*') - fname--; - - fname++; - - for (idx = 0; idx < fname; idx++) /* Output type */ - { - catchar(&out, at(tos,idx)); - } - - cattext(&out, "\n"); /* Insert a newline between type and fnname */ + while (fname + && !isspace ((unsigned char) at (tos,fname)) + && at (tos,fname) != '*') + fname--; + + fname++; - for (idx = fname; idx < openp; idx++) /* Output fnname */ + /* Output type, omitting trailing whitespace character(s), if + any. */ + for (len = fname; 0 < len; len--) { - catchar(&out, at(tos,idx)); + if (!isspace ((unsigned char) at (tos, len - 1))) + break; } + for (idx = 0; idx < len; idx++) + catchar (&out, at (tos, idx)); - cattext(&out," PARAMS ("); + cattext (&out, "\n"); /* Insert a newline between type and fnname */ - while (at(tos,idx) && at(tos,idx) !=';') + /* Output function name, omitting trailing whitespace + character(s), if any. */ + for (len = openp; 0 < len; len--) { - catchar(&out, at(tos, idx)); - idx++; + if (!isspace ((unsigned char) at (tos, len - 1))) + break; } - cattext(&out,");\n\n"); - } - overwrite_string(tos, &out); - pc++; - -} + for (idx = fname; idx < len; idx++) + catchar (&out, at (tos, idx)); + + cattext (&out, " PARAMS ("); + for (idx = openp; at (tos, idx) && at (tos, idx) != ';'; idx++) + catchar (&out, at (tos, idx)); + cattext (&out, ");\n\n"); + } + overwrite_string (tos, &out); + pc++; + +} /* turn {* and *} into comments */ -WORD(translatecomments) +WORD (translatecomments) { - unsigned int idx = 0; - string_type out; - init_string(&out); - - while (at(tos, idx)) + unsigned int idx = 0; + string_type out; + init_string (&out); + + while (at (tos, idx)) { - if (at(tos,idx) == '{' && at(tos,idx+1) =='*') + if (at (tos, idx) == '{' && at (tos, idx + 1) == '*') { - cattext(&out,"/*"); - idx+=2; + cattext (&out, "/*"); + idx += 2; } - else if (at(tos,idx) == '*' && at(tos,idx+1) =='}') + else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}') { - cattext(&out,"*/"); - idx+=2; + cattext (&out, "*/"); + idx += 2; } - else + else { - catchar(&out, at(tos, idx)); - idx++; + catchar (&out, at (tos, idx)); + idx++; } } + overwrite_string (tos, &out); - overwrite_string(tos, &out); - - pc++; - + pc++; } #if 0 @@ -581,843 +587,822 @@ WORD(translatecomments) /* turn everything not starting with a . into a comment */ -WORD(manglecomments) +WORD (manglecomments) { - unsigned int idx = 0; - string_type out; - init_string(&out); - - while (at(tos, idx)) + unsigned int idx = 0; + string_type out; + init_string (&out); + + while (at (tos, idx)) { - if (at(tos,idx) == '\n' && at(tos,idx+1) =='*') + if (at (tos, idx) == '\n' && at (tos, idx + 1) == '*') { - cattext(&out," /*"); - idx+=2; + cattext (&out, " /*"); + idx += 2; } - else if (at(tos,idx) == '*' && at(tos,idx+1) =='}') + else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}') { - cattext(&out,"*/"); - idx+=2; + cattext (&out, "*/"); + idx += 2; } - else + else { - catchar(&out, at(tos, idx)); - idx++; + catchar (&out, at (tos, idx)); + idx++; } } + overwrite_string (tos, &out); - overwrite_string(tos, &out); - - pc++; - + pc++; } #endif /* Mod tos so that only lines with leading dots remain */ static void -DEFUN_VOID(outputdots) +outputdots (void) { - unsigned int idx = 0; - string_type out; - init_string(&out); - - while (at(tos, idx)) + unsigned int idx = 0; + string_type out; + init_string (&out); + + while (at (tos, idx)) { - if (at(tos, idx) == '\n' && at(tos, idx+1) == '.') + if (at (tos, idx) == '\n' && at (tos, idx + 1) == '.') { char c; idx += 2; - - while ((c = at(tos, idx)) && c != '\n') + + while ((c = at (tos, idx)) && c != '\n') { - if (c == '{' && at(tos,idx+1) =='*') + if (c == '{' && at (tos, idx + 1) == '*') { - cattext(&out," /*"); - idx+=2; + cattext (&out, "/*"); + idx += 2; } - else if (c == '*' && at(tos,idx+1) =='}') + else if (c == '*' && at (tos, idx + 1) == '}') { - cattext(&out,"*/"); - idx+=2; + cattext (&out, "*/"); + idx += 2; } else { - catchar(&out, c); - idx++; + catchar (&out, c); + idx++; } } - catchar(&out,'\n'); + catchar (&out, '\n'); } - else + else { - idx++; + idx++; } - } + } - overwrite_string(tos, &out); - pc++; - + overwrite_string (tos, &out); + pc++; } /* Find lines starting with . and | and put example around them on tos */ -WORD(courierize) -{ - string_type out; - unsigned int idx = 0; - int command = 0; - - init_string(&out); - - while (at(tos, idx)) +WORD (courierize) +{ + string_type out; + unsigned int idx = 0; + int command = 0; + + init_string (&out); + + while (at (tos, idx)) { - if (at(tos, idx) == '\n' - && (at(tos, idx +1 ) == '.' - || at(tos,idx+1) == '|')) + if (at (tos, idx) == '\n' + && (at (tos, idx +1 ) == '.' + || at (tos, idx + 1) == '|')) { - cattext(&out,"\n@example\n"); - do + cattext (&out, "\n@example\n"); + do { - idx += 2; - - while (at(tos, idx) && at(tos, idx)!='\n') + idx += 2; + + while (at (tos, idx) && at (tos, idx) != '\n') { - if (at(tos,idx)=='{' && at(tos,idx+1) =='*') + if (at (tos, idx) == '{' && at (tos, idx + 1) == '*') { - cattext(&out," /*"); - idx+=2; + cattext (&out, "/*"); + idx += 2; } - else if (at(tos,idx)=='*' && at(tos,idx+1) =='}') + else if (at (tos, idx) == '*' && at (tos, idx + 1) == '}') { - cattext(&out,"*/"); - idx+=2; + cattext (&out, "*/"); + idx += 2; } - else if (at(tos,idx) == '{' && !command) + else if (at (tos, idx) == '{' && !command) { - cattext(&out,"@{"); - idx++; + cattext (&out, "@{"); + idx++; } - else if (at(tos,idx) == '}' && !command) + else if (at (tos, idx) == '}' && !command) { - cattext(&out,"@}"); - idx++; + cattext (&out, "@}"); + idx++; } - else + else { - if (at(tos,idx) == '@') - command = 1; - else if (isspace((unsigned char) at(tos,idx)) - || at(tos,idx) == '}') - command = 0; - catchar(&out, at(tos, idx)); - idx++; + if (at (tos, idx) == '@') + command = 1; + else if (isspace ((unsigned char) at (tos, idx)) + || at (tos, idx) == '}') + command = 0; + catchar (&out, at (tos, idx)); + idx++; } - + } - catchar(&out,'\n'); - } - while (at(tos, idx) == '\n' - && ((at(tos, idx+1) == '.') - || (at(tos,idx+1) == '|'))) - ; - cattext(&out,"@end example"); + catchar (&out, '\n'); + } + while (at (tos, idx) == '\n' + && ((at (tos, idx + 1) == '.') + || (at (tos, idx + 1) == '|'))) + ; + cattext (&out, "@end example"); } - else - { - catchar(&out, at(tos, idx)); - idx++; + else + { + catchar (&out, at (tos, idx)); + idx++; } - } - - overwrite_string(tos, &out); - pc++; + } - + overwrite_string (tos, &out); + pc++; } /* Finds any lines starting with "o ", if there are any, then turns on @itemize @bullet, and @items each of them. Then ends with @end itemize, inplace at TOS*/ - -WORD(bulletize) +WORD (bulletize) { - unsigned int idx = 0; - int on = 0; - string_type out; - init_string(&out); - - while (at(tos, idx)) { - if (at(tos, idx) == '@' && - at(tos, idx+1) == '*') + unsigned int idx = 0; + int on = 0; + string_type out; + init_string (&out); + + while (at (tos, idx)) + { + if (at (tos, idx) == '@' + && at (tos, idx + 1) == '*') { - cattext(&out,"*"); - idx+=2; + cattext (&out, "*"); + idx += 2; } - - else - if (at(tos, idx) == '\n' && - at(tos, idx+1) == 'o' && - isspace((unsigned char) at(tos, idx +2))) + else if (at (tos, idx) == '\n' + && at (tos, idx + 1) == 'o' + && isspace ((unsigned char) at (tos, idx + 2))) + { + if (!on) { - if (!on) - { - cattext(&out,"\n@itemize @bullet\n"); - on = 1; - - } - cattext(&out,"\n@item\n"); - idx+=3; + cattext (&out, "\n@itemize @bullet\n"); + on = 1; + } - else + cattext (&out, "\n@item\n"); + idx += 3; + } + else + { + catchar (&out, at (tos, idx)); + if (on && at (tos, idx) == '\n' + && at (tos, idx + 1) == '\n' + && at (tos, idx + 2) != 'o') { - catchar(&out, at(tos, idx)); - if (on && at(tos, idx) == '\n' && - at(tos, idx+1) == '\n' && - at(tos, idx+2) != 'o') - { - cattext(&out, "@end itemize"); - on = 0; - } - idx++; - + cattext (&out, "@end itemize"); + on = 0; } + idx++; + } - if (on) + } + if (on) { - cattext(&out,"@end itemize\n"); - } + cattext (&out, "@end itemize\n"); + } - delete_string(tos); - *tos = out; - pc++; - + delete_string (tos); + *tos = out; + pc++; } /* Turn <> into @code{foo} in place at TOS*/ - -WORD(do_fancy_stuff) +WORD (do_fancy_stuff) { - unsigned int idx = 0; - string_type out; - init_string(&out); - while (at(tos, idx)) + unsigned int idx = 0; + string_type out; + init_string (&out); + while (at (tos, idx)) { - if (at(tos, idx) == '<' - && at(tos, idx+1) == '<' - && !isspace((unsigned char) at(tos,idx + 2))) + if (at (tos, idx) == '<' + && at (tos, idx + 1) == '<' + && !isspace ((unsigned char) at (tos, idx + 2))) { - /* This qualifies as a << startup */ - idx +=2; - cattext(&out,"@code{"); - while(at(tos,idx) && - at(tos,idx) != '>' ) + /* This qualifies as a << startup. */ + idx += 2; + cattext (&out, "@code{"); + while (at (tos, idx) + && at (tos, idx) != '>' ) { - catchar(&out, at(tos, idx)); - idx++; - + catchar (&out, at (tos, idx)); + idx++; + } - cattext(&out,"}"); - idx+=2; + cattext (&out, "}"); + idx += 2; } - else + else { - catchar(&out, at(tos, idx)); - idx++; + catchar (&out, at (tos, idx)); + idx++; } } - delete_string(tos); - *tos = out; - pc++; - -} -/* A command is all upper case,and alone on a line */ -static int -DEFUN( iscommand,(ptr, idx), - string_type *ptr AND - unsigned int idx) -{ - unsigned int len = 0; - while (at(ptr,idx)) { - if (isupper((unsigned char) at(ptr,idx)) || at(ptr,idx) == ' ' || - at(ptr,idx) == '_') - { - len++; - idx++; - } - else if(at(ptr,idx) == '\n') - { - if (len > 3) return 1; - return 0; - } - else return 0; - } - return 0; + delete_string (tos); + *tos = out; + pc++; } +/* A command is all upper case,and alone on a line. */ static int -DEFUN(copy_past_newline,(ptr, idx, dst), - string_type *ptr AND - unsigned int idx AND - string_type *dst) +iscommand (ptr, idx) + string_type *ptr; + unsigned int idx; { - int column = 0; + unsigned int len = 0; + while (at (ptr, idx)) + { + if (isupper ((unsigned char) at (ptr, idx)) + || at (ptr, idx) == ' ' || at (ptr, idx) == '_') + { + len++; + idx++; + } + else if (at (ptr, idx) == '\n') + { + if (len > 3) + return 1; + return 0; + } + else + return 0; + } + return 0; +} - while (at(ptr, idx) && at(ptr, idx) != '\n') +static int +copy_past_newline (ptr, idx, dst) + string_type *ptr; + unsigned int idx; + string_type *dst; +{ + int column = 0; + + while (at (ptr, idx) && at (ptr, idx) != '\n') { - if (at (ptr, idx) == '\t') - { - /* Expand tabs. Neither makeinfo nor TeX can cope well with - them. */ - do - catchar (dst, ' '); - while (++column & 7); - } - else - { - catchar(dst, at(ptr, idx)); - column++; - } - idx++; - - } - catchar(dst, at(ptr, idx)); - idx++; - return idx; + if (at (ptr, idx) == '\t') + { + /* Expand tabs. Neither makeinfo nor TeX can cope well with + them. */ + do + catchar (dst, ' '); + while (++column & 7); + } + else + { + catchar (dst, at (ptr, idx)); + column++; + } + idx++; + + } + catchar (dst, at (ptr, idx)); + idx++; + return idx; } -WORD(icopy_past_newline) +WORD (icopy_past_newline) { - tos++; - check_range (); - init_string(tos); - idx = copy_past_newline(ptr, idx, tos); - pc++; + tos++; + check_range (); + init_string (tos); + idx = copy_past_newline (ptr, idx, tos); + pc++; } /* indent - Take the string at the top of the stack, do some prettying */ + Take the string at the top of the stack, do some prettying. */ - -WORD(kill_bogus_lines) +WORD (kill_bogus_lines) { - int sl ; - - int idx = 0; - int c; - int dot = 0 ; - - string_type out; - init_string(&out); - /* Drop leading nl */ - while (at(tos,idx) == '\n') + int sl; + + int idx = 0; + int c; + int dot = 0; + + string_type out; + init_string (&out); + /* Drop leading nl. */ + while (at (tos, idx) == '\n') { - idx++; + idx++; } - c = idx; - - /* If the first char is a '.' prepend a newline so that it is - recognized properly later. */ - if (at (tos, idx) == '.') - catchar (&out, '\n'); - - /* Find the last char */ - while (at(tos,idx)) + c = idx; + + /* If the first char is a '.' prepend a newline so that it is + recognized properly later. */ + if (at (tos, idx) == '.') + catchar (&out, '\n'); + + /* Find the last char. */ + while (at (tos, idx)) { - idx++; + idx++; } - - /* find the last non white before the nl */ + + /* Find the last non white before the nl. */ + idx--; + + while (idx && isspace ((unsigned char) at (tos, idx))) idx--; - - while (idx && isspace((unsigned char) at(tos,idx))) - idx--; - idx++; - - /* Copy buffer upto last char, but blank lines before and after - dots don't count */ - sl = 1; + idx++; + + /* Copy buffer upto last char, but blank lines before and after + dots don't count. */ + sl = 1; - while (c < idx) + while (c < idx) { - if (at(tos,c) == '\n' - && at(tos,c+1) == '\n' - && at(tos,c+2) == '.') + if (at (tos, c) == '\n' + && at (tos, c + 1) == '\n' + && at (tos, c + 2) == '.') { - /* Ignore two newlines before a dot*/ - c++; + /* Ignore two newlines before a dot. */ + c++; } - else if (at(tos,c) == '.' && sl) + else if (at (tos, c) == '.' && sl) { - /* remember that this line started with a dot */ - dot=2; + /* remember that this line started with a dot. */ + dot = 2; } - else if (at(tos,c) == '\n' - && at(tos,c+1) == '\n' - && dot) + else if (at (tos, c) == '\n' + && at (tos, c + 1) == '\n' + && dot) { - c++; - /* Ignore two newlines when last line was dot */ + c++; + /* Ignore two newlines when last line was dot. */ } - catchar(&out, at(tos,c)); - if (at(tos,c) == '\n') + catchar (&out, at (tos, c)); + if (at (tos, c) == '\n') { - sl = 1; - - if (dot == 2)dot=1;else dot = 0; + sl = 1; + + if (dot == 2) + dot = 1; + else + dot = 0; } - else - sl = 0; - - c++; + else + sl = 0; + + c++; } - - /* Append nl*/ - catchar(&out, '\n'); - pc++; - delete_string(tos); - *tos = out; - - + + /* Append nl. */ + catchar (&out, '\n'); + pc++; + delete_string (tos); + *tos = out; + } -WORD(indent) +WORD (indent) { - string_type out; - int tab = 0; - int idx = 0; - int ol =0; - init_string(&out); - while (at(tos,idx)) { - switch (at(tos,idx)) + string_type out; + int tab = 0; + int idx = 0; + int ol = 0; + init_string (&out); + while (at (tos, idx)) + { + switch (at (tos, idx)) + { + case '\n': + cattext (&out, "\n"); + idx++; + if (tab && at (tos, idx)) { - case '\n': - cattext(&out,"\n"); - idx++; - if (tab && at(tos,idx)) - { - cattext(&out," "); - } - ol = 0; - break; - case '(': - tab++; - if (ol == 0) - cattext(&out," "); - idx++; - cattext(&out,"("); - ol = 1; - break; - case ')': - tab--; - cattext(&out,")"); - idx++; - ol=1; - - break; - default: - catchar(&out,at(tos,idx)); - ol=1; - - idx++; - break; + cattext (&out, " "); } - } + ol = 0; + break; + case '(': + tab++; + if (ol == 0) + cattext (&out, " "); + idx++; + cattext (&out, "("); + ol = 1; + break; + case ')': + tab--; + cattext (&out, ")"); + idx++; + ol = 1; + + break; + default: + catchar (&out, at (tos, idx)); + ol = 1; + + idx++; + break; + } + } - pc++; - delete_string(tos); - *tos = out; + pc++; + delete_string (tos); + *tos = out; } - -WORD(get_stuff_in_command) +WORD (get_stuff_in_command) { - tos++; - check_range (); - init_string(tos); + tos++; + check_range (); + init_string (tos); - while (at(ptr, idx)) { - if (iscommand(ptr, idx)) break; - idx = copy_past_newline(ptr, idx, tos); - } - pc++; + while (at (ptr, idx)) + { + if (iscommand (ptr, idx)) + break; + idx = copy_past_newline (ptr, idx, tos); + } + pc++; } -WORD(swap) +WORD (swap) { - string_type t; - - t = tos[0]; - tos[0] = tos[-1]; - tos[-1] =t; - pc++; - + string_type t; + + t = tos[0]; + tos[0] = tos[-1]; + tos[-1] = t; + pc++; } -WORD(other_dup) +WORD (other_dup) { - tos++; - check_range (); - init_string(tos); - catstr(tos, tos-1); - pc++; + tos++; + check_range (); + init_string (tos); + catstr (tos, tos - 1); + pc++; } -WORD(drop) +WORD (drop) { tos--; check_range (); pc++; } -WORD(idrop) +WORD (idrop) { isp--; icheck_range (); pc++; } -WORD(icatstr) +WORD (icatstr) { - tos--; - check_range (); - catstr(tos, tos+1); - delete_string(tos+1); - pc++; + tos--; + check_range (); + catstr (tos, tos + 1); + delete_string (tos + 1); + pc++; } -WORD(skip_past_newline) +WORD (skip_past_newline) { - while (at(ptr,idx) - && at(ptr,idx) != '\n') - idx++; + while (at (ptr, idx) + && at (ptr, idx) != '\n') idx++; - pc++; + idx++; + pc++; } - -WORD(internalmode) +WORD (internalmode) { - internal_mode = *(isp); - isp--; - icheck_range (); - pc++; + internal_mode = *(isp); + isp--; + icheck_range (); + pc++; } -WORD(maybecatstr) +WORD (maybecatstr) { - if (internal_wanted == internal_mode) + if (internal_wanted == internal_mode) { - catstr(tos-1, tos); + catstr (tos - 1, tos); } - delete_string(tos); - tos--; - check_range (); - pc++; + delete_string (tos); + tos--; + check_range (); + pc++; } char * -DEFUN(nextword,(string, word), - char *string AND - char **word) -{ - char *word_start; - int idx; - char *dst; - char *src; - - int length = 0; - - while (isspace((unsigned char) *string) || *string == '-') { - if (*string == '-') - { - while (*string && *string != '\n') - string++; - - } - else { - string++; - } - } - if (!*string) return 0; - - word_start = string; - if (*string == '"') - { - do - { - string++; - length++; - if (*string == '\\') - { - string += 2; - length += 2; - } - } - while (*string != '"'); - } - else - { - while (!isspace((unsigned char) *string)) +nextword (string, word) + char *string; + char **word; +{ + char *word_start; + int idx; + char *dst; + char *src; + + int length = 0; + + while (isspace ((unsigned char) *string) || *string == '-') + { + if (*string == '-') { + while (*string && *string != '\n') string++; - length++; - + + } + else + { + string++; } } - - *word = malloc(length + 1); - - dst = *word; - src = word_start; - + if (!*string) + return 0; - for (idx= 0; idx < length; idx++) - { - if (src[idx] == '\\') - switch (src[idx+1]) + word_start = string; + if (*string == '"') + { + do + { + string++; + length++; + if (*string == '\\') { - case 'n': - *dst++ = '\n'; - idx++; - break; - case '"': - case '\\': - *dst++ = src[idx+1]; - idx++; - break; - default: - *dst++ = '\\'; - break; + string += 2; + length += 2; } - else - *dst++ = src[idx]; + } + while (*string != '"'); } - *dst++ = 0; + else + { + while (!isspace ((unsigned char) *string)) + { + string++; + length++; + } + } + *word = malloc (length + 1); + dst = *word; + src = word_start; + for (idx = 0; idx < length; idx++) + { + if (src[idx] == '\\') + switch (src[idx + 1]) + { + case 'n': + *dst++ = '\n'; + idx++; + break; + case '"': + case '\\': + *dst++ = src[idx + 1]; + idx++; + break; + default: + *dst++ = '\\'; + break; + } + else + *dst++ = src[idx]; + } + *dst++ = 0; - if(*string) - return string + 1; - else - return 0; - + if (*string) + return string + 1; + else + return 0; } + dict_type *root; + dict_type * -DEFUN(lookup_word,(word), - char *word) +lookup_word (word) + char *word; { dict_type *ptr = root; - while (ptr) { - if (strcmp(ptr->word, word) == 0) return ptr; + while (ptr) + { + if (strcmp (ptr->word, word) == 0) + return ptr; ptr = ptr->next; - } if (warning) - fprintf(stderr,"Can't find %s\n",word); + fprintf (stderr, "Can't find %s\n", word); return 0; - - } -static void DEFUN_VOID(perform) +static void +perform (void) { tos = stack; - - while (at(ptr, idx)) { - /* It's worth looking through the command list */ - if (iscommand(ptr, idx)) - { - char *next; - dict_type *word ; - - (void) nextword(addr(ptr, idx), &next); + while (at (ptr, idx)) + { + /* It's worth looking through the command list. */ + if (iscommand (ptr, idx)) + { + char *next; + dict_type *word; - word = lookup_word(next); + (void) nextword (addr (ptr, idx), &next); + word = lookup_word (next); - + if (word) + { + exec (word); + } + else + { + if (warning) + fprintf (stderr, "warning, %s is not recognised\n", next); + skip_past_newline (); + } - if (word) - { - exec(word); } - else - { - if (warning) - fprintf(stderr,"warning, %s is not recognised\n", next); - skip_past_newline(); - } - - } - else skip_past_newline(); - + else + skip_past_newline (); } } dict_type * -DEFUN(newentry,(word), - char *word) -{ - dict_type *new = (dict_type *)malloc(sizeof(dict_type)); - new->word = word; - new->next = root; - root = new; - new->code = (stinst_type *)malloc(sizeof(stinst_type )); - new->code_length = 1; - new->code_end = 0; - return new; - +newentry (word) + char *word; +{ + dict_type *new = (dict_type *) malloc (sizeof (dict_type)); + new->word = word; + new->next = root; + root = new; + new->code = (stinst_type *) malloc (sizeof (stinst_type)); + new->code_length = 1; + new->code_end = 0; + return new; } - unsigned int -DEFUN(add_to_definition,(entry, word), - dict_type *entry AND - stinst_type word) +add_to_definition (entry, word) + dict_type *entry; + stinst_type word; { - if (entry->code_end == entry->code_length) + if (entry->code_end == entry->code_length) { - entry->code_length += 2; - entry->code = - (stinst_type *) realloc((char *)(entry->code), - entry->code_length *sizeof(word_type)); + entry->code_length += 2; + entry->code = + (stinst_type *) realloc ((char *) (entry->code), + entry->code_length * sizeof (word_type)); } - entry->code[entry->code_end] = word; - -return entry->code_end++; -} - - - - - + entry->code[entry->code_end] = word; + return entry->code_end++; +} void -DEFUN(add_intrinsic,(name, func), - char *name AND - void (*func)()) +add_intrinsic (name, func) + char *name; + void (*func) (); { - dict_type *new = newentry(name); - add_to_definition(new, func); - add_to_definition(new, 0); + dict_type *new = newentry (name); + add_to_definition (new, func); + add_to_definition (new, 0); } void -DEFUN(add_var,(name), - char *name) +add_var (name) + char *name; { - dict_type *new = newentry(name); - add_to_definition(new, push_number); - add_to_definition(new, (stinst_type)(&(new->var))); - add_to_definition(new,0); + dict_type *new = newentry (name); + add_to_definition (new, push_number); + add_to_definition (new, (stinst_type) (&(new->var))); + add_to_definition (new, 0); } - -void -DEFUN(compile, (string), - char *string) +void +compile (string) + char *string; { - /* add words to the dictionary */ - char *word; - string = nextword(string, &word); - while (string && *string && word[0]) + /* Add words to the dictionary. */ + char *word; + string = nextword (string, &word); + while (string && *string && word[0]) { - if (strcmp(word,"var")==0) + if (strcmp (word, "var") == 0) { - string=nextword(string, &word); - - add_var(word); - string=nextword(string, &word); + string = nextword (string, &word); + + add_var (word); + string = nextword (string, &word); } -else - - if (word[0] == ':') + else if (word[0] == ':') { - dict_type *ptr; - /* Compile a word and add to dictionary */ - string = nextword(string, &word); - - ptr = newentry(word); - string = nextword(string, &word); - while (word[0] != ';' ) + dict_type *ptr; + /* Compile a word and add to dictionary. */ + string = nextword (string, &word); + + ptr = newentry (word); + string = nextword (string, &word); + while (word[0] != ';') { - switch (word[0]) - { - case '"': - /* got a string, embed magic push string - function */ - add_to_definition(ptr, push_text); - add_to_definition(ptr, (stinst_type)(word+1)); - break; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - /* Got a number, embedd the magic push number - function */ - add_to_definition(ptr, push_number); - add_to_definition(ptr, (stinst_type)atol(word)); - break; - default: - add_to_definition(ptr, call); - add_to_definition(ptr, (stinst_type)lookup_word(word)); - } - - string = nextword(string, &word); + switch (word[0]) + { + case '"': + /* got a string, embed magic push string + function */ + add_to_definition (ptr, push_text); + add_to_definition (ptr, (stinst_type) (word + 1)); + break; + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + /* Got a number, embedd the magic push number + function */ + add_to_definition (ptr, push_number); + add_to_definition (ptr, (stinst_type) atol (word)); + break; + default: + add_to_definition (ptr, call); + add_to_definition (ptr, (stinst_type) lookup_word (word)); + } + + string = nextword (string, &word); } - add_to_definition(ptr,0); - string = nextword(string, &word); + add_to_definition (ptr, 0); + string = nextword (string, &word); } - else + else { - fprintf(stderr,"syntax error at %s\n",string-1); - } + fprintf (stderr, "syntax error at %s\n", string - 1); + } } - } - -static void DEFUN_VOID(bang) +static void +bang (void) { - *(long *)((isp[0])) = isp[-1]; - isp-=2; + *(long *) ((isp[0])) = isp[-1]; + isp -= 2; icheck_range (); pc++; } -WORD(atsign) +WORD (atsign) { - isp[0] = *(long *)(isp[0]); - pc++; + isp[0] = *(long *) (isp[0]); + pc++; } -WORD(hello) +WORD (hello) { - printf("hello\n"); - pc++; + printf ("hello\n"); + pc++; } -WORD(stdout_) +WORD (stdout_) { isp++; icheck_range (); @@ -1425,7 +1410,7 @@ WORD(stdout_) pc++; } -WORD(stderr_) +WORD (stderr_) { isp++; icheck_range (); @@ -1433,7 +1418,7 @@ WORD(stderr_) pc++; } -WORD(print) +WORD (print) { if (*isp == 1) write_buffer (tos, stdout); @@ -1448,29 +1433,29 @@ WORD(print) pc++; } - -static void DEFUN(read_in, (str, file), - string_type *str AND - FILE *file) +static void +read_in (str, file) + string_type *str; + FILE *file; { - char buff[10000]; - unsigned int r; - do + char buff[10000]; + unsigned int r; + do { - r = fread(buff, 1, sizeof(buff), file); - catbuf(str, buff, r); + r = fread (buff, 1, sizeof (buff), file); + catbuf (str, buff, r); } - while (r); - buff[0] = 0; - - catbuf(str, buff,1); -} + while (r); + buff[0] = 0; + catbuf (str, buff, 1); +} -static void DEFUN_VOID(usage) +static void +usage (void) { - fprintf(stderr,"usage: -[d|i|g] file\n"); - exit(33); + fprintf (stderr, "usage: -[d|i|g] file\n"); + exit (33); } /* There is no reliable way to declare exit. Sometimes it returns @@ -1484,95 +1469,98 @@ chew_exit () exit (0); } -int DEFUN(main,(ac,av), -int ac AND -char *av[]) +int +main (ac, av) + int ac; + char *av[]; { unsigned int i; string_type buffer; string_type pptr; - init_string(&buffer); - init_string(&pptr); - init_string(stack+0); - tos=stack+1; + init_string (&buffer); + init_string (&pptr); + init_string (stack + 0); + tos = stack + 1; ptr = &pptr; - - add_intrinsic("push_text", push_text); - add_intrinsic("!", bang); - add_intrinsic("@", atsign); - add_intrinsic("hello",hello); - add_intrinsic("stdout",stdout_); - add_intrinsic("stderr",stderr_); - add_intrinsic("print",print); - add_intrinsic("skip_past_newline", skip_past_newline ); - add_intrinsic("catstr", icatstr ); - add_intrinsic("copy_past_newline", icopy_past_newline ); - add_intrinsic("dup", other_dup ); - add_intrinsic("drop", drop); - add_intrinsic("idrop", idrop); - add_intrinsic("remchar", remchar ); - add_intrinsic("get_stuff_in_command", get_stuff_in_command ); - add_intrinsic("do_fancy_stuff", do_fancy_stuff ); - add_intrinsic("bulletize", bulletize ); - add_intrinsic("courierize", courierize ); + + add_intrinsic ("push_text", push_text); + add_intrinsic ("!", bang); + add_intrinsic ("@", atsign); + add_intrinsic ("hello", hello); + add_intrinsic ("stdout", stdout_); + add_intrinsic ("stderr", stderr_); + add_intrinsic ("print", print); + add_intrinsic ("skip_past_newline", skip_past_newline); + add_intrinsic ("catstr", icatstr); + add_intrinsic ("copy_past_newline", icopy_past_newline); + add_intrinsic ("dup", other_dup); + add_intrinsic ("drop", drop); + add_intrinsic ("idrop", idrop); + add_intrinsic ("remchar", remchar); + add_intrinsic ("get_stuff_in_command", get_stuff_in_command); + add_intrinsic ("do_fancy_stuff", do_fancy_stuff); + add_intrinsic ("bulletize", bulletize); + add_intrinsic ("courierize", courierize); /* If the following line gives an error, exit() is not declared in the ../hosts/foo.h file for this host. Fix it there, not here! */ /* No, don't fix it anywhere; see comment on chew_exit--Ian Taylor. */ - add_intrinsic("exit", chew_exit ); - add_intrinsic("swap", swap ); - add_intrinsic("outputdots", outputdots ); - add_intrinsic("paramstuff", paramstuff ); - add_intrinsic("maybecatstr", maybecatstr ); - add_intrinsic("translatecomments", translatecomments ); - add_intrinsic("kill_bogus_lines", kill_bogus_lines); - add_intrinsic("indent", indent); - add_intrinsic("internalmode", internalmode); - add_intrinsic("print_stack_level", print_stack_level); - add_intrinsic("strip_trailing_newlines", strip_trailing_newlines); - - /* Put a nl at the start */ - catchar(&buffer,'\n'); - - read_in(&buffer, stdin); - remove_noncomments(&buffer, ptr); - for (i= 1; i < (unsigned int) ac; i++) - { - if (av[i][0] == '-') + add_intrinsic ("exit", chew_exit); + add_intrinsic ("swap", swap); + add_intrinsic ("outputdots", outputdots); + add_intrinsic ("paramstuff", paramstuff); + add_intrinsic ("maybecatstr", maybecatstr); + add_intrinsic ("translatecomments", translatecomments); + add_intrinsic ("kill_bogus_lines", kill_bogus_lines); + add_intrinsic ("indent", indent); + add_intrinsic ("internalmode", internalmode); + add_intrinsic ("print_stack_level", print_stack_level); + add_intrinsic ("strip_trailing_newlines", strip_trailing_newlines); + + /* Put a nl at the start. */ + catchar (&buffer, '\n'); + + read_in (&buffer, stdin); + remove_noncomments (&buffer, ptr); + for (i = 1; i < (unsigned int) ac; i++) { - if (av[i][1] == 'f') - { - string_type b; - FILE *f; - init_string(&b); - - f = fopen(av[i+1],"r"); - if (!f) + if (av[i][0] == '-') { - fprintf(stderr,"Can't open the input file %s\n",av[i+1]); - return 33; - } + if (av[i][1] == 'f') + { + string_type b; + FILE *f; + init_string (&b); - read_in(&b, f); - compile(b.ptr); - perform(); - } - else if (av[i][1] == 'i') - { - internal_wanted = 1; - } - else if (av[i][1] == 'w') - { - warning = 1; - } - else - usage (); + f = fopen (av[i + 1], "r"); + if (!f) + { + fprintf (stderr, "Can't open the input file %s\n", + av[i + 1]); + return 33; + } + + read_in (&b, f); + compile (b.ptr); + perform (); + } + else if (av[i][1] == 'i') + { + internal_wanted = 1; + } + else if (av[i][1] == 'w') + { + warning = 1; + } + else + usage (); + } } - } - write_buffer(stack+0, stdout); + write_buffer (stack + 0, stdout); if (tos != stack) { - fprintf (stderr, "finishing with current stack level %d\n", tos - stack); + fprintf (stderr, "finishing with current stack level %d\n", + tos - stack); return 1; } return 0; diff --git a/contrib/binutils/bfd/doc/coffcode.texi b/contrib/binutils/bfd/doc/coffcode.texi index fcb7e75..8406a04 100644 --- a/contrib/binutils/bfd/doc/coffcode.texi +++ b/contrib/binutils/bfd/doc/coffcode.texi @@ -365,6 +365,8 @@ dependent COFF routines: boolean _bfd_coff_long_filenames; boolean _bfd_coff_long_section_names; unsigned int _bfd_coff_default_section_alignment_power; + boolean _bfd_coff_force_symnames_in_strings; + unsigned int _bfd_coff_debug_string_prefix_length; void (*_bfd_coff_swap_filehdr_in) PARAMS (( bfd *abfd, PTR ext, @@ -467,12 +469,12 @@ dependent COFF routines: struct bfd_link_info *info, bfd *abfd, const char *name, - flagword flags, + flagword flags, asection *section, bfd_vma value, const char *string, boolean copy, - boolean collect, + boolean collect, struct bfd_link_hash_entry **hashp)); boolean (*_bfd_coff_link_output_has_begun) PARAMS (( @@ -562,6 +564,12 @@ dependent COFF routines: #define bfd_coff_symname_in_debug(abfd, sym)\ ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym)) +#define bfd_coff_force_symnames_in_strings(abfd)\ + (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings) + +#define bfd_coff_debug_string_prefix_length(abfd)\ + (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length) + #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\ ((coff_backend_info (abfd)->_bfd_coff_print_aux)\ (abfd, file, base, symbol, aux, indaux)) diff --git a/contrib/binutils/bfd/doc/format.texi b/contrib/binutils/bfd/doc/format.texi index 3281c36..a181d1c 100644 --- a/contrib/binutils/bfd/doc/format.texi +++ b/contrib/binutils/bfd/doc/format.texi @@ -1,6 +1,6 @@ @section File formats A format is a BFD concept of high level file contents type. The -formats supported by BFD are: +formats supported by BFD are: @itemize @bullet @@ -43,7 +43,7 @@ matches, it is used. If not, exactly one target must recognize the file, or an error results. The function returns @code{true} on success, otherwise @code{false} -with one of the following error codes: +with one of the following error codes: @itemize @bullet diff --git a/contrib/binutils/bfd/doc/hash.texi b/contrib/binutils/bfd/doc/hash.texi index 7ddc900..eb87273 100644 --- a/contrib/binutils/bfd/doc/hash.texi +++ b/contrib/binutils/bfd/doc/hash.texi @@ -219,7 +219,7 @@ in a linker hash table entry: @code{type}, @code{written} and @node Write Other Derived Routines, , Write the Derived Creation Routine, Deriving a New Hash Table Type @subsubsection Write other derived routines You will want to write other routines for your new hash table, -as well. +as well. You will want an initialization routine which calls the initialization routine of the hash table you are deriving from diff --git a/contrib/binutils/bfd/doc/libbfd.texi b/contrib/binutils/bfd/doc/libbfd.texi index d202dc2..b4b0a14 100644 --- a/contrib/binutils/bfd/doc/libbfd.texi +++ b/contrib/binutils/bfd/doc/libbfd.texi @@ -40,16 +40,16 @@ To detect calling these with less than a @code{bfd_vma}, use @code{gcc -Wconversion} on a host with 64 bit @code{bfd_vma}'s. @example - /* Byte swapping macros for user section data. */ +/* Byte swapping macros for user section data. */ #define bfd_put_8(abfd, val, ptr) \ - ((void) (*((unsigned char *)(ptr)) = (unsigned char)(val))) + ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val))) #define bfd_put_signed_8 \ bfd_put_8 #define bfd_get_8(abfd, ptr) \ - (*(unsigned char *)(ptr)) + (*(unsigned char *) (ptr)) #define bfd_get_signed_8(abfd, ptr) \ - ((*(unsigned char *)(ptr) ^ 0x80) - 0x80) + ((*(unsigned char *) (ptr) ^ 0x80) - 0x80) #define bfd_put_16(abfd, val, ptr) \ BFD_SEND(abfd, bfd_putx16, ((val),(ptr))) @@ -104,7 +104,7 @@ some object files keep their header records in big endian order and their data in little endian order. @example - /* Byte swapping macros for file header data. */ +/* Byte swapping macros for file header data. */ #define bfd_h_put_8(abfd, val, ptr) \ bfd_put_8 (abfd, val, ptr) diff --git a/contrib/binutils/bfd/doc/linker.texi b/contrib/binutils/bfd/doc/linker.texi index b618156..5105cc7 100644 --- a/contrib/binutils/bfd/doc/linker.texi +++ b/contrib/binutils/bfd/doc/linker.texi @@ -30,7 +30,7 @@ ends which have implemented versions of these routines are a.out (in @code{aoutx.h}) and ECOFF (in @code{ecoff.c}). The a.out routines are used as examples throughout this section. -@menu +@menu * Creating a Linker Hash Table:: * Adding Symbols to the Hash Table:: * Performing the Final Link:: diff --git a/contrib/binutils/bfd/doc/reloc.texi b/contrib/binutils/bfd/doc/reloc.texi index 89811d8..eb31eca 100644 --- a/contrib/binutils/bfd/doc/reloc.texi +++ b/contrib/binutils/bfd/doc/reloc.texi @@ -764,6 +764,16 @@ MIPS ELF relocations. @deffnx {} BFD_RELOC_386_GOTPC i386/elf relocations @end deffn +@deffn {} BFD_RELOC_X86_64_GOT32 +@deffnx {} BFD_RELOC_X86_64_PLT32 +@deffnx {} BFD_RELOC_X86_64_COPY +@deffnx {} BFD_RELOC_X86_64_GLOB_DAT +@deffnx {} BFD_RELOC_X86_64_JUMP_SLOT +@deffnx {} BFD_RELOC_X86_64_RELATIVE +@deffnx {} BFD_RELOC_X86_64_GOTPCREL +@deffnx {} BFD_RELOC_X86_64_32S +x86-64/elf relocations +@end deffn @deffn {} BFD_RELOC_NS32K_IMM_8 @deffnx {} BFD_RELOC_NS32K_IMM_16 @deffnx {} BFD_RELOC_NS32K_IMM_32 @@ -830,6 +840,16 @@ It generally does map to one of the other relocation types. ARM 26 bit pc-relative branch. The lowest two bits must be zero and are not stored in the instruction. @end deffn +@deffn {} BFD_RELOC_ARM_PCREL_BLX +ARM 26 bit pc-relative branch. The lowest bit must be zero and is +not stored in the instruction. The 2nd lowest bit comes from a 1 bit +field in the instruction. +@end deffn +@deffn {} BFD_RELOC_THUMB_PCREL_BLX +Thumb 22 bit pc-relative branch. The lowest bit must be zero and is +not stored in the instruction. The 2nd lowest bit comes from a 1 bit +field in the instruction. +@end deffn @deffn {} BFD_RELOC_ARM_IMMEDIATE @deffnx {} BFD_RELOC_ARM_ADRL_IMMEDIATE @deffnx {} BFD_RELOC_ARM_OFFSET_IMM @@ -877,6 +897,13 @@ These relocs are only used within the ARM assembler. They are not @deffnx {} BFD_RELOC_SH_CODE @deffnx {} BFD_RELOC_SH_DATA @deffnx {} BFD_RELOC_SH_LABEL +@deffnx {} BFD_RELOC_SH_LOOP_START +@deffnx {} BFD_RELOC_SH_LOOP_END +@deffnx {} BFD_RELOC_SH_COPY +@deffnx {} BFD_RELOC_SH_GLOB_DAT +@deffnx {} BFD_RELOC_SH_JMP_SLOT +@deffnx {} BFD_RELOC_SH_RELATIVE +@deffnx {} BFD_RELOC_SH_GOTPC Hitachi SH relocs. Not all of these appear in object files. @end deffn @deffn {} BFD_RELOC_THUMB_PCREL_BRANCH9 @@ -886,7 +913,7 @@ Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must be zero and is not stored in the instruction. @end deffn @deffn {} BFD_RELOC_ARC_B22_PCREL -Argonaut RISC Core (ARC) relocs. +ARC Cores relocs. ARC 22 bit pc-relative branch. The lowest two bits must be zero and are not stored in the instruction. The high 20 bits are installed in bits 26 through 7 of the instruction. @@ -1060,6 +1087,29 @@ This is a 8bit DP reloc for the tms320c30, where the most significant 8 bits of a 24 bit word are placed into the least significant 8 bits of the opcode. @end deffn +@deffn {} BFD_RELOC_TIC54X_PARTLS7 +This is a 7bit reloc for the tms320c54x, where the least +significant 7 bits of a 16 bit word are placed into the least +significant 7 bits of the opcode. +@end deffn +@deffn {} BFD_RELOC_TIC54X_PARTMS9 +This is a 9bit DP reloc for the tms320c54x, where the most +significant 9 bits of a 16 bit word are placed into the least +significant 9 bits of the opcode. +@end deffn +@deffn {} BFD_RELOC_TIC54X_23 +This is an extended address 23-bit reloc for the tms320c54x. +@end deffn +@deffn {} BFD_RELOC_TIC54X_16_OF_23 +This is a 16-bit reloc for the tms320c54x, where the least +significant 16 bits of a 23-bit extended address are placed into +the opcode. +@end deffn +@deffn {} BFD_RELOC_TIC54X_MS7_OF_23 +This is a reloc for the tms320c54x, where the most +significant 7 bits of a 23-bit extended address are placed into +the opcode. +@end deffn @deffn {} BFD_RELOC_FR30_48 This is a 48 bit reloc for the FR30 that stores 32 bits. @end deffn @@ -1187,6 +1237,126 @@ describes the entry that is being used. For Rela hosts, this offset is stored in the reloc's addend. For Rel hosts, we are forced to put this offset in the reloc's section offset. @end deffn +@deffn {} BFD_RELOC_IA64_IMM14 +@deffnx {} BFD_RELOC_IA64_IMM22 +@deffnx {} BFD_RELOC_IA64_IMM64 +@deffnx {} BFD_RELOC_IA64_DIR32MSB +@deffnx {} BFD_RELOC_IA64_DIR32LSB +@deffnx {} BFD_RELOC_IA64_DIR64MSB +@deffnx {} BFD_RELOC_IA64_DIR64LSB +@deffnx {} BFD_RELOC_IA64_GPREL22 +@deffnx {} BFD_RELOC_IA64_GPREL64I +@deffnx {} BFD_RELOC_IA64_GPREL32MSB +@deffnx {} BFD_RELOC_IA64_GPREL32LSB +@deffnx {} BFD_RELOC_IA64_GPREL64MSB +@deffnx {} BFD_RELOC_IA64_GPREL64LSB +@deffnx {} BFD_RELOC_IA64_LTOFF22 +@deffnx {} BFD_RELOC_IA64_LTOFF64I +@deffnx {} BFD_RELOC_IA64_PLTOFF22 +@deffnx {} BFD_RELOC_IA64_PLTOFF64I +@deffnx {} BFD_RELOC_IA64_PLTOFF64MSB +@deffnx {} BFD_RELOC_IA64_PLTOFF64LSB +@deffnx {} BFD_RELOC_IA64_FPTR64I +@deffnx {} BFD_RELOC_IA64_FPTR32MSB +@deffnx {} BFD_RELOC_IA64_FPTR32LSB +@deffnx {} BFD_RELOC_IA64_FPTR64MSB +@deffnx {} BFD_RELOC_IA64_FPTR64LSB +@deffnx {} BFD_RELOC_IA64_PCREL21B +@deffnx {} BFD_RELOC_IA64_PCREL21BI +@deffnx {} BFD_RELOC_IA64_PCREL21M +@deffnx {} BFD_RELOC_IA64_PCREL21F +@deffnx {} BFD_RELOC_IA64_PCREL22 +@deffnx {} BFD_RELOC_IA64_PCREL60B +@deffnx {} BFD_RELOC_IA64_PCREL64I +@deffnx {} BFD_RELOC_IA64_PCREL32MSB +@deffnx {} BFD_RELOC_IA64_PCREL32LSB +@deffnx {} BFD_RELOC_IA64_PCREL64MSB +@deffnx {} BFD_RELOC_IA64_PCREL64LSB +@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR22 +@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64I +@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64MSB +@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64LSB +@deffnx {} BFD_RELOC_IA64_SEGREL32MSB +@deffnx {} BFD_RELOC_IA64_SEGREL32LSB +@deffnx {} BFD_RELOC_IA64_SEGREL64MSB +@deffnx {} BFD_RELOC_IA64_SEGREL64LSB +@deffnx {} BFD_RELOC_IA64_SECREL32MSB +@deffnx {} BFD_RELOC_IA64_SECREL32LSB +@deffnx {} BFD_RELOC_IA64_SECREL64MSB +@deffnx {} BFD_RELOC_IA64_SECREL64LSB +@deffnx {} BFD_RELOC_IA64_REL32MSB +@deffnx {} BFD_RELOC_IA64_REL32LSB +@deffnx {} BFD_RELOC_IA64_REL64MSB +@deffnx {} BFD_RELOC_IA64_REL64LSB +@deffnx {} BFD_RELOC_IA64_LTV32MSB +@deffnx {} BFD_RELOC_IA64_LTV32LSB +@deffnx {} BFD_RELOC_IA64_LTV64MSB +@deffnx {} BFD_RELOC_IA64_LTV64LSB +@deffnx {} BFD_RELOC_IA64_IPLTMSB +@deffnx {} BFD_RELOC_IA64_IPLTLSB +@deffnx {} BFD_RELOC_IA64_COPY +@deffnx {} BFD_RELOC_IA64_TPREL22 +@deffnx {} BFD_RELOC_IA64_TPREL64MSB +@deffnx {} BFD_RELOC_IA64_TPREL64LSB +@deffnx {} BFD_RELOC_IA64_LTOFF_TP22 +@deffnx {} BFD_RELOC_IA64_LTOFF22X +@deffnx {} BFD_RELOC_IA64_LDXMOV +Intel IA64 Relocations. +@end deffn +@deffn {} BFD_RELOC_M68HC11_HI8 +Motorola 68HC11 reloc. +This is the 8 bits high part of an absolute address. +@end deffn +@deffn {} BFD_RELOC_M68HC11_LO8 +Motorola 68HC11 reloc. +This is the 8 bits low part of an absolute address. +@end deffn +@deffn {} BFD_RELOC_M68HC11_3B +Motorola 68HC11 reloc. +This is the 3 bits of a value. +@end deffn +@deffn {} BFD_RELOC_CRIS_BDISP8 +@deffnx {} BFD_RELOC_CRIS_UNSIGNED_5 +@deffnx {} BFD_RELOC_CRIS_SIGNED_6 +@deffnx {} BFD_RELOC_CRIS_UNSIGNED_6 +@deffnx {} BFD_RELOC_CRIS_UNSIGNED_4 +These relocs are only used within the CRIS assembler. They are not +(at present) written to any object files. +@end deffn +@deffn {} BFD_RELOC_860_COPY +@deffnx {} BFD_RELOC_860_GLOB_DAT +@deffnx {} BFD_RELOC_860_JUMP_SLOT +@deffnx {} BFD_RELOC_860_RELATIVE +@deffnx {} BFD_RELOC_860_PC26 +@deffnx {} BFD_RELOC_860_PLT26 +@deffnx {} BFD_RELOC_860_PC16 +@deffnx {} BFD_RELOC_860_LOW0 +@deffnx {} BFD_RELOC_860_SPLIT0 +@deffnx {} BFD_RELOC_860_LOW1 +@deffnx {} BFD_RELOC_860_SPLIT1 +@deffnx {} BFD_RELOC_860_LOW2 +@deffnx {} BFD_RELOC_860_SPLIT2 +@deffnx {} BFD_RELOC_860_LOW3 +@deffnx {} BFD_RELOC_860_LOGOT0 +@deffnx {} BFD_RELOC_860_SPGOT0 +@deffnx {} BFD_RELOC_860_LOGOT1 +@deffnx {} BFD_RELOC_860_SPGOT1 +@deffnx {} BFD_RELOC_860_LOGOTOFF0 +@deffnx {} BFD_RELOC_860_SPGOTOFF0 +@deffnx {} BFD_RELOC_860_LOGOTOFF1 +@deffnx {} BFD_RELOC_860_SPGOTOFF1 +@deffnx {} BFD_RELOC_860_LOGOTOFF2 +@deffnx {} BFD_RELOC_860_LOGOTOFF3 +@deffnx {} BFD_RELOC_860_LOPC +@deffnx {} BFD_RELOC_860_HIGHADJ +@deffnx {} BFD_RELOC_860_HAGOT +@deffnx {} BFD_RELOC_860_HAGOTOFF +@deffnx {} BFD_RELOC_860_HAPC +@deffnx {} BFD_RELOC_860_HIGH +@deffnx {} BFD_RELOC_860_HIGOT +@deffnx {} BFD_RELOC_860_HIGOTOFF +Intel i860 Relocations. +@end deffn @example diff --git a/contrib/binutils/bfd/doc/section.texi b/contrib/binutils/bfd/doc/section.texi index 2569590..4b0ec017 100644 --- a/contrib/binutils/bfd/doc/section.texi +++ b/contrib/binutils/bfd/doc/section.texi @@ -107,10 +107,10 @@ Here is the section structure: @example - /* This structure is used for a comdat section, as in PE. A comdat - section is associated with a particular symbol. When the linker - sees a comdat section, it keeps only one of the sections with a - given name and associated with a given symbol. */ +/* This structure is used for a comdat section, as in PE. A comdat + section is associated with a particular symbol. When the linker + sees a comdat section, it keeps only one of the sections with a + given name and associated with a given symbol. */ struct bfd_comdat_info @{ @@ -122,340 +122,362 @@ struct bfd_comdat_info specific code; it is not an index into the list returned by bfd_canonicalize_symtab. */ long symbol; - - /* If this section is being discarded, the linker uses this field - to point to the input section which is being kept. */ - struct sec *sec; @}; typedef struct sec @{ - /* The name of the section; the name isn't a copy, the pointer is - the same as that passed to bfd_make_section. */ + /* The name of the section; the name isn't a copy, the pointer is + the same as that passed to bfd_make_section. */ + + const char *name; + + /* A unique sequence number. */ - CONST char *name; + int id; - /* Which section is it; 0..nth. */ + /* Which section is it; 0..nth. */ - int index; + int index; - /* The next section in the list belonging to the BFD, or NULL. */ + /* The next section in the list belonging to the BFD, or NULL. */ - struct sec *next; + struct sec *next; - /* The field flags contains attributes of the section. Some - flags are read in from the object file, and some are - synthesized from other information. */ + /* The field flags contains attributes of the section. Some + flags are read in from the object file, and some are + synthesized from other information. */ - flagword flags; + flagword flags; #define SEC_NO_FLAGS 0x000 - /* Tells the OS to allocate space for this section when loading. - This is clear for a section containing debug information - only. */ + /* Tells the OS to allocate space for this section when loading. + This is clear for a section containing debug information only. */ #define SEC_ALLOC 0x001 - /* Tells the OS to load the section from the file when loading. - This is clear for a .bss section. */ + /* Tells the OS to load the section from the file when loading. + This is clear for a .bss section. */ #define SEC_LOAD 0x002 - /* The section contains data still to be relocated, so there is - some relocation information too. */ + /* The section contains data still to be relocated, so there is + some relocation information too. */ #define SEC_RELOC 0x004 #if 0 /* Obsolete ? */ #define SEC_BALIGN 0x008 #endif - /* A signal to the OS that the section contains read only - data. */ + /* A signal to the OS that the section contains read only data. */ #define SEC_READONLY 0x010 - /* The section contains code only. */ + /* The section contains code only. */ #define SEC_CODE 0x020 - /* The section contains data only. */ + /* The section contains data only. */ #define SEC_DATA 0x040 - /* The section will reside in ROM. */ + /* The section will reside in ROM. */ #define SEC_ROM 0x080 - /* The section contains constructor information. This section - type is used by the linker to create lists of constructors and - destructors used by @code{g++}. When a back end sees a symbol - which should be used in a constructor list, it creates a new - section for the type of name (e.g., @code{__CTOR_LIST__}), attaches - the symbol to it, and builds a relocation. To build the lists - of constructors, all the linker has to do is catenate all the - sections called @code{__CTOR_LIST__} and relocate the data - contained within - exactly the operations it would peform on - standard data. */ + /* The section contains constructor information. This section + type is used by the linker to create lists of constructors and + destructors used by @code{g++}. When a back end sees a symbol + which should be used in a constructor list, it creates a new + section for the type of name (e.g., @code{__CTOR_LIST__}), attaches + the symbol to it, and builds a relocation. To build the lists + of constructors, all the linker has to do is catenate all the + sections called @code{__CTOR_LIST__} and relocate the data + contained within - exactly the operations it would peform on + standard data. */ #define SEC_CONSTRUCTOR 0x100 - /* The section is a constructor, and should be placed at the - end of the text, data, or bss section(?). */ + /* The section is a constructor, and should be placed at the + end of the text, data, or bss section(?). */ #define SEC_CONSTRUCTOR_TEXT 0x1100 #define SEC_CONSTRUCTOR_DATA 0x2100 #define SEC_CONSTRUCTOR_BSS 0x3100 - /* The section has contents - a data section could be - @code{SEC_ALLOC} | @code{SEC_HAS_CONTENTS}; a debug section could be - @code{SEC_HAS_CONTENTS} */ + /* The section has contents - a data section could be + @code{SEC_ALLOC} | @code{SEC_HAS_CONTENTS}; a debug section could be + @code{SEC_HAS_CONTENTS} */ #define SEC_HAS_CONTENTS 0x200 - /* An instruction to the linker to not output the section - even if it has information which would normally be written. */ + /* An instruction to the linker to not output the section + even if it has information which would normally be written. */ #define SEC_NEVER_LOAD 0x400 - /* The section is a COFF shared library section. This flag is - only for the linker. If this type of section appears in - the input file, the linker must copy it to the output file - without changing the vma or size. FIXME: Although this - was originally intended to be general, it really is COFF - specific (and the flag was renamed to indicate this). It - might be cleaner to have some more general mechanism to - allow the back end to control what the linker does with - sections. */ + /* The section is a COFF shared library section. This flag is + only for the linker. If this type of section appears in + the input file, the linker must copy it to the output file + without changing the vma or size. FIXME: Although this + was originally intended to be general, it really is COFF + specific (and the flag was renamed to indicate this). It + might be cleaner to have some more general mechanism to + allow the back end to control what the linker does with + sections. */ #define SEC_COFF_SHARED_LIBRARY 0x800 - /* The section contains common symbols (symbols may be defined - multiple times, the value of a symbol is the amount of - space it requires, and the largest symbol value is the one - used). Most targets have exactly one of these (which we - translate to bfd_com_section_ptr), but ECOFF has two. */ + /* The section has GOT references. This flag is only for the + linker, and is currently only used by the elf32-hppa back end. + It will be set if global offset table references were detected + in this section, which indicate to the linker that the section + contains PIC code, and must be handled specially when doing a + static link. */ +#define SEC_HAS_GOT_REF 0x4000 + + /* The section contains common symbols (symbols may be defined + multiple times, the value of a symbol is the amount of + space it requires, and the largest symbol value is the one + used). Most targets have exactly one of these (which we + translate to bfd_com_section_ptr), but ECOFF has two. */ #define SEC_IS_COMMON 0x8000 - /* The section contains only debugging information. For - example, this is set for ELF .debug and .stab sections. - strip tests this flag to see if a section can be - discarded. */ + /* The section contains only debugging information. For + example, this is set for ELF .debug and .stab sections. + strip tests this flag to see if a section can be + discarded. */ #define SEC_DEBUGGING 0x10000 - /* The contents of this section are held in memory pointed to - by the contents field. This is checked by - bfd_get_section_contents, and the data is retrieved from - memory if appropriate. */ + /* The contents of this section are held in memory pointed to + by the contents field. This is checked by bfd_get_section_contents, + and the data is retrieved from memory if appropriate. */ #define SEC_IN_MEMORY 0x20000 - /* The contents of this section are to be excluded by the - linker for executable and shared objects unless those - objects are to be further relocated. */ + /* The contents of this section are to be excluded by the + linker for executable and shared objects unless those + objects are to be further relocated. */ #define SEC_EXCLUDE 0x40000 - /* The contents of this section are to be sorted by the - based on the address specified in the associated symbol - table. */ + /* The contents of this section are to be sorted by the + based on the address specified in the associated symbol + table. */ #define SEC_SORT_ENTRIES 0x80000 - /* When linking, duplicate sections of the same name should be - discarded, rather than being combined into a single section as - is usually done. This is similar to how common symbols are - handled. See SEC_LINK_DUPLICATES below. */ + /* When linking, duplicate sections of the same name should be + discarded, rather than being combined into a single section as + is usually done. This is similar to how common symbols are + handled. See SEC_LINK_DUPLICATES below. */ #define SEC_LINK_ONCE 0x100000 - /* If SEC_LINK_ONCE is set, this bitfield describes how the linker - should handle duplicate sections. */ + /* If SEC_LINK_ONCE is set, this bitfield describes how the linker + should handle duplicate sections. */ #define SEC_LINK_DUPLICATES 0x600000 - /* This value for SEC_LINK_DUPLICATES means that duplicate - sections with the same name should simply be discarded. */ + /* This value for SEC_LINK_DUPLICATES means that duplicate + sections with the same name should simply be discarded. */ #define SEC_LINK_DUPLICATES_DISCARD 0x0 - /* This value for SEC_LINK_DUPLICATES means that the linker - should warn if there are any duplicate sections, although - it should still only link one copy. */ + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if there are any duplicate sections, although + it should still only link one copy. */ #define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000 - /* This value for SEC_LINK_DUPLICATES means that the linker - should warn if any duplicate sections are a different size. */ + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if any duplicate sections are a different size. */ #define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000 - /* This value for SEC_LINK_DUPLICATES means that the linker - should warn if any duplicate sections contain different - contents. */ + /* This value for SEC_LINK_DUPLICATES means that the linker + should warn if any duplicate sections contain different + contents. */ #define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000 - /* This section was created by the linker as part of dynamic - relocation or other arcane processing. It is skipped when - going through the first-pass output, trusting that someone - else up the line will take care of it later. */ + /* This section was created by the linker as part of dynamic + relocation or other arcane processing. It is skipped when + going through the first-pass output, trusting that someone + else up the line will take care of it later. */ #define SEC_LINKER_CREATED 0x800000 - /* This section should not be subject to garbage collection. */ + /* This section should not be subject to garbage collection. */ #define SEC_KEEP 0x1000000 - /* This section contains "short" data, and should be placed - "near" the GP. */ + /* This section contains "short" data, and should be placed + "near" the GP. */ #define SEC_SMALL_DATA 0x2000000 - /* This section contains data which may be shared with other - executables or shared objects. */ + /* This section contains data which may be shared with other + executables or shared objects. */ #define SEC_SHARED 0x4000000 - /* End of section flags. */ + /* When a section with this flag is being linked, then if the size of + the input section is less than a page, it should not cross a page + boundary. If the size of the input section is one page or more, it + should be aligned on a page boundary. */ +#define SEC_BLOCK 0x8000000 + + /* Conditionally link this section; do not link if there are no + references found to any symbol in the section. */ +#define SEC_CLINK 0x10000000 + + /* End of section flags. */ + + /* Some internal packed boolean fields. */ - /* Some internal packed boolean fields. */ + /* See the vma field. */ + unsigned int user_set_vma : 1; - /* See the vma field. */ - unsigned int user_set_vma : 1; + /* Whether relocations have been processed. */ + unsigned int reloc_done : 1; - /* Whether relocations have been processed. */ - unsigned int reloc_done : 1; + /* A mark flag used by some of the linker backends. */ + unsigned int linker_mark : 1; - /* A mark flag used by some of the linker backends. */ - unsigned int linker_mark : 1; + /* A mark flag used by some linker backends for garbage collection. */ + unsigned int gc_mark : 1; - /* A mark flag used by some linker backends for garbage collection. */ - unsigned int gc_mark : 1; + /* Used by the ELF code to mark sections which have been allocated to segments. */ + unsigned int segment_mark : 1; - /* End of internal packed boolean fields. */ + /* End of internal packed boolean fields. */ - /* The virtual memory address of the section - where it will be - at run time. The symbols are relocated against this. The - user_set_vma flag is maintained by bfd; if it's not set, the - backend can assign addresses (for example, in @code{a.out}, where - the default address for @code{.data} is dependent on the specific - target and various flags). */ + /* The virtual memory address of the section - where it will be + at run time. The symbols are relocated against this. The + user_set_vma flag is maintained by bfd; if it's not set, the + backend can assign addresses (for example, in @code{a.out}, where + the default address for @code{.data} is dependent on the specific + target and various flags). */ - bfd_vma vma; + bfd_vma vma; - /* The load address of the section - where it would be in a - rom image; really only used for writing section header - information. */ + /* The load address of the section - where it would be in a + rom image; really only used for writing section header + information. */ - bfd_vma lma; + bfd_vma lma; - /* The size of the section in octets, as it will be output. - Contains a value even if the section has no contents (e.g., the - size of @code{.bss}). This will be filled in after relocation. */ + /* The size of the section in octets, as it will be output. + Contains a value even if the section has no contents (e.g., the + size of @code{.bss}). This will be filled in after relocation. */ - bfd_size_type _cooked_size; + bfd_size_type _cooked_size; - /* The original size on disk of the section, in octets. Normally this - value is the same as the size, but if some relaxing has - been done, then this value will be bigger. */ + /* The original size on disk of the section, in octets. Normally this + value is the same as the size, but if some relaxing has + been done, then this value will be bigger. */ - bfd_size_type _raw_size; + bfd_size_type _raw_size; - /* If this section is going to be output, then this value is the - offset in *bytes* into the output section of the first byte in the - input section (byte ==> smallest addressable unit on the - target). In most cases, if this was going to start at the - 100th octet (8-bit quantity) in the output section, this value - would be 100. However, if the target byte size is 16 bits - (bfd_octets_per_byte is "2"), this value would be 50. */ + /* If this section is going to be output, then this value is the + offset in *bytes* into the output section of the first byte in the + input section (byte ==> smallest addressable unit on the + target). In most cases, if this was going to start at the + 100th octet (8-bit quantity) in the output section, this value + would be 100. However, if the target byte size is 16 bits + (bfd_octets_per_byte is "2"), this value would be 50. */ - bfd_vma output_offset; + bfd_vma output_offset; - /* The output section through which to map on output. */ + /* The output section through which to map on output. */ - struct sec *output_section; + struct sec *output_section; - /* The alignment requirement of the section, as an exponent of 2 - - e.g., 3 aligns to 2^3 (or 8). */ + /* The alignment requirement of the section, as an exponent of 2 - + e.g., 3 aligns to 2^3 (or 8). */ - unsigned int alignment_power; + unsigned int alignment_power; - /* If an input section, a pointer to a vector of relocation - records for the data in this section. */ + /* If an input section, a pointer to a vector of relocation + records for the data in this section. */ - struct reloc_cache_entry *relocation; + struct reloc_cache_entry *relocation; - /* If an output section, a pointer to a vector of pointers to - relocation records for the data in this section. */ + /* If an output section, a pointer to a vector of pointers to + relocation records for the data in this section. */ - struct reloc_cache_entry **orelocation; + struct reloc_cache_entry **orelocation; - /* The number of relocation records in one of the above */ + /* The number of relocation records in one of the above */ - unsigned reloc_count; + unsigned reloc_count; - /* Information below is back end specific - and not always used - or updated. */ + /* Information below is back end specific - and not always used + or updated. */ - /* File position of section data */ + /* File position of section data. */ - file_ptr filepos; + file_ptr filepos; - /* File position of relocation info */ + /* File position of relocation info. */ - file_ptr rel_filepos; + file_ptr rel_filepos; - /* File position of line data */ + /* File position of line data. */ - file_ptr line_filepos; + file_ptr line_filepos; - /* Pointer to data for applications */ + /* Pointer to data for applications. */ - PTR userdata; + PTR userdata; - /* If the SEC_IN_MEMORY flag is set, this points to the actual - contents. */ - unsigned char *contents; + /* If the SEC_IN_MEMORY flag is set, this points to the actual + contents. */ + unsigned char *contents; - /* Attached line number information */ + /* Attached line number information. */ - alent *lineno; + alent *lineno; - /* Number of line number records */ + /* Number of line number records. */ - unsigned int lineno_count; + unsigned int lineno_count; - /* Optional information about a COMDAT entry; NULL if not COMDAT */ + /* Optional information about a COMDAT entry; NULL if not COMDAT. */ - struct bfd_comdat_info *comdat; + struct bfd_comdat_info *comdat; - /* When a section is being output, this value changes as more - linenumbers are written out */ + /* Points to the kept section if this section is a link-once section, + and is discarded. */ + struct sec *kept_section; - file_ptr moving_line_filepos; + /* When a section is being output, this value changes as more + linenumbers are written out. */ - /* What the section number is in the target world */ + file_ptr moving_line_filepos; - int target_index; + /* What the section number is in the target world. */ - PTR used_by_bfd; + int target_index; - /* If this is a constructor section then here is a list of the - relocations created to relocate items within it. */ + PTR used_by_bfd; - struct relent_chain *constructor_chain; + /* If this is a constructor section then here is a list of the + relocations created to relocate items within it. */ - /* The BFD which owns the section. */ + struct relent_chain *constructor_chain; - bfd *owner; + /* The BFD which owns the section. */ - /* A symbol which points at this section only */ - struct symbol_cache_entry *symbol; - struct symbol_cache_entry **symbol_ptr_ptr; + bfd *owner; - struct bfd_link_order *link_order_head; - struct bfd_link_order *link_order_tail; + /* A symbol which points at this section only */ + struct symbol_cache_entry *symbol; + struct symbol_cache_entry **symbol_ptr_ptr; + + struct bfd_link_order *link_order_head; + struct bfd_link_order *link_order_tail; @} asection ; - /* These sections are global, and are managed by BFD. The application - and target back end are not permitted to change the values in - these sections. New code should use the section_ptr macros rather - than referring directly to the const sections. The const sections - may eventually vanish. */ +/* These sections are global, and are managed by BFD. The application + and target back end are not permitted to change the values in + these sections. New code should use the section_ptr macros rather + than referring directly to the const sections. The const sections + may eventually vanish. */ #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" #define BFD_COM_SECTION_NAME "*COM*" #define BFD_IND_SECTION_NAME "*IND*" - /* the absolute section */ +/* the absolute section */ extern const asection bfd_abs_section; #define bfd_abs_section_ptr ((asection *) &bfd_abs_section) #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) - /* Pointer to the undefined section */ +/* Pointer to the undefined section */ extern const asection bfd_und_section; #define bfd_und_section_ptr ((asection *) &bfd_und_section) #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) - /* Pointer to the common section */ +/* Pointer to the common section */ extern const asection bfd_com_section; #define bfd_com_section_ptr ((asection *) &bfd_com_section) - /* Pointer to the indirect section */ +/* Pointer to the indirect section */ extern const asection bfd_ind_section; #define bfd_ind_section_ptr ((asection *) &bfd_ind_section) #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) @@ -480,7 +502,7 @@ These are the functions exported by the section handling part of BFD. @subsubsection @code{bfd_get_section_by_name} @strong{Synopsis} @example -asection *bfd_get_section_by_name(bfd *abfd, CONST char *name); +asection *bfd_get_section_by_name(bfd *abfd, const char *name); @end example @strong{Description}@* Run through @var{abfd} and return the one of the @@ -492,11 +514,26 @@ all sections of a given name is to use @code{bfd_map_over_sections} and @code{strcmp} on the name (or better yet, base it on the section flags or something else) for each section. +@findex bfd_get_unique_section_name +@subsubsection @code{bfd_get_unique_section_name} +@strong{Synopsis} +@example +char *bfd_get_unique_section_name(bfd *abfd, + const char *templat, + int *count); +@end example +@strong{Description}@* +Invent a section name that is unique in @var{abfd} by tacking +a dot and a digit suffix onto the original @var{templat}. If +@var{count} is non-NULL, then it specifies the first number +tried as a suffix to generate a unique name. The value +pointed to by @var{count} will be incremented in this case. + @findex bfd_make_section_old_way @subsubsection @code{bfd_make_section_old_way} @strong{Synopsis} @example -asection *bfd_make_section_old_way(bfd *abfd, CONST char *name); +asection *bfd_make_section_old_way(bfd *abfd, const char *name); @end example @strong{Description}@* Create a new empty section called @var{name} @@ -523,7 +560,7 @@ If memory allocation fails. @subsubsection @code{bfd_make_section_anyway} @strong{Synopsis} @example -asection *bfd_make_section_anyway(bfd *abfd, CONST char *name); +asection *bfd_make_section_anyway(bfd *abfd, const char *name); @end example @strong{Description}@* Create a new empty section called @var{name} and attach it to the end of @@ -543,7 +580,7 @@ Return @code{NULL} and set @code{bfd_error} on error; possible errors are: @subsubsection @code{bfd_make_section} @strong{Synopsis} @example -asection *bfd_make_section(bfd *, CONST char *name); +asection *bfd_make_section(bfd *, const char *name); @end example @strong{Description}@* Like @code{bfd_make_section_anyway}, but return @code{NULL} (without calling @@ -576,7 +613,7 @@ have the @code{SEC_HAS_CONTENTS} field set. @strong{Synopsis} @example void bfd_map_over_sections(bfd *abfd, - void (*func)(bfd *abfd, + void (*func) (bfd *abfd, asection *sect, PTR obj), PTR obj); diff --git a/contrib/binutils/bfd/doc/syms.texi b/contrib/binutils/bfd/doc/syms.texi index 74c151b..400a106 100644 --- a/contrib/binutils/bfd/doc/syms.texi +++ b/contrib/binutils/bfd/doc/syms.texi @@ -376,8 +376,8 @@ class of @var{symbol}, or '?' for an unknown class. @example int bfd_decode_symclass(asymbol *symbol); @end example -@findex bfd_is_undefined_symclass -@subsubsection @code{bfd_is_undefined_symclass } +@findex bfd_is_undefined_symclass +@subsubsection @code{bfd_is_undefined_symclass} @strong{Description}@* Returns non-zero if the class symbol returned by bfd_decode_symclass represents an undefined symbol. diff --git a/contrib/binutils/bfd/doc/targets.texi b/contrib/binutils/bfd/doc/targets.texi index 50086c4..0526faf 100644 --- a/contrib/binutils/bfd/doc/targets.texi +++ b/contrib/binutils/bfd/doc/targets.texi @@ -7,7 +7,7 @@ of a target back end. All the back end provides to the root part of BFD is a structure containing pointers to functions which perform certain low level operations on files. BFD translates the applications's requests through a pointer into -calls to the back end routines. +calls to the back end routines. When a file is opened with @code{bfd_openr}, its format and target are unknown. BFD uses various mechanisms to determine @@ -18,12 +18,12 @@ how to interpret the file. The operations performed are: @item Create a BFD by calling the internal routine @code{_bfd_new_bfd}, then call @code{bfd_find_target} with the -target string supplied to @code{bfd_openr} and the new BFD pointer. +target string supplied to @code{bfd_openr} and the new BFD pointer. @item If a null target string was provided to @code{bfd_find_target}, look up the environment variable @code{GNUTARGET} and use -that as the target string. +that as the target string. @item If the target string is still @code{NULL}, or the target string is @@ -35,7 +35,7 @@ cause @code{bfd_check_format} to loop through all the targets. @item Otherwise, inspect the elements in the target vector one by one, until a match on target name is found. When found, -use it. +use it. @item Otherwise return the error @code{bfd_error_invalid_target} to @@ -47,7 +47,7 @@ Otherwise return the error @code{bfd_error_invalid_target} to @end itemize Once the BFD has been opened and the target selected, the file format may be determined. This is done by calling -@code{bfd_check_format} on the BFD with a suggested format. +@code{bfd_check_format} on the BFD with a suggested format. If @code{target_defaulted} has been set, each possible target type is tried to see if it recognizes the specified format. @code{bfd_check_format} returns @code{true} when the caller guesses right. @@ -63,17 +63,17 @@ type is tried to see if it recognizes the specified format. @strong{Description}@* This structure contains everything that BFD knows about a target. It includes things like its byte order, name, and which -routines to call to do various operations. +routines to call to do various operations. Every BFD points to a target structure with its @code{xvec} -member. +member. The macros below are used to dispatch to functions through the @code{bfd_target} vector. They are used in a number of macros further down in @file{bfd.h}, and are also used when calling various routines by hand inside the BFD implementation. The @var{arglist} argument must be parenthesized; it contains all the arguments -to the called function. +to the called function. They make the documentation (more) unpleasant to read, so if someone wants to fix this and not break the above, please do. @@ -92,13 +92,13 @@ someone wants to fix this and not break the above, please do. For operations which index on the BFD format: @example #define BFD_SEND_FMT(bfd, message, arglist) \ - (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) + (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) #ifdef DEBUG_BFD_SEND #undef BFD_SEND_FMT #define BFD_SEND_FMT(bfd, message, arglist) \ (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ - (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \ + (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \ (bfd_assert (__FILE__,__LINE__), NULL)) #endif @end example @@ -109,13 +109,14 @@ defines one of these. FIXME, these names should be rationalised with the names of the entry points which call them. Too bad we can't have one -macro to define them both! +macro to define them both! @example enum bfd_flavour @{ bfd_target_unknown_flavour, bfd_target_aout_flavour, bfd_target_coff_flavour, bfd_target_ecoff_flavour, + bfd_target_xcoff_flavour, bfd_target_elf_flavour, bfd_target_ieee_flavour, bfd_target_nlm_flavour, @@ -133,7 +134,7 @@ enum bfd_flavour @{ enum bfd_endian @{ BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN @}; - /* Forward declaration. */ +/* Forward declaration. */ typedef struct bfd_link_info _bfd_link_info; typedef struct bfd_target @@ -159,21 +160,21 @@ The order of bytes within the header parts of a file. A mask of all the flags which an executable may have set - from the set @code{BFD_NO_FLAGS}, @code{HAS_RELOC}, ...@code{D_PAGED}. @example - flagword object_flags; + flagword object_flags; @end example A mask of all the flags which a section may have set - from the set @code{SEC_NO_FLAGS}, @code{SEC_ALLOC}, ...@code{SET_NEVER_LOAD}. @example flagword section_flags; @end example -The character normally found at the front of a symbol +The character normally found at the front of a symbol (if any), perhaps `_'. @example char symbol_leading_char; @end example The pad character for file names within an archive header. @example - char ar_pad_char; + char ar_pad_char; @end example The maximum number of characters in an archive header. @example @@ -208,15 +209,15 @@ Byte swapping for the headers Format dependent routines: these are vectors of entry points within the target vector structure, one for each format to check. -Check the format of a file being read. Return a @code{bfd_target *} or zero. +Check the format of a file being read. Return a @code{bfd_target *} or zero. @example const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *)); @end example -Set the format of a file being written. +Set the format of a file being written. @example boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *)); @end example -Write cached information into a file being written, at @code{bfd_close}. +Write cached information into a file being written, at @code{bfd_close}. @example boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *)); @end example @@ -224,7 +225,7 @@ The general target vector. These vectors are initialized using the BFD_JUMP_TABLE macros. @example - /* Generic entry points. */ + /* Generic entry points. */ #define BFD_JUMP_TABLE_GENERIC(NAME)\ CAT(NAME,_close_and_cleanup),\ CAT(NAME,_bfd_free_cached_info),\ @@ -232,20 +233,20 @@ CAT(NAME,_new_section_hook),\ CAT(NAME,_get_section_contents),\ CAT(NAME,_get_section_contents_in_window) - /* Called when the BFD is being closed to do any necessary cleanup. */ + /* Called when the BFD is being closed to do any necessary cleanup. */ boolean (*_close_and_cleanup) PARAMS ((bfd *)); - /* Ask the BFD to free all cached information. */ + /* Ask the BFD to free all cached information. */ boolean (*_bfd_free_cached_info) PARAMS ((bfd *)); - /* Called when a new section is created. */ + /* Called when a new section is created. */ boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr)); - /* Read the contents of a section. */ - boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, + /* Read the contents of a section. */ + boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type)); boolean (*_bfd_get_section_contents_in_window) PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type)); - /* Entry points to copy private data. */ + /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME)\ CAT(NAME,_bfd_copy_private_bfd_data),\ CAT(NAME,_bfd_merge_private_bfd_data),\ @@ -253,27 +254,27 @@ CAT(NAME,_bfd_copy_private_section_data),\ CAT(NAME,_bfd_copy_private_symbol_data),\ CAT(NAME,_bfd_set_private_flags),\ CAT(NAME,_bfd_print_private_bfd_data)\ - /* Called to copy BFD general private data from one object file + /* Called to copy BFD general private data from one object file to another. */ boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *)); - /* Called to merge BFD general private data from one object file + /* Called to merge BFD general private data from one object file to a common output file when linking. */ boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *)); - /* Called to copy BFD private section data from one object file + /* Called to copy BFD private section data from one object file to another. */ boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr, bfd *, sec_ptr)); - /* Called to copy BFD private symbol data from one symbol + /* Called to copy BFD private symbol data from one symbol to another. */ boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *, bfd *, asymbol *)); - /* Called to set private backend flags */ + /* Called to set private backend flags */ boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword)); - /* Called to print private BFD data */ + /* Called to print private BFD data */ boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR)); - /* Core file entry points. */ + /* Core file entry points. */ #define BFD_JUMP_TABLE_CORE(NAME)\ CAT(NAME,_core_file_failing_command),\ CAT(NAME,_core_file_failing_signal),\ @@ -282,7 +283,7 @@ CAT(NAME,_core_file_matches_executable_p) int (*_core_file_failing_signal) PARAMS ((bfd *)); boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *)); - /* Archive entry points. */ + /* Archive entry points. */ #define BFD_JUMP_TABLE_ARCHIVE(NAME)\ CAT(NAME,_slurp_armap),\ CAT(NAME,_slurp_extended_name_table),\ @@ -299,10 +300,10 @@ CAT(NAME,_update_armap_timestamp) boolean (*_bfd_construct_extended_name_table) PARAMS ((bfd *, char **, bfd_size_type *, const char **)); void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *)); - boolean (*write_armap) PARAMS ((bfd *arch, + boolean (*write_armap) PARAMS ((bfd *arch, unsigned int elength, struct orl *map, - unsigned int orl_count, + unsigned int orl_count, int stridx)); PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *)); bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev)); @@ -311,7 +312,7 @@ CAT(NAME,_update_armap_timestamp) int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *)); boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *)); - /* Entry points used for symbols. */ + /* Entry points used for symbols. */ #define BFD_JUMP_TABLE_SYMBOLS(NAME)\ CAT(NAME,_get_symtab_upper_bound),\ CAT(NAME,_get_symtab),\ @@ -344,7 +345,7 @@ CAT(NAME,_minisymbol_to_symbol) struct sec *section, struct symbol_cache_entry **symbols, bfd_vma offset, CONST char **file, CONST char **func, unsigned int *line)); - /* Back-door to allow format-aware applications to create debug symbols + /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ asymbol * (*_bfd_make_debug_symbol) PARAMS (( @@ -360,7 +361,7 @@ CAT(NAME,_minisymbol_to_symbol) asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR, asymbol *)); - /* Routines for relocs. */ + /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME)\ CAT(NAME,_get_reloc_upper_bound),\ CAT(NAME,_canonicalize_reloc),\ @@ -368,12 +369,12 @@ CAT(NAME,_bfd_reloc_type_lookup) long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr)); long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, struct symbol_cache_entry **)); - /* See documentation on reloc types. */ + /* See documentation on reloc types. */ reloc_howto_type * (*reloc_type_lookup) PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); - /* Routines used when writing an object file. */ + /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME)\ CAT(NAME,_set_arch_mach),\ CAT(NAME,_set_section_contents) @@ -382,7 +383,7 @@ CAT(NAME,_set_section_contents) boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type)); - /* Routines used by the linker. */ + /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME)\ CAT(NAME,_sizeof_headers),\ CAT(NAME,_bfd_get_relocated_section_contents),\ @@ -401,37 +402,37 @@ CAT(NAME,_bfd_gc_sections) boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *, struct bfd_link_info *, boolean *again)); - /* Create a hash table for the linker. Different backends store + /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *)); - /* Add symbols from this object file into the hash table. */ + /* Add symbols from this object file into the hash table. */ boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *)); - /* Do a link based on the link_order structures attached to each + /* Do a link based on the link_order structures attached to each section of the BFD. */ boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *)); - /* Should this section be split up into smaller pieces during linking. */ + /* Should this section be split up into smaller pieces during linking. */ boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *)); - /* Remove sections that are not referenced from the output. */ + /* Remove sections that are not referenced from the output. */ boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *)); - /* Routines to handle dynamic symbols and relocs. */ + /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME)\ CAT(NAME,_get_dynamic_symtab_upper_bound),\ CAT(NAME,_canonicalize_dynamic_symtab),\ CAT(NAME,_get_dynamic_reloc_upper_bound),\ CAT(NAME,_canonicalize_dynamic_reloc) - /* Get the amount of memory required to hold the dynamic symbols. */ + /* Get the amount of memory required to hold the dynamic symbols. */ long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *)); - /* Read in the dynamic symbols. */ + /* Read in the dynamic symbols. */ long (*_bfd_canonicalize_dynamic_symtab) PARAMS ((bfd *, struct symbol_cache_entry **)); - /* Get the amount of memory required to hold the dynamic relocs. */ + /* Get the amount of memory required to hold the dynamic relocs. */ long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *)); - /* Read in the dynamic relocs. */ + /* Read in the dynamic relocs. */ long (*_bfd_canonicalize_dynamic_reloc) PARAMS ((bfd *, arelent **, struct symbol_cache_entry **)); @@ -442,15 +443,15 @@ and little endian code, and target chosen by the linker has the wrong endianness. The function open_output() in ld/ldlang.c uses this field to find an alternative output format that is suitable. @example - /* Opposite endian version of this target. */ + /* Opposite endian version of this target. */ const struct bfd_target * alternative_target; - + @end example Data for use by back-end routines, which isn't generic enough to belong in this structure. @example PTR backend_data; - + @} bfd_target; @end example @@ -497,7 +498,7 @@ modify the names. @subsubsection @code{bfd_seach_for_target} @strong{Synopsis} @example -const bfd_target * bfd_search_for_target (int (* search_func)(const bfd_target *, void *), void *); +const bfd_target * bfd_search_for_target (int (* search_func) (const bfd_target *, void *), void *); @end example @strong{Description}@* Return a pointer to the first transfer vector in the list of diff --git a/contrib/binutils/bfd/dwarf1.c b/contrib/binutils/bfd/dwarf1.c index da184cc..b96adc5 100644 --- a/contrib/binutils/bfd/dwarf1.c +++ b/contrib/binutils/bfd/dwarf1.c @@ -1,7 +1,7 @@ /* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line). - Copyright 1998, 1999 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. -Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com). +Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com). This file is part of BFD. @@ -26,121 +26,115 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "elf-bfd.h" #include "elf/dwarf.h" -/* dwarf1_debug is the starting point for all dwarf1 info. */ +/* dwarf1_debug is the starting point for all dwarf1 info. */ struct dwarf1_debug { - /* The bfd we are working with. */ + /* The bfd we are working with. */ bfd* abfd; - /* List of already parsed compilation units. */ + /* List of already parsed compilation units. */ struct dwarf1_unit* lastUnit; - /* The buffer for the .debug section. - Zero indicates that the .debug section failed to load. */ + /* The buffer for the .debug section. + Zero indicates that the .debug section failed to load. */ char* debug_section; - /* Pointer to the end of the .debug_info section memory buffer. */ + /* Pointer to the end of the .debug_info section memory buffer. */ char* debug_section_end; - /* The buffer for the .line section. */ + /* The buffer for the .line section. */ char* line_section; - /* End of that buffer. */ + /* End of that buffer. */ char* line_section_end; - /* The current or next unread die within the .debug section. */ + /* The current or next unread die within the .debug section. */ char* currentDie; }; -/* One dwarf1_unit for each parsed compilation unit die. */ +/* One dwarf1_unit for each parsed compilation unit die. */ struct dwarf1_unit { - /* Linked starting from stash->lastUnit. */ + /* Linked starting from stash->lastUnit. */ struct dwarf1_unit* prev; - /* Name of the compilation unit. */ + /* Name of the compilation unit. */ char* name; - /* The highest and lowest address used in the compilation unit. */ + /* The highest and lowest address used in the compilation unit. */ unsigned long low_pc; unsigned long high_pc; /* Does this unit have a statement list? */ int has_stmt_list; - /* If any, the offset of the line number table in the .line section. */ + /* If any, the offset of the line number table in the .line section. */ unsigned long stmt_list_offset; - /* If non-zero, a pointer to the first child of this unit. */ + /* If non-zero, a pointer to the first child of this unit. */ char* first_child; /* How many line entries? */ unsigned long line_count; - /* The decoded line number table (line_count entries). */ + /* The decoded line number table (line_count entries). */ struct linenumber* linenumber_table; - /* The list of functions in this unit. */ + /* The list of functions in this unit. */ struct dwarf1_func* func_list; }; - - /* One dwarf1_func for each parsed function die. */ struct dwarf1_func { - /* Linked starting from aUnit->func_list. */ + /* Linked starting from aUnit->func_list. */ struct dwarf1_func* prev; - - /* Name of function. */ + + /* Name of function. */ char* name; - - /* The highest and lowest address used in the compilation unit. */ + + /* The highest and lowest address used in the compilation unit. */ unsigned long low_pc; unsigned long high_pc; }; - -/* Used to return info about a parsed die. */ +/* Used to return info about a parsed die. */ struct die_info { unsigned long length; unsigned long sibling; unsigned long low_pc; unsigned long high_pc; unsigned long stmt_list_offset; - - char* name; - + + char* name; + int has_stmt_list; unsigned short tag; }; - -/* Parsed line number information. */ +/* Parsed line number information. */ struct linenumber { - /* First address in the line. */ + /* First address in the line. */ unsigned long addr; - /* The line number. */ + /* The line number. */ unsigned long linenumber; }; - -/* Find the form of an attr, from the attr field. */ +/* Find the form of an attr, from the attr field. */ #define FORM_FROM_ATTR(attr) ((attr) & 0xF) /* Implicitly specified */ - /* Return a newly allocated dwarf1_unit. It should be cleared and - then attached into the 'stash' at 'stash->lastUnit'. */ + then attached into the 'stash' at 'stash->lastUnit'. */ static struct dwarf1_unit* alloc_dwarf1_unit (stash) struct dwarf1_debug* stash; { - struct dwarf1_unit* x = - (struct dwarf1_unit*) bfd_zalloc (stash->abfd, + struct dwarf1_unit* x = + (struct dwarf1_unit*) bfd_zalloc (stash->abfd, sizeof (struct dwarf1_unit)); x->prev = stash->lastUnit; stash->lastUnit = x; @@ -149,28 +143,28 @@ alloc_dwarf1_unit (stash) } /* Return a newly allocated dwarf1_func. It must be cleared and - attached into 'aUnit' at 'aUnit->func_list'. */ + attached into 'aUnit' at 'aUnit->func_list'. */ static struct dwarf1_func* alloc_dwarf1_func (stash, aUnit) struct dwarf1_debug* stash; struct dwarf1_unit* aUnit; { - struct dwarf1_func* x = - (struct dwarf1_func*) bfd_zalloc (stash->abfd, + struct dwarf1_func* x = + (struct dwarf1_func*) bfd_zalloc (stash->abfd, sizeof (struct dwarf1_func)); x->prev = aUnit->func_list; aUnit->func_list = x; - + return x; } /* parse_die - parse a Dwarf1 die. Parse the die starting at 'aDiePtr' into 'aDieInfo'. 'abfd' must be the bfd from which the section that 'aDiePtr' - points to was pulled from. + points to was pulled from. - Return false if the die is invalidly formatted; true otherwise. */ + Return false if the die is invalidly formatted; true otherwise. */ static boolean parse_die (abfd, aDieInfo, aDiePtr) @@ -181,36 +175,36 @@ parse_die (abfd, aDieInfo, aDiePtr) char* this_die = aDiePtr; char* xptr = this_die; - memset (aDieInfo,0,sizeof(*aDieInfo)); + memset (aDieInfo,0,sizeof (*aDieInfo)); - /* First comes the length. */ - aDieInfo->length = bfd_get_32 (abfd, xptr); + /* First comes the length. */ + aDieInfo->length = bfd_get_32 (abfd, (bfd_byte *) xptr); xptr += 4; if (aDieInfo->length == 0) return false; if (aDieInfo->length < 6) { - /* Just padding bytes. */ + /* Just padding bytes. */ aDieInfo->tag = TAG_padding; return true; } - /* Then the tag. */ - aDieInfo->tag = bfd_get_16 (abfd, xptr); + /* Then the tag. */ + aDieInfo->tag = bfd_get_16 (abfd, (bfd_byte *) xptr); xptr += 2; - - /* Then the attributes. */ + + /* Then the attributes. */ while (xptr < (this_die + aDieInfo->length)) { unsigned short attr; - - /* Parse the attribute based on its form. This section + + /* Parse the attribute based on its form. This section must handle all dwarf1 forms, but need only handle the - actual attributes that we care about. */ + actual attributes that we care about. */ - attr = bfd_get_16 (abfd, xptr); + attr = bfd_get_16 (abfd, (bfd_byte *) xptr); xptr += 2; - + switch (FORM_FROM_ATTR (attr)) { case FORM_DATA2: @@ -219,10 +213,10 @@ parse_die (abfd, aDieInfo, aDiePtr) case FORM_DATA4: case FORM_REF: if (attr == AT_sibling) - aDieInfo->sibling = bfd_get_32 (abfd, xptr); + aDieInfo->sibling = bfd_get_32 (abfd, (bfd_byte *) xptr); else if (attr == AT_stmt_list) { - aDieInfo->stmt_list_offset = bfd_get_32 (abfd, xptr); + aDieInfo->stmt_list_offset = bfd_get_32 (abfd, (bfd_byte *) xptr); aDieInfo->has_stmt_list = 1; } xptr += 4; @@ -232,16 +226,16 @@ parse_die (abfd, aDieInfo, aDiePtr) break; case FORM_ADDR: if (attr == AT_low_pc) - aDieInfo->low_pc = bfd_get_32 (abfd, xptr); + aDieInfo->low_pc = bfd_get_32 (abfd, (bfd_byte *) xptr); else if (attr == AT_high_pc) - aDieInfo->high_pc = bfd_get_32 (abfd, xptr); + aDieInfo->high_pc = bfd_get_32 (abfd, (bfd_byte *) xptr); xptr += 4; break; case FORM_BLOCK2: - xptr += 2 + bfd_get_16 (abfd, xptr); + xptr += 2 + bfd_get_16 (abfd, (bfd_byte *) xptr); break; case FORM_BLOCK4: - xptr += 4 + bfd_get_32 (abfd, xptr); + xptr += 4 + bfd_get_32 (abfd, (bfd_byte *) xptr); break; case FORM_STRING: if (attr == AT_name) @@ -255,9 +249,9 @@ parse_die (abfd, aDieInfo, aDiePtr) } /* Parse a dwarf1 line number table for 'aUnit->stmt_list_offset' - into 'aUnit->linenumber_table'. Return false if an error - occurs; true otherwise. */ - + into 'aUnit->linenumber_table'. Return false if an error + occurs; true otherwise. */ + static boolean parse_line_table (stash, aUnit) struct dwarf1_debug* stash; @@ -265,19 +259,19 @@ parse_line_table (stash, aUnit) { char* xptr; - /* Load the ".line" section from the bfd if we haven't already. */ + /* Load the ".line" section from the bfd if we haven't already. */ if (stash->line_section == 0) { asection *msec; unsigned long size; - + msec = bfd_get_section_by_name (stash->abfd, ".line"); if (! msec) return false; - + size = bfd_get_section_size_before_reloc (msec); - stash->line_section = (unsigned char*) bfd_alloc (stash->abfd, size); - + stash->line_section = (char *) bfd_alloc (stash->abfd, size); + if (! stash->line_section) return false; @@ -298,36 +292,36 @@ parse_line_table (stash, aUnit) char* tblend; unsigned long base; - /* First comes the length. */ - tblend = bfd_get_32 (stash->abfd, xptr) + xptr; + /* First comes the length. */ + tblend = bfd_get_32 (stash->abfd, (bfd_byte *) xptr) + xptr; xptr += 4; - /* Then the base address for each address in the table. */ - base = bfd_get_32 (stash->abfd, xptr); + /* Then the base address for each address in the table. */ + base = bfd_get_32 (stash->abfd, (bfd_byte *) xptr); xptr += 4; /* How many line entrys? 10 = 4 (line number) + 2 (pos in line) + 4 (address in line) */ aUnit->line_count = (tblend - xptr) / 10; - /* Allocate an array for the entries. */ - aUnit->linenumber_table = (struct linenumber*) - bfd_alloc (stash->abfd, + /* Allocate an array for the entries. */ + aUnit->linenumber_table = (struct linenumber *) + bfd_alloc (stash->abfd, sizeof (struct linenumber) * aUnit->line_count); - + for (eachLine = 0; eachLine < aUnit->line_count; eachLine++) { - /* A line number. */ + /* A line number. */ aUnit->linenumber_table[eachLine].linenumber - = bfd_get_32 (stash->abfd, xptr); + = bfd_get_32 (stash->abfd, (bfd_byte *) xptr); xptr += 4; - /* Skip the position within the line. */ + /* Skip the position within the line. */ xptr += 2; - /* And finally the address. */ - aUnit->linenumber_table[eachLine].addr - = base + bfd_get_32 (stash->abfd, xptr); + /* And finally the address. */ + aUnit->linenumber_table[eachLine].addr + = base + bfd_get_32 (stash->abfd, (bfd_byte *) xptr); xptr += 4; } } @@ -338,7 +332,7 @@ parse_line_table (stash, aUnit) /* Parse each function die in a compilation unit 'aUnit'. The first child die of 'aUnit' should be in 'aUnit->first_child', the result is placed in 'aUnit->func_list'. - Return false if error; true otherwise. */ + Return false if error; true otherwise. */ static boolean parse_functions_in_unit (stash, aUnit) @@ -353,37 +347,37 @@ parse_functions_in_unit (stash, aUnit) ) { struct die_info eachDieInfo; - + if (! parse_die (stash->abfd, &eachDieInfo, eachDie)) return false; - + if (eachDieInfo.tag == TAG_global_subroutine || eachDieInfo.tag == TAG_subroutine || eachDieInfo.tag == TAG_inlined_subroutine || eachDieInfo.tag == TAG_entry_point) { struct dwarf1_func* aFunc = alloc_dwarf1_func (stash,aUnit); - + aFunc->name = eachDieInfo.name; aFunc->low_pc = eachDieInfo.low_pc; aFunc->high_pc = eachDieInfo.high_pc; } - + /* Move to next sibling, if none, end loop */ if (eachDieInfo.sibling) eachDie = stash->debug_section + eachDieInfo.sibling; else break; } - + return true; } /* Find the nearest line to 'addr' in 'aUnit'. - Return whether we found the line (or a function) without error. */ + Return whether we found the line (or a function) without error. */ static boolean -dwarf1_unit_find_nearest_line (stash, aUnit, addr, +dwarf1_unit_find_nearest_line (stash, aUnit, addr, filename_ptr, functionname_ptr, linenumber_ptr) struct dwarf1_debug* stash; @@ -427,8 +421,8 @@ dwarf1_unit_find_nearest_line (stash, aUnit, addr, } } - for (eachFunc = aUnit->func_list; - eachFunc; + for (eachFunc = aUnit->func_list; + eachFunc; eachFunc = eachFunc->prev) { if (eachFunc->low_pc <= addr @@ -445,11 +439,8 @@ dwarf1_unit_find_nearest_line (stash, aUnit, addr, return line_p || func_p; } - - - /* The DWARF 1 version of find_nearest line. - Return true if the line is found without error. */ + Return true if the line is found without error. */ boolean _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, @@ -472,31 +463,30 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, *filename_ptr = NULL; *functionname_ptr = NULL; *linenumber_ptr = 0; - if (! stash) { asection *msec; unsigned long size; - + stash = elf_tdata (abfd)->dwarf1_find_line_info = (struct dwarf1_debug*) bfd_zalloc (abfd, sizeof (struct dwarf1_debug)); - + if (! stash) return false; - + msec = bfd_get_section_by_name (abfd, ".debug"); if (! msec) { /* No dwarf1 info. Note that at this point the stash has been allocated, but contains zeros, this lets - future calls to this function fail quicker. */ + future calls to this function fail quicker. */ return false; } size = bfd_get_section_size_before_reloc (msec); - stash->debug_section = (unsigned char*) bfd_alloc (abfd, size); - + stash->debug_section = (char *) bfd_alloc (abfd, size); + if (! stash->debug_section) return false; @@ -512,20 +502,19 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, } /* A null debug_section indicates that there was no dwarf1 info - or that an error occured while setting up the stash. */ + or that an error occured while setting up the stash. */ if (! stash->debug_section) return false; - /* Look at the previously parsed units to see if any contain - the addr. */ + the addr. */ for (eachUnit = stash->lastUnit; eachUnit; eachUnit = eachUnit->prev) { if (eachUnit->low_pc <= addr && addr < eachUnit->high_pc) return dwarf1_unit_find_nearest_line (stash, eachUnit, addr, - filename_ptr, - functionname_ptr, + filename_ptr, + functionname_ptr, linenumber_ptr); } @@ -535,36 +524,36 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, if (! parse_die (stash->abfd, &aDieInfo, stash->currentDie)) return false; - + if (aDieInfo.tag == TAG_compile_unit) { struct dwarf1_unit* aUnit = alloc_dwarf1_unit (stash); - + aUnit->name = aDieInfo.name; aUnit->low_pc = aDieInfo.low_pc; aUnit->high_pc = aDieInfo.high_pc; aUnit->has_stmt_list = aDieInfo.has_stmt_list; aUnit->stmt_list_offset = aDieInfo.stmt_list_offset; - + /* A die has a child if it's followed by a die that is - not it's sibling. */ - if (aDieInfo.sibling - && stash->currentDie + aDieInfo.length + not it's sibling. */ + if (aDieInfo.sibling + && stash->currentDie + aDieInfo.length < stash->debug_section_end - && stash->currentDie + aDieInfo.length + && stash->currentDie + aDieInfo.length != stash->debug_section + aDieInfo.sibling) aUnit->first_child = stash->currentDie + aDieInfo.length; else aUnit->first_child = 0; if (aUnit->low_pc <= addr && addr < aUnit->high_pc) - return dwarf1_unit_find_nearest_line (stash, aUnit, addr, - filename_ptr, - functionname_ptr, + return dwarf1_unit_find_nearest_line (stash, aUnit, addr, + filename_ptr, + functionname_ptr, linenumber_ptr); } - + if (aDieInfo.sibling != 0) stash->currentDie = stash->debug_section + aDieInfo.sibling; else @@ -574,5 +563,4 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, return false; } - /* EOF */ diff --git a/contrib/binutils/bfd/dwarf2.c b/contrib/binutils/bfd/dwarf2.c index b6de261..141c686 100644 --- a/contrib/binutils/bfd/dwarf2.c +++ b/contrib/binutils/bfd/dwarf2.c @@ -36,36 +36,38 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "elf/dwarf2.h" /* The data in the .debug_line statement prologue looks like this. */ + struct line_head - { - unsigned int total_length; - unsigned short version; - unsigned int prologue_length; - unsigned char minimum_instruction_length; - unsigned char default_is_stmt; - int line_base; - unsigned char line_range; - unsigned char opcode_base; - unsigned char *standard_opcode_lengths; - }; - -/* Attributes have a name and a value */ +{ + unsigned int total_length; + unsigned short version; + unsigned int prologue_length; + unsigned char minimum_instruction_length; + unsigned char default_is_stmt; + int line_base; + unsigned char line_range; + unsigned char opcode_base; + unsigned char *standard_opcode_lengths; +}; + +/* Attributes have a name and a value. */ + struct attribute +{ + enum dwarf_attribute name; + enum dwarf_form form; + union { - enum dwarf_attribute name; - enum dwarf_form form; - union - { - char *str; - struct dwarf_block *blk; - unsigned int unsnd; - int snd; - bfd_vma addr; - } - u; - }; - -/* Get at parts of an attribute structure */ + char *str; + struct dwarf_block *blk; + unsigned int unsnd; + int snd; + bfd_vma addr; + } + u; +}; + +/* Get at parts of an attribute structure. */ #define DW_STRING(attr) ((attr)->u.str) #define DW_UNSND(attr) ((attr)->u.unsnd) @@ -73,100 +75,100 @@ struct attribute #define DW_SND(attr) ((attr)->u.snd) #define DW_ADDR(attr) ((attr)->u.addr) -/* Blocks are a bunch of untyped bytes. */ +/* Blocks are a bunch of untyped bytes. */ struct dwarf_block - { - unsigned int size; - char *data; - }; - - -struct dwarf2_debug { +{ + unsigned int size; + char *data; +}; - /* A list of all previously read comp_units. */ +struct dwarf2_debug +{ + /* A list of all previously read comp_units. */ struct comp_unit* all_comp_units; /* The next unread compilation unit within the .debug_info section. Zero indicates that the .debug_info section has not been loaded - into a buffer yet.*/ + into a buffer yet. */ char* info_ptr; - /* Pointer to the end of the .debug_info section memory buffer. */ + /* Pointer to the end of the .debug_info section memory buffer. */ char* info_ptr_end; - /* Pointer to the .debug_abbrev section loaded into memory. */ + /* Pointer to the .debug_abbrev section loaded into memory. */ char* dwarf_abbrev_buffer; - /* Length of the loaded .debug_abbrev section. */ + /* Length of the loaded .debug_abbrev section. */ unsigned long dwarf_abbrev_size; /* Buffer for decode_line_info. */ char *dwarf_line_buffer; + + /* Length of the loaded .debug_line section. */ + unsigned long dwarf_line_size; }; -struct arange { +struct arange +{ struct arange *next; bfd_vma low; bfd_vma high; }; - /* A minimal decoding of DWARF2 compilation units. We only decode - what's needed to get to the line number information. */ - -struct comp_unit { + what's needed to get to the line number information. */ - /* Chain the previously read compilation units. */ +struct comp_unit +{ + /* Chain the previously read compilation units. */ struct comp_unit* next_unit; - /* Keep the bdf convenient (for memory allocation). */ + /* Keep the bdf convenient (for memory allocation). */ bfd* abfd; /* The lowest and higest addresses contained in this compilation - unit as specified in the compilation unit header. */ + unit as specified in the compilation unit header. */ struct arange arange; - /* The DW_AT_name attribute (for error messages). */ + /* The DW_AT_name attribute (for error messages). */ char* name; - /* The abbrev hash table. */ + /* The abbrev hash table. */ struct abbrev_info** abbrevs; - /* Note that an error was found by comp_unit_find_nearest_line. */ + /* Note that an error was found by comp_unit_find_nearest_line. */ int error; - /* The DW_AT_comp_dir attribute */ + /* The DW_AT_comp_dir attribute. */ char* comp_dir; - /* True if there is a line number table associated with this comp. unit. */ + /* True if there is a line number table associated with this comp. unit. */ int stmtlist; - - /* The offset into .debug_line of the line number table. */ + + /* The offset into .debug_line of the line number table. */ unsigned long line_offset; - /* Pointer to the first child die for the comp unit. */ + /* Pointer to the first child die for the comp unit. */ char *first_child_die_ptr; - /* The end of the comp unit. */ + /* The end of the comp unit. */ char *end_ptr; - /* The decoded line number, NULL if not yet decoded. */ + /* The decoded line number, NULL if not yet decoded. */ struct line_info_table* line_table; - /* A list of the functions found in this comp. unit. */ - struct funcinfo* function_table; + /* A list of the functions found in this comp. unit. */ + struct funcinfo* function_table; - /* Address size for this unit - from unit header */ + /* Address size for this unit - from unit header. */ unsigned char addr_size; }; +/* VERBATIM + The following function up to the END VERBATIM mark are + copied directly from dwarf2read.c. */ - -/* VERBATIM - The following function up to the END VERBATIM mark are - copied directly from dwarf2read.c. */ - -/* read dwarf information from a buffer */ +/* Read dwarf information from a buffer. */ static unsigned int read_1_byte (abfd, buf) @@ -192,9 +194,7 @@ read_2_bytes (abfd, buf) return bfd_get_16 (abfd, (bfd_byte *) buf); } -#if 0 - -/* This is not used. */ +#if 0 /* This is not used. */ static int read_2_signed_bytes (abfd, buf) @@ -214,9 +214,7 @@ read_4_bytes (abfd, buf) return bfd_get_32 (abfd, (bfd_byte *) buf); } -#if 0 - -/* This is not used. */ +#if 0 /* This is not used. */ static int read_4_signed_bytes (abfd, buf) @@ -262,6 +260,7 @@ read_string (abfd, buf, bytes_read_ptr) *bytes_read_ptr = 1; return NULL; } + *bytes_read_ptr = strlen (buf) + 1; return buf; } @@ -280,7 +279,7 @@ read_unsigned_leb128 (abfd, buf, bytes_read_ptr) result = 0; shift = 0; num_read = 0; - + do { byte = bfd_get_8 (abfd, (bfd_byte *) buf); @@ -290,9 +289,9 @@ read_unsigned_leb128 (abfd, buf, bytes_read_ptr) shift += 7; } while (byte & 0x80); - + * bytes_read_ptr = num_read; - + return result; } @@ -320,12 +319,12 @@ read_signed_leb128 (abfd, buf, bytes_read_ptr) shift += 7; } while (byte & 0x80); - + if ((shift < 32) && (byte & 0x40)) result |= -(1 << shift); * bytes_read_ptr = num_read; - + return result; } @@ -349,26 +348,22 @@ read_address (unit, buf) } } - - - - -/* This data structure holds the information of an abbrev. */ +/* This data structure holds the information of an abbrev. */ struct abbrev_info - { - unsigned int number; /* number identifying abbrev */ - enum dwarf_tag tag; /* dwarf tag */ - int has_children; /* boolean */ - unsigned int num_attrs; /* number of attributes */ - struct attr_abbrev *attrs; /* an array of attribute descriptions */ - struct abbrev_info *next; /* next in chain */ - }; +{ + unsigned int number; /* Number identifying abbrev. */ + enum dwarf_tag tag; /* DWARF tag. */ + int has_children; /* Boolean. */ + unsigned int num_attrs; /* Number of attributes. */ + struct attr_abbrev *attrs; /* An array of attribute descriptions. */ + struct abbrev_info *next; /* Next in chain. */ +}; struct attr_abbrev - { - enum dwarf_attribute name; - enum dwarf_form form; - }; +{ + enum dwarf_attribute name; + enum dwarf_form form; +}; #ifndef ABBREV_HASH_SIZE #define ABBREV_HASH_SIZE 121 @@ -397,6 +392,7 @@ lookup_abbrev (number,abbrevs) else abbrev = abbrev->next; } + return NULL; } @@ -406,18 +402,16 @@ lookup_abbrev (number,abbrevs) in a hash table. */ static struct abbrev_info** -read_abbrevs (abfd, offset) +read_abbrevs (abfd, offset, stash) bfd * abfd; unsigned int offset; + struct dwarf2_debug *stash; { struct abbrev_info **abbrevs; char *abbrev_ptr; struct abbrev_info *cur_abbrev; unsigned int abbrev_number, bytes_read, abbrev_name; unsigned int abbrev_form, hash_number; - struct dwarf2_debug *stash; - - stash = elf_tdata(abfd)->dwarf2_find_line_info; if (! stash->dwarf_abbrev_buffer) { @@ -430,13 +424,13 @@ read_abbrevs (abfd, offset) bfd_set_error (bfd_error_bad_value); return 0; } - + stash->dwarf_abbrev_size = msec->_raw_size; stash->dwarf_abbrev_buffer = (char*) bfd_alloc (abfd, stash->dwarf_abbrev_size); if (! stash->dwarf_abbrev_buffer) return 0; - - if (! bfd_get_section_contents (abfd, msec, + + if (! bfd_get_section_contents (abfd, msec, stash->dwarf_abbrev_buffer, 0, stash->dwarf_abbrev_size)) return 0; @@ -444,35 +438,36 @@ read_abbrevs (abfd, offset) 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) bigger than abbrev size (%u)."), offset, stash->dwarf_abbrev_size ); bfd_set_error (bfd_error_bad_value); return 0; } - abbrevs = (struct abbrev_info**) bfd_zalloc (abfd, sizeof(struct abbrev_info*) * ABBREV_HASH_SIZE); + abbrevs = (struct abbrev_info**) bfd_zalloc (abfd, sizeof (struct abbrev_info*) * ABBREV_HASH_SIZE); abbrev_ptr = stash->dwarf_abbrev_buffer + offset; abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); abbrev_ptr += bytes_read; - /* loop until we reach an abbrev number of 0 */ + /* Loop until we reach an abbrev number of 0. */ while (abbrev_number) { cur_abbrev = (struct abbrev_info*)bfd_zalloc (abfd, sizeof (struct abbrev_info)); - /* read in abbrev header */ + /* Read in abbrev header. */ cur_abbrev->number = abbrev_number; cur_abbrev->tag = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); abbrev_ptr += bytes_read; cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr); abbrev_ptr += 1; - /* now read in declarations */ + /* Now read in declarations. */ abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); abbrev_ptr += bytes_read; abbrev_form = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); abbrev_ptr += bytes_read; + while (abbrev_name) { if ((cur_abbrev->num_attrs % ATTR_ALLOC_CHUNK) == 0) @@ -484,6 +479,7 @@ read_abbrevs (abfd, offset) if (! cur_abbrev->attrs) return 0; } + cur_abbrev->attrs[cur_abbrev->num_attrs].name = abbrev_name; cur_abbrev->attrs[cur_abbrev->num_attrs++].form = abbrev_form; abbrev_name = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read); @@ -530,6 +526,7 @@ read_attribute (attr, abbrev, unit, info_ptr) attr->name = abbrev->name; attr->form = abbrev->form; + switch (abbrev->form) { case DW_FORM_addr: @@ -631,42 +628,41 @@ read_attribute (attr, abbrev, unit, info_ptr) return info_ptr; } - -/* Source line information table routines. */ +/* Source line information table routines. */ #define FILE_ALLOC_CHUNK 5 #define DIR_ALLOC_CHUNK 5 -struct line_info { +struct line_info +{ struct line_info* prev_line; - bfd_vma address; char* filename; unsigned int line; unsigned int column; - int end_sequence; /* end of (sequential) code sequence */ + int end_sequence; /* End of (sequential) code sequence. */ }; -struct fileinfo { +struct fileinfo +{ char *name; unsigned int dir; unsigned int time; unsigned int size; }; -struct line_info_table { +struct line_info_table +{ bfd* abfd; - unsigned int num_files; unsigned int num_dirs; - char* comp_dir; char** dirs; struct fileinfo* files; struct line_info* last_line; }; -static void +static void add_line_info (table, address, filename, line, column, end_sequence) struct line_info_table* table; bfd_vma address; @@ -688,7 +684,7 @@ add_line_info (table, address, filename, line, column, end_sequence) info->end_sequence = end_sequence; } -static char* +static char * concat_filename (table, file) struct line_info_table* table; unsigned int file; @@ -703,7 +699,7 @@ concat_filename (table, file) } filename = table->files[file - 1].name; - if (*filename == '/') + if (IS_ABSOLUTE_PATH(filename)) return filename; else @@ -723,8 +719,9 @@ arange_add (unit, low_pc, high_pc) { struct arange *arange; - /* first see if we can cheaply extend an existing range: */ + /* First see if we can cheaply extend an existing range. */ arange = &unit->arange; + do { if (low_pc == arange->high) @@ -743,14 +740,14 @@ arange_add (unit, low_pc, high_pc) if (unit->arange.high == 0) { - /* this is the first address range: store it in unit->arange: */ + /* This is the first address range: store it in unit->arange. */ unit->arange.next = 0; unit->arange.low = low_pc; unit->arange.high = high_pc; return; } - /* need to allocate a new arange and insert it into the arange list: */ + /* Need to allocate a new arange and insert it into the arange list. */ arange = bfd_zalloc (unit->abfd, sizeof (*arange)); arange->low = low_pc; arange->high = high_pc; @@ -759,18 +756,15 @@ arange_add (unit, low_pc, high_pc) unit->arange.next = arange; } -/* Decode the line number information for UNIT. */ +/* Decode the line number information for UNIT. */ static struct line_info_table* -decode_line_info (unit) +decode_line_info (unit, stash) struct comp_unit *unit; + struct dwarf2_debug *stash; { bfd *abfd = unit->abfd; - - struct dwarf2_debug *stash; - struct line_info_table* table; - char *line_ptr; char *line_end; struct line_head lh; @@ -778,12 +772,9 @@ decode_line_info (unit) char *cur_file, *cur_dir; unsigned char op_code, extended_op, adj_opcode; - stash = elf_tdata (abfd)->dwarf2_find_line_info; - if (! stash->dwarf_line_buffer) { asection *msec; - unsigned long size; msec = bfd_get_section_by_name (abfd, ".debug_line"); if (! msec) @@ -792,22 +783,33 @@ decode_line_info (unit) bfd_set_error (bfd_error_bad_value); return 0; } - - size = msec->_raw_size; - stash->dwarf_line_buffer = (char *) bfd_alloc (abfd, size); + + stash->dwarf_line_size = msec->_raw_size; + stash->dwarf_line_buffer = (char *) bfd_alloc (abfd, stash->dwarf_line_size); if (! stash->dwarf_line_buffer) return 0; - if (! bfd_get_section_contents (abfd, msec, + if (! bfd_get_section_contents (abfd, msec, stash->dwarf_line_buffer, 0, - size)) + stash->dwarf_line_size)) return 0; /* FIXME: We ought to apply the relocs against this section before - we process it.... */ + we process it... */ + } + + /* Since we are using un-relocated data, it is possible to get a bad value + for the line_offset. Validate it here so that we won't get a segfault + below. */ + if (unit->line_offset >= stash->dwarf_line_size) + { + (*_bfd_error_handler) (_("Dwarf Error: Line offset (%u) bigger than line size (%u)."), + unit->line_offset, stash->dwarf_line_size); + bfd_set_error (bfd_error_bad_value); + return 0; } - table = (struct line_info_table*) bfd_alloc (abfd, + table = (struct line_info_table*) bfd_alloc (abfd, sizeof (struct line_info_table)); table->abfd = abfd; table->comp_dir = unit->comp_dir; @@ -823,7 +825,7 @@ decode_line_info (unit) line_ptr = stash->dwarf_line_buffer + unit->line_offset; - /* read in the prologue */ + /* Read in the prologue. */ lh.total_length = read_4_bytes (abfd, line_ptr); line_ptr += 4; line_end = line_ptr + lh.total_length; @@ -845,16 +847,18 @@ decode_line_info (unit) bfd_alloc (abfd, lh.opcode_base * sizeof (unsigned char)); lh.standard_opcode_lengths[0] = 1; + for (i = 1; i < lh.opcode_base; ++i) { lh.standard_opcode_lengths[i] = read_1_byte (abfd, line_ptr); line_ptr += 1; } - /* Read directory table */ + /* Read directory table. */ while ((cur_dir = read_string (abfd, line_ptr, &bytes_read)) != NULL) { line_ptr += bytes_read; + if ((table->num_dirs % DIR_ALLOC_CHUNK) == 0) { table->dirs = (char **) @@ -863,14 +867,17 @@ decode_line_info (unit) if (! table->dirs) return 0; } + table->dirs[table->num_dirs++] = cur_dir; } + line_ptr += bytes_read; - /* Read file name table */ + /* Read file name table. */ while ((cur_file = read_string (abfd, line_ptr, &bytes_read)) != NULL) { line_ptr += bytes_read; + if ((table->num_files % FILE_ALLOC_CHUNK) == 0) { table->files = (struct fileinfo *) @@ -880,6 +887,7 @@ decode_line_info (unit) if (! table->files) return 0; } + table->files[table->num_files].name = cur_file; table->files[table->num_files].dir = read_unsigned_leb128 (abfd, line_ptr, &bytes_read); @@ -892,12 +900,13 @@ decode_line_info (unit) line_ptr += bytes_read; table->num_files++; } + line_ptr += bytes_read; /* Read the statement sequences until there's nothing left. */ while (line_ptr < line_end) { - /* state machine registers */ + /* State machine registers. */ bfd_vma address = 0; char* filename = concat_filename (table, 1); unsigned int line = 1; @@ -907,15 +916,16 @@ decode_line_info (unit) int end_sequence = 0, need_low_pc = 1; bfd_vma low_pc = 0; - /* Decode the table. */ + /* Decode the table. */ while (! end_sequence) { op_code = read_1_byte (abfd, line_ptr); line_ptr += 1; + switch (op_code) { case DW_LNS_extended_op: - line_ptr += 1; /* ignore length */ + line_ptr += 1; /* Ignore length. */ extended_op = read_1_byte (abfd, line_ptr); line_ptr += 1; switch (extended_op) @@ -1012,12 +1022,12 @@ decode_line_info (unit) address += read_2_bytes (abfd, line_ptr); line_ptr += 2; break; - default: /* special operand */ + default: /* Special operand. */ adj_opcode = op_code - lh.opcode_base; address += (adj_opcode / lh.line_range) * lh.minimum_instruction_length; line += lh.line_base + (adj_opcode % lh.line_range); - /* append row to matrix using current values */ + /* Append row to matrix using current values. */ add_line_info (table, address, filename, line, column, 0); basic_block = 1; if (need_low_pc) @@ -1032,15 +1042,14 @@ decode_line_info (unit) return table; } - /* If ADDR is within TABLE set the output parameters and return true, otherwise return false. The output parameters, FILENAME_PTR and - LINENUMBER_PTR, are pointers to the objects to be filled in. */ + LINENUMBER_PTR, are pointers to the objects to be filled in. */ static boolean -lookup_address_in_line_info_table (table, +lookup_address_in_line_info_table (table, addr, - filename_ptr, + filename_ptr, linenumber_ptr) struct line_info_table* table; bfd_vma addr; @@ -1049,7 +1058,7 @@ lookup_address_in_line_info_table (table, { struct line_info* next_line = table->last_line; struct line_info* each_line; - + if (!next_line) return false; @@ -1067,28 +1076,24 @@ lookup_address_in_line_info_table (table, next_line = each_line; each_line = each_line->prev_line; } - + return false; } - - - -/* Function table functions. */ +/* Function table functions. */ -struct funcinfo { +struct funcinfo +{ struct funcinfo *prev_func; - char* name; bfd_vma low; bfd_vma high; }; - -/* If ADDR is within TABLE, set FUNCTIONNAME_PTR, and return true. */ +/* If ADDR is within TABLE, set FUNCTIONNAME_PTR, and return true. */ static boolean -lookup_address_in_function_table (table, +lookup_address_in_function_table (table, addr, functionname_ptr) struct funcinfo* table; @@ -1107,18 +1112,14 @@ lookup_address_in_function_table (table, return true; } } - + return false; } - - - -/* DWARF2 Compilation unit functions. */ - +/* DWARF2 Compilation unit functions. */ /* Scan over each die in a comp. unit looking for functions to add - to the function table. */ + to the function table. */ static boolean scan_unit_for_functions (unit) @@ -1144,16 +1145,16 @@ scan_unit_for_functions (unit) nesting_level--; continue; } - + abbrev = lookup_abbrev (abbrev_number,unit->abbrevs); if (! abbrev) { - (*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %d."), + (*_bfd_error_handler) (_("Dwarf Error: Could not find abbrev number %d."), abbrev_number); bfd_set_error (bfd_error_bad_value); return false; } - + if (abbrev->tag == DW_TAG_subprogram) { func = (struct funcinfo*) bfd_zalloc (abfd, sizeof (struct funcinfo)); @@ -1162,24 +1163,24 @@ scan_unit_for_functions (unit) } else func = NULL; - + for (i = 0; i < abbrev->num_attrs; ++i) { info_ptr = read_attribute (&attr, &abbrev->attrs[i], unit, info_ptr); - + if (func) { switch (attr.name) { case DW_AT_name: - + name = DW_STRING (&attr); /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */ if (func->name == NULL) func->name = DW_STRING (&attr); break; - + case DW_AT_MIPS_linkage_name: func->name = DW_STRING (&attr); break; @@ -1203,7 +1204,7 @@ scan_unit_for_functions (unit) case DW_AT_name: name = DW_STRING (&attr); break; - + default: break; } @@ -1217,11 +1218,6 @@ scan_unit_for_functions (unit) return true; } - - - - - /* Parse a DWARF2 compilation unit starting at INFO_PTR. This includes the compilation unit header that proceeds the DIE's, but does not include the length field that preceeds each compilation @@ -1233,10 +1229,10 @@ scan_unit_for_functions (unit) to get to the line number information for the compilation unit. */ static struct comp_unit * -parse_comp_unit (abfd, info_ptr, end_ptr, abbrev_length) +parse_comp_unit (abfd, stash, unit_length, abbrev_length) bfd* abfd; - char* info_ptr; - char* end_ptr; + struct dwarf2_debug *stash; + bfd_vma unit_length; unsigned int abbrev_length; { struct comp_unit* unit; @@ -1250,6 +1246,9 @@ parse_comp_unit (abfd, info_ptr, end_ptr, abbrev_length) struct abbrev_info *abbrev; struct attribute attr; + char *info_ptr = stash->info_ptr; + char *end_ptr = info_ptr + unit_length; + version = read_2_bytes (abfd, info_ptr); info_ptr += 2; BFD_ASSERT (abbrev_length == 0 @@ -1286,8 +1285,8 @@ parse_comp_unit (abfd, info_ptr, end_ptr, abbrev_length) return 0; } - /* Read the abbrevs for this compilation unit into a table */ - abbrevs = read_abbrevs (abfd, abbrev_offset); + /* Read the abbrevs for this compilation unit into a table. */ + abbrevs = read_abbrevs (abfd, abbrev_offset, stash); if (! abbrevs) return 0; @@ -1309,10 +1308,10 @@ parse_comp_unit (abfd, info_ptr, end_ptr, abbrev_length) bfd_set_error (bfd_error_bad_value); return 0; } - + unit = (struct comp_unit*) bfd_zalloc (abfd, sizeof (struct comp_unit)); unit->abfd = abfd; - unit->addr_size = addr_size; + unit->addr_size = addr_size; unit->abbrevs = abbrevs; unit->end_ptr = end_ptr; @@ -1366,11 +1365,7 @@ parse_comp_unit (abfd, info_ptr, end_ptr, abbrev_length) return unit; } - - - - -/* Return true if UNIT contains the address given by ADDR. */ +/* Return true if UNIT contains the address given by ADDR. */ static boolean comp_unit_contains_address (unit, addr) @@ -1390,30 +1385,32 @@ comp_unit_contains_address (unit, addr) arange = arange->next; } while (arange); + return 0; } - /* If UNIT contains ADDR, set the output parameters to the values for the line containing ADDR. The output parameters, FILENAME_PTR, FUNCTIONNAME_PTR, and LINENUMBER_PTR, are pointers to the objects - to be filled in. + to be filled in. Return true of UNIT contains ADDR, and no errors were encountered; false otherwise. */ static boolean comp_unit_find_nearest_line (unit, addr, - filename_ptr, functionname_ptr, linenumber_ptr) + filename_ptr, functionname_ptr, linenumber_ptr, + stash) struct comp_unit* unit; bfd_vma addr; const char **filename_ptr; const char **functionname_ptr; unsigned int *linenumber_ptr; + struct dwarf2_debug *stash; { boolean line_p; boolean func_p; - + if (unit->error) return false; @@ -1424,15 +1421,15 @@ comp_unit_find_nearest_line (unit, addr, unit->error = 1; return false; } - - unit->line_table = decode_line_info (unit); + + unit->line_table = decode_line_info (unit, stash); if (! unit->line_table) { unit->error = 1; return false; } - + if (! scan_unit_for_functions (unit)) { unit->error = 1; @@ -1442,14 +1439,51 @@ comp_unit_find_nearest_line (unit, addr, line_p = lookup_address_in_line_info_table (unit->line_table, addr, - filename_ptr, + filename_ptr, linenumber_ptr); - func_p = lookup_address_in_function_table (unit->function_table, + func_p = lookup_address_in_function_table (unit->function_table, addr, functionname_ptr); return line_p || func_p; } +/* Locate a section in a BFD containing debugging info. The search starts from the + section after AFTER_SEC, or from the first section in the BFD if AFTER_SEC is + NULL. The search works by examining the names of the sections. There are two + permissiable names. The first is .debug_info. This is the standard DWARF2 name. + The second is a prefix .gnu.linkonce.wi. This is a variation on the .debug_info + section which has a checksum describing the contents appended onto the name. This + allows the linker to identify and discard duplicate debugging sections for + different compilation units. */ +#define DWARF2_DEBUG_INFO ".debug_info" +#define GNU_LINKONCE_INFO ".gnu.linkonce.wi." + +static asection * +find_debug_info (abfd, after_sec) + bfd * abfd; + asection * after_sec; +{ + asection * msec; + + if (after_sec) + msec = after_sec->next; + else + msec = abfd->sections; + + while (msec) + { + if (strcmp (msec->name, DWARF2_DEBUG_INFO) == 0) + return msec; + + if (strncmp (msec->name, GNU_LINKONCE_INFO, strlen (GNU_LINKONCE_INFO)) == 0) + return msec; + + msec = msec->next; + } + + return NULL; +} + /* The DWARF2 version of find_nearest line. Return true if the line is found without error. ADDR_SIZE is the number of bytes in the initial .debug_info length field and in the abbreviation offset. @@ -1460,7 +1494,7 @@ boolean _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, filename_ptr, functionname_ptr, linenumber_ptr, - addr_size) + addr_size, pinfo) bfd *abfd; asection *section; asymbol **symbols ATTRIBUTE_UNUSED; @@ -1469,24 +1503,23 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, const char **functionname_ptr; unsigned int *linenumber_ptr; unsigned int addr_size; + PTR *pinfo; { /* Read each compilation unit from the section .debug_info, and check to see if it contains the address we are searching for. If yes, lookup the address, and return the line number info. If no, go - on to the next compilation unit. + on to the next compilation unit. We keep a list of all the previously read compilation units, and - a pointer to the next un-read compilation unit. Check the - previously read units before reading more. - */ + a pointer to the next un-read compilation unit. Check the + previously read units before reading more. */ + struct dwarf2_debug *stash = (struct dwarf2_debug *) *pinfo; - struct dwarf2_debug *stash = elf_tdata (abfd)->dwarf2_find_line_info; - - /* What address are we looking for? */ + /* What address are we looking for? */ bfd_vma addr = offset + section->vma; struct comp_unit* each; - + *filename_ptr = NULL; *functionname_ptr = NULL; *linenumber_ptr = 0; @@ -1497,74 +1530,90 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, if (addr_size == 0) addr_size = 4; BFD_ASSERT (addr_size == 4 || addr_size == 8); - + if (! stash) { + unsigned long total_size; asection *msec; - unsigned long size; - - stash = elf_tdata (abfd)->dwarf2_find_line_info = + + stash = (struct dwarf2_debug*) bfd_zalloc (abfd, sizeof (struct dwarf2_debug)); - if (! stash) return false; - - msec = bfd_get_section_by_name (abfd, ".debug_info"); - if (! msec) - { - /* No dwarf2 info. Note that at this point the stash - has been allocated, but contains zeros, this lets - future calls to this function fail quicker. */ - return false; - } - size = msec->_raw_size; - if (size == 0) - return false; - - stash->info_ptr = (char *) bfd_alloc (abfd, size); - - if (! stash->info_ptr) + *pinfo = (PTR) stash; + + msec = find_debug_info (abfd, NULL); + if (! msec) + /* No dwarf2 info. Note that at this point the stash + has been allocated, but contains zeros, this lets + future calls to this function fail quicker. */ + return false; + + /* There can be more than one DWARF2 info section in a BFD these days. + Read them all in and produce one large stash. We do this in two + passes - in the first pass we just accumulate the section sizes. + In the second pass we read in the section's contents. The allows + us to avoid reallocing the data as we add sections to the stash. */ + for (total_size = 0; msec; msec = find_debug_info (abfd, msec)) + total_size += msec->_raw_size; + + stash->info_ptr = (char *) bfd_alloc (abfd, total_size); + if (stash->info_ptr == NULL) return false; - if (! bfd_get_section_contents (abfd, msec, stash->info_ptr, 0, size)) + stash->info_ptr_end = stash->info_ptr; + + for (msec = find_debug_info (abfd, NULL); + msec; + msec = find_debug_info (abfd, msec)) { - stash->info_ptr = 0; - return false; + unsigned long size; + unsigned long start; + + size = msec->_raw_size; + if (size == 0) + continue; + + start = stash->info_ptr_end - stash->info_ptr; + + if (! bfd_get_section_contents (abfd, msec, stash->info_ptr + start, 0, size)) + continue; + + stash->info_ptr_end = stash->info_ptr + start + size; } - stash->info_ptr_end = stash->info_ptr + size; - - /* FIXME: There is a problem with the contents of the - .debug_info section. The 'low' and 'high' addresses of the - comp_units are computed by relocs against symbols in the - .text segment. We need these addresses in order to determine - the nearest line number, and so we have to resolve the - relocs. There is a similar problem when the .debug_line - section is processed as well (e.g., there may be relocs - against the operand of the DW_LNE_set_address operator). - - Unfortunately getting hold of the reloc information is hard... - - For now, this means that disassembling object files (as - opposed to fully executables) does not always work as well as - we would like. */ + BFD_ASSERT (stash->info_ptr_end = stash->info_ptr + total_size); } - - /* A null info_ptr indicates that there is no dwarf2 info - (or that an error occured while setting up the stash). */ + /* FIXME: There is a problem with the contents of the + .debug_info section. The 'low' and 'high' addresses of the + comp_units are computed by relocs against symbols in the + .text segment. We need these addresses in order to determine + the nearest line number, and so we have to resolve the + relocs. There is a similar problem when the .debug_line + section is processed as well (e.g., there may be relocs + against the operand of the DW_LNE_set_address operator). + + Unfortunately getting hold of the reloc information is hard... + + For now, this means that disassembling object files (as + opposed to fully executables) does not always work as well as + we would like. */ + + /* A null info_ptr indicates that there is no dwarf2 info + (or that an error occured while setting up the stash). */ if (! stash->info_ptr) return false; - /* Check the previously read comp. units first. */ - + /* Check the previously read comp. units first. */ for (each = stash->all_comp_units; each; each = each->next_unit) if (comp_unit_contains_address (each, addr)) - return comp_unit_find_nearest_line (each, addr, filename_ptr, - functionname_ptr, linenumber_ptr); + return comp_unit_find_nearest_line (each, addr, filename_ptr, + functionname_ptr, linenumber_ptr, + stash); - /* Read each remaining comp. units checking each as they are read. */ + /* Read each remaining comp. units checking each as they are read. */ while (stash->info_ptr < stash->info_ptr_end) { struct comp_unit* each; @@ -1579,9 +1628,7 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, if (length > 0) { - each = parse_comp_unit (abfd, stash->info_ptr, - stash->info_ptr + length, - addr_size); + each = parse_comp_unit (abfd, stash, length, addr_size); stash->info_ptr += length; if (each) @@ -1593,21 +1640,23 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, compilation units. If we don't have them (i.e., unit->high == 0), we need to consult the line info table to see if a compilation unit contains the given - address. */ + address. */ if (each->arange.high > 0) { if (comp_unit_contains_address (each, addr)) return comp_unit_find_nearest_line (each, addr, filename_ptr, functionname_ptr, - linenumber_ptr); + linenumber_ptr, + stash); } else { found = comp_unit_find_nearest_line (each, addr, filename_ptr, functionname_ptr, - linenumber_ptr); + linenumber_ptr, + stash); if (found) return true; } @@ -1617,5 +1666,3 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, return false; } - -/* end of file */ diff --git a/contrib/binutils/bfd/ecoff.c b/contrib/binutils/bfd/ecoff.c index 4b136ee..f22112b 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, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Original version by Per Bothner. Full support added by Ian Lance Taylor, ian@cygnus.com. @@ -344,9 +344,9 @@ ecoff_sec_to_styp_flags (name, flags) } else if (strcmp (name, _RCONST) == 0) styp = STYP_RCONST; - else if (flags & SEC_CODE) + else if (flags & SEC_CODE) styp = STYP_TEXT; - else if (flags & SEC_DATA) + else if (flags & SEC_DATA) styp = STYP_DATA; else if (flags & SEC_READONLY) styp = STYP_RDATA; @@ -363,7 +363,6 @@ ecoff_sec_to_styp_flags (name, flags) /* Get the BFD flags to use for a section. */ -/*ARGSUSED*/ flagword _bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section) bfd *abfd ATTRIBUTE_UNUSED; @@ -452,7 +451,7 @@ ecoff_slurp_symbolic_header (abfd) HDRR *internal_symhdr; /* See if we've already read it in. */ - if (ecoff_data (abfd)->debug_info.symbolic_header.magic == + if (ecoff_data (abfd)->debug_info.symbolic_header.magic == backend->debug_swap.sym_magic) return true; @@ -509,7 +508,6 @@ ecoff_slurp_symbolic_header (abfd) object file. This is called by gdb via the read_debug_info entry point in the backend structure. */ -/*ARGSUSED*/ boolean _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug) bfd *abfd; @@ -1090,7 +1088,7 @@ ecoff_emit_aggregate (abfd, fdr, string, rndx, isym, which) unsigned int ifd = rndx->rfd; unsigned int indx = rndx->index; const char *name; - + if (ifd == 0xfff) ifd = isym; @@ -1340,7 +1338,6 @@ ecoff_type_to_string (abfd, fdr, indx) p1 += strlen (buffer1); } - /* * Deal with any qualifiers. */ @@ -1406,7 +1403,7 @@ ecoff_type_to_string (abfd, fdr, indx) int j; /* Print array bounds reversed (ie, in the order the C - programmer writes them). C is such a fun language.... */ + programmer writes them). C is such a fun language.... */ while (i < 5 && qualifiers[i+1].type == tqArray) i++; @@ -1447,7 +1444,6 @@ ecoff_type_to_string (abfd, fdr, indx) /* Return information about ECOFF symbol SYMBOL in RET. */ -/*ARGSUSED*/ void _bfd_ecoff_get_symbol_info (abfd, symbol, ret) bfd *abfd ATTRIBUTE_UNUSED; @@ -1459,7 +1455,6 @@ _bfd_ecoff_get_symbol_info (abfd, symbol, ret) /* Return whether this is a local label. */ -/*ARGSUSED*/ boolean _bfd_ecoff_bfd_is_local_label_name (abfd, name) bfd *abfd ATTRIBUTE_UNUSED; @@ -1490,7 +1485,7 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how) if (ecoffsymbol (symbol)->local) { SYMR ecoff_sym; - + (*debug_swap->swap_sym_in) (abfd, ecoffsymbol (symbol)->native, &ecoff_sym); fprintf (file, "ecoff local "); @@ -1604,7 +1599,7 @@ _bfd_ecoff_print_symbol (abfd, filep, symbol, how) fprintf (file, _("\n First symbol: %ld"), (long) (indx + sym_base)); else - fprintf (file, _("\n First symbol: %ld"), + fprintf (file, _("\n First symbol: %ld"), ((long) (AUX_GET_ISYM (bigendian, &aux_base[ecoff_ext.asym.index]) @@ -1680,7 +1675,7 @@ ecoff_slurp_reloc_table (abfd, section, symbols) if (_bfd_ecoff_slurp_symbol_table (abfd) == false) return false; - + internal_relocs = (arelent *) bfd_alloc (abfd, (sizeof (arelent) * section->reloc_count)); @@ -1778,7 +1773,7 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols) { unsigned int count; - if (section->flags & SEC_CONSTRUCTOR) + if (section->flags & SEC_CONSTRUCTOR) { arelent_chain *chain; @@ -1791,7 +1786,7 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols) *relptr++ = &chain->relent; } else - { + { arelent *tblptr; if (ecoff_slurp_reloc_table (abfd, section, symbols) == false) @@ -1812,7 +1807,6 @@ _bfd_ecoff_canonicalize_reloc (abfd, section, relptr, symbols) and return the name of the source file and the line nearest to the wanted location. */ -/*ARGSUSED*/ boolean _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset, filename_ptr, functionname_ptr, retline_ptr) @@ -1984,7 +1978,6 @@ _bfd_ecoff_set_arch_mach (abfd, arch, machine) /* Get the size of the section headers. */ -/*ARGSUSED*/ int _bfd_ecoff_sizeof_headers (abfd, reloc) bfd *abfd; @@ -1996,8 +1989,8 @@ _bfd_ecoff_sizeof_headers (abfd, reloc) c = 0; for (current = abfd->sections; - current != (asection *)NULL; - current = current->next) + current != (asection *)NULL; + current = current->next) ++c; ret = (bfd_coff_filhsz (abfd) @@ -2218,13 +2211,13 @@ ecoff_compute_reloc_file_positions (abfd) abort (); abfd->output_has_begun = true; } - + reloc_base = ecoff_data (abfd)->reloc_filepos; reloc_size = 0; for (current = abfd->sections; - current != (asection *)NULL; - current = current->next) + current != (asection *)NULL; + current = current->next) { if (current->reloc_count == 0) current->rel_filepos = 0; @@ -2312,7 +2305,7 @@ bfd_ecoff_get_gp_value (abfd) bfd_set_error (bfd_error_invalid_operation); return 0; } - + return ecoff_data (abfd)->gp; } @@ -2491,8 +2484,8 @@ _bfd_ecoff_write_object_contents (abfd) count = 1; for (current = abfd->sections; - current != (asection *)NULL; - current = current->next) + current != (asection *)NULL; + current = current->next) { current->target_index = count; ++count; @@ -2630,7 +2623,7 @@ _bfd_ecoff_write_object_contents (abfd) /* Do nothing */ ; else abort (); - } + } /* Set up the file header. */ @@ -2782,7 +2775,7 @@ _bfd_ecoff_write_object_contents (abfd) arelent *reloc; asymbol *sym; struct internal_reloc in; - + memset ((PTR) &in, 0, sizeof in); reloc = *reloc_ptr_ptr; @@ -2982,7 +2975,7 @@ _bfd_ecoff_slurp_armap (abfd) char *raw_ptr; struct symdef *symdef_ptr; char *stringbase; - + /* Get the name of the first element. */ i = bfd_read ((PTR) nextname, 1, 16, abfd); if (i == 0) @@ -3034,11 +3027,11 @@ _bfd_ecoff_slurp_armap (abfd) return false; parsed_size = mapdata->parsed_size; bfd_release (abfd, (PTR) mapdata); - + raw_armap = (char *) bfd_alloc (abfd, parsed_size); if (raw_armap == (char *) NULL) return false; - + if (bfd_read ((PTR) raw_armap, 1, parsed_size, abfd) != parsed_size) { if (bfd_get_error () != bfd_error_system_call) @@ -3046,7 +3039,7 @@ _bfd_ecoff_slurp_armap (abfd) bfd_release (abfd, (PTR) raw_armap); return false; } - + ardata->tdata = (PTR) raw_armap; count = bfd_h_get_32 (abfd, (PTR) raw_armap); @@ -3075,7 +3068,7 @@ _bfd_ecoff_slurp_armap (abfd) { unsigned int name_offset, file_offset; unsigned int hash, rehash, srch; - + name_offset = bfd_h_get_32 (abfd, (PTR) raw_ptr); file_offset = bfd_h_get_32 (abfd, (PTR) (raw_ptr + 4)); if (file_offset == 0) @@ -3167,7 +3160,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx) padit = stridx % 2; stringsize = stridx + padit; - /* Include 8 bytes to store symdefsize and stringsize in output. */ + /* Include 8 bytes to store symdefsize and stringsize in output. */ mapsize = symdefsize + stringsize + 8; firstreal = SARMAG + sizeof (struct ar_hdr) + mapsize + elength; @@ -3201,7 +3194,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx) #if 0 hdr.ar_mode[0] = '0'; #else - /* Building gcc ends up extracting the armap as a file - twice. */ + /* Building gcc ends up extracting the armap as a file - twice. */ hdr.ar_mode[0] = '6'; hdr.ar_mode[1] = '4'; hdr.ar_mode[2] = '4'; @@ -3214,8 +3207,8 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx) /* Turn all null bytes in the header into spaces. */ for (i = 0; i < sizeof (struct ar_hdr); i++) - if (((char *)(&hdr))[i] == '\0') - (((char *)(&hdr))[i]) = ' '; + if (((char *) (&hdr))[i] == '\0') + (((char *) (&hdr))[i]) = ' '; if (bfd_write ((PTR) &hdr, 1, sizeof (struct ar_hdr), abfd) != sizeof (struct ar_hdr)) @@ -3224,7 +3217,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx) bfd_h_put_32 (abfd, (bfd_vma) hashsize, temp); if (bfd_write ((PTR) temp, 1, 4, abfd) != 4) return false; - + hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize); if (!hashtable) return false; @@ -3266,7 +3259,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx) hash = srch; } - + bfd_h_put_32 (abfd, (bfd_vma) map[i].namidx, (PTR) (hashtable + hash * 8)); bfd_h_put_32 (abfd, (bfd_vma) firstreal, @@ -3345,7 +3338,7 @@ _bfd_ecoff_archive_p (abfd) bfd_ardata (abfd)->symdefs = NULL; bfd_ardata (abfd)->extended_names = NULL; bfd_ardata (abfd)->tdata = NULL; - + if (_bfd_ecoff_slurp_armap (abfd) == false || _bfd_ecoff_slurp_extended_name_table (abfd) == false) { @@ -3353,7 +3346,7 @@ _bfd_ecoff_archive_p (abfd) abfd->tdata.aout_ar_data = tdata_hold; return (const bfd_target *) NULL; } - + if (bfd_has_map (abfd)) { bfd *first; @@ -4391,7 +4384,7 @@ ecoff_link_write_external (h, data) bfd *output_bfd = einfo->abfd; boolean strip; - /* We need to check if this symbol is being stripped. */ + /* We need to check if this symbol is being stripped. */ if (h->root.type == bfd_link_hash_undefined || h->root.type == bfd_link_hash_undefweak) strip = false; @@ -4427,7 +4420,7 @@ ecoff_link_write_external (h, data) output_section = h->root.u.def.section->output_section; name = bfd_section_name (output_section->owner, output_section); - + if (strcmp (name, _TEXT) == 0) h->esym.asym.sc = scText; else if (strcmp (name, _DATA) == 0) diff --git a/contrib/binutils/bfd/ecofflink.c b/contrib/binutils/bfd/ecofflink.c index 25fc966..9b2e0f5 100644 --- a/contrib/binutils/bfd/ecofflink.c +++ b/contrib/binutils/bfd/ecofflink.c @@ -1,5 +1,5 @@ /* Routines to link ECOFF debugging information. - Copyright 1993, 94, 95, 96, 97, 1999 Free Software Foundation, Inc. + Copyright 1993, 94, 95, 96, 97, 99, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support, . This file is part of BFD, the Binary File Descriptor library. @@ -69,8 +69,8 @@ _bfd_ecoff_swap_tir_in (bigend, ext_copy, intern) struct tir_ext ext[1]; *ext = *ext_copy; /* Make it reasonable to do in-place. */ - - /* now the fun stuff... */ + + /* now the fun stuff... */ if (bigend) { intern->fBitfield = 0 != (ext->t_bits1[0] & TIR_BITS1_FBITFIELD_BIG); intern->continued = 0 != (ext->t_bits1[0] & TIR_BITS1_CONTINUED_BIG); @@ -109,7 +109,7 @@ _bfd_ecoff_swap_tir_in (bigend, ext_copy, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -126,8 +126,8 @@ _bfd_ecoff_swap_tir_out (bigend, intern_copy, ext) TIR intern[1]; *intern = *intern_copy; /* Make it reasonable to do in-place. */ - - /* now the fun stuff... */ + + /* now the fun stuff... */ if (bigend) { ext->t_bits1[0] = ((intern->fBitfield ? TIR_BITS1_FBITFIELD_BIG : 0) | (intern->continued ? TIR_BITS1_CONTINUED_BIG : 0) @@ -166,7 +166,7 @@ _bfd_ecoff_swap_tir_out (bigend, intern_copy, ext) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -182,8 +182,8 @@ _bfd_ecoff_swap_rndx_in (bigend, ext_copy, intern) struct rndx_ext ext[1]; *ext = *ext_copy; /* Make it reasonable to do in-place. */ - - /* now the fun stuff... */ + + /* now the fun stuff... */ if (bigend) { intern->rfd = (ext->r_bits[0] << RNDX_BITS0_RFD_SH_LEFT_BIG) | ((ext->r_bits[1] & RNDX_BITS1_RFD_BIG) @@ -205,7 +205,7 @@ _bfd_ecoff_swap_rndx_in (bigend, ext_copy, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -221,8 +221,8 @@ _bfd_ecoff_swap_rndx_out (bigend, intern_copy, ext) RNDXR intern[1]; *intern = *intern_copy; /* Make it reasonable to do in-place. */ - - /* now the fun stuff... */ + + /* now the fun stuff... */ if (bigend) { ext->r_bits[0] = intern->rfd >> RNDX_BITS0_RFD_SH_LEFT_BIG; ext->r_bits[1] = (((intern->rfd << RNDX_BITS1_RFD_SH_BIG) @@ -243,7 +243,7 @@ _bfd_ecoff_swap_rndx_out (bigend, intern_copy, ext) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -465,7 +465,7 @@ add_memory_shuffle (ainfo, head, tail, data, size) unsigned long size; { struct shuffle *n; - + n = (struct shuffle *) objalloc_alloc (ainfo->memory, sizeof (struct shuffle)); if (!n) @@ -488,7 +488,6 @@ add_memory_shuffle (ainfo, head, tail, data, size) /* Initialize the FDR hash table. This returns a handle which is then passed in to bfd_ecoff_debug_accumulate, et. al. */ -/*ARGSUSED*/ PTR bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info) bfd *output_bfd ATTRIBUTE_UNUSED; @@ -547,7 +546,6 @@ bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info) /* Free the accumulated debugging information. */ -/*ARGSUSED*/ void bfd_ecoff_debug_free (handle, output_bfd, output_debug, output_swap, info) PTR handle; @@ -557,7 +555,7 @@ bfd_ecoff_debug_free (handle, output_bfd, output_debug, output_swap, info) struct bfd_link_info *info; { struct accumulate *ainfo = (struct accumulate *) handle; - + bfd_hash_table_free (&ainfo->fdr_hash.table); if (! info->relocateable) @@ -576,7 +574,6 @@ bfd_ecoff_debug_free (handle, output_bfd, output_debug, output_swap, info) linker information structure. HANDLE is returned by bfd_ecoff_debug_init. */ -/*ARGSUSED*/ boolean bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap, input_bfd, input_debug, input_swap, @@ -1409,7 +1406,6 @@ bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym) /* Align the ECOFF debugging information. */ -/*ARGSUSED*/ static void ecoff_align_debug (abfd, debug, swap) bfd *abfd ATTRIBUTE_UNUSED; @@ -1967,9 +1963,9 @@ lookup_line (abfd, debug_info, debug_swap, line_info) boolean stabs; FDR *fdr_ptr; int i; - + offset = line_info->cache.start; - + /* Build FDR table (sorted by object file's base-address) if we don't have it already. */ if (line_info->fdrtab == NULL @@ -1981,7 +1977,7 @@ lookup_line (abfd, debug_info, debug_swap, line_info) /* find first FDR for address OFFSET */ i = fdrtab_lookup (line_info, offset); if (i < 0) - return false; /* no FDR, no fun... */ + return false; /* no FDR, no fun... */ fdr_ptr = tab[i].fdr; /* Check whether this file has stabs debugging information. In a @@ -2046,9 +2042,9 @@ lookup_line (abfd, debug_info, debug_swap, line_info) malloc.c. I'm not sure why this happens, but it could be due to optimizations that reorder a function's position within an object-file. - + Strategy: - + On the first call to this function, we build a table of FDRs that is sorted by the base-address of the object-file the FDR is referring to. Notice that each object-file may contain @@ -2079,9 +2075,9 @@ lookup_line (abfd, debug_info, debug_swap, line_info) bfd_vma dist, min_dist = 0; char *pdr_hold; char *pdr_end; - + fdr_ptr = tab[i].fdr; - + pdr_ptr = ((char *) debug_info->external_pdr + fdr_ptr->ipdFirst * external_pdr_size); pdr_end = pdr_ptr + fdr_ptr->cpd * external_pdr_size; @@ -2106,7 +2102,7 @@ lookup_line (abfd, debug_info, debug_swap, line_info) } } } - + if (!best_pdr || min_dist < best_dist) { best_dist = min_dist; @@ -2119,7 +2115,7 @@ lookup_line (abfd, debug_info, debug_swap, line_info) && tab[i].base_addr == tab[i - 1].base_addr); if (!best_fdr || !best_pdr) - return false; /* shouldn't happen... */ + return false; /* shouldn't happen... */ /* phew, finally we got something that we can hold onto: */ fdr_ptr = best_fdr; diff --git a/contrib/binutils/bfd/ecoffswap.h b/contrib/binutils/bfd/ecoffswap.h index 0d28d16..70d548d 100644 --- a/contrib/binutils/bfd/ecoffswap.h +++ b/contrib/binutils/bfd/ecoffswap.h @@ -1,5 +1,5 @@ /* Generic ECOFF swapping routines, for BFD. - Copyright 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 1995, 1996, 2000 Free Software Foundation, Inc. Written by Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -27,10 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ on them in gdb by naming the including source file; e.g., 'coff-mips.c':ecoff_swap_hdr_in. - Before including this header file, one of ECOFF_32 or ECOFF_64 must - be defined. These are checked when swapping information that - depends upon the target size. This code works for 32 bit and 64 - bit ECOFF, but may need to be generalized in the future. + Before including this header file, one of ECOFF_32, ECOFF_64, + ECOFF_SIGNED_32 or ECOFF_SIGNED_64 must be defined. These are + checked when swapping information that depends upon the target + size. This code works for 32 bit and 64 bit ECOFF, but may need to + be generalized in the future. Some header file which defines the external forms of these structures must also be included before including this header file. @@ -50,6 +51,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ecoff_get_off bfd_h_get_64 #define ecoff_put_off bfd_h_put_64 #endif +#ifdef ECOFF_SIGNED_32 +#define ecoff_get_off bfd_h_get_signed_32 +#define ecoff_put_off bfd_h_put_signed_32 +#endif +#ifdef ECOFF_SIGNED_64 +#define ecoff_get_off bfd_h_get_signed_64 +#define ecoff_put_off bfd_h_put_signed_64 +#endif /* ECOFF auxiliary information swapping routines. These are the same for all ECOFF targets, so they are defined in ecofflink.c. */ @@ -122,7 +131,7 @@ ecoff_swap_hdr_in (abfd, ext_copy, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -167,7 +176,7 @@ ecoff_swap_hdr_out (abfd, intern_copy, ext_ptr) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -182,10 +191,10 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern) struct fdr_ext ext[1]; *ext = *(struct fdr_ext *) ext_copy; - + intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->f_adr); intern->rss = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rss); -#ifdef ECOFF_64 +#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) if (intern->rss == 0xffffffff) intern->rss = -1; #endif @@ -197,11 +206,11 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern) intern->cline = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_cline); intern->ioptBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_ioptBase); intern->copt = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_copt); -#ifdef ECOFF_32 +#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32) intern->ipdFirst = bfd_h_get_16 (abfd, (bfd_byte *)ext->f_ipdFirst); intern->cpd = bfd_h_get_16 (abfd, (bfd_byte *)ext->f_cpd); #endif -#ifdef ECOFF_64 +#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) intern->ipdFirst = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_ipdFirst); intern->cpd = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_cpd); #endif @@ -210,7 +219,7 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern) intern->rfdBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rfdBase); intern->crfd = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_crfd); - /* now the fun stuff... */ + /* now the fun stuff... */ if (bfd_header_big_endian (abfd)) { intern->lang = (ext->f_bits1[0] & FDR_BITS1_LANG_BIG) >> FDR_BITS1_LANG_SH_BIG; @@ -235,7 +244,7 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -251,7 +260,7 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr) FDR intern[1]; *intern = *intern_copy; /* Make it reasonable to do in-place. */ - + ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->f_adr); bfd_h_put_32 (abfd, intern->rss, (bfd_byte *)ext->f_rss); bfd_h_put_32 (abfd, intern->issBase, (bfd_byte *)ext->f_issBase); @@ -262,11 +271,11 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr) bfd_h_put_32 (abfd, intern->cline, (bfd_byte *)ext->f_cline); bfd_h_put_32 (abfd, intern->ioptBase, (bfd_byte *)ext->f_ioptBase); bfd_h_put_32 (abfd, intern->copt, (bfd_byte *)ext->f_copt); -#ifdef ECOFF_32 +#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32) bfd_h_put_16 (abfd, intern->ipdFirst, (bfd_byte *)ext->f_ipdFirst); bfd_h_put_16 (abfd, intern->cpd, (bfd_byte *)ext->f_cpd); #endif -#ifdef ECOFF_64 +#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) bfd_h_put_32 (abfd, intern->ipdFirst, (bfd_byte *)ext->f_ipdFirst); bfd_h_put_32 (abfd, intern->cpd, (bfd_byte *)ext->f_cpd); #endif @@ -275,7 +284,7 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr) bfd_h_put_32 (abfd, intern->rfdBase, (bfd_byte *)ext->f_rfdBase); bfd_h_put_32 (abfd, intern->crfd, (bfd_byte *)ext->f_crfd); - /* now the fun stuff... */ + /* now the fun stuff... */ if (bfd_header_big_endian (abfd)) { ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_BIG) & FDR_BITS1_LANG_BIG) @@ -303,7 +312,7 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -341,7 +350,7 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern) intern->lnHigh = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_lnHigh); intern->cbLineOffset = ecoff_get_off (abfd, (bfd_byte *)ext->p_cbLineOffset); -#ifdef ECOFF_64 +#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) intern->gp_prologue = bfd_h_get_8 (abfd, (bfd_byte *) ext->p_gp_prologue); if (bfd_header_big_endian (abfd)) { @@ -364,11 +373,11 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern) << PDR_BITS2_RESERVED_SH_LEFT_LITTLE)); } intern->localoff = bfd_h_get_8 (abfd, (bfd_byte *) ext->p_localoff); -#endif +#endif #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -384,7 +393,7 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr) PDR intern[1]; *intern = *intern_copy; /* Make it reasonable to do in-place. */ - + ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->p_adr); bfd_h_put_32 (abfd, intern->isym, (bfd_byte *)ext->p_isym); bfd_h_put_32 (abfd, intern->iline, (bfd_byte *)ext->p_iline); @@ -400,7 +409,7 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr) bfd_h_put_32 (abfd, intern->lnHigh, (bfd_byte *)ext->p_lnHigh); ecoff_put_off (abfd, intern->cbLineOffset, (bfd_byte *)ext->p_cbLineOffset); -#ifdef ECOFF_64 +#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) bfd_h_put_8 (abfd, intern->gp_prologue, (bfd_byte *) ext->p_gp_prologue); if (bfd_header_big_endian (abfd)) { @@ -425,17 +434,17 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr) & PDR_BITS2_RESERVED_LITTLE); } bfd_h_put_8 (abfd, intern->localoff, (bfd_byte *) ext->p_localoff); -#endif +#endif #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } #else /* MPW_C */ /* Same routines, but with ECOFF_64 code removed, so ^&%$#&! MPW C doesn't - corrupt itself and then freak out. */ + corrupt itself and then freak out. */ /* Swap in the procedure descriptor record. */ static void @@ -447,7 +456,7 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern) struct pdr_ext ext[1]; *ext = *(struct pdr_ext *) ext_copy; - + intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->p_adr); intern->isym = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_isym); intern->iline = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_iline); @@ -468,7 +477,7 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -484,7 +493,7 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr) PDR intern[1]; *intern = *intern_copy; /* Make it reasonable to do in-place. */ - + ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->p_adr); bfd_h_put_32 (abfd, intern->isym, (bfd_byte *)ext->p_isym); bfd_h_put_32 (abfd, intern->iline, (bfd_byte *)ext->p_iline); @@ -502,7 +511,7 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } #endif /* MPW_C */ @@ -518,11 +527,11 @@ ecoff_swap_sym_in (abfd, ext_copy, intern) struct sym_ext ext[1]; *ext = *(struct sym_ext *) ext_copy; - + intern->iss = bfd_h_get_32 (abfd, (bfd_byte *)ext->s_iss); intern->value = ecoff_get_off (abfd, (bfd_byte *)ext->s_value); - /* now the fun stuff... */ + /* now the fun stuff... */ if (bfd_header_big_endian (abfd)) { intern->st = (ext->s_bits1[0] & SYM_BITS1_ST_BIG) >> SYM_BITS1_ST_SH_BIG; @@ -552,7 +561,7 @@ ecoff_swap_sym_in (abfd, ext_copy, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -568,11 +577,11 @@ ecoff_swap_sym_out (abfd, intern_copy, ext_ptr) SYMR intern[1]; *intern = *intern_copy; /* Make it reasonable to do in-place. */ - + bfd_h_put_32 (abfd, intern->iss, (bfd_byte *)ext->s_iss); ecoff_put_off (abfd, intern->value, (bfd_byte *)ext->s_value); - /* now the fun stuff... */ + /* now the fun stuff... */ if (bfd_header_big_endian (abfd)) { ext->s_bits1[0] = (((intern->st << SYM_BITS1_ST_SH_BIG) & SYM_BITS1_ST_BIG) @@ -601,7 +610,7 @@ ecoff_swap_sym_out (abfd, intern_copy, ext_ptr) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -616,8 +625,8 @@ ecoff_swap_ext_in (abfd, ext_copy, intern) struct ext_ext ext[1]; *ext = *(struct ext_ext *) ext_copy; - - /* now the fun stuff... */ + + /* now the fun stuff... */ if (bfd_header_big_endian (abfd)) { intern->jmptbl = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_BIG); intern->cobol_main = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_BIG); @@ -629,10 +638,10 @@ ecoff_swap_ext_in (abfd, ext_copy, intern) } intern->reserved = 0; -#ifdef ECOFF_32 +#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32) intern->ifd = bfd_h_get_signed_16 (abfd, (bfd_byte *)ext->es_ifd); #endif -#ifdef ECOFF_64 +#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) intern->ifd = bfd_h_get_signed_32 (abfd, (bfd_byte *)ext->es_ifd); #endif @@ -640,7 +649,7 @@ ecoff_swap_ext_in (abfd, ext_copy, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -656,14 +665,14 @@ ecoff_swap_ext_out (abfd, intern_copy, ext_ptr) EXTR intern[1]; *intern = *intern_copy; /* Make it reasonable to do in-place. */ - - /* now the fun stuff... */ + + /* now the fun stuff... */ if (bfd_header_big_endian (abfd)) { ext->es_bits1[0] = ((intern->jmptbl ? EXT_BITS1_JMPTBL_BIG : 0) | (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_BIG : 0) | (intern->weakext ? EXT_BITS1_WEAKEXT_BIG : 0)); ext->es_bits2[0] = 0; -#ifdef ECOFF_64 +#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) ext->es_bits2[1] = 0; ext->es_bits2[2] = 0; #endif @@ -672,16 +681,16 @@ ecoff_swap_ext_out (abfd, intern_copy, ext_ptr) | (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_LITTLE : 0) | (intern->weakext ? EXT_BITS1_WEAKEXT_LITTLE : 0)); ext->es_bits2[0] = 0; -#ifdef ECOFF_64 +#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) ext->es_bits2[1] = 0; ext->es_bits2[2] = 0; #endif } -#ifdef ECOFF_32 +#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32) bfd_h_put_signed_16 (abfd, intern->ifd, (bfd_byte *)ext->es_ifd); #endif -#ifdef ECOFF_64 +#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) bfd_h_put_signed_32 (abfd, intern->ifd, (bfd_byte *)ext->es_ifd); #endif @@ -689,7 +698,7 @@ ecoff_swap_ext_out (abfd, intern_copy, ext_ptr) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -707,7 +716,7 @@ ecoff_swap_rfd_in (abfd, ext_ptr, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -725,7 +734,7 @@ ecoff_swap_rfd_out (abfd, intern, ext_ptr) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -766,7 +775,7 @@ ecoff_swap_opt_in (abfd, ext_copy, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -805,7 +814,7 @@ ecoff_swap_opt_out (abfd, intern_copy, ext_ptr) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -826,7 +835,7 @@ ecoff_swap_dnr_in (abfd, ext_copy, intern) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } @@ -848,6 +857,6 @@ ecoff_swap_dnr_out (abfd, intern_copy, ext_ptr) #ifdef TEST if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0) - abort(); + abort (); #endif } diff --git a/contrib/binutils/bfd/elf-bfd.h b/contrib/binutils/bfd/elf-bfd.h index 0dcecdf..4a36629 100644 --- a/contrib/binutils/bfd/elf-bfd.h +++ b/contrib/binutils/bfd/elf-bfd.h @@ -208,7 +208,7 @@ struct elf_link_local_dynamic_entry /* The index in the outgoing dynamic symbol table. */ long dynindx; - + /* A copy of the input symbol. */ Elf_Internal_Sym isym; }; @@ -243,6 +243,9 @@ struct elf_link_hash_table PTR stab_info; /* A linked list of local symbols to be added to .dynsym. */ struct elf_link_local_dynamic_entry *dynlocal; + /* A linked list of DT_RPATH/DT_RUNPATH names found in dynamic + objects included in the link. */ + struct bfd_link_needed_list *runpath; }; /* Look up an entry in an ELF linker hash table. */ @@ -372,9 +375,9 @@ struct elf_backend_data unsigned int)); /* A function to set the type of the info field. Processor-specific - types should be handled here. */ - int (*elf_backend_get_symbol_type) PARAMS (( Elf_Internal_Sym *, int)); - + types should be handled here. */ + int (*elf_backend_get_symbol_type) PARAMS (( Elf_Internal_Sym *, int)); + /* A function to do additional processing on the ELF section header just before writing it out. This is used to set the flags and type fields for some sections, or to actually write out data for @@ -388,8 +391,13 @@ struct elf_backend_data Elf32_Internal_Shdr *, char *)); + /* A function to convert machine dependent section header flags to + BFD internal section header flags. */ + boolean (*elf_backend_section_flags) PARAMS ((flagword *, + Elf32_Internal_Shdr *)); + /* A function to handle unusual program segment types when creating BFD - sections from ELF program segments. */ + sections from ELF program segments. */ boolean (*elf_backend_section_from_phdr) PARAMS ((bfd *, Elf32_Internal_Phdr *, int)); @@ -601,7 +609,7 @@ struct elf_backend_data /* Modify any information related to dynamic linking such that the symbol is not exported. */ void (*elf_backend_hide_symbol) - PARAMS ((struct elf_link_hash_entry *)); + PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); /* The swapping table to use when dealing with ECOFF information. Used for the MIPS ELF .mdebug section. */ @@ -638,7 +646,7 @@ struct elf_backend_data both REL and RELA relocations, and this flag is set for those backends.) */ unsigned may_use_rel_p : 1; - + /* Whether the backend may use RELA relocations. (Some backends use both REL and RELA relocations, and this flag is set for those backends.) */ @@ -647,8 +655,8 @@ struct elf_backend_data /* Whether the default relocation type is RELA. If a backend with this flag set wants REL relocations for a particular section, it must note that explicitly. Similarly, if this flag is clear, - and the backend wants RELA relocations for a particular - section. */ + and the backend wants RELA relocations for a particular + section. */ unsigned default_use_rela_p : 1; /* True if addresses "naturally" sign extend. This is used when @@ -788,14 +796,14 @@ struct elf_obj_tdata file_ptr next_file_pos; #if 0 /* we don't need these inside bfd anymore, and I think - these weren't used outside bfd. */ + these weren't used outside bfd. */ void *prstatus; /* The raw /proc prstatus structure */ void *prpsinfo; /* The raw /proc prpsinfo structure */ #endif bfd_vma gp; /* The gp value (MIPS only, for now) */ unsigned int gp_size; /* The gp size (MIPS only, for now) */ - /* Information grabbed from an elf core file. */ + /* Information grabbed from an elf core file. */ int core_signal; int core_pid; int core_lwpid; @@ -817,7 +825,7 @@ struct elf_obj_tdata document the intent of any particular piece of code. The field should be used as a count until size_dynamic_sections, at which point the contents of the .got is fixed. Afterward, if an entry - is -1, then the symbol does not require a global offset table entry. */ + is -1, then the symbol does not require a global offset table entry. */ union { bfd_signed_vma *refcounts; @@ -838,6 +846,14 @@ struct elf_obj_tdata one. */ const char *dt_name; + /* When a reference in a regular object is resolved by a shared + object is loaded into via the DT_NEEDED entries by the linker + ELF emulation code, we need to add the shared object to the + DT_NEEDED list of the resulting binary to indicate the dependency + as if the -l option is passed to the linker. This field holds the + name of the loaded shared object. */ + const char *dt_soname; + /* Irix 5 often screws up the symbol table, sorting local symbols after global symbols. This flag is set if the symbol table in this BFD appears to be screwed up. If it is, we ignore the @@ -857,11 +873,11 @@ struct elf_obj_tdata find_nearest_line. */ struct mips_elf_find_line *find_line_info; - /* A place to stash dwarf1 info for this bfd. */ + /* A place to stash dwarf1 info for this bfd. */ struct dwarf1_debug *dwarf1_find_line_info; - /* A place to stash dwarf2 info for this bfd. */ - struct dwarf2_debug *dwarf2_find_line_info; + /* A place to stash dwarf2 info for this bfd. */ + PTR dwarf2_find_line_info; /* An array of stub sections indexed by symbol number, used by the MIPS ELF linker. FIXME: We should figure out some way to only @@ -885,6 +901,13 @@ struct elf_obj_tdata /* Linker sections that we are interested in. */ struct elf_linker_section *linker_section[ (int)LINKER_SECTION_MAX ]; + + /* The Irix 5 support uses two virtual sections, which represent + text/data symbols defined in dynamic objects. */ + asymbol *elf_data_symbol; + asymbol *elf_text_symbol; + asection *elf_data_section; + asection *elf_text_section; }; #define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data) @@ -908,6 +931,7 @@ struct elf_obj_tdata #define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got.offsets) #define elf_local_ptr_offsets(bfd) (elf_tdata(bfd) -> linker_section_pointers) #define elf_dt_name(bfd) (elf_tdata(bfd) -> dt_name) +#define elf_dt_soname(bfd) (elf_tdata(bfd) -> dt_soname) #define elf_bad_symtab(bfd) (elf_tdata(bfd) -> bad_symtab) #define elf_flags_init(bfd) (elf_tdata(bfd) -> flags_init) #define elf_linker_section(bfd,n) (elf_tdata(bfd) -> linker_section[(int)n]) @@ -970,7 +994,7 @@ extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create extern void _bfd_elf_link_hash_copy_indirect PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *)); extern void _bfd_elf_link_hash_hide_symbol - PARAMS ((struct elf_link_hash_entry *)); + PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); extern boolean _bfd_elf_link_hash_table_init PARAMS ((struct elf_link_hash_table *, bfd *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, @@ -1006,14 +1030,14 @@ extern boolean _bfd_elf_set_arch_mach PARAMS ((bfd *, enum bfd_architecture, unsigned long)); extern boolean _bfd_elf_find_nearest_line PARAMS ((bfd *, asection *, asymbol **, - bfd_vma, CONST char **, - CONST char **, + bfd_vma, const char **, + const char **, unsigned int *)); #define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols #define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol extern int _bfd_elf_sizeof_headers PARAMS ((bfd *, boolean)); extern boolean _bfd_elf_new_section_hook PARAMS ((bfd *, asection *)); -extern boolean _bfd_elf_init_reloc_shdr +extern boolean _bfd_elf_init_reloc_shdr PARAMS ((bfd *, Elf_Internal_Shdr *, asection *, boolean)); /* If the target doesn't have reloc handling written yet: */ @@ -1142,6 +1166,10 @@ extern long bfd_elf32_slurp_symbol_table extern boolean bfd_elf32_write_shdrs_and_ehdr PARAMS ((bfd *)); extern int bfd_elf32_write_out_phdrs PARAMS ((bfd *, const Elf_Internal_Phdr *, int)); +extern void bfd_elf32_write_relocs + PARAMS ((bfd *, asection *, PTR)); +extern boolean bfd_elf32_slurp_reloc_table + PARAMS ((bfd *, asection *, asymbol **, boolean)); extern boolean bfd_elf32_add_dynamic_entry PARAMS ((struct bfd_link_info *, bfd_vma, bfd_vma)); extern boolean bfd_elf32_link_create_dynamic_sections @@ -1185,6 +1213,10 @@ extern long bfd_elf64_slurp_symbol_table extern boolean bfd_elf64_write_shdrs_and_ehdr PARAMS ((bfd *)); extern int bfd_elf64_write_out_phdrs PARAMS ((bfd *, const Elf_Internal_Phdr *, int)); +extern void bfd_elf64_write_relocs + PARAMS ((bfd *, asection *, PTR)); +extern boolean bfd_elf64_slurp_reloc_table + PARAMS ((bfd *, asection *, asymbol **, boolean)); extern boolean bfd_elf64_add_dynamic_entry PARAMS ((struct bfd_link_info *, bfd_vma, bfd_vma)); extern boolean bfd_elf64_link_create_dynamic_sections @@ -1274,11 +1306,11 @@ extern boolean _bfd_mips_elf_finish_dynamic_symbol Elf_Internal_Sym *)); extern boolean _bfd_mips_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); -extern asection * _bfd_mips_elf_gc_mark_hook +extern asection * _bfd_mips_elf_gc_mark_hook PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *)); -extern boolean _bfd_mips_elf_gc_sweep_hook - PARAMS ((bfd *, struct bfd_link_info *, asection *, +extern boolean _bfd_mips_elf_gc_sweep_hook + PARAMS ((bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *)); extern boolean _bfd_mips_elf_always_size_sections PARAMS ((bfd *, struct bfd_link_info *)); @@ -1289,7 +1321,7 @@ extern boolean _bfd_mips_elf_check_relocs const Elf_Internal_Rela *)); extern struct bfd_link_hash_table *_bfd_mips_elf_link_hash_table_create PARAMS ((bfd *)); -extern boolean _bfd_mips_elf_print_private_bfd_data +extern boolean _bfd_mips_elf_print_private_bfd_data PARAMS ((bfd *, PTR)); extern boolean _bfd_mips_elf_link_output_symbol_hook PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *, diff --git a/contrib/binutils/bfd/elf.c b/contrib/binutils/bfd/elf.c index e8e7e37..5ae24ee 100644 --- a/contrib/binutils/bfd/elf.c +++ b/contrib/binutils/bfd/elf.c @@ -31,6 +31,8 @@ SECTION haven't bothered yet. */ +/* For sparc64-cross-sparc32. */ +#define _SYSCALL32 #include "bfd.h" #include "sysdep.h" #include "bfdlink.h" @@ -227,11 +229,11 @@ bfd_elf_hash (namearg) /* Read a specified number of bytes at a specified offset in an ELF file, into a newly allocated buffer, and return a pointer to the - buffer. */ + buffer. */ static char * elf_read (abfd, offset, size) - bfd * abfd; + bfd *abfd; long offset; unsigned int size; { @@ -252,31 +254,31 @@ elf_read (abfd, offset, size) boolean bfd_elf_mkobject (abfd) - bfd * abfd; + bfd *abfd; { - /* this just does initialization */ - /* coff_mkobject zalloc's space for tdata.coff_obj_data ... */ + /* This just does initialization. */ + /* coff_mkobject zalloc's space for tdata.coff_obj_data ... */ elf_tdata (abfd) = (struct elf_obj_tdata *) bfd_zalloc (abfd, sizeof (struct elf_obj_tdata)); if (elf_tdata (abfd) == 0) return false; - /* since everything is done at close time, do we need any - initialization? */ + /* Since everything is done at close time, do we need any + initialization? */ return true; } boolean bfd_elf_mkcorefile (abfd) - bfd * abfd; + bfd *abfd; { - /* I think this can be done just like an object file. */ + /* I think this can be done just like an object file. */ return bfd_elf_mkobject (abfd); } char * bfd_elf_get_str_section (abfd, shindex) - bfd * abfd; + bfd *abfd; unsigned int shindex; { Elf_Internal_Shdr **i_shdrp; @@ -291,7 +293,7 @@ bfd_elf_get_str_section (abfd, shindex) shstrtab = (char *) i_shdrp[shindex]->contents; if (shstrtab == NULL) { - /* No cached one, attempt to read, and cache what we read. */ + /* No cached one, attempt to read, and cache what we read. */ offset = i_shdrp[shindex]->sh_offset; shstrtabsize = i_shdrp[shindex]->sh_size; shstrtab = elf_read (abfd, offset, shstrtabsize); @@ -302,7 +304,7 @@ bfd_elf_get_str_section (abfd, shindex) char * bfd_elf_string_from_elf_section (abfd, shindex, strindex) - bfd * abfd; + bfd *abfd; unsigned int shindex; unsigned int strindex; { @@ -343,6 +345,7 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name) { asection *newsect; flagword flags; + struct elf_backend_data *bed; if (hdr->bfd_section != NULL) { @@ -381,10 +384,23 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name) /* The debugging sections appear to be recognized only by name, not any sort of flag. */ - if (strncmp (name, ".debug", sizeof ".debug" - 1) == 0 - || strncmp (name, ".line", sizeof ".line" - 1) == 0 - || strncmp (name, ".stab", sizeof ".stab" - 1) == 0) - flags |= SEC_DEBUGGING; + { + static const char *debug_sec_names [] = + { + ".debug", + ".gnu.linkonce.wi.", + ".line", + ".stab" + }; + int i; + + for (i = sizeof (debug_sec_names) / sizeof (debug_sec_names[0]); i--;) + if (strncmp (name, debug_sec_names[i], strlen (debug_sec_names[i])) == 0) + break; + + if (i >= 0) + flags |= SEC_DEBUGGING; + } /* As a GNU extension, if the name begins with .gnu.linkonce, we only link a single copy of the section. This is used to support @@ -395,6 +411,11 @@ _bfd_elf_make_section_from_shdr (abfd, hdr, name) if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0) flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; + bed = get_elf_backend_data (abfd); + if (bed->elf_backend_section_flags) + if (! bed->elf_backend_section_flags (&flags, hdr)) + return false; + if (! bfd_set_section_flags (abfd, newsect, flags)) return false; @@ -457,7 +478,7 @@ DESCRIPTION struct elf_internal_shdr * bfd_elf_find_section (abfd, name) - bfd * abfd; + bfd *abfd; char *name; { Elf_Internal_Shdr **i_shdrp; @@ -497,7 +518,6 @@ const char *const bfd_elf_section_type_names[] = { function. It just short circuits the reloc if producing relocateable output against an external symbol. */ -/*ARGSUSED*/ bfd_reloc_status_type bfd_elf_generic_reloc (abfd, reloc_entry, @@ -653,13 +673,40 @@ _bfd_elf_print_private_bfd_data (abfd, farg) case DT_DEBUG: name = "DEBUG"; break; case DT_TEXTREL: name = "TEXTREL"; break; case DT_JMPREL: name = "JMPREL"; break; - case DT_AUXILIARY: name = "AUXILIARY"; stringp = true; break; - case DT_FILTER: name = "FILTER"; stringp = true; break; + case DT_BIND_NOW: name = "BIND_NOW"; break; + case DT_INIT_ARRAY: name = "INIT_ARRAY"; break; + case DT_FINI_ARRAY: name = "FINI_ARRAY"; break; + case DT_INIT_ARRAYSZ: name = "INIT_ARRAYSZ"; break; + case DT_FINI_ARRAYSZ: name = "FINI_ARRAYSZ"; break; + case DT_RUNPATH: name = "RUNPATH"; stringp = true; break; + case DT_FLAGS: name = "FLAGS"; break; + case DT_PREINIT_ARRAY: name = "PREINIT_ARRAY"; break; + case DT_PREINIT_ARRAYSZ: name = "PREINIT_ARRAYSZ"; break; + case DT_CHECKSUM: name = "CHECKSUM"; break; + case DT_PLTPADSZ: name = "PLTPADSZ"; break; + case DT_MOVEENT: name = "MOVEENT"; break; + case DT_MOVESZ: name = "MOVESZ"; break; + case DT_FEATURE: name = "FEATURE"; break; + case DT_POSFLAG_1: name = "POSFLAG_1"; break; + case DT_SYMINSZ: name = "SYMINSZ"; break; + case DT_SYMINENT: name = "SYMINENT"; break; + case DT_CONFIG: name = "CONFIG"; stringp = true; break; + case DT_DEPAUDIT: name = "DEPAUDIT"; stringp = true; break; + case DT_AUDIT: name = "AUDIT"; stringp = true; break; + case DT_PLTPAD: name = "PLTPAD"; break; + case DT_MOVETAB: name = "MOVETAB"; break; + case DT_SYMINFO: name = "SYMINFO"; break; + case DT_RELACOUNT: name = "RELACOUNT"; break; + case DT_RELCOUNT: name = "RELCOUNT"; break; + case DT_FLAGS_1: name = "FLAGS_1"; break; case DT_VERSYM: name = "VERSYM"; break; case DT_VERDEF: name = "VERDEF"; break; case DT_VERDEFNUM: name = "VERDEFNUM"; break; case DT_VERNEED: name = "VERNEED"; break; case DT_VERNEEDNUM: name = "VERNEEDNUM"; break; + case DT_AUXILIARY: name = "AUXILIARY"; stringp = true; break; + case DT_USED: name = "USED"; break; + case DT_FILTER: name = "FILTER"; stringp = true; break; } fprintf (f, " %-11s ", name); @@ -762,16 +809,16 @@ bfd_elf_print_symbol (abfd, filep, symbol, how) CONST char *name = NULL; struct elf_backend_data *bed; unsigned char st_other; - + section_name = symbol->section ? symbol->section->name : "(*none*)"; bed = get_elf_backend_data (abfd); if (bed->elf_backend_print_symbol_all) - name = (*bed->elf_backend_print_symbol_all) (abfd, filep, symbol); + name = (*bed->elf_backend_print_symbol_all) (abfd, filep, symbol); if (name == NULL) { - name = symbol->name; + name = symbol->name; bfd_print_symbol_vandf ((PTR) file, symbol); } @@ -838,7 +885,7 @@ bfd_elf_print_symbol (abfd, filep, symbol, how) /* If the st_other field is not zero, print it. */ st_other = ((elf_symbol_type *) symbol)->internal_elf_sym.st_other; - + switch (st_other) { case 0: break; @@ -950,7 +997,8 @@ _bfd_elf_link_hash_copy_indirect (dir, ind) } void -_bfd_elf_link_hash_hide_symbol(h) +_bfd_elf_link_hash_hide_symbol (info, h) + struct bfd_link_info *info ATTRIBUTE_UNUSED; struct elf_link_hash_entry *h; { h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; @@ -975,6 +1023,7 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc) table->dynstr = NULL; table->bucketcount = 0; table->needed = NULL; + table->runpath = NULL; table->hgot = NULL; table->stab_info = NULL; table->dynlocal = NULL; @@ -1018,6 +1067,16 @@ bfd_elf_set_dt_needed_name (abfd, name) elf_dt_name (abfd) = name; } +void +bfd_elf_set_dt_needed_soname (abfd, name) + bfd *abfd; + const char *name; +{ + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour + && bfd_get_format (abfd) == bfd_object) + elf_dt_soname (abfd) = name; +} + /* Get the list of DT_NEEDED entries for a link. This is a hook for the linker ELF emulation code. */ @@ -1031,6 +1090,19 @@ bfd_elf_get_needed_list (abfd, info) return elf_hash_table (info)->needed; } +/* Get the list of DT_RPATH/DT_RUNPATH entries for a link. This is a + hook for the linker ELF emulation code. */ + +struct bfd_link_needed_list * +bfd_elf_get_runpath_list (abfd, info) + bfd *abfd ATTRIBUTE_UNUSED; + struct bfd_link_info *info; +{ + if (info->hash->creator->flavour != bfd_target_elf_flavour) + return NULL; + return elf_hash_table (info)->runpath; +} + /* Get the name actually used for a dynamic object for a link. This is the SONAME entry if there is one. Otherwise, it is the string passed to bfd_elf_set_dt_needed_name, or it is the filename. */ @@ -1155,7 +1227,7 @@ _bfd_elf_stringtab_init () /* ELF .o/exec file reading */ -/* Create a new bfd section from an ELF section header. */ +/* Create a new bfd section from an ELF section header. */ boolean bfd_section_from_shdr (abfd, shindex) @@ -1328,8 +1400,10 @@ bfd_section_from_shdr (abfd, shindex) /* If this reloc section does not use the main symbol table we don't treat it as a reloc section. BFD can't adequately represent such a section, so at least for now, we don't - try. We just present it as a normal section. */ - if (hdr->sh_link != elf_onesymtab (abfd)) + try. We just present it as a normal section. We also + can't use it as a reloc section if it points to the null + section. */ + if (hdr->sh_link != elf_onesymtab (abfd) || hdr->sh_info == SHN_UNDEF) return _bfd_elf_make_section_from_shdr (abfd, hdr, name); if (! bfd_section_from_shdr (abfd, hdr->sh_info)) @@ -1423,7 +1497,7 @@ _bfd_elf_new_section_hook (abfd, sec) sec->used_by_bfd = (PTR) sdata; /* Indicate whether or not this section should use RELA relocations. */ - sdata->use_rela_p + sdata->use_rela_p = get_elf_backend_data (abfd)->default_use_rela_p; return true; @@ -1486,7 +1560,7 @@ _bfd_elf_make_section_from_phdr (abfd, hdr, index, typename) if (hdr->p_flags & PF_X) { /* FIXME: all we known is that it has execute PERMISSION, - may be data. */ + may be data. */ newsect->flags |= SEC_CODE; } } @@ -1558,7 +1632,7 @@ bfd_section_from_phdr (abfd, hdr, index) default: /* Check for any processor-specific program segment types. - If no handler for them, default to making "segment" sections. */ + If no handler for them, default to making "segment" sections. */ bed = get_elf_backend_data (abfd); if (bed->elf_backend_section_from_phdr) return (*bed->elf_backend_section_from_phdr) (abfd, hdr, index); @@ -1606,7 +1680,6 @@ _bfd_elf_init_reloc_shdr (abfd, rel_hdr, asect, use_rela_p) /* Set up an ELF internal section header for a section. */ -/*ARGSUSED*/ static void elf_fake_sections (abfd, asect, failedptrarg) bfd *abfd; @@ -1720,16 +1793,10 @@ elf_fake_sections (abfd, asect, failedptrarg) || this_hdr->sh_info == elf_tdata (abfd)->cverrefs); } else if ((asect->flags & SEC_ALLOC) != 0 - && (asect->flags & SEC_LOAD) != 0) - this_hdr->sh_type = SHT_PROGBITS; - else if ((asect->flags & SEC_ALLOC) != 0 - && ((asect->flags & SEC_LOAD) == 0)) + && ((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)) this_hdr->sh_type = SHT_NOBITS; else - { - /* Who knows? */ - this_hdr->sh_type = SHT_PROGBITS; - } + this_hdr->sh_type = SHT_PROGBITS; if ((asect->flags & SEC_ALLOC) != 0) this_hdr->sh_flags |= SHF_ALLOC; @@ -1745,11 +1812,11 @@ elf_fake_sections (abfd, asect, failedptrarg) /* If the section has relocs, set up a section header for the SHT_REL[A] section. If two relocation sections are required for this section, it is up to the processor-specific back-end to - create the other. */ + create the other. */ if ((asect->flags & SEC_RELOC) != 0 - && !_bfd_elf_init_reloc_shdr (abfd, + && !_bfd_elf_init_reloc_shdr (abfd, &elf_section_data (asect)->rel_hdr, - asect, + asect, elf_section_data (asect)->use_rela_p)) *failedptr = true; } @@ -1766,7 +1833,6 @@ assign_section_numbers (abfd) asection *sec; unsigned int section_number; Elf_Internal_Shdr **i_shdrp; - struct elf_backend_data *bed = get_elf_backend_data (abfd); section_number = 1; @@ -1901,7 +1967,7 @@ assign_section_numbers (abfd) /* This is a .stab section. */ elf_section_data (s)->this_hdr.sh_entsize = - 4 + 2 * (bed->s->arch_size / 8); + 4 + 2 * bfd_get_arch_size (abfd) / 8; } } break; @@ -1990,7 +2056,7 @@ elf_map_symbols (abfd) for (idx = 0; idx < symcount; idx++) { sym = syms[idx]; - + if ((sym->flags & BSF_SECTION_SYM) != 0 && sym->value == 0) { @@ -2004,7 +2070,7 @@ elf_map_symbols (abfd) { if (sec->output_offset != 0) continue; - + sec = sec->output_section; /* Empty sections in the input files may have had a section @@ -2903,18 +2969,21 @@ assign_file_positions_for_segments (abfd) if (p->p_type == PT_NOTE && bfd_get_format (abfd) == bfd_core) { - if (i == 0) /* the actual "note" segment */ - { /* this one actually contains everything. */ + /* The actual "note" segment has i == 0. + This is the one that actually contains everything. */ + if (i == 0) + { sec->filepos = off; p->p_filesz = sec->_raw_size; off += sec->_raw_size; voff = off; } - else /* fake sections -- don't need to be written */ + else { + /* Fake sections -- don't need to be written. */ sec->filepos = 0; sec->_raw_size = 0; - flags = sec->flags = 0; /* no contents */ + flags = sec->flags = 0; } p->p_memsz = 0; p->p_align = 1; @@ -3228,7 +3297,7 @@ prep_headers (abfd) i_ehdrp->e_machine = EM_NONE; break; case bfd_arch_sparc: - if (bed->s->arch_size == 64) + if (bfd_get_arch_size (abfd) == 64) i_ehdrp->e_machine = EM_SPARCV9; else i_ehdrp->e_machine = EM_SPARC; @@ -3237,7 +3306,19 @@ prep_headers (abfd) i_ehdrp->e_machine = EM_S370; break; case bfd_arch_i386: - i_ehdrp->e_machine = EM_386; + if (bfd_get_arch_size (abfd) == 64) + i_ehdrp->e_machine = EM_X86_64; + else + i_ehdrp->e_machine = EM_386; + break; + case bfd_arch_ia64: + i_ehdrp->e_machine = EM_IA_64; + break; + case bfd_arch_m68hc11: + i_ehdrp->e_machine = EM_68HC11; + break; + case bfd_arch_m68hc12: + i_ehdrp->e_machine = EM_68HC12; break; case bfd_arch_m68k: i_ehdrp->e_machine = EM_68K; @@ -3288,10 +3369,10 @@ prep_headers (abfd) case 0: i_ehdrp->e_machine = EM_CYGNUS_V850; break; } break; - case bfd_arch_arc: + case bfd_arch_arc: i_ehdrp->e_machine = EM_CYGNUS_ARC; break; - case bfd_arch_arm: + case bfd_arch_arm: i_ehdrp->e_machine = EM_ARM; break; case bfd_arch_m32r: @@ -3306,6 +3387,9 @@ prep_headers (abfd) case bfd_arch_pj: i_ehdrp->e_machine = EM_PJ; break; + case bfd_arch_cris: + i_ehdrp->e_machine = EM_CRIS; + break; /* also note that EM_M32, AT&T WE32100 is unknown to bfd */ default: i_ehdrp->e_machine = EM_NONE; @@ -3313,24 +3397,24 @@ prep_headers (abfd) i_ehdrp->e_version = bed->s->ev_current; i_ehdrp->e_ehsize = bed->s->sizeof_ehdr; - /* no program header, for now. */ + /* No program header, for now. */ i_ehdrp->e_phoff = 0; i_ehdrp->e_phentsize = 0; i_ehdrp->e_phnum = 0; - /* each bfd section is section header entry */ + /* Each bfd section is section header entry. */ i_ehdrp->e_entry = bfd_get_start_address (abfd); i_ehdrp->e_shentsize = bed->s->sizeof_shdr; - /* if we're building an executable, we'll need a program header table */ + /* If we're building an executable, we'll need a program header table. */ if (abfd->flags & EXEC_P) { - /* it all happens later */ + /* It all happens later. */ #if 0 i_ehdrp->e_phentsize = sizeof (Elf_External_Phdr); /* elf_build_phdrs() returns a (NULL-terminated) array of - Elf_Internal_Phdrs */ + Elf_Internal_Phdrs. */ i_phdrp = elf_build_phdrs (abfd, i_ehdrp, i_shdrp, &i_ehdrp->e_phnum); i_ehdrp->e_phoff = outbase; outbase += i_ehdrp->e_phentsize * i_ehdrp->e_phnum; @@ -3410,7 +3494,7 @@ _bfd_elf_write_object_contents (abfd) _bfd_elf_assign_file_positions_for_relocs (abfd); - /* After writing the headers, we need to write the sections too... */ + /* After writing the headers, we need to write the sections too... */ for (count = 1; count < i_ehdrp->e_shnum; count++) { if (bed->elf_backend_section_processing) @@ -3441,10 +3525,12 @@ boolean _bfd_elf_write_corefile_contents (abfd) bfd *abfd; { - /* Hopefully this can be done just like an object file. */ + /* Hopefully this can be done just like an object file. */ return _bfd_elf_write_object_contents (abfd); } -/* given a section, search the header to find them... */ + +/* Given a section, search the header to find them. */ + int _bfd_elf_section_from_bfd_section (abfd, asect) bfd *abfd; @@ -3553,14 +3639,18 @@ copy_private_bfd_data (ibfd, obfd) bfd *ibfd; bfd *obfd; { - Elf_Internal_Ehdr *iehdr; - struct elf_segment_map *mfirst; - struct elf_segment_map **pm; - struct elf_segment_map *m; - Elf_Internal_Phdr *p; - unsigned int i; - unsigned int num_segments; - boolean phdr_included = false; + Elf_Internal_Ehdr * iehdr; + struct elf_segment_map * map; + struct elf_segment_map * map_first; + struct elf_segment_map ** pointer_to_map; + Elf_Internal_Phdr * segment; + asection * section; + unsigned int i; + unsigned int num_segments; + boolean phdr_included = false; + bfd_vma maxpagesize; + struct elf_segment_map * phdr_adjust_seg = NULL; + unsigned int phdr_adjust_num = 0; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) @@ -3571,119 +3661,214 @@ copy_private_bfd_data (ibfd, obfd) iehdr = elf_elfheader (ibfd); - mfirst = NULL; - pm = &mfirst; + map_first = NULL; + pointer_to_map = &map_first; num_segments = elf_elfheader (ibfd)->e_phnum; - -#define IS_CONTAINED_BY(addr, len, bottom, phdr) \ - ((addr) >= (bottom) \ - && ( ((addr) + (len)) <= ((bottom) + (phdr)->p_memsz) \ - || ((addr) + (len)) <= ((bottom) + (phdr)->p_filesz))) - - /* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */ - -#define IS_COREFILE_NOTE(p, s) \ - (p->p_type == PT_NOTE \ - && bfd_get_format (ibfd) == bfd_core \ - && s->vma == 0 && s->lma == 0 \ - && (bfd_vma) s->filepos >= p->p_offset \ - && (bfd_vma) s->filepos + s->_raw_size \ + maxpagesize = get_elf_backend_data (obfd)->maxpagesize; + + /* Returns the end address of the segment + 1. */ +#define SEGMENT_END(segment, start) \ + (start + (segment->p_memsz > segment->p_filesz \ + ? segment->p_memsz : segment->p_filesz)) + + /* Returns true if the given section is contained within + the given segment. VMA addresses are compared. */ +#define IS_CONTAINED_BY_VMA(section, segment) \ + (section->vma >= segment->p_vaddr \ + && (section->vma + section->_raw_size) \ + <= (SEGMENT_END (segment, segment->p_vaddr))) + + /* Returns true if the given section is contained within + the given segment. LMA addresses are compared. */ +#define IS_CONTAINED_BY_LMA(section, segment, base) \ + (section->lma >= base \ + && (section->lma + section->_raw_size) \ + <= SEGMENT_END (segment, base)) + + /* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */ +#define IS_COREFILE_NOTE(p, s) \ + (p->p_type == PT_NOTE \ + && bfd_get_format (ibfd) == bfd_core \ + && s->vma == 0 && s->lma == 0 \ + && (bfd_vma) s->filepos >= p->p_offset \ + && (bfd_vma) s->filepos + s->_raw_size \ <= p->p_offset + p->p_filesz) /* The complicated case when p_vaddr is 0 is to handle the Solaris linker, which generates a PT_INTERP section with p_vaddr and p_memsz set to 0. */ - -#define IS_SOLARIS_PT_INTERP(p, s) \ - (p->p_vaddr == 0 \ - && p->p_filesz > 0 \ - && (s->flags & SEC_HAS_CONTENTS) != 0 \ - && s->_raw_size > 0 \ - && (bfd_vma) s->filepos >= p->p_offset \ - && ((bfd_vma) s->filepos + s->_raw_size \ +#define IS_SOLARIS_PT_INTERP(p, s) \ + ( p->p_vaddr == 0 \ + && p->p_filesz > 0 \ + && (s->flags & SEC_HAS_CONTENTS) != 0 \ + && s->_raw_size > 0 \ + && (bfd_vma) s->filepos >= p->p_offset \ + && ((bfd_vma) s->filepos + s->_raw_size \ <= p->p_offset + p->p_filesz)) + /* Decide if the given section should be included in the given segment. + A section will be included if: + 1. It is within the address space of the segment, + 2. It is an allocated segment, + 3. There is an output section associated with it, + 4. The section has not already been allocated to a previous segment. */ +#define INCLUDE_SECTION_IN_SEGMENT(section, segment) \ + ((((IS_CONTAINED_BY_VMA (section, segment) \ + || IS_SOLARIS_PT_INTERP (segment, section)) \ + && (section->flags & SEC_ALLOC) != 0) \ + || IS_COREFILE_NOTE (segment, section)) \ + && section->output_section != NULL \ + && section->segment_mark == false) + + /* Returns true iff seg1 starts after the end of seg2. */ +#define SEGMENT_AFTER_SEGMENT(seg1, seg2) \ + (seg1->p_vaddr >= SEGMENT_END (seg2, seg2->p_vaddr)) + + /* Returns true iff seg1 and seg2 overlap. */ +#define SEGMENT_OVERLAPS(seg1, seg2) \ + (!(SEGMENT_AFTER_SEGMENT (seg1, seg2) || SEGMENT_AFTER_SEGMENT (seg2, seg1))) + + /* Initialise the segment mark field. */ + for (section = ibfd->sections; section != NULL; section = section->next) + section->segment_mark = false; + /* Scan through the segments specified in the program header - of the input BFD. */ - for (i = 0, p = elf_tdata (ibfd)->phdr; i < num_segments; i++, p++) + of the input BFD. For this first scan we look for overlaps + in the loadable segments. These can be created by wierd + parameters to objcopy. */ + for (i = 0, segment = elf_tdata (ibfd)->phdr; + i < num_segments; + i++, segment++) { - unsigned int csecs; - asection *s; - asection **sections; - asection *os; - unsigned int isec; - bfd_vma matching_lma; - bfd_vma suggested_lma; unsigned int j; + Elf_Internal_Phdr *segment2; - /* For each section in the input BFD, decide if it should be - included in the current segment. A section will be included - if it is within the address space of the segment, and it is - an allocated segment, and there is an output section - associated with it. */ - csecs = 0; - for (s = ibfd->sections; s != NULL; s = s->next) - if (s->output_section != NULL) - { - if ((IS_CONTAINED_BY (s->vma, s->_raw_size, p->p_vaddr, p) - || IS_SOLARIS_PT_INTERP (p, s)) - && (s->flags & SEC_ALLOC) != 0) - ++csecs; - else if (IS_COREFILE_NOTE (p, s)) - ++csecs; - } + if (segment->p_type != PT_LOAD) + continue; + + /* Determine if this segment overlaps any previous segments. */ + for (j = 0, segment2 = elf_tdata (ibfd)->phdr; j < i; j++, segment2 ++) + { + bfd_signed_vma extra_length; + + if (segment2->p_type != PT_LOAD + || ! SEGMENT_OVERLAPS (segment, segment2)) + continue; + + /* Merge the two segments together. */ + if (segment2->p_vaddr < segment->p_vaddr) + { + /* Extend SEGMENT2 to include SEGMENT and then delete + SEGMENT. */ + extra_length = + SEGMENT_END (segment, segment->p_vaddr) + - SEGMENT_END (segment2, segment2->p_vaddr); + + if (extra_length > 0) + { + segment2->p_memsz += extra_length; + segment2->p_filesz += extra_length; + } + + segment->p_type = PT_NULL; + + /* Since we have deleted P we must restart the outer loop. */ + i = 0; + segment = elf_tdata (ibfd)->phdr; + break; + } + else + { + /* Extend SEGMENT to include SEGMENT2 and then delete + SEGMENT2. */ + extra_length = + SEGMENT_END (segment2, segment2->p_vaddr) + - SEGMENT_END (segment, segment->p_vaddr); + + if (extra_length > 0) + { + segment->p_memsz += extra_length; + segment->p_filesz += extra_length; + } + + segment2->p_type = PT_NULL; + } + } + } + + /* The second scan attempts to assign sections to segments. */ + for (i = 0, segment = elf_tdata (ibfd)->phdr; + i < num_segments; + i ++, segment ++) + { + unsigned int section_count; + asection ** sections; + asection * output_section; + unsigned int isec; + bfd_vma matching_lma; + bfd_vma suggested_lma; + unsigned int j; + + if (segment->p_type == PT_NULL) + continue; + + /* Compute how many sections might be placed into this segment. */ + section_count = 0; + for (section = ibfd->sections; section != NULL; section = section->next) + if (INCLUDE_SECTION_IN_SEGMENT (section, segment)) + ++section_count; /* Allocate a segment map big enough to contain all of the sections we have selected. */ - m = ((struct elf_segment_map *) + map = ((struct elf_segment_map *) bfd_alloc (obfd, (sizeof (struct elf_segment_map) - + ((size_t) csecs - 1) * sizeof (asection *)))); - if (m == NULL) + + ((size_t) section_count - 1) * sizeof (asection *)))); + if (map == NULL) return false; /* Initialise the fields of the segment map. Default to using the physical address of the segment in the input BFD. */ - m->next = NULL; - m->p_type = p->p_type; - m->p_flags = p->p_flags; - m->p_flags_valid = 1; - m->p_paddr = p->p_paddr; - m->p_paddr_valid = 1; + map->next = NULL; + map->p_type = segment->p_type; + map->p_flags = segment->p_flags; + map->p_flags_valid = 1; + map->p_paddr = segment->p_paddr; + map->p_paddr_valid = 1; /* Determine if this segment contains the ELF file header and if it contains the program headers themselves. */ - m->includes_filehdr = (p->p_offset == 0 - && p->p_filesz >= iehdr->e_ehsize); + map->includes_filehdr = (segment->p_offset == 0 + && segment->p_filesz >= iehdr->e_ehsize); - m->includes_phdrs = 0; + map->includes_phdrs = 0; - if (! phdr_included || p->p_type != PT_LOAD) + if (! phdr_included || segment->p_type != PT_LOAD) { - m->includes_phdrs = - (p->p_offset <= (bfd_vma) iehdr->e_phoff - && (p->p_offset + p->p_filesz + map->includes_phdrs = + (segment->p_offset <= (bfd_vma) iehdr->e_phoff + && (segment->p_offset + segment->p_filesz >= ((bfd_vma) iehdr->e_phoff + iehdr->e_phnum * iehdr->e_phentsize))); - if (p->p_type == PT_LOAD && m->includes_phdrs) + + if (segment->p_type == PT_LOAD && map->includes_phdrs) phdr_included = true; } - if (csecs == 0) + if (section_count == 0) { /* Special segments, such as the PT_PHDR segment, may contain no sections, but ordinary, loadable segments should contain something. */ - - if (p->p_type == PT_LOAD) + if (segment->p_type == PT_LOAD) _bfd_error_handler (_("%s: warning: Empty loadable segment detected\n"), bfd_get_filename (ibfd)); - m->count = 0; - *pm = m; - pm = &m->next; + map->count = 0; + *pointer_to_map = map; + pointer_to_map = &map->next; continue; } @@ -3716,7 +3901,8 @@ copy_private_bfd_data (ibfd, obfd) pointers that we are interested in. As these sections get assigned to a segment, they are removed from this array. */ - sections = (asection **) bfd_malloc (sizeof (asection *) * csecs); + sections = (asection **) bfd_malloc + (sizeof (asection *) * section_count); if (sections == NULL) return false; @@ -3726,70 +3912,67 @@ copy_private_bfd_data (ibfd, obfd) case, where the sections have not been moved, this means that we have completely filled the segment, and there is nothing more to do. */ - isec = 0; matching_lma = 0; suggested_lma = 0; - for (j = 0, s = ibfd->sections; s != NULL; s = s->next) + for (j = 0, section = ibfd->sections; + section != NULL; + section = section->next) { - os = s->output_section; - - if ((((IS_CONTAINED_BY (s->vma, s->_raw_size, p->p_vaddr, p) - || IS_SOLARIS_PT_INTERP (p, s)) - && (s->flags & SEC_ALLOC) != 0) - || IS_COREFILE_NOTE (p, s)) - && os != NULL) + if (INCLUDE_SECTION_IN_SEGMENT (section, segment)) { - sections[j++] = s; + output_section = section->output_section; + + sections[j ++] = section; /* The Solaris native linker always sets p_paddr to 0. We try to catch that case here, and set it to the correct value. */ - if (p->p_paddr == 0 - && p->p_vaddr != 0 + if (segment->p_paddr == 0 + && segment->p_vaddr != 0 && isec == 0 - && os->lma != 0 - && (os->vma == (p->p_vaddr - + (m->includes_filehdr - ? iehdr->e_ehsize - : 0) - + (m->includes_phdrs - ? iehdr->e_phnum * iehdr->e_phentsize - : 0)))) - m->p_paddr = p->p_vaddr; + && output_section->lma != 0 + && (output_section->vma == (segment->p_vaddr + + (map->includes_filehdr + ? iehdr->e_ehsize + : 0) + + (map->includes_phdrs + ? iehdr->e_phnum * iehdr->e_phentsize + : 0)))) + map->p_paddr = segment->p_vaddr; /* Match up the physical address of the segment with the LMA address of the output section. */ - if (IS_CONTAINED_BY (os->lma, os->_raw_size, m->p_paddr, p) - || IS_COREFILE_NOTE (p, s)) + if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr) + || IS_COREFILE_NOTE (segment, section)) { if (matching_lma == 0) - matching_lma = os->lma; + matching_lma = output_section->lma; /* We assume that if the section fits within the segment - that it does not overlap any other section within that + then it does not overlap any other section within that segment. */ - m->sections[isec++] = os; + map->sections[isec ++] = output_section; } else if (suggested_lma == 0) - suggested_lma = os->lma; + suggested_lma = output_section->lma; } } - BFD_ASSERT (j == csecs); + BFD_ASSERT (j == section_count); /* Step Two: Adjust the physical address of the current segment, if necessary. */ - if (isec == csecs) + if (isec == section_count) { /* All of the sections fitted within the segment as currently specified. This is the default case. Add the segment to the list of built segments and carry on to process the next program header in the input BFD. */ - m->count = csecs; - *pm = m; - pm = &m->next; + map->count = section_count; + *pointer_to_map = map; + pointer_to_map = &map->next; free (sections); continue; @@ -3801,25 +3984,33 @@ copy_private_bfd_data (ibfd, obfd) /* At least one section fits inside the current segment. Keep it, but modify its physical address to match the LMA of the first section that fitted. */ - - m->p_paddr = matching_lma; + map->p_paddr = matching_lma; } else { /* None of the sections fitted inside the current segment. Change the current segment's physical address to match the LMA of the first section. */ - - m->p_paddr = suggested_lma; + map->p_paddr = suggested_lma; } - /* Offset the segment physical address from the lma to allow - for space taken up by elf headers. */ - if (m->includes_filehdr) - m->p_paddr -= iehdr->e_ehsize; + /* Offset the segment physical address from the lma + to allow for space taken up by elf headers. */ + if (map->includes_filehdr) + map->p_paddr -= iehdr->e_ehsize; - if (m->includes_phdrs) - m->p_paddr -= iehdr->e_phnum * iehdr->e_phentsize; + if (map->includes_phdrs) + { + map->p_paddr -= iehdr->e_phnum * iehdr->e_phentsize; + + /* iehdr->e_phnum is just an estimate of the number + of program headers that we will need. Make a note + here of the number we used and the segment we chose + to hold these headers, so that we can adjust the + offset when we know the correct value. */ + phdr_adjust_num = iehdr->e_phnum; + phdr_adjust_seg = map; + } } /* Step Three: Loop over the sections again, this time assigning @@ -3832,97 +4023,99 @@ copy_private_bfd_data (ibfd, obfd) isec = 0; do { - m->count = 0; + map->count = 0; suggested_lma = 0; /* Fill the current segment with sections that fit. */ - for (j = 0; j < csecs; j++) + for (j = 0; j < section_count; j++) { - s = sections[j]; + section = sections[j]; - if (s == NULL) + if (section == NULL) continue; - os = s->output_section; + output_section = section->output_section; + + BFD_ASSERT (output_section != NULL); - if (IS_CONTAINED_BY (os->lma, os->_raw_size, m->p_paddr, p) - || IS_COREFILE_NOTE (p, s)) + if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr) + || IS_COREFILE_NOTE (segment, section)) { - if (m->count == 0) + if (map->count == 0) { /* If the first section in a segment does not start at - the beginning of the segment, then something is wrong. */ - if (os->lma != (m->p_paddr - + (m->includes_filehdr - ? iehdr->e_ehsize : 0) - + (m->includes_phdrs - ? iehdr->e_phnum * iehdr->e_phentsize - : 0))) + the beginning of the segment, then something is + wrong. */ + if (output_section->lma != + (map->p_paddr + + (map->includes_filehdr ? iehdr->e_ehsize : 0) + + (map->includes_phdrs + ? iehdr->e_phnum * iehdr->e_phentsize + : 0))) abort (); } else { asection * prev_sec; - bfd_vma maxpagesize; - prev_sec = m->sections[m->count - 1]; - maxpagesize = get_elf_backend_data (obfd)->maxpagesize; + prev_sec = map->sections[map->count - 1]; /* If the gap between the end of the previous section - and the start of this section is more than maxpagesize - then we need to start a new segment. */ - if (BFD_ALIGN (prev_sec->lma + prev_sec->_raw_size, maxpagesize) - < BFD_ALIGN (os->lma, maxpagesize)) + and the start of this section is more than + maxpagesize then we need to start a new segment. */ + if ((BFD_ALIGN (prev_sec->lma + prev_sec->_raw_size, maxpagesize) + < BFD_ALIGN (output_section->lma, maxpagesize)) + || ((prev_sec->lma + prev_sec->_raw_size) > output_section->lma)) { if (suggested_lma == 0) - suggested_lma = os->lma; + suggested_lma = output_section->lma; continue; } } - m->sections[m->count++] = os; + map->sections[map->count++] = output_section; ++isec; sections[j] = NULL; + section->segment_mark = true; } else if (suggested_lma == 0) - suggested_lma = os->lma; + suggested_lma = output_section->lma; } - BFD_ASSERT (m->count > 0); + BFD_ASSERT (map->count > 0); /* Add the current segment to the list of built segments. */ - *pm = m; - pm = &m->next; + *pointer_to_map = map; + pointer_to_map = &map->next; - if (isec < csecs) + if (isec < section_count) { /* We still have not allocated all of the sections to segments. Create a new segment here, initialise it and carry on looping. */ - - m = ((struct elf_segment_map *) - bfd_alloc (obfd, - (sizeof (struct elf_segment_map) - + ((size_t) csecs - 1) * sizeof (asection *)))); - if (m == NULL) + map = ((struct elf_segment_map *) + bfd_alloc (obfd, + (sizeof (struct elf_segment_map) + + ((size_t) section_count - 1) + * sizeof (asection *)))); + if (map == NULL) return false; /* Initialise the fields of the segment map. Set the physical physical address to the LMA of the first section that has not yet been assigned. */ - - m->next = NULL; - m->p_type = p->p_type; - m->p_flags = p->p_flags; - m->p_flags_valid = 1; - m->p_paddr = suggested_lma; - m->p_paddr_valid = 1; - m->includes_filehdr = 0; - m->includes_phdrs = 0; + map->next = NULL; + map->p_type = segment->p_type; + map->p_flags = segment->p_flags; + map->p_flags_valid = 1; + map->p_paddr = suggested_lma; + map->p_paddr_valid = 1; + map->includes_filehdr = 0; + map->includes_phdrs = 0; } } - while (isec < csecs); + while (isec < section_count); free (sections); } @@ -3931,44 +4124,65 @@ copy_private_bfd_data (ibfd, obfd) p_paddr fields are zero. When we try to objcopy or strip such a file, we get confused. Check for this case, and if we find it reset the p_paddr_valid fields. */ - for (m = mfirst; m != NULL; m = m->next) - if (m->p_paddr != 0) + for (map = map_first; map != NULL; map = map->next) + if (map->p_paddr != 0) break; - if (m == NULL) + if (map == NULL) { - for (m = mfirst; m != NULL; m = m->next) - m->p_paddr_valid = 0; + for (map = map_first; map != NULL; map = map->next) + map->p_paddr_valid = 0; } - elf_tdata (obfd)->segment_map = mfirst; + elf_tdata (obfd)->segment_map = map_first; + + /* If we had to estimate the number of program headers that were + going to be needed, then check our estimate know and adjust + the offset if necessary. */ + if (phdr_adjust_seg != NULL) + { + unsigned int count; + + for (count = 0, map = map_first; map != NULL; map = map->next) + count++; + + if (count > phdr_adjust_num) + phdr_adjust_seg->p_paddr + -= (count - phdr_adjust_num) * iehdr->e_phentsize; + } #if 0 - /* Final Step: Sort the segments into ascending order of physical address. */ - if (mfirst != NULL) + /* Final Step: Sort the segments into ascending order of physical + address. */ + if (map_first != NULL) { - struct elf_segment_map* prev; + struct elf_segment_map *prev; - prev = mfirst; - for (m = mfirst->next; m != NULL; prev = m, m = m->next) + prev = map_first; + for (map = map_first->next; map != NULL; prev = map, map = map->next) { - /* Yes I know - its a bubble sort....*/ - if (m->next != NULL && (m->next->p_paddr < m->p_paddr)) + /* Yes I know - its a bubble sort.... */ + if (map->next != NULL && (map->next->p_paddr < map->p_paddr)) { - /* swap m and m->next */ - prev->next = m->next; - m->next = m->next->next; - prev->next->next = m; + /* Swap map and map->next. */ + prev->next = map->next; + map->next = map->next->next; + prev->next->next = map; - /* restart loop. */ - m = mfirst; + /* Restart loop. */ + map = map_first; } } } #endif -#undef IS_CONTAINED_BY -#undef IS_SOLARIS_PT_INTERP +#undef SEGMENT_END +#undef IS_CONTAINED_BY_VMA +#undef IS_CONTAINED_BY_LMA #undef IS_COREFILE_NOTE +#undef IS_SOLARIS_PT_INTERP +#undef INCLUDE_SECTION_IN_SEGMENT +#undef SEGMENT_AFTER_SEGMENT +#undef SEGMENT_OVERLAPS return true; } @@ -4090,7 +4304,7 @@ swap_out_syms (abfd, sttp, relocatable_p) if (!elf_map_symbols (abfd)) return false; - /* Dump out the symtabs. */ + /* Dump out the symtabs. */ { int symcount = bfd_get_symcount (abfd); asymbol **syms = bfd_get_outsymbols (abfd); @@ -4141,9 +4355,11 @@ swap_out_syms (abfd, sttp, relocatable_p) flagword flags = syms[idx]->flags; int type; - if (flags & BSF_SECTION_SYM) - /* Section symbols have no names. */ - sym.st_name = 0; + if ((flags & BSF_SECTION_SYM) != 0) + { + /* Section symbols have no name. */ + sym.st_name = 0; + } else { sym.st_name = (unsigned long) _bfd_stringtab_add (stt, @@ -4781,13 +4997,14 @@ _bfd_elf_find_nearest_line (abfd, asymbol **p; if (_bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset, - filename_ptr, functionname_ptr, + 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)) + line_ptr, 0, + &elf_tdata (abfd)->dwarf2_find_line_info)) return true; if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, @@ -4908,7 +5125,7 @@ _bfd_elf_validate_reloc (abfd, areloc) bfd *abfd; arelent *areloc; { - /* Check whether we really have an ELF howto. */ + /* Check whether we really have an ELF howto. */ if ((*areloc->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec) { @@ -4916,7 +5133,7 @@ _bfd_elf_validate_reloc (abfd, areloc) reloc_howto_type *howto; /* Alien reloc: Try to determine its type to replace it with an - equivalent ELF reloc. */ + equivalent ELF reloc. */ if (areloc->howto->pc_relative) { @@ -5029,48 +5246,44 @@ _bfd_elf_rel_vtable_reloc_fn (abfd, re, symbol, data, is, obfd, errmsg) { return bfd_reloc_ok; } - /* Elf core file support. Much of this only works on native toolchains, since we rely on knowing the machine-dependent procfs structure in order to pick - out details about the corefile. */ + out details about the corefile. */ #ifdef HAVE_SYS_PROCFS_H # include #endif - -/* Define offsetof for those systems which lack it. */ +/* Define offsetof for those systems which lack it. */ #ifndef offsetof # define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER) #endif - -/* FIXME: this is kinda wrong, but it's what gdb wants. */ +/* FIXME: this is kinda wrong, but it's what gdb wants. */ static int elfcore_make_pid (abfd) - bfd* abfd; + bfd *abfd; { return ((elf_tdata (abfd)->core_lwpid << 16) + (elf_tdata (abfd)->core_pid)); } - /* If there isn't a section called NAME, make one, using data from SECT. Note, this function will generate a reference to NAME, so you shouldn't deallocate or - overwrite it. */ + overwrite it. */ static boolean elfcore_maybe_make_sect (abfd, name, sect) - bfd* abfd; - char* name; - asection* sect; + bfd *abfd; + char *name; + asection *sect; { - asection* sect2; + asection *sect2; if (bfd_get_section_by_name (abfd, name) != NULL) return true; @@ -5086,9 +5299,8 @@ elfcore_maybe_make_sect (abfd, name, sect) return true; } - /* prstatus_t exists on: - solaris 2.[567] + solaris 2.5+ linux 2.[01] + glibc unixware 4.2 */ @@ -5096,33 +5308,68 @@ elfcore_maybe_make_sect (abfd, name, sect) #if defined (HAVE_PRSTATUS_T) static boolean elfcore_grok_prstatus (abfd, note) - bfd* abfd; - Elf_Internal_Note* note; + bfd *abfd; + Elf_Internal_Note *note; { - prstatus_t prstat; char buf[100]; - char* name; - asection* sect; + char *name; + asection *sect; + int raw_size; + int offset; - if (note->descsz != sizeof (prstat)) - return true; + if (note->descsz == sizeof (prstatus_t)) + { + prstatus_t prstat; - memcpy (&prstat, note->descdata, sizeof (prstat)); + raw_size = sizeof (prstat.pr_reg); + offset = offsetof (prstatus_t, pr_reg); + memcpy (&prstat, note->descdata, sizeof (prstat)); - elf_tdata (abfd)->core_signal = prstat.pr_cursig; - elf_tdata (abfd)->core_pid = prstat.pr_pid; + elf_tdata (abfd)->core_signal = prstat.pr_cursig; + elf_tdata (abfd)->core_pid = prstat.pr_pid; - /* pr_who exists on: - solaris 2.[567] - unixware 4.2 - pr_who doesn't exist on: - linux 2.[01] - */ + /* pr_who exists on: + solaris 2.5+ + unixware 4.2 + pr_who doesn't exist on: + linux 2.[01] + */ #if defined (HAVE_PRSTATUS_T_PR_WHO) - elf_tdata (abfd)->core_lwpid = prstat.pr_who; + elf_tdata (abfd)->core_lwpid = prstat.pr_who; #endif + } +#if defined (HAVE_PRSTATUS32_T) + else if (note->descsz == sizeof (prstatus32_t)) + { + /* 64-bit host, 32-bit corefile */ + prstatus32_t prstat; + + raw_size = sizeof (prstat.pr_reg); + offset = offsetof (prstatus32_t, pr_reg); + memcpy (&prstat, note->descdata, sizeof (prstat)); + + elf_tdata (abfd)->core_signal = prstat.pr_cursig; + elf_tdata (abfd)->core_pid = prstat.pr_pid; + + /* pr_who exists on: + solaris 2.5+ + unixware 4.2 + pr_who doesn't exist on: + linux 2.[01] + */ +#if defined (HAVE_PRSTATUS32_T_PR_WHO) + elf_tdata (abfd)->core_lwpid = prstat.pr_who; +#endif + } +#endif /* HAVE_PRSTATUS32_T */ + else + { + /* Fail - we don't know how to handle any other + note size (ie. data object type). */ + return true; + } - /* Make a ".reg/999" section. */ + /* Make a ".reg/999" section. */ sprintf (buf, ".reg/%d", elfcore_make_pid (abfd)); name = bfd_alloc (abfd, strlen (buf) + 1); @@ -5133,8 +5380,10 @@ elfcore_grok_prstatus (abfd, note) sect = bfd_make_section (abfd, name); if (sect == NULL) return false; - sect->_raw_size = sizeof (prstat.pr_reg); - sect->filepos = note->descpos + offsetof (prstatus_t, pr_reg); + + sect->_raw_size = raw_size; + sect->filepos = note->descpos + offset; + sect->flags = SEC_HAS_CONTENTS; sect->alignment_power = 2; @@ -5145,7 +5394,6 @@ elfcore_grok_prstatus (abfd, note) } #endif /* defined (HAVE_PRSTATUS_T) */ - /* Create a pseudosection containing the exact contents of NOTE. This actually creates up to two pseudosections: - For the single-threaded case, a section named NAME, unless @@ -5156,13 +5404,13 @@ elfcore_grok_prstatus (abfd, note) static boolean elfcore_make_note_pseudosection (abfd, name, note) - bfd* abfd; + bfd *abfd; char *name; - Elf_Internal_Note* note; + Elf_Internal_Note *note; { char buf[100]; char *threaded_name; - asection* sect; + asection *sect; /* Build the section name. */ @@ -5186,54 +5434,58 @@ elfcore_make_note_pseudosection (abfd, name, note) return true; } - /* There isn't a consistent prfpregset_t across platforms, but it doesn't matter, because we don't have to pick this - data structure apart. */ + data structure apart. */ + static boolean elfcore_grok_prfpreg (abfd, note) - bfd* abfd; - Elf_Internal_Note* note; + bfd *abfd; + Elf_Internal_Note *note; { return elfcore_make_note_pseudosection (abfd, ".reg2", note); } - /* Linux dumps the Intel SSE regs in a note named "LINUX" with a note type of 5 (NT_PRXFPREG). Just include the whole note's contents literally. */ + static boolean elfcore_grok_prxfpreg (abfd, note) - bfd* abfd; - Elf_Internal_Note* note; + bfd *abfd; + Elf_Internal_Note *note; { return elfcore_make_note_pseudosection (abfd, ".reg-xfp", note); } - #if defined (HAVE_PRPSINFO_T) -# define elfcore_psinfo_t prpsinfo_t +typedef prpsinfo_t elfcore_psinfo_t; +#if defined (HAVE_PRPSINFO32_T) /* Sparc64 cross Sparc32 */ +typedef prpsinfo32_t elfcore_psinfo32_t; +#endif #endif #if defined (HAVE_PSINFO_T) -# define elfcore_psinfo_t psinfo_t +typedef psinfo_t elfcore_psinfo_t; +#if defined (HAVE_PSINFO32_T) /* Sparc64 cross Sparc32 */ +typedef psinfo32_t elfcore_psinfo32_t; +#endif #endif - #if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T) /* return a malloc'ed copy of a string at START which is at most MAX bytes long, possibly without a terminating '\0'. - the copy will always have a terminating '\0'. */ + the copy will always have a terminating '\0'. */ static char* elfcore_strndup (abfd, start, max) - bfd* abfd; - char* start; + bfd *abfd; + char *start; int max; { - char* dup; - char* end = memchr (start, '\0', max); + char *dup; + char *end = memchr (start, '\0', max); int len; if (end == NULL) @@ -5253,28 +5505,50 @@ elfcore_strndup (abfd, start, max) static boolean elfcore_grok_psinfo (abfd, note) - bfd* abfd; - Elf_Internal_Note* note; + bfd *abfd; + Elf_Internal_Note *note; { - elfcore_psinfo_t psinfo; + if (note->descsz == sizeof (elfcore_psinfo_t)) + { + elfcore_psinfo_t psinfo; - if (note->descsz != sizeof (elfcore_psinfo_t)) - return true; + memcpy (&psinfo, note->descdata, sizeof (psinfo)); + + elf_tdata (abfd)->core_program + = elfcore_strndup (abfd, psinfo.pr_fname, sizeof (psinfo.pr_fname)); - memcpy (&psinfo, note->descdata, note->descsz); + elf_tdata (abfd)->core_command + = elfcore_strndup (abfd, psinfo.pr_psargs, sizeof (psinfo.pr_psargs)); + } +#if defined (HAVE_PRPSINFO32_T) || defined (HAVE_PSINFO32_T) + else if (note->descsz == sizeof (elfcore_psinfo32_t)) + { + /* 64-bit host, 32-bit corefile */ + elfcore_psinfo32_t psinfo; - elf_tdata (abfd)->core_program - = elfcore_strndup (abfd, psinfo.pr_fname, sizeof (psinfo.pr_fname)); + memcpy (&psinfo, note->descdata, sizeof (psinfo)); - elf_tdata (abfd)->core_command - = elfcore_strndup (abfd, psinfo.pr_psargs, sizeof (psinfo.pr_psargs)); + elf_tdata (abfd)->core_program + = elfcore_strndup (abfd, psinfo.pr_fname, sizeof (psinfo.pr_fname)); + + elf_tdata (abfd)->core_command + = elfcore_strndup (abfd, psinfo.pr_psargs, sizeof (psinfo.pr_psargs)); + } +#endif + + else + { + /* Fail - we don't know how to handle any other + note size (ie. data object type). */ + return true; + } /* Note that for some reason, a spurious space is tacked onto the end of the args in some (at least one anyway) - implementations, so strip it off if it exists. */ + implementations, so strip it off if it exists. */ { - char* command = elf_tdata (abfd)->core_command; + char *command = elf_tdata (abfd)->core_command; int n = strlen (command); if (0 < n && command[n - 1] == ' ') @@ -5285,43 +5559,59 @@ elfcore_grok_psinfo (abfd, note) } #endif /* defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T) */ - #if defined (HAVE_PSTATUS_T) static boolean elfcore_grok_pstatus (abfd, note) - bfd* abfd; - Elf_Internal_Note* note; + bfd *abfd; + Elf_Internal_Note *note; { - pstatus_t pstat; + if (note->descsz == sizeof (pstatus_t) +#if defined (HAVE_PXSTATUS_T) + || note->descsz == sizeof (pxstatus_t) +#endif + ) + { + pstatus_t pstat; - if (note->descsz != sizeof (pstat)) - return true; + memcpy (&pstat, note->descdata, sizeof (pstat)); - memcpy (&pstat, note->descdata, sizeof (pstat)); + elf_tdata (abfd)->core_pid = pstat.pr_pid; + } +#if defined (HAVE_PSTATUS32_T) + else if (note->descsz == sizeof (pstatus32_t)) + { + /* 64-bit host, 32-bit corefile */ + pstatus32_t pstat; - elf_tdata (abfd)->core_pid = pstat.pr_pid; + memcpy (&pstat, note->descdata, sizeof (pstat)); + elf_tdata (abfd)->core_pid = pstat.pr_pid; + } +#endif /* Could grab some more details from the "representative" lwpstatus_t in pstat.pr_lwp, but we'll catch it all in an - NT_LWPSTATUS note, presumably. */ + NT_LWPSTATUS note, presumably. */ return true; } #endif /* defined (HAVE_PSTATUS_T) */ - #if defined (HAVE_LWPSTATUS_T) static boolean elfcore_grok_lwpstatus (abfd, note) - bfd* abfd; - Elf_Internal_Note* note; + bfd *abfd; + Elf_Internal_Note *note; { lwpstatus_t lwpstat; char buf[100]; - char* name; - asection* sect; + char *name; + asection *sect; - if (note->descsz != sizeof (lwpstat)) + if (note->descsz != sizeof (lwpstat) +#if defined (HAVE_LWPXSTATUS_T) + && note->descsz != sizeof (lwpxstatus_t) +#endif + ) return true; memcpy (&lwpstat, note->descdata, sizeof (lwpstat)); @@ -5329,7 +5619,7 @@ elfcore_grok_lwpstatus (abfd, note) elf_tdata (abfd)->core_lwpid = lwpstat.pr_lwpid; elf_tdata (abfd)->core_signal = lwpstat.pr_cursig; - /* Make a ".reg/999" section. */ + /* Make a ".reg/999" section. */ sprintf (buf, ".reg/%d", elfcore_make_pid (abfd)); name = bfd_alloc (abfd, strlen (buf) + 1); @@ -5394,41 +5684,41 @@ elfcore_grok_lwpstatus (abfd, note) #if defined (HAVE_WIN32_PSTATUS_T) static boolean elfcore_grok_win32pstatus (abfd, note) - bfd * abfd; - Elf_Internal_Note * note; + bfd *abfd; + Elf_Internal_Note *note; { char buf[30]; - char * name; - asection * sect; + char *name; + asection *sect; win32_pstatus_t pstatus; if (note->descsz < sizeof (pstatus)) return true; - memcpy (& pstatus, note->descdata, note->descsz); - - switch (pstatus.data_type) + memcpy (&pstatus, note->descdata, note->descsz); + + switch (pstatus.data_type) { case NOTE_INFO_PROCESS: /* FIXME: need to add ->core_command. */ elf_tdata (abfd)->core_signal = pstatus.data.process_info.signal; elf_tdata (abfd)->core_pid = pstatus.data.process_info.pid; - break ; + break; case NOTE_INFO_THREAD: /* Make a ".reg/999" section. */ sprintf (buf, ".reg/%d", pstatus.data.thread_info.tid); - + name = bfd_alloc (abfd, strlen (buf) + 1); if (name == NULL) - return false; - + return false; + strcpy (name, buf); sect = bfd_make_section (abfd, name); if (sect == NULL) - return false; - + return false; + sect->_raw_size = sizeof (pstatus.data.thread_info.thread_context); sect->filepos = note->descpos + offsetof (struct win32_pstatus, data.thread_info.thread_context); @@ -5442,19 +5732,19 @@ elfcore_grok_win32pstatus (abfd, note) case NOTE_INFO_MODULE: /* Make a ".module/xxxxxxxx" section. */ - sprintf (buf, ".module/%08x" , pstatus.data.module_info.base_address); - + sprintf (buf, ".module/%08x", pstatus.data.module_info.base_address); + name = bfd_alloc (abfd, strlen (buf) + 1); if (name == NULL) return false; - + strcpy (name, buf); sect = bfd_make_section (abfd, name); - + if (sect == NULL) return false; - + sect->_raw_size = note->descsz; sect->filepos = note->descpos; sect->flags = SEC_HAS_CONTENTS; @@ -5471,8 +5761,8 @@ elfcore_grok_win32pstatus (abfd, note) static boolean elfcore_grok_note (abfd, note) - bfd* abfd; - Elf_Internal_Note* note; + bfd *abfd; + Elf_Internal_Note *note; { switch (note->type) { @@ -5498,11 +5788,11 @@ elfcore_grok_note (abfd, note) return elfcore_grok_prfpreg (abfd, note); #if defined (HAVE_WIN32_PSTATUS_T) - case NT_WIN32PSTATUS: + case NT_WIN32PSTATUS: return elfcore_grok_win32pstatus (abfd, note); #endif - case NT_PRXFPREG: /* Linux SSE extension */ + case NT_PRXFPREG: /* Linux SSE extension */ if (note->namesz == 5 && ! strcmp (note->namedata, "LINUX")) return elfcore_grok_prxfpreg (abfd, note); @@ -5517,15 +5807,14 @@ elfcore_grok_note (abfd, note) } } - static boolean elfcore_read_notes (abfd, offset, size) - bfd* abfd; + bfd *abfd; bfd_vma offset; bfd_vma size; { - char* buf; - char* p; + char *buf; + char *p; if (size <= 0) return true; @@ -5547,8 +5836,8 @@ elfcore_read_notes (abfd, offset, size) p = buf; while (p < buf + size) { - /* FIXME: bad alignment assumption. */ - Elf_External_Note* xnp = (Elf_External_Note*) p; + /* FIXME: bad alignment assumption. */ + Elf_External_Note *xnp = (Elf_External_Note *) p; Elf_Internal_Note in; in.type = bfd_h_get_32 (abfd, (bfd_byte *) xnp->type); @@ -5570,13 +5859,12 @@ elfcore_read_notes (abfd, offset, size) return true; } - /* FIXME: This function is now unnecessary. Callers can just call bfd_section_from_phdr directly. */ boolean _bfd_elfcore_section_from_phdr (abfd, phdr, sec_num) - bfd* abfd; + bfd *abfd; Elf_Internal_Phdr* phdr; int sec_num; { @@ -5585,14 +5873,13 @@ _bfd_elfcore_section_from_phdr (abfd, phdr, sec_num) return true; } - - /* Providing external access to the ELF program header table. */ /* Return an upper bound on the number of bytes required to store a copy of ABFD's program header table entries. Return -1 if an error occurs; bfd_get_error will return an appropriate code. */ + long bfd_get_elf_phdr_upper_bound (abfd) bfd *abfd; @@ -5607,7 +5894,6 @@ bfd_get_elf_phdr_upper_bound (abfd) * sizeof (Elf_Internal_Phdr)); } - /* Copy ABFD's program header table entries to *PHDRS. The entries will be stored as an array of Elf_Internal_Phdr structures, as defined in include/elf/internal.h. To find out how large the @@ -5615,6 +5901,7 @@ bfd_get_elf_phdr_upper_bound (abfd) Return the number of program header table entries read, or -1 if an error occurs; bfd_get_error will return an appropriate code. */ + int bfd_get_elf_phdrs (abfd, phdrs) bfd *abfd; @@ -5629,7 +5916,7 @@ bfd_get_elf_phdrs (abfd, phdrs) } num_phdrs = elf_elfheader (abfd)->e_phnum; - memcpy (phdrs, elf_tdata (abfd)->phdr, + memcpy (phdrs, elf_tdata (abfd)->phdr, num_phdrs * sizeof (Elf_Internal_Phdr)); return num_phdrs; diff --git a/contrib/binutils/bfd/elf32-arm.h b/contrib/binutils/bfd/elf32-arm.h index 2e8a657..0f2ac8a 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 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -17,7 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - typedef unsigned long int insn32; typedef unsigned short int insn16; @@ -37,7 +36,6 @@ static bfd_reloc_status_type elf32_arm_final_link_relocate PARAMS ((reloc_howto_type *, bfd *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, bfd_vma, struct bfd_link_info *, asection *, const char *, unsigned char, struct elf_link_hash_entry *)); - static insn32 insert_thumb_branch PARAMS ((insn32, int)); static struct elf_link_hash_entry *find_thumb_glue @@ -57,14 +55,12 @@ static int elf32_thumb_to_arm_stub PARAMS ((struct bfd_link_info *, const char *, bfd *, bfd *, asection *, bfd_byte *, asection *, bfd_vma, bfd_signed_vma, bfd_vma)); +#define INTERWORK_FLAG(abfd) (elf_elfheader (abfd)->e_flags & EF_INTERWORK) + /* The linker script knows the section names for placement. The entry_names are used to do simple name mangling on the stubs. Given a function name, and its type, the stub can be found. The - name can be changed. The only requirement is the %s be present. - */ - -#define INTERWORK_FLAG( abfd ) (elf_elfheader (abfd)->e_flags & EF_INTERWORK) - + name can be changed. The only requirement is the %s be present. */ #define THUMB2ARM_GLUE_SECTION_NAME ".glue_7t" #define THUMB2ARM_GLUE_ENTRY_NAME "__%s_from_thumb" @@ -76,14 +72,12 @@ static int elf32_thumb_to_arm_stub #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1" /* The size in bytes of an entry in the procedure linkage table. */ - #define PLT_ENTRY_SIZE 16 /* The first entry in a procedure linkage table looks like 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 */ - + linker first. */ static const bfd_byte elf32_arm_plt0_entry [PLT_ENTRY_SIZE] = { 0x04, 0xe0, 0x2d, 0xe5, /* str lr, [sp, #-4]! */ @@ -94,7 +88,6 @@ static const bfd_byte elf32_arm_plt0_entry [PLT_ENTRY_SIZE] = /* Subsequent entries in a procedure linkage table look like this. */ - static const bfd_byte elf32_arm_plt_entry [PLT_ENTRY_SIZE] = { 0x04, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc, #4] */ @@ -103,7 +96,6 @@ static const bfd_byte elf32_arm_plt_entry [PLT_ENTRY_SIZE] = 0x00, 0x00, 0x00, 0x00 /* offset to symbol in got */ }; - /* The ARM linker needs to keep track of the number of relocs that it decides to copy in check_relocs for each symbol. This is so that it can discard PC relative relocs if it doesn't need them when @@ -112,7 +104,6 @@ static const bfd_byte elf32_arm_plt_entry [PLT_ENTRY_SIZE] = /* This structure keeps track of the number of PC relative relocs we have copied for a given symbol. */ - struct elf32_arm_pcrel_relocs_copied { /* Next section. */ @@ -124,7 +115,6 @@ struct elf32_arm_pcrel_relocs_copied }; /* Arm ELF linker hash entry. */ - struct elf32_arm_link_hash_entry { struct elf_link_hash_entry root; @@ -134,12 +124,10 @@ struct elf32_arm_link_hash_entry }; /* Declare this now that the above structures are defined. */ - static boolean elf32_arm_discard_copies PARAMS ((struct elf32_arm_link_hash_entry *, PTR)); /* Traverse an arm ELF linker hash table. */ - #define elf32_arm_link_hash_traverse(table, func, info) \ (elf_link_hash_traverse \ (&(table)->root, \ @@ -150,26 +138,25 @@ static boolean elf32_arm_discard_copies #define elf32_arm_hash_table(info) \ ((struct elf32_arm_link_hash_table *) ((info)->hash)) -/* ARM ELF linker hash table */ +/* ARM ELF linker hash table. */ struct elf32_arm_link_hash_table - { - /* The main hash table. */ - struct elf_link_hash_table root; - - /* The size in bytes of the section containg the Thumb-to-ARM glue. */ - long int thumb_glue_size; +{ + /* The main hash table. */ + struct elf_link_hash_table root; - /* The size in bytes of the section containg the ARM-to-Thumb glue. */ - long int arm_glue_size; + /* The size in bytes of the section containg the Thumb-to-ARM glue. */ + long int thumb_glue_size; - /* An arbitary input BFD chosen to hold the glue sections. */ - bfd * bfd_of_glue_owner; + /* The size in bytes of the section containg the ARM-to-Thumb glue. */ + long int arm_glue_size; - /* A boolean indicating whether knowledge of the ARM's pipeline - length should be applied by the linker. */ - int no_pipeline_knowledge; - }; + /* An arbitary input BFD chosen to hold the glue sections. */ + bfd * bfd_of_glue_owner; + /* A boolean indicating whether knowledge of the ARM's pipeline + length should be applied by the linker. */ + int no_pipeline_knowledge; +}; /* Create an entry in an ARM ELF linker hash table. */ @@ -201,7 +188,7 @@ elf32_arm_link_hash_newfunc (entry, table, string) return (struct bfd_hash_entry *) ret; } -/* Create an ARM elf linker hash table */ +/* Create an ARM elf linker hash table. */ static struct bfd_link_hash_table * elf32_arm_link_hash_table_create (abfd) @@ -229,6 +216,8 @@ elf32_arm_link_hash_table_create (abfd) return &ret->root.root; } +/* Locate the Thumb encoded calling stub for NAME. */ + static struct elf_link_hash_entry * find_thumb_glue (link_info, name, input_bfd) struct bfd_link_info *link_info; @@ -242,7 +231,6 @@ find_thumb_glue (link_info, name, input_bfd) /* We need a pointer to the armelf specific hash table. */ hash_table = elf32_arm_hash_table (link_info); - tmp_name = ((char *) bfd_malloc (strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1)); @@ -255,7 +243,7 @@ find_thumb_glue (link_info, name, input_bfd) if (hash == NULL) /* xgettext:c-format */ - _bfd_error_handler (_ ("%s: unable to find THUMB glue '%s' for `%s'"), + _bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"), bfd_get_filename (input_bfd), tmp_name, name); free (tmp_name); @@ -263,6 +251,8 @@ find_thumb_glue (link_info, name, input_bfd) return hash; } +/* Locate the ARM encoded calling stub for NAME. */ + static struct elf_link_hash_entry * find_arm_glue (link_info, name, input_bfd) struct bfd_link_info *link_info; @@ -288,7 +278,7 @@ find_arm_glue (link_info, name, input_bfd) if (myh == NULL) /* xgettext:c-format */ - _bfd_error_handler (_ ("%s: unable to find ARM glue '%s' for `%s'"), + _bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"), bfd_get_filename (input_bfd), tmp_name, name); free (tmp_name); @@ -296,24 +286,21 @@ find_arm_glue (link_info, name, input_bfd) return myh; } -/* - ARM->Thumb glue: +/* ARM->Thumb glue: .arm __func_from_arm: ldr r12, __func_addr bx r12 __func_addr: - .word func @ behave as if you saw a ARM_32 reloc - */ + .word func @ behave as if you saw a ARM_32 reloc. */ #define ARM2THUMB_GLUE_SIZE 12 static const insn32 a2t1_ldr_insn = 0xe59fc000; static const insn32 a2t2_bx_r12_insn = 0xe12fff1c; static const insn32 a2t3_func_addr_insn = 0x00000001; -/* - Thumb->ARM: Thumb->(non-interworking aware) ARM +/* Thumb->ARM: Thumb->(non-interworking aware) ARM .thumb .thumb .align 2 .align 2 @@ -327,8 +314,7 @@ static const insn32 a2t3_func_addr_insn = 0x00000001; ldmia r13! {r6, lr} bx lr __func_addr: - .word func - */ + .word func */ #define THUMB2ARM_GLUE_SIZE 8 static const insn16 t2a1_bx_pc_insn = 0x4778; @@ -408,7 +394,6 @@ record_arm_to_thumb_glue (link_info, h) s = bfd_get_section_by_name (globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME); - BFD_ASSERT (s != NULL); tmp_name = ((char *) @@ -423,14 +408,14 @@ record_arm_to_thumb_glue (link_info, h) if (myh != NULL) { + /* We've already seen this guy. */ free (tmp_name); - return; /* we've already seen this guy */ + return; } /* The only trick here is using hash_table->arm_glue_size as the value. Even though the section isn't allocated yet, this is where we will be putting it. */ - _bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner, tmp_name, BSF_GLOBAL, s, globals->arm_glue_size + 1, @@ -477,8 +462,9 @@ record_thumb_to_arm_glue (link_info, h) if (myh != NULL) { + /* We've already seen this guy. */ free (tmp_name); - return; /* we've already seen this guy */ + return; } _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, tmp_name, @@ -486,17 +472,16 @@ record_thumb_to_arm_glue (link_info, h) NULL, true, false, (struct bfd_link_hash_entry **) &myh); - /* If we mark it 'thumb', the disassembler will do a better job. */ + /* If we mark it 'Thumb', the disassembler will do a better job. */ bind = ELF_ST_BIND (myh->type); myh->type = ELF_ST_INFO (bind, STT_ARM_TFUNC); free (tmp_name); - /* Allocate another symbol to mark where we switch to arm mode. */ - #define CHANGE_TO_ARM "__%s_change_to_arm" #define BACK_FROM_ARM "__%s_back_from_arm" + /* Allocate another symbol to mark where we switch to Arm mode. */ tmp_name = (char *) bfd_malloc (strlen (name) + strlen (CHANGE_TO_ARM) + 1); BFD_ASSERT (tmp_name); @@ -520,6 +505,7 @@ record_thumb_to_arm_glue (link_info, h) /* Select a BFD to be used to hold the sections used by the glue code. This function is called from the linker scripts in ld/emultempl/ {armelf/pe}.em */ + boolean bfd_elf32_arm_get_bfd_for_interworking (abfd, info) bfd *abfd; @@ -556,7 +542,7 @@ bfd_elf32_arm_get_bfd_for_interworking (abfd, info) || !bfd_set_section_flags (abfd, sec, flags) || !bfd_set_section_alignment (abfd, sec, 2)) return false; - + /* Set the gc mark to prevent the section from being removed by garbage collection, despite the fact that no relocs refer to this section. */ sec->gc_mark = 1; @@ -574,7 +560,7 @@ bfd_elf32_arm_get_bfd_for_interworking (abfd, info) || !bfd_set_section_flags (abfd, sec, flags) || !bfd_set_section_alignment (abfd, sec, 2)) return false; - + sec->gc_mark = 1; } @@ -608,7 +594,6 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) /* Here we have a bfd that is to be included on the link. We have a hook to do reloc rummaging, before section sizes are nailed down. */ - globals = elf32_arm_hash_table (link_info); BFD_ASSERT (globals != NULL); @@ -628,8 +613,8 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) continue; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - /* Load the relocs. */ + /* Load the relocs. */ irel = (_bfd_elf32_link_read_relocs (abfd, sec, (PTR) NULL, (Elf_Internal_Rela *) NULL, false)); @@ -646,7 +631,7 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) r_type = ELF32_R_TYPE (irel->r_info); r_index = ELF32_R_SYM (irel->r_info); - /* These are the only relocation types we care about */ + /* These are the only relocation types we care about. */ if ( r_type != R_ARM_PC24 && r_type != R_ARM_THM_PC22) continue; @@ -663,6 +648,7 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) contents = (bfd_byte *) bfd_malloc (sec->_raw_size); if (contents == NULL) goto error_return; + free_contents = contents; if (!bfd_get_section_contents (abfd, sec, contents, @@ -684,7 +670,9 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) bfd_malloc (symtab_hdr->sh_size)); if (extsyms == NULL) goto error_return; + free_extsyms = extsyms; + if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0 || (bfd_read (extsyms, 1, symtab_hdr->sh_size, abfd) != symtab_hdr->sh_size)) @@ -692,15 +680,14 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) } } - /* If the relocation is not against a symbol it cannot concern us. */ - + /* If the relocation is not against a symbol it cannot concern us. */ h = NULL; - /* We don't care about local symbols */ + /* We don't care about local symbols. */ if (r_index < symtab_hdr->sh_info) continue; - /* This is an external symbol */ + /* This is an external symbol. */ r_index -= symtab_hdr->sh_info; h = (struct elf_link_hash_entry *) elf_sym_hashes (abfd)[r_index]; @@ -716,7 +703,6 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) /* This one is a call from arm code. We need to look up the target of the call. If it is a thumb target, we insert glue. */ - if (ELF_ST_TYPE(h->type) == STT_ARM_TFUNC) record_arm_to_thumb_glue (link_info, h); break; @@ -725,7 +711,6 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) /* This one is a call from thumb code. We look up the target of the call. If it is not a thumb target, we insert glue. */ - if (ELF_ST_TYPE (h->type) != STT_ARM_TFUNC) record_thumb_to_arm_glue (link_info, h); break; @@ -737,7 +722,7 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge) } return true; - + error_return: if (free_relocs != NULL) free (free_relocs); @@ -745,7 +730,7 @@ error_return: free (free_contents); if (free_extsyms != NULL) free (free_extsyms); - + return false; } @@ -775,10 +760,10 @@ error_return: moves the computed address into the PC, so it must be the second one in the sequence. The problem, however is that whilst little endian code stores the instructions in HI then LOW order, big endian code does the - reverse. nickc@cygnus.com */ + reverse. nickc@cygnus.com. */ -#define LOW_HI_ORDER 0xF800F000 -#define HI_LOW_ORDER 0xF000F800 +#define LOW_HI_ORDER 0xF800F000 +#define HI_LOW_ORDER 0xF000F800 static insn32 insert_thumb_branch (br_insn, rel_off) @@ -788,26 +773,25 @@ insert_thumb_branch (br_insn, rel_off) unsigned int low_bits; unsigned int high_bits; - BFD_ASSERT ((rel_off & 1) != 1); - rel_off >>= 1; /* half word aligned address */ - low_bits = rel_off & 0x000007FF; /* the bottom 11 bits */ - high_bits = (rel_off >> 11) & 0x000007FF; /* the top 11 bits */ + rel_off >>= 1; /* Half word aligned address. */ + low_bits = rel_off & 0x000007FF; /* The bottom 11 bits. */ + high_bits = (rel_off >> 11) & 0x000007FF; /* The top 11 bits. */ if ((br_insn & LOW_HI_ORDER) == LOW_HI_ORDER) br_insn = LOW_HI_ORDER | (low_bits << 16) | high_bits; else if ((br_insn & HI_LOW_ORDER) == HI_LOW_ORDER) br_insn = HI_LOW_ORDER | (high_bits << 16) | low_bits; else - abort (); /* error - not a valid branch instruction form */ - - /* FIXME: abort is probably not the right call. krk@cygnus.com */ + /* FIXME: abort is probably not the right call. krk@cygnus.com */ + abort (); /* error - not a valid branch instruction form. */ return br_insn; } -/* Thumb code calling an ARM function */ +/* Thumb code calling an ARM function. */ + static int elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section, hit_data, sym_sec, offset, addend, val) @@ -854,10 +838,10 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section, && !INTERWORK_FLAG (sym_sec->owner)) { _bfd_error_handler - (_ ("%s(%s): warning: interworking not enabled."), + (_("%s(%s): warning: interworking not enabled."), bfd_get_filename (sym_sec->owner), name); _bfd_error_handler - (_ (" first occurrence: %s: thumb call to arm"), + (_(" first occurrence: %s: thumb call to arm"), bfd_get_filename (input_bfd)); return false; @@ -873,13 +857,19 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section, s->contents + my_offset + 2); ret_offset = - ((bfd_signed_vma) val) /* Address of destination of the stub */ + /* Address of destination of the stub. */ + ((bfd_signed_vma) val) - ((bfd_signed_vma) - (s->output_offset /* Offset from the start of the current section to the start of the stubs. */ - + my_offset /* Offset of the start of this stub from the start of the stubs. */ - + s->output_section->vma) /* Address of the start of the current section. */ - + 4 /* The branch instruction is 4 bytes into the stub. */ - + 8); /* ARM branches work from the pc of the instruction + 8. */ + /* Offset from the start of the current section to the start of the stubs. */ + (s->output_offset + /* Offset of the start of this stub from the start of the stubs. */ + + my_offset + /* Address of the start of the current section. */ + + s->output_section->vma) + /* The branch instruction is 4 bytes into the stub. */ + + 4 + /* ARM branches work from the pc of the instruction + 8. */ + + 8); bfd_put_32 (output_bfd, t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF), @@ -907,7 +897,8 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section, return true; } -/* Arm code calling a Thumb function */ +/* Arm code calling a Thumb function. */ + static int elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section, hit_data, sym_sec, offset, addend, val) @@ -952,12 +943,13 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section, && !INTERWORK_FLAG (sym_sec->owner)) { _bfd_error_handler - (_ ("%s(%s): warning: interworking not enabled."), + (_("%s(%s): warning: interworking not enabled."), bfd_get_filename (sym_sec->owner), name); _bfd_error_handler - (_ (" first occurrence: %s: arm call to thumb"), + (_(" first occurrence: %s: arm call to thumb"), bfd_get_filename (input_bfd)); } + --my_offset; myh->root.u.def.value = my_offset; @@ -977,7 +969,7 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section, tmp = bfd_get_32 (input_bfd, hit_data); tmp = tmp & 0xFF000000; - /* Somehow these are both 4 too far, so subtract 8. */ + /* Somehow these are both 4 too far, so subtract 8. */ ret_offset = s->output_offset + my_offset + s->output_section->vma @@ -985,7 +977,7 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section, + input_section->output_section->vma + offset + addend) - 8; - + tmp = tmp | ((ret_offset >> 2) & 0x00FFFFFF); bfd_put_32 (output_bfd, tmp, hit_data @@ -995,6 +987,7 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section, } /* Perform a relocation as part of a final link. */ + static bfd_reloc_status_type elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, input_section, contents, rel, value, @@ -1062,9 +1055,11 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, case R_ARM_PC24: case R_ARM_ABS32: case R_ARM_REL32: +#ifndef OLD_ARM_ABI + case R_ARM_XPC25: +#endif /* When generating a shared object, these relocations are copied - into the output file to be resolved at run time. */ - + into the output file to be resolved at run time. */ if (info->shared && (r_type != R_ARM_PC24 || (h != NULL @@ -1157,30 +1152,46 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, sreloc->contents) + sreloc->reloc_count)); ++sreloc->reloc_count; - + /* If this reloc is against an external symbol, we do not want to fiddle with the addend. Otherwise, we need to include the symbol - value so that it becomes an addend for the dynamic reloc. */ + value so that it becomes an addend for the dynamic reloc. */ if (! relocate) return bfd_reloc_ok; - return _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, value, (bfd_vma) 0); } else switch (r_type) { - case R_ARM_PC24: - /* Arm B/BL instruction */ - - /* Check for arm calling thumb function. */ - if (sym_flags == STT_ARM_TFUNC) +#ifndef OLD_ARM_ABI + case R_ARM_XPC25: /* Arm BLX instruction. */ +#endif + case R_ARM_PC24: /* Arm B/BL instruction */ +#ifndef OLD_ARM_ABI + if (r_type == R_ARM_XPC25) + { + /* Check for Arm calling Arm function. */ + /* FIXME: Should we translate the instruction into a BL + instruction instead ? */ + if (sym_flags != STT_ARM_TFUNC) + _bfd_error_handler (_("\ +%s: Warning: Arm BLX instruction targets Arm function '%s'."), + bfd_get_filename (input_bfd), + h ? h->root.root.string : "(local)"); + } + else +#endif { - elf32_arm_to_thumb_stub (info, sym_name, input_bfd, output_bfd, - input_section, hit_data, sym_sec, rel->r_offset, - signed_addend, value); - return bfd_reloc_ok; + /* Check for Arm calling Thumb function. */ + if (sym_flags == STT_ARM_TFUNC) + { + elf32_arm_to_thumb_stub (info, sym_name, input_bfd, output_bfd, + input_section, hit_data, sym_sec, rel->r_offset, + signed_addend, value); + return bfd_reloc_ok; + } } if ( strcmp (bfd_get_target (input_bfd), "elf32-littlearm-oabi") == 0 @@ -1188,7 +1199,6 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, { /* The old way of doing things. Trearing the addend as a byte sized field and adding in the pipeline offset. */ - value -= (input_section->output_section->vma + input_section->output_offset); value -= rel->r_offset; @@ -1217,7 +1227,6 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, Note: None of these operations have knowledge of the pipeline size of the processor, thus it is up to the assembler to encode this information into the addend. */ - value -= (input_section->output_section->vma + input_section->output_offset); value -= rel->r_offset; @@ -1239,22 +1248,31 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, } } + signed_addend = value; + signed_addend >>= howto->rightshift; + /* It is not an error for an undefined weak reference to be out of range. Any program that branches to such a symbol - is going to crash anyway, so there is no point worrying - about getting the destination exactly right. */ + is going to crash anyway, so there is no point worrying + about getting the destination exactly right. */ if (! h || h->root.type != bfd_link_hash_undefweak) { /* Perform a signed range check. */ - signed_addend = value; - signed_addend >>= howto->rightshift; - if (signed_addend > ((bfd_signed_vma)(howto->dst_mask >> 1)) + if ( signed_addend > ((bfd_signed_vma) (howto->dst_mask >> 1)) || signed_addend < - ((bfd_signed_vma) ((howto->dst_mask + 1) >> 1))) return bfd_reloc_overflow; } - - value = (signed_addend & howto->dst_mask) - | (bfd_get_32 (input_bfd, hit_data) & (~ howto->dst_mask)); + +#ifndef OLD_ARM_ABI + /* If necessary set the H bit in the BLX instruction. */ + if (r_type == R_ARM_XPC25 && ((value & 2) == 2)) + value = (signed_addend & howto->dst_mask) + | (bfd_get_32 (input_bfd, hit_data) & (~ howto->dst_mask)) + | (1 << 24); + else +#endif + value = (signed_addend & howto->dst_mask) + | (bfd_get_32 (input_bfd, hit_data) & (~ howto->dst_mask)); break; case R_ARM_ABS32: @@ -1303,7 +1321,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, return bfd_reloc_ok; case R_ARM_THM_ABS5: - /* Support ldr and str instructions for the thumb. */ + /* Support ldr and str instructions for the thumb. */ #ifdef USE_REL /* Need to refetch addend. */ addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask; @@ -1321,8 +1339,11 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, bfd_put_16 (input_bfd, value, hit_data); return bfd_reloc_ok; +#ifndef OLD_ARM_ABI + case R_ARM_THM_XPC22: +#endif case R_ARM_THM_PC22: - /* Thumb BL (branch long instruction). */ + /* Thumb BL (branch long instruction). */ { bfd_vma relocation; boolean overflow = false; @@ -1339,23 +1360,38 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, { bfd_vma upper = upper_insn & 0x7ff; bfd_vma lower = lower_insn & 0x7ff; - upper = (upper ^ 0x400) - 0x400; /* sign extend */ + upper = (upper ^ 0x400) - 0x400; /* Sign extend. */ addend = (upper << 12) | (lower << 1); signed_addend = addend; } #endif - - /* If it is not a call to thumb, assume call to arm. - If it is a call relative to a section name, then it is not a - function call at all, but rather a long jump. */ - if (sym_flags != STT_ARM_TFUNC && sym_flags != STT_SECTION) +#ifndef OLD_ARM_ABI + if (r_type == R_ARM_THM_XPC22) { - if (elf32_thumb_to_arm_stub - (info, sym_name, input_bfd, output_bfd, input_section, - hit_data, sym_sec, rel->r_offset, signed_addend, value)) - return bfd_reloc_ok; - else - return bfd_reloc_dangerous; + /* Check for Thumb to Thumb call. */ + /* FIXME: Should we translate the instruction into a BL + instruction instead ? */ + if (sym_flags == STT_ARM_TFUNC) + _bfd_error_handler (_("\ +%s: Warning: Thumb BLX instruction targets thumb function '%s'."), + bfd_get_filename (input_bfd), + h ? h->root.root.string : "(local)"); + } + else +#endif + { + /* If it is not a call to Thumb, assume call to Arm. + If it is a call relative to a section name, then it is not a + function call at all, but rather a long jump. */ + if (sym_flags != STT_ARM_TFUNC && sym_flags != STT_SECTION) + { + if (elf32_thumb_to_arm_stub + (info, sym_name, input_bfd, output_bfd, input_section, + hit_data, sym_sec, rel->r_offset, signed_addend, value)) + return bfd_reloc_ok; + else + return bfd_reloc_dangerous; + } } relocation = value + signed_addend; @@ -1363,11 +1399,11 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, relocation -= (input_section->output_section->vma + input_section->output_offset + rel->r_offset); - + if (! globals->no_pipeline_knowledge) { - Elf_Internal_Ehdr * i_ehdrp; /* Elf file header, internal form */ - + Elf_Internal_Ehdr * i_ehdrp; /* Elf file header, internal form. */ + i_ehdrp = elf_elfheader (input_bfd); /* Previous versions of this code also used to add in the pipline @@ -1429,21 +1465,19 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, BFD_ASSERT (sgot != NULL); if (sgot == NULL) return bfd_reloc_notsupported; - + /* Note that sgot->output_offset is not involved in this calculation. We always want the start of .got. If we define _GLOBAL_OFFSET_TABLE in a different way, as is permitted by the ABI, we might have to change this - calculation. */ - + calculation. */ value -= sgot->output_section->vma; return _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, value, (bfd_vma) 0); case R_ARM_GOTPC: - /* Use global offset table as symbol value. */ - + /* Use global offset table as symbol value. */ BFD_ASSERT (sgot != NULL); if (sgot == NULL) @@ -1456,7 +1490,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, case R_ARM_GOT32: /* Relocation is to the entry for this symbol in the - global offset table. */ + global offset table. */ if (sgot == NULL) return bfd_reloc_notsupported; @@ -1479,8 +1513,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, When doing a dynamic link, we create a .rel.got relocation entry to initialize the value. This is done in the - finish_dynamic_symbol routine. */ - + finish_dynamic_symbol routine. */ if ((off & 1) != 0) off &= ~1; else @@ -1503,7 +1536,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, /* The offset must always be a multiple of 4. We use the least significant bit to record whether we have already - generated the necessary reloc. */ + generated the necessary reloc. */ if ((off & 1) != 0) off &= ~1; else @@ -1534,7 +1567,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, value = sgot->output_offset + off; } - + return _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, value, (bfd_vma) 0); @@ -1544,7 +1577,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd, procedure linkage table. */ /* Resolve a PLT32 reloc against a local symbol directly, - without using the procedure linkage table. */ + without using the procedure linkage table. */ if (h == NULL) return _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, value, @@ -1607,44 +1640,67 @@ arm_add_to_rel (abfd, address, howto, increment) reloc_howto_type * howto; bfd_signed_vma increment; { - bfd_vma contents; bfd_signed_vma addend; - contents = bfd_get_32 (abfd, address); - - /* Get the (signed) value from the instruction. */ - addend = contents & howto->src_mask; - if (addend & ((howto->src_mask + 1) >> 1)) + if (howto->type == R_ARM_THM_PC22) { - bfd_signed_vma mask; - - mask = -1; - mask &= ~ howto->src_mask; - addend |= mask; - } + int upper_insn, lower_insn; + int upper, lower; - /* Add in the increment, (which is a byte value). */ - switch (howto->type) - { - case R_ARM_THM_PC22: - default: + upper_insn = bfd_get_16 (abfd, address); + lower_insn = bfd_get_16 (abfd, address + 2); + upper = upper_insn & 0x7ff; + lower = lower_insn & 0x7ff; + + addend = (upper << 12) | (lower << 1); addend += increment; - break; - - case R_ARM_PC24: - addend <<= howto->size; - addend += increment; - - /* Should we check for overflow here ? */ + addend >>= 1; - /* Drop any undesired bits. */ - addend >>= howto->rightshift; - break; + upper_insn = (upper_insn & 0xf800) | ((addend >> 11) & 0x7ff); + lower_insn = (lower_insn & 0xf800) | (addend & 0x7ff); + + bfd_put_16 (abfd, upper_insn, address); + bfd_put_16 (abfd, lower_insn, address + 2); + } + else + { + bfd_vma contents; + + contents = bfd_get_32 (abfd, address); + + /* Get the (signed) value from the instruction. */ + addend = contents & howto->src_mask; + if (addend & ((howto->src_mask + 1) >> 1)) + { + bfd_signed_vma mask; + + mask = -1; + mask &= ~ howto->src_mask; + addend |= mask; + } + + /* Add in the increment, (which is a byte value). */ + switch (howto->type) + { + default: + addend += increment; + break; + + case R_ARM_PC24: + addend <<= howto->size; + addend += increment; + + /* Should we check for overflow here ? */ + + /* Drop any undesired bits. */ + addend >>= howto->rightshift; + break; + } + + contents = (contents & ~ howto->dst_mask) | (addend & howto->dst_mask); + + bfd_put_32 (abfd, contents, address); } - - contents = (contents & ~ howto->dst_mask) | (addend & howto->dst_mask); - - bfd_put_32 (abfd, contents, address); } #endif /* USE_REL */ @@ -1723,6 +1779,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section, h = NULL; sym = NULL; sec = NULL; + if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -1734,10 +1791,12 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section, else { h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - while (h->root.type == bfd_link_hash_indirect + + while ( h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; - if (h->root.type == bfd_link_hash_defined + + if ( h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { int relocation_needed = 1; @@ -1746,7 +1805,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section, /* In these cases, we don't need the relocation value. We check specially because in some obscure cases - sec->output_section will be NULL. */ + sec->output_section will be NULL. */ switch (r_type) { case R_ARM_PC24: @@ -1865,19 +1924,19 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section, break; case bfd_reloc_outofrange: - msg = _ ("internal error: out of range error"); + msg = _("internal error: out of range error"); goto common_error; case bfd_reloc_notsupported: - msg = _ ("internal error: unsupported relocation error"); + msg = _("internal error: unsupported relocation error"); goto common_error; case bfd_reloc_dangerous: - msg = _ ("internal error: dangerous error"); + msg = _("internal error: dangerous error"); goto common_error; default: - msg = _ ("internal error: unknown error"); + msg = _("internal error: unknown error"); /* fall through */ common_error: @@ -1893,7 +1952,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section, return true; } -/* Function to keep ARM specific flags in the ELF header. */ +/* Function to keep ARM specific flags in the ELF header. */ static boolean elf32_arm_set_private_flags (abfd, flags) bfd *abfd; @@ -1902,14 +1961,17 @@ elf32_arm_set_private_flags (abfd, flags) if (elf_flags_init (abfd) && elf_elfheader (abfd)->e_flags != flags) { - if (flags & EF_INTERWORK) - _bfd_error_handler (_ ("\ + if (EF_ARM_EABI_VERSION (flags) == EF_ARM_EABI_UNKNOWN) + { + if (flags & EF_INTERWORK) + _bfd_error_handler (_("\ Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"), - bfd_get_filename (abfd)); - else - _bfd_error_handler (_ ("\ + bfd_get_filename (abfd)); + else + _bfd_error_handler (_("\ Warning: Clearing the interwork flag of %s due to outside request"), - bfd_get_filename (abfd)); + bfd_get_filename (abfd)); + } } else { @@ -1920,7 +1982,8 @@ Warning: Clearing the interwork flag of %s due to outside request"), return true; } -/* Copy backend specific data from one object module to another */ +/* Copy backend specific data from one object module to another. */ + static boolean elf32_arm_copy_private_bfd_data (ibfd, obfd) bfd *ibfd; @@ -1929,14 +1992,16 @@ elf32_arm_copy_private_bfd_data (ibfd, obfd) flagword in_flags; flagword out_flags; - if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour + if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) return true; - in_flags = elf_elfheader (ibfd)->e_flags; + in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; - if (elf_flags_init (obfd) && in_flags != out_flags) + if (elf_flags_init (obfd) + && EF_ARM_EABI_VERSION (out_flags) == EF_ARM_EABI_UNKNOWN + && in_flags != out_flags) { /* Cannot mix APCS26 and APCS32 code. */ if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26)) @@ -1951,7 +2016,7 @@ elf32_arm_copy_private_bfd_data (ibfd, obfd) if ((in_flags & EF_INTERWORK) != (out_flags & EF_INTERWORK)) { if (out_flags & EF_INTERWORK) - _bfd_error_handler (_ ("\ + _bfd_error_handler (_("\ Warning: Clearing the interwork flag in %s because non-interworking code in %s has been linked with it"), bfd_get_filename (obfd), bfd_get_filename (ibfd)); @@ -1971,10 +2036,11 @@ Warning: Clearing the interwork flag in %s because non-interworking code in %s h /* Merge backend specific data from an object file to the output object file when linking. */ + static boolean elf32_arm_merge_private_bfd_data (ibfd, obfd) - bfd *ibfd; - bfd *obfd; + bfd * ibfd; + bfd * obfd; { flagword out_flags; flagword in_flags; @@ -1982,29 +2048,18 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd) boolean null_input_bfd = true; asection *sec; + /* Check if we have the same endianess. */ + if (_bfd_generic_verify_endian_match (ibfd, obfd) == false) + return false; + if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) return true; - /* Check if we have the same endianess */ - if ( ibfd->xvec->byteorder != obfd->xvec->byteorder - && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN - && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN) - { - (*_bfd_error_handler) - (_("%s: compiled for a %s endian system and target is %s endian"), - bfd_get_filename (ibfd), - bfd_big_endian (ibfd) ? "big" : "little", - bfd_big_endian (obfd) ? "big" : "little"); - - bfd_set_error (bfd_error_wrong_format); - return false; - } - /* The input BFD must have had its flags initialised. */ /* The following seems bogus to me -- The flags are initialized in the assembler but I don't think an elf_flags_init field is - written into the object */ + written into the object. */ /* BFD_ASSERT (elf_flags_init (ibfd)); */ in_flags = elf_elfheader (ibfd)->e_flags; @@ -2052,96 +2107,152 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd) if (null_input_bfd) return true; - /* If any of the input BFDs is non-PIC, the output is also position - dependent. */ - if (!(in_flags & EF_PIC)) - elf_elfheader (obfd)->e_flags &= ~EF_PIC; - /* Complain about various flag mismatches. */ - if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26)) + if (EF_ARM_EABI_VERSION (in_flags) != EF_ARM_EABI_VERSION (out_flags)) { - _bfd_error_handler (_ ("\ + _bfd_error_handler (_("\ +Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"), + bfd_get_filename (ibfd), + (in_flags & EF_ARM_EABIMASK) >> 24, + bfd_get_filename (obfd), + (out_flags & EF_ARM_EABIMASK) >> 24); + return false; + } + + /* Not sure what needs to be checked for EABI versions >= 1. */ + if (EF_ARM_EABI_VERSION (in_flags) == EF_ARM_EABI_UNKNOWN) + { + if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26)) + { + _bfd_error_handler (_("\ Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"), bfd_get_filename (ibfd), in_flags & EF_APCS_26 ? 26 : 32, bfd_get_filename (obfd), out_flags & EF_APCS_26 ? 26 : 32); - flags_compatible = false; - } + flags_compatible = false; + } - if ((in_flags & EF_APCS_FLOAT) != (out_flags & EF_APCS_FLOAT)) - { - _bfd_error_handler (_ ("\ + if ((in_flags & EF_APCS_FLOAT) != (out_flags & EF_APCS_FLOAT)) + { + _bfd_error_handler (_("\ Error: %s passes floats in %s registers, whereas %s passes them in %s registers"), bfd_get_filename (ibfd), - in_flags & EF_APCS_FLOAT ? _ ("float") : _ ("integer"), + in_flags & EF_APCS_FLOAT ? _("float") : _("integer"), bfd_get_filename (obfd), - out_flags & EF_APCS_26 ? _ ("float") : _ ("integer")); - flags_compatible = false; - } + out_flags & EF_APCS_26 ? _("float") : _("integer")); + flags_compatible = false; + } #ifdef EF_SOFT_FLOAT - if ((in_flags & EF_SOFT_FLOAT) != (out_flags & EF_SOFT_FLOAT)) - { - _bfd_error_handler (_ ("\ + if ((in_flags & EF_SOFT_FLOAT) != (out_flags & EF_SOFT_FLOAT)) + { + _bfd_error_handler (_ ("\ Error: %s uses %s floating point, whereas %s uses %s floating point"), - bfd_get_filename (ibfd), - in_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"), - bfd_get_filename (obfd), - out_flags & EF_SOFT_FLOAT ? _("soft") : _("hard")); - flags_compatible = false; - } + bfd_get_filename (ibfd), + in_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"), + bfd_get_filename (obfd), + out_flags & EF_SOFT_FLOAT ? _("soft") : _("hard")); + flags_compatible = false; + } #endif - /* Interworking mismatch is only a warning. */ - if ((in_flags & EF_INTERWORK) != (out_flags & EF_INTERWORK)) - _bfd_error_handler (_ ("\ + /* Interworking mismatch is only a warning. */ + if ((in_flags & EF_INTERWORK) != (out_flags & EF_INTERWORK)) + _bfd_error_handler (_("\ Warning: %s %s interworking, whereas %s %s"), bfd_get_filename (ibfd), - in_flags & EF_INTERWORK ? _ ("supports") : _ ("does not support"), + in_flags & EF_INTERWORK ? _("supports") : _("does not support"), bfd_get_filename (obfd), - out_flags & EF_INTERWORK ? _ ("does not") : _ ("does")); + out_flags & EF_INTERWORK ? _("does not") : _("does")); + } return flags_compatible; } -/* Display the flags field */ +/* Display the flags field. */ + static boolean elf32_arm_print_private_bfd_data (abfd, ptr) bfd *abfd; PTR ptr; { - FILE *file = (FILE *) ptr; + FILE * file = (FILE *) ptr; + unsigned long flags; BFD_ASSERT (abfd != NULL && ptr != NULL); /* Print normal ELF private data. */ _bfd_elf_print_private_bfd_data (abfd, ptr); - /* Ignore init flag - it may not be set, despite the flags field containing valid data. */ + flags = elf_elfheader (abfd)->e_flags; + /* Ignore init flag - it may not be set, despite the flags field + containing valid data. */ /* xgettext:c-format */ - fprintf (file, _ ("private flags = %lx:"), elf_elfheader (abfd)->e_flags); + fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags); - if (elf_elfheader (abfd)->e_flags & EF_INTERWORK) - fprintf (file, _ (" [interworking enabled]")); - else - fprintf (file, _ (" [interworking not enabled]")); + switch (EF_ARM_EABI_VERSION (flags)) + { + case EF_ARM_EABI_UNKNOWN: + /* The following flag bits are GNU extenstions and not part of the + official ARM ELF extended ABI. Hence they are only decoded if + the EABI version is not set. */ + if (flags & EF_INTERWORK) + fprintf (file, _(" [interworking enabled]")); - if (elf_elfheader (abfd)->e_flags & EF_APCS_26) - fprintf (file, _ (" [APCS-26]")); - else - fprintf (file, _ (" [APCS-32]")); + if (flags & EF_APCS_26) + fprintf (file, _(" [APCS-26]")); + else + fprintf (file, _(" [APCS-32]")); - if (elf_elfheader (abfd)->e_flags & EF_APCS_FLOAT) - fprintf (file, _ (" [floats passed in float registers]")); - else - fprintf (file, _ (" [floats passed in integer registers]")); + if (flags & EF_APCS_FLOAT) + fprintf (file, _(" [floats passed in float registers]")); - if (elf_elfheader (abfd)->e_flags & EF_PIC) - fprintf (file, _ (" [position independent]")); - else - fprintf (file, _ (" [absolute position]")); + if (flags & EF_PIC) + fprintf (file, _(" [position independent]")); + + if (flags & EF_NEW_ABI) + fprintf (file, _(" [new ABI]")); + + if (flags & EF_OLD_ABI) + fprintf (file, _(" [old ABI]")); + + if (flags & EF_SOFT_FLOAT) + fprintf (file, _(" [software FP]")); + + flags &= ~(EF_INTERWORK | EF_APCS_26 | EF_APCS_FLOAT | EF_PIC + | EF_NEW_ABI | EF_OLD_ABI | EF_SOFT_FLOAT); + break; + + case EF_ARM_EABI_VER1: + fprintf (file, _(" [Version1 EABI]")); + + if (flags & EF_ARM_SYMSARESORTED) + fprintf (file, _(" [sorted symbol table]")); + else + fprintf (file, _(" [unsorted symbol table]")); + + flags &= ~ EF_ARM_SYMSARESORTED; + break; + + default: + fprintf (file, _(" ")); + break; + } + + flags &= ~ EF_ARM_EABIMASK; + + if (flags & EF_ARM_RELEXEC) + fprintf (file, _(" [relocatable executable]")); + + if (flags & EF_ARM_HASENTRY) + fprintf (file, _(" [has entry point]")); + + flags &= ~ (EF_ARM_RELEXEC | EF_ARM_HASENTRY); + + if (flags) + fprintf (file, _("")); fputc ('\n', file); @@ -2157,7 +2268,7 @@ elf32_arm_get_symbol_type (elf_sym, type) { case STT_ARM_TFUNC: return ELF_ST_TYPE (elf_sym->st_info); - break; + case STT_ARM_16BIT: /* If the symbol is not an object, return the STT_ARM_16BIT flag. This allows us to distinguish between data used by Thumb instructions @@ -2166,6 +2277,9 @@ elf32_arm_get_symbol_type (elf_sym, type) if (type != STT_OBJECT) return ELF_ST_TYPE (elf_sym->st_info); break; + + default: + break; } return type; @@ -2245,33 +2359,35 @@ elf32_arm_check_relocs (abfd, info, sec, relocs) bfd * dynobj; asection * sgot, *srelgot, *sreloc; bfd_vma * local_got_offsets; - + if (info->relocateable) return true; - + sgot = srelgot = sreloc = NULL; - + dynobj = elf_hash_table (info)->dynobj; local_got_offsets = elf_local_got_offsets (abfd); symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); - sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym); + sym_hashes_end = sym_hashes + + symtab_hdr->sh_size / sizeof (Elf32_External_Sym); + if (!elf_bad_symtab (abfd)) sym_hashes_end -= symtab_hdr->sh_info; - + rel_end = relocs + sec->reloc_count; for (rel = relocs; rel < rel_end; rel++) { struct elf_link_hash_entry *h; unsigned long r_symndx; - + r_symndx = ELF32_R_SYM (rel->r_info); if (r_symndx < symtab_hdr->sh_info) h = NULL; else h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - + /* Some relocs require a global offset table. */ if (dynobj == NULL) { @@ -2305,7 +2421,7 @@ elf32_arm_check_relocs (abfd, info, sec, relocs) && (h != NULL || info->shared)) { srelgot = bfd_get_section_by_name (dynobj, ".rel.got"); - + /* If no got relocation section, make one and initialize. */ if (srelgot == NULL) { @@ -2490,7 +2606,7 @@ elf32_arm_check_relocs (abfd, info, sec, relocs) if (!_bfd_elf32_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) return false; break; - + /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_ARM_GNU_VTENTRY: @@ -2503,10 +2619,9 @@ elf32_arm_check_relocs (abfd, info, sec, relocs) return true; } - /* Find the nearest line to a particular section and offset, for error reporting. This code is a duplicate of the code in elf.c, except - that it also accepts STT_ARM_TFUNC as a symbol that names a function. */ + that it also accepts STT_ARM_TFUNC as a symbol that names a function. */ static boolean elf32_arm_find_nearest_line @@ -2527,7 +2642,8 @@ elf32_arm_find_nearest_line if (_bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset, filename_ptr, functionname_ptr, - line_ptr, 0)) + line_ptr, 0, + &elf_tdata (abfd)->dwarf2_find_line_info)) return true; if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, @@ -2667,7 +2783,6 @@ elf32_arm_adjust_dynamic_symbol (info, h) /* We also need to make an entry in the .got.plt section, which will be placed in the .got section by the linker script. */ - s = bfd_get_section_by_name (dynobj, ".got.plt"); BFD_ASSERT (s != NULL); s->_raw_size += 4; @@ -2712,7 +2827,6 @@ elf32_arm_adjust_dynamic_symbol (info, h) determine the address it must put in the global offset table, so both the dynamic object and the regular object will refer to the same memory location for the variable. */ - s = bfd_get_section_by_name (dynobj, ".dynbss"); BFD_ASSERT (s != NULL); @@ -2872,7 +2986,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info) outname = bfd_get_section_name (output_bfd, s->output_section); target = bfd_get_section_by_name (output_bfd, outname + 4); - + if (target != NULL && (target->flags & SEC_READONLY) != 0 && (target->flags & SEC_ALLOC) != 0) @@ -2925,7 +3039,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info) if (plt) { - if (! bfd_elf32_add_dynamic_entry (info, DT_PLTGOT, 0) + if ( ! bfd_elf32_add_dynamic_entry (info, DT_PLTGOT, 0) || ! bfd_elf32_add_dynamic_entry (info, DT_PLTRELSZ, 0) || ! bfd_elf32_add_dynamic_entry (info, DT_PLTREL, DT_REL) || ! bfd_elf32_add_dynamic_entry (info, DT_JMPREL, 0)) @@ -2934,7 +3048,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info) if (relocs) { - if (! bfd_elf32_add_dynamic_entry (info, DT_REL, 0) + if ( ! bfd_elf32_add_dynamic_entry (info, DT_REL, 0) || ! bfd_elf32_add_dynamic_entry (info, DT_RELSZ, 0) || ! bfd_elf32_add_dynamic_entry (info, DT_RELENT, sizeof (Elf32_External_Rel))) @@ -2945,6 +3059,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info) { if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0)) return false; + info->flags |= DF_TEXTREL; } } @@ -3052,6 +3167,13 @@ elf32_arm_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; } } @@ -3063,7 +3185,6 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym) /* This symbol has an entry in the global offset table. Set it up. */ - sgot = bfd_get_section_by_name (dynobj, ".got"); srel = bfd_get_section_by_name (dynobj, ".rel.got"); BFD_ASSERT (sgot != NULL && srel != NULL); @@ -3098,7 +3219,6 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym) Elf_Internal_Rel rel; /* This symbol needs a copy reloc. Set it up. */ - BFD_ASSERT (h->dynindx != -1 && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak)); @@ -3152,6 +3272,7 @@ elf32_arm_finish_dynamic_sections (output_bfd, info) dyncon = (Elf32_External_Dyn *) sdyn->contents; dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->_raw_size); + for (; dyncon < dynconend; dyncon++) { Elf_Internal_Dyn dyn; @@ -3242,7 +3363,7 @@ elf32_arm_post_process_headers (abfd, link_info) bfd * abfd; struct bfd_link_info * link_info ATTRIBUTE_UNUSED; { - Elf_Internal_Ehdr * i_ehdrp; /* Elf file header, internal form */ + Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */ i_ehdrp = elf_elfheader (abfd); @@ -3250,12 +3371,10 @@ elf32_arm_post_process_headers (abfd, link_info) i_ehdrp->e_ident[EI_ABIVERSION] = ARM_ELF_ABI_VERSION; } - #define ELF_ARCH bfd_arch_arm #define ELF_MACHINE_CODE EM_ARM #define ELF_MAXPAGESIZE 0x8000 - #define bfd_elf32_bfd_copy_private_bfd_data elf32_arm_copy_private_bfd_data #define bfd_elf32_bfd_merge_private_bfd_data elf32_arm_merge_private_bfd_data #define bfd_elf32_bfd_set_private_flags elf32_arm_set_private_flags diff --git a/contrib/binutils/bfd/elf32-gen.c b/contrib/binutils/bfd/elf32-gen.c index 47da53b..7a39f47 100644 --- a/contrib/binutils/bfd/elf32-gen.c +++ b/contrib/binutils/bfd/elf32-gen.c @@ -58,6 +58,37 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) bfd_reloc->howto = &dummy; } +static boolean +elf32_generic_link_add_symbols (abfd, info) + bfd *abfd; + struct bfd_link_info *info; +{ + asection *o; + + /* Check if there are any relocations. */ + for (o = abfd->sections; o != NULL; o = o->next) + if ((o->flags & SEC_RELOC) != 0) + { + Elf_Internal_Ehdr *ehdrp; + + ehdrp = elf_elfheader (abfd); + if (abfd->my_archive) + (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"), + bfd_get_filename (abfd->my_archive), + bfd_get_filename (abfd), + ehdrp->e_machine); + else + (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"), + bfd_get_filename (abfd), + ehdrp->e_machine); + + bfd_set_error (bfd_error_wrong_format); + return false; + } + + return bfd_elf32_bfd_link_add_symbols (abfd, info); +} + #define TARGET_LITTLE_SYM bfd_elf32_little_generic_vec #define TARGET_LITTLE_NAME "elf32-little" #define TARGET_BIG_SYM bfd_elf32_big_generic_vec @@ -66,6 +97,7 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) #define ELF_MACHINE_CODE EM_NONE #define ELF_MAXPAGESIZE 0x1 #define bfd_elf32_bfd_reloc_type_lookup bfd_default_reloc_type_lookup +#define bfd_elf32_bfd_link_add_symbols elf32_generic_link_add_symbols #define elf_info_to_howto elf_generic_info_to_howto #define elf_info_to_howto_rel elf_generic_info_to_howto_rel diff --git a/contrib/binutils/bfd/elf32-i386.c b/contrib/binutils/bfd/elf32-i386.c index fc1b5a8..4ad2c2b 100644 --- a/contrib/binutils/bfd/elf32-i386.c +++ b/contrib/binutils/bfd/elf32-i386.c @@ -1,5 +1,6 @@ /* Intel 80386/80486-specific support for 32-bit ELF - Copyright 1993, 94-98, 1999 Free Software Foundation, Inc. + Copyright 1993, 94, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -56,35 +57,66 @@ static boolean elf_i386_finish_dynamic_sections static reloc_howto_type elf_howto_table[]= { - HOWTO(R_386_NONE, 0,0, 0,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_NONE", true,0x00000000,0x00000000,false), - HOWTO(R_386_32, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_32", true,0xffffffff,0xffffffff,false), - HOWTO(R_386_PC32, 0,2,32,true, 0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PC32", true,0xffffffff,0xffffffff,true), - HOWTO(R_386_GOT32, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOT32", true,0xffffffff,0xffffffff,false), - HOWTO(R_386_PLT32, 0,2,32,true,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PLT32", true,0xffffffff,0xffffffff,true), - HOWTO(R_386_COPY, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_COPY", true,0xffffffff,0xffffffff,false), - HOWTO(R_386_GLOB_DAT, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GLOB_DAT", true,0xffffffff,0xffffffff,false), - HOWTO(R_386_JUMP_SLOT, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_JUMP_SLOT",true,0xffffffff,0xffffffff,false), - HOWTO(R_386_RELATIVE, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_RELATIVE", true,0xffffffff,0xffffffff,false), - HOWTO(R_386_GOTOFF, 0,2,32,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTOFF", true,0xffffffff,0xffffffff,false), - HOWTO(R_386_GOTPC, 0,2,32,true,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_GOTPC", true,0xffffffff,0xffffffff,true), - EMPTY_HOWTO (11), - EMPTY_HOWTO (12), - EMPTY_HOWTO (13), - EMPTY_HOWTO (14), - EMPTY_HOWTO (15), - EMPTY_HOWTO (16), - EMPTY_HOWTO (17), - EMPTY_HOWTO (18), - EMPTY_HOWTO (19), + HOWTO(R_386_NONE, 0, 0, 0, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_NONE", + true, 0x00000000, 0x00000000, false), + HOWTO(R_386_32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_32", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_PC32, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_PC32", + true, 0xffffffff, 0xffffffff, true), + HOWTO(R_386_GOT32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_GOT32", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_PLT32, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_PLT32", + true, 0xffffffff, 0xffffffff, true), + HOWTO(R_386_COPY, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_COPY", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_GLOB_DAT, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_GLOB_DAT", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_JUMP_SLOT, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_JUMP_SLOT", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_RELATIVE, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_RELATIVE", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_GOTOFF, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_GOTOFF", + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_GOTPC, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_GOTPC", + true, 0xffffffff, 0xffffffff, true), + + /* We have a gap in the reloc numbers here. + R_386_standard counts the number up to this point, and + R_386_ext_offset is the value to subtract from a reloc type of + R_386_16 thru R_386_PC8 to form an index into this table. */ +#define R_386_standard ((unsigned int) R_386_GOTPC + 1) +#define R_386_ext_offset ((unsigned int) R_386_16 - R_386_standard) + /* The remaining relocs are a GNU extension. */ - HOWTO(R_386_16, 0,1,16,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_16", true,0xffff,0xffff,false), - HOWTO(R_386_PC16, 0,1,16,true, 0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_PC16", true,0xffff,0xffff,true), - HOWTO(R_386_8, 0,0,8,false,0,complain_overflow_bitfield, bfd_elf_generic_reloc,"R_386_8", true,0xff,0xff,false), - HOWTO(R_386_PC8, 0,0,8,true, 0,complain_overflow_signed, bfd_elf_generic_reloc,"R_386_PC8", true,0xff,0xff,true), -}; + HOWTO(R_386_16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_16", + true, 0xffff, 0xffff, false), + HOWTO(R_386_PC16, 0, 1, 16, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_PC16", + true, 0xffff, 0xffff, true), + HOWTO(R_386_8, 0, 0, 8, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_386_8", + true, 0xff, 0xff, false), + HOWTO(R_386_PC8, 0, 0, 8, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_386_PC8", + true, 0xff, 0xff, true), + + /* Another gap. */ +#define R_386_ext ((unsigned int) R_386_PC8 + 1 - R_386_ext_offset) +#define R_386_vt_offset ((unsigned int) R_386_GNU_VTINHERIT - R_386_ext) /* GNU extension to record C++ vtable hierarchy. */ -static reloc_howto_type elf32_i386_vtinherit_howto = HOWTO (R_386_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -97,10 +129,9 @@ static reloc_howto_type elf32_i386_vtinherit_howto = false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - false); + false), /* GNU extension to record C++ vtable member usage. */ -static reloc_howto_type elf32_i386_vtentry_howto = HOWTO (R_386_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -113,7 +144,11 @@ static reloc_howto_type elf32_i386_vtentry_howto = false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - false); + false) + +#define R_386_vt ((unsigned int) R_386_GNU_VTENTRY + 1 - R_386_vt_offset) + +}; #ifdef DEBUG_GEN_RELOC #define TRACE(str) fprintf (stderr, "i386 bfd reloc lookup %d (%s)\n", code, str) @@ -130,76 +165,78 @@ elf_i386_reloc_type_lookup (abfd, code) { case BFD_RELOC_NONE: TRACE ("BFD_RELOC_NONE"); - return &elf_howto_table[ (int)R_386_NONE ]; + return &elf_howto_table[(unsigned int) R_386_NONE ]; case BFD_RELOC_32: TRACE ("BFD_RELOC_32"); - return &elf_howto_table[ (int)R_386_32 ]; + return &elf_howto_table[(unsigned int) R_386_32 ]; case BFD_RELOC_CTOR: TRACE ("BFD_RELOC_CTOR"); - return &elf_howto_table[ (int)R_386_32 ]; + return &elf_howto_table[(unsigned int) R_386_32 ]; case BFD_RELOC_32_PCREL: TRACE ("BFD_RELOC_PC32"); - return &elf_howto_table[ (int)R_386_PC32 ]; + return &elf_howto_table[(unsigned int) R_386_PC32 ]; case BFD_RELOC_386_GOT32: TRACE ("BFD_RELOC_386_GOT32"); - return &elf_howto_table[ (int)R_386_GOT32 ]; + return &elf_howto_table[(unsigned int) R_386_GOT32 ]; case BFD_RELOC_386_PLT32: TRACE ("BFD_RELOC_386_PLT32"); - return &elf_howto_table[ (int)R_386_PLT32 ]; + return &elf_howto_table[(unsigned int) R_386_PLT32 ]; case BFD_RELOC_386_COPY: TRACE ("BFD_RELOC_386_COPY"); - return &elf_howto_table[ (int)R_386_COPY ]; + return &elf_howto_table[(unsigned int) R_386_COPY ]; case BFD_RELOC_386_GLOB_DAT: TRACE ("BFD_RELOC_386_GLOB_DAT"); - return &elf_howto_table[ (int)R_386_GLOB_DAT ]; + return &elf_howto_table[(unsigned int) R_386_GLOB_DAT ]; case BFD_RELOC_386_JUMP_SLOT: TRACE ("BFD_RELOC_386_JUMP_SLOT"); - return &elf_howto_table[ (int)R_386_JUMP_SLOT ]; + return &elf_howto_table[(unsigned int) R_386_JUMP_SLOT ]; case BFD_RELOC_386_RELATIVE: TRACE ("BFD_RELOC_386_RELATIVE"); - return &elf_howto_table[ (int)R_386_RELATIVE ]; + return &elf_howto_table[(unsigned int) R_386_RELATIVE ]; case BFD_RELOC_386_GOTOFF: TRACE ("BFD_RELOC_386_GOTOFF"); - return &elf_howto_table[ (int)R_386_GOTOFF ]; + return &elf_howto_table[(unsigned int) R_386_GOTOFF ]; case BFD_RELOC_386_GOTPC: TRACE ("BFD_RELOC_386_GOTPC"); - return &elf_howto_table[ (int)R_386_GOTPC ]; + return &elf_howto_table[(unsigned int) R_386_GOTPC ]; /* The remaining relocs are a GNU extension. */ case BFD_RELOC_16: TRACE ("BFD_RELOC_16"); - return &elf_howto_table[(int) R_386_16]; + return &elf_howto_table[(unsigned int) R_386_16 - R_386_ext_offset]; case BFD_RELOC_16_PCREL: TRACE ("BFD_RELOC_16_PCREL"); - return &elf_howto_table[(int) R_386_PC16]; + return &elf_howto_table[(unsigned int) R_386_PC16 - R_386_ext_offset]; case BFD_RELOC_8: TRACE ("BFD_RELOC_8"); - return &elf_howto_table[(int) R_386_8]; + return &elf_howto_table[(unsigned int) R_386_8 - R_386_ext_offset]; case BFD_RELOC_8_PCREL: TRACE ("BFD_RELOC_8_PCREL"); - return &elf_howto_table[(int) R_386_PC8]; + return &elf_howto_table[(unsigned int) R_386_PC8 - R_386_ext_offset]; case BFD_RELOC_VTABLE_INHERIT: TRACE ("BFD_RELOC_VTABLE_INHERIT"); - return &elf32_i386_vtinherit_howto; + return &elf_howto_table[(unsigned int) R_386_GNU_VTINHERIT + - R_386_vt_offset]; case BFD_RELOC_VTABLE_ENTRY: TRACE ("BFD_RELOC_VTABLE_ENTRY"); - return &elf32_i386_vtentry_howto; + return &elf_howto_table[(unsigned int) R_386_GNU_VTENTRY + - R_386_vt_offset]; default: break; @@ -224,22 +261,20 @@ elf_i386_info_to_howto_rel (abfd, cache_ptr, dst) arelent *cache_ptr; Elf32_Internal_Rel *dst; { - enum elf_i386_reloc_type type; - - type = (enum elf_i386_reloc_type) ELF32_R_TYPE (dst->r_info); - if (type == R_386_GNU_VTINHERIT) - cache_ptr->howto = &elf32_i386_vtinherit_howto; - else if (type == R_386_GNU_VTENTRY) - cache_ptr->howto = &elf32_i386_vtentry_howto; - else if (type < R_386_max - && (type < FIRST_INVALID_RELOC || type > LAST_INVALID_RELOC)) - cache_ptr->howto = &elf_howto_table[(int) type]; - else + unsigned int r_type = ELF32_R_TYPE (dst->r_info); + unsigned int indx; + + if ((indx = r_type) >= R_386_standard + && ((indx = r_type - R_386_ext_offset) - R_386_standard + >= R_386_ext - R_386_standard) + && ((indx = r_type - R_386_vt_offset) - R_386_ext + >= R_386_vt - R_386_ext)) { (*_bfd_error_handler) (_("%s: invalid relocation type %d"), - bfd_get_filename (abfd), (int) type); - cache_ptr->howto = &elf_howto_table[(int) R_386_NONE]; + bfd_get_filename (abfd), (int) r_type); + indx = (unsigned int) R_386_NONE; } + cache_ptr->howto = &elf_howto_table[indx]; } /* Return whether a symbol name implies a local label. The UnixWare @@ -439,7 +474,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs) bfd *dynobj; Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; - bfd_vma *local_got_offsets; + bfd_signed_vma *local_got_refcounts; const Elf_Internal_Rela *rel; const Elf_Internal_Rela *rel_end; asection *sgot; @@ -452,7 +487,7 @@ elf_i386_check_relocs (abfd, info, sec, relocs) dynobj = elf_hash_table (info)->dynobj; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); - local_got_offsets = elf_local_got_offsets (abfd); + local_got_refcounts = elf_local_got_refcounts (abfd); sgot = NULL; srelgot = NULL; @@ -522,57 +557,54 @@ elf_i386_check_relocs (abfd, info, sec, relocs) if (h != NULL) { - if (h->got.offset != (bfd_vma) -1) + if (h->got.refcount == -1) { - /* We have already allocated space in the .got. */ - break; - } - h->got.offset = sgot->_raw_size; + h->got.refcount = 1; - /* Make sure this symbol is output as a dynamic symbol. */ - if (h->dynindx == -1) - { - if (! bfd_elf32_link_record_dynamic_symbol (info, h)) - return false; - } + /* Make sure this symbol is output as a dynamic symbol. */ + if (h->dynindx == -1) + { + if (! bfd_elf32_link_record_dynamic_symbol (info, h)) + return false; + } - srelgot->_raw_size += sizeof (Elf32_External_Rel); + sgot->_raw_size += 4; + srelgot->_raw_size += sizeof (Elf32_External_Rel); + } + else + h->got.refcount += 1; } else { - /* This is a global offset table entry for a local - symbol. */ - if (local_got_offsets == NULL) + /* This is a global offset table entry for a local symbol. */ + if (local_got_refcounts == NULL) { size_t size; - register unsigned int i; - size = symtab_hdr->sh_info * sizeof (bfd_vma); - local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size); - if (local_got_offsets == NULL) + size = symtab_hdr->sh_info * sizeof (bfd_signed_vma); + local_got_refcounts = ((bfd_signed_vma *) + bfd_alloc (abfd, size)); + if (local_got_refcounts == NULL) return false; - elf_local_got_offsets (abfd) = local_got_offsets; - for (i = 0; i < symtab_hdr->sh_info; i++) - local_got_offsets[i] = (bfd_vma) -1; + elf_local_got_refcounts (abfd) = local_got_refcounts; + memset (local_got_refcounts, -1, size); } - if (local_got_offsets[r_symndx] != (bfd_vma) -1) + if (local_got_refcounts[r_symndx] == -1) { - /* We have already allocated space in the .got. */ - break; - } - local_got_offsets[r_symndx] = sgot->_raw_size; + local_got_refcounts[r_symndx] = 1; - if (info->shared) - { - /* If we are generating a shared object, we need to - output a R_386_RELATIVE reloc so that the dynamic - linker can adjust this GOT entry. */ - srelgot->_raw_size += sizeof (Elf32_External_Rel); + sgot->_raw_size += 4; + if (info->shared) + { + /* If we are generating a shared object, we need to + output a R_386_RELATIVE reloc so that the dynamic + linker can adjust this GOT entry. */ + srelgot->_raw_size += sizeof (Elf32_External_Rel); + } } + else + local_got_refcounts[r_symndx] += 1; } - - sgot->_raw_size += 4; - break; case R_386_PLT32: @@ -588,8 +620,13 @@ elf_i386_check_relocs (abfd, info, sec, relocs) if (h == NULL) continue; - h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; - + if (h->plt.refcount == -1) + { + h->plt.refcount = 1; + h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; + } + else + h->plt.refcount += 1; break; case R_386_32: @@ -598,28 +635,33 @@ elf_i386_check_relocs (abfd, info, sec, relocs) h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF; /* If we are creating a shared library, and this is a reloc - against a global symbol, or a non PC relative reloc - against a local symbol, then we need to copy the reloc - into the shared library. However, if we are linking with - -Bsymbolic, we do not need to copy a reloc against a - global symbol which is defined in an object we are - including in the link (i.e., DEF_REGULAR is set). At - this point we have not seen all the input files, so it is - possible that DEF_REGULAR is not set now but will be set - later (it is never cleared). We account for that - possibility below by storing information in the - pcrel_relocs_copied field of the hash table entry. */ + against a global symbol, or a non PC relative reloc + against a local symbol, then we need to copy the reloc + into the shared library. However, if we are linking with + -Bsymbolic, we do not need to copy a reloc against a + global symbol which is defined in an object we are + including in the link (i.e., DEF_REGULAR is set). At + this point we have not seen all the input files, so it is + possible that DEF_REGULAR is not set now but will be set + later (it is never cleared). In case of a weak definition, + DEF_REGULAR may be cleared later by a strong definition in + a shared library. We account for that possibility below by + storing information in the relocs_copied field of the hash + table entry. A similar situation occurs when creating + shared libraries and symbol visibility changes render the + symbol local. */ if (info->shared && (sec->flags & SEC_ALLOC) != 0 && (ELF32_R_TYPE (rel->r_info) != R_386_PC32 || (h != NULL && (! info->symbolic + || h->root.type == bfd_link_hash_defweak || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)))) { /* When creating a shared object, we must copy these - reloc types into the output file. We create a reloc - section in dynobj and make room for this reloc. */ + reloc types into the output file. We create a reloc + section in dynobj and make room for this reloc. */ if (sreloc == NULL) { const char *name; @@ -631,9 +673,20 @@ elf_i386_check_relocs (abfd, info, sec, relocs) if (name == NULL) return false; - BFD_ASSERT (strncmp (name, ".rel", 4) == 0 - && strcmp (bfd_get_section_name (abfd, sec), - name + 4) == 0); + if (strncmp (name, ".rel", 4) != 0 + || strcmp (bfd_get_section_name (abfd, sec), + name + 4) != 0) + { + if (abfd->my_archive) + (*_bfd_error_handler) (_("%s(%s): bad relocation section name `%s\'"), + bfd_get_filename (abfd->my_archive), + bfd_get_filename (abfd), + name); + else + (*_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) @@ -654,15 +707,13 @@ elf_i386_check_relocs (abfd, info, sec, relocs) sreloc->_raw_size += sizeof (Elf32_External_Rel); - /* If we are linking with -Bsymbolic, and this is a - global symbol, we count the number of PC relative - relocations we have entered for this symbol, so that - we can discard them again if the symbol is later - defined by a regular object. Note that this function - is only called if we are using an elf_i386 linker - hash table, which means that h is really a pointer to - an elf_i386_link_hash_entry. */ - if (h != NULL && info->symbolic + /* If this is a global symbol, we count the number of PC + relative relocations we have entered for this symbol, + so that we can discard them later as necessary. Note + that this function is only called if we are using an + elf_i386 linker hash table, which means that h is + really a pointer to an elf_i386_link_hash_entry. */ + if (h != NULL && ELF32_R_TYPE (rel->r_info) == R_386_PC32) { struct elf_i386_link_hash_entry *eh; @@ -766,14 +817,81 @@ elf_i386_gc_mark_hook (abfd, info, rel, h, sym) static boolean elf_i386_gc_sweep_hook (abfd, info, sec, relocs) - bfd *abfd ATTRIBUTE_UNUSED; + bfd *abfd; struct bfd_link_info *info ATTRIBUTE_UNUSED; - asection *sec ATTRIBUTE_UNUSED; - const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED; + asection *sec; + const Elf_Internal_Rela *relocs; { - /* ??? It would seem that the existing i386 code does no sort - of reference counting or whatnot on its GOT and PLT entries, - so it is not possible to garbage collect them at this time. */ + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes; + bfd_signed_vma *local_got_refcounts; + const Elf_Internal_Rela *rel, *relend; + unsigned long r_symndx; + struct elf_link_hash_entry *h; + bfd *dynobj; + asection *sgot; + asection *srelgot; + + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; + sym_hashes = elf_sym_hashes (abfd); + local_got_refcounts = elf_local_got_refcounts (abfd); + + dynobj = elf_hash_table (info)->dynobj; + if (dynobj == NULL) + return true; + + sgot = bfd_get_section_by_name (dynobj, ".got"); + srelgot = bfd_get_section_by_name (dynobj, ".rel.got"); + + relend = relocs + sec->reloc_count; + for (rel = relocs; rel < relend; rel++) + switch (ELF32_R_TYPE (rel->r_info)) + { + case R_386_GOT32: + case R_386_GOTOFF: + case R_386_GOTPC: + r_symndx = ELF32_R_SYM (rel->r_info); + if (r_symndx >= symtab_hdr->sh_info) + { + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + if (h->got.refcount > 0) + { + h->got.refcount -= 1; + if (h->got.refcount == 0) + { + sgot->_raw_size -= 4; + srelgot->_raw_size -= sizeof (Elf32_External_Rel); + } + } + } + else if (local_got_refcounts != NULL) + { + if (local_got_refcounts[r_symndx] > 0) + { + local_got_refcounts[r_symndx] -= 1; + if (local_got_refcounts[r_symndx] == 0) + { + sgot->_raw_size -= 4; + if (info->shared) + srelgot->_raw_size -= sizeof (Elf32_External_Rel); + } + } + } + break; + + case R_386_PLT32: + r_symndx = ELF32_R_SYM (rel->r_info); + if (r_symndx >= symtab_hdr->sh_info) + { + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + if (h->plt.refcount > 0) + h->plt.refcount -= 1; + } + break; + + default: + break; + } return true; } @@ -812,16 +930,18 @@ elf_i386_adjust_dynamic_symbol (info, h) if (h->type == STT_FUNC || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) { - if (! info->shared - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0) + if ((! info->shared + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 + && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0) + || (info->shared && h->plt.refcount <= 0)) { /* This case can occur if we saw a PLT32 reloc in an input - file, but the symbol was never referred to by a dynamic - object. In such a case, we don't actually need to build - a procedure linkage table, and we can just do a PC32 - reloc instead. */ - BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0); + file, but the symbol was never referred to by a dynamic + object, or if all references were garbage collected. In + such a case, we don't actually need to build a procedure + linkage table, and we can just do a PC32 reloc instead. */ + h->plt.offset = (bfd_vma) -1; + h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; return true; } @@ -859,13 +979,11 @@ elf_i386_adjust_dynamic_symbol (info, h) /* We also need to make an entry in the .got.plt section, which will be placed in the .got section by the linker script. */ - s = bfd_get_section_by_name (dynobj, ".got.plt"); BFD_ASSERT (s != NULL); s->_raw_size += 4; /* We also need to make an entry in the .rel.plt section. */ - s = bfd_get_section_by_name (dynobj, ".rel.plt"); BFD_ASSERT (s != NULL); s->_raw_size += sizeof (Elf32_External_Rel); @@ -995,10 +1113,10 @@ elf_i386_size_dynamic_sections (output_bfd, info) PC relative relocs against symbols defined in a regular object. We allocated space for them in the check_relocs routine, but we will not fill them in in the relocate_section routine. */ - if (info->shared && info->symbolic) + if (info->shared) elf_i386_link_hash_traverse (elf_i386_hash_table (info), elf_i386_discard_copies, - (PTR) NULL); + (PTR) info); /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate @@ -1092,8 +1210,12 @@ elf_i386_size_dynamic_sections (output_bfd, info) continue; } - /* Allocate memory for the section contents. */ - s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size); + /* Allocate memory for the section contents. We use bfd_zalloc + here in case unused entries are not reclaimed before the + section's contents are written out. This should not happen, + but this way if it does, we get a R_386_NONE reloc instead + of garbage. */ + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size); if (s->contents == NULL && s->_raw_size != 0) return false; } @@ -1133,6 +1255,7 @@ elf_i386_size_dynamic_sections (output_bfd, info) { if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0)) return false; + info->flags |= DF_TEXTREL; } } @@ -1140,26 +1263,32 @@ elf_i386_size_dynamic_sections (output_bfd, info) } /* This function is called via elf_i386_link_hash_traverse if we are - creating a shared object with -Bsymbolic. It discards the space - allocated to copy PC relative relocs against symbols which are - defined in regular objects. We allocated space for them in the + creating a shared object. In the -Bsymbolic case, it discards the + space allocated to copy PC relative relocs against symbols which + are defined in regular objects. For the normal non-symbolic case, + we also discard space for relocs that have become local due to + symbol visibility changes. We allocated space for them in the check_relocs routine, but we won't fill them in in the relocate_section routine. */ -/*ARGSUSED*/ static boolean -elf_i386_discard_copies (h, ignore) +elf_i386_discard_copies (h, inf) struct elf_i386_link_hash_entry *h; - PTR ignore ATTRIBUTE_UNUSED; + PTR inf; { struct elf_i386_pcrel_relocs_copied *s; - - /* We only discard relocs for symbols defined in a regular object. */ - if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) - return true; - - for (s = h->pcrel_relocs_copied; s != NULL; s = s->next) - s->section->_raw_size -= s->count * sizeof (Elf32_External_Rel); + struct bfd_link_info *info = (struct bfd_link_info *) inf; + + /* If a symbol has been forced local or we have found a regular + definition for the symbolic link case, then we won't be needing + any relocs. */ + if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0 + && ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0 + || info->symbolic)) + { + for (s = h->pcrel_relocs_copied; s != NULL; s = s->next) + s->section->_raw_size -= s->count * sizeof (Elf32_External_Rel); + } return true; } @@ -1193,9 +1322,14 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, sym_hashes = elf_sym_hashes (input_bfd); local_got_offsets = elf_local_got_offsets (input_bfd); - sgot = NULL; - splt = NULL; sreloc = NULL; + splt = NULL; + sgot = NULL; + if (dynobj != NULL) + { + splt = bfd_get_section_by_name (dynobj, ".plt"); + sgot = bfd_get_section_by_name (dynobj, ".got"); + } rel = relocs; relend = relocs + input_section->reloc_count; @@ -1209,20 +1343,21 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, asection *sec; bfd_vma relocation; bfd_reloc_status_type r; + unsigned int indx; r_type = ELF32_R_TYPE (rel->r_info); - if (r_type == R_386_GNU_VTINHERIT - || r_type == R_386_GNU_VTENTRY) + if (r_type == (int) R_386_GNU_VTINHERIT + || r_type == (int) R_386_GNU_VTENTRY) continue; - if (r_type < 0 - || r_type >= (int) R_386_max - || (r_type >= (int) FIRST_INVALID_RELOC - && r_type <= (int) LAST_INVALID_RELOC)) + + if ((indx = (unsigned) r_type) >= R_386_standard + && ((indx = (unsigned) r_type - R_386_ext_offset) - R_386_standard + >= R_386_ext - R_386_standard)) { bfd_set_error (bfd_error_bad_value); return false; } - howto = elf_howto_table + r_type; + howto = elf_howto_table + indx; r_symndx = ELF32_R_SYM (rel->r_info); @@ -1273,6 +1408,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, sec = h->root.u.def.section; if (r_type == R_386_GOTPC || (r_type == R_386_PLT32 + && splt != NULL && h->plt.offset != (bfd_vma) -1) || (r_type == R_386_GOT32 && elf_hash_table (info)->dynamic_sections_created @@ -1336,11 +1472,7 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, case R_386_GOT32: /* Relocation is to the entry for this symbol in the global offset table. */ - if (sgot == NULL) - { - sgot = bfd_get_section_by_name (dynobj, ".got"); - BFD_ASSERT (sgot != NULL); - } + BFD_ASSERT (sgot != NULL); if (h != NULL) { @@ -1459,12 +1591,13 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, /* Relocation is to the entry for this symbol in the procedure linkage table. */ - /* Resolve a PLT32 reloc again a local symbol directly, + /* Resolve a PLT32 reloc against a local symbol directly, without using the procedure linkage table. */ if (h == NULL) break; - if (h->plt.offset == (bfd_vma) -1) + if (h->plt.offset == (bfd_vma) -1 + || splt == NULL) { /* We didn't make a PLT entry for this symbol. This happens when statically linking PIC code, or when @@ -1472,12 +1605,6 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, break; } - if (splt == NULL) - { - splt = bfd_get_section_by_name (dynobj, ".plt"); - BFD_ASSERT (splt != NULL); - } - relocation = (splt->output_section->vma + splt->output_offset + h->plt.offset); @@ -1513,10 +1640,22 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section, if (name == NULL) return false; - BFD_ASSERT (strncmp (name, ".rel", 4) == 0 - && strcmp (bfd_get_section_name (input_bfd, - input_section), - name + 4) == 0); + if (strncmp (name, ".rel", 4) != 0 + || strcmp (bfd_get_section_name (input_bfd, + input_section), + name + 4) != 0) + { + if (input_bfd->my_archive) + (*_bfd_error_handler) (_("%s(%s): bad relocation section name `%s\'"), + bfd_get_filename (input_bfd->my_archive), + bfd_get_filename (input_bfd), + name); + else + (*_bfd_error_handler) (_("%s: bad relocation section name `%s\'"), + bfd_get_filename (input_bfd), + name); + return false; + } sreloc = bfd_get_section_by_name (dynobj, name); BFD_ASSERT (sreloc != NULL); @@ -1744,17 +1883,21 @@ elf_i386_finish_dynamic_symbol (output_bfd, info, h, sym) + sgot->output_offset + (h->got.offset &~ 1)); - /* If this is a -Bsymbolic link, and the symbol is defined - locally, we just want to emit a RELATIVE reloc. Likewise if - the symbol was forced to be local because of a version file. + /* If this is a static link, or it is a -Bsymbolic link and the + symbol is defined locally or was forced to be local because + of a version file, we just want to emit a RELATIVE reloc. The entry in the global offset table will already have been initialized in the relocate_section function. */ - if (info->shared - && (info->symbolic || h->dynindx == -1) - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)) - rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE); + if (! elf_hash_table (info)->dynamic_sections_created + || (info->shared + && (info->symbolic || h->dynindx == -1) + && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))) + { + rel.r_info = ELF32_R_INFO (0, R_386_RELATIVE); + } else { + BFD_ASSERT((h->got.offset & 1) == 0); bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); rel.r_info = ELF32_R_INFO (h->dynindx, R_386_GLOB_DAT); } @@ -1928,27 +2071,6 @@ elf_i386_finish_dynamic_sections (output_bfd, info) #define ELF_ARCH bfd_arch_i386 #define ELF_MACHINE_CODE EM_386 #define ELF_MAXPAGESIZE 0x1000 -#define elf_info_to_howto elf_i386_info_to_howto -#define elf_info_to_howto_rel elf_i386_info_to_howto_rel -#define bfd_elf32_bfd_reloc_type_lookup elf_i386_reloc_type_lookup -#define bfd_elf32_bfd_is_local_label_name \ - elf_i386_is_local_label_name -#define elf_backend_create_dynamic_sections \ - _bfd_elf_create_dynamic_sections -#define bfd_elf32_bfd_link_hash_table_create \ - elf_i386_link_hash_table_create -#define elf_backend_check_relocs elf_i386_check_relocs -#define elf_backend_adjust_dynamic_symbol \ - elf_i386_adjust_dynamic_symbol -#define elf_backend_size_dynamic_sections \ - elf_i386_size_dynamic_sections -#define elf_backend_relocate_section elf_i386_relocate_section -#define elf_backend_finish_dynamic_symbol \ - elf_i386_finish_dynamic_symbol -#define elf_backend_finish_dynamic_sections \ - elf_i386_finish_dynamic_sections -#define elf_backend_gc_mark_hook elf_i386_gc_mark_hook -#define elf_backend_gc_sweep_hook elf_i386_gc_sweep_hook #define elf_backend_can_gc_sections 1 #define elf_backend_want_got_plt 1 @@ -1957,4 +2079,22 @@ elf_i386_finish_dynamic_sections (output_bfd, info) #define elf_backend_got_header_size 12 #define elf_backend_plt_header_size PLT_ENTRY_SIZE +#define elf_info_to_howto elf_i386_info_to_howto +#define elf_info_to_howto_rel elf_i386_info_to_howto_rel + +#define bfd_elf32_bfd_final_link _bfd_elf32_gc_common_final_link +#define bfd_elf32_bfd_is_local_label_name elf_i386_is_local_label_name +#define bfd_elf32_bfd_link_hash_table_create elf_i386_link_hash_table_create +#define bfd_elf32_bfd_reloc_type_lookup elf_i386_reloc_type_lookup + +#define elf_backend_adjust_dynamic_symbol elf_i386_adjust_dynamic_symbol +#define elf_backend_check_relocs elf_i386_check_relocs +#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections +#define elf_backend_finish_dynamic_sections elf_i386_finish_dynamic_sections +#define elf_backend_finish_dynamic_symbol elf_i386_finish_dynamic_symbol +#define elf_backend_gc_mark_hook elf_i386_gc_mark_hook +#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 + #include "elf32-target.h" diff --git a/contrib/binutils/bfd/elf32-ppc.c b/contrib/binutils/bfd/elf32-ppc.c index b405fea..d3152ce 100644 --- a/contrib/binutils/bfd/elf32-ppc.c +++ b/contrib/binutils/bfd/elf32-ppc.c @@ -32,7 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define USE_RELA /* we want RELA relocations, not REL */ - static reloc_howto_type *ppc_elf_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); static void ppc_elf_info_to_howto @@ -124,11 +123,27 @@ static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_i /* The number of single-slot PLT entries (the rest use two slots). */ #define PLT_NUM_SINGLE_ENTRIES 8192 +/* Will references to this symbol always reference the symbol + in this object? */ +#define SYMBOL_REFERENCES_LOCAL(INFO, H) \ + ((! INFO->shared \ + || INFO->symbolic \ + || H->dynindx == -1 \ + || 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) + +/* Will _calls_ to this symbol always call the version in this object? */ +#define SYMBOL_CALLS_LOCAL(INFO, H) \ + ((! INFO->shared \ + || INFO->symbolic \ + || H->dynindx == -1 \ + || ELF_ST_VISIBILITY (H->other) != STV_DEFAULT) \ + && (H->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0) -static reloc_howto_type *ppc_elf_howto_table[ (int)R_PPC_max ]; +static reloc_howto_type *ppc_elf_howto_table[(int) R_PPC_max]; -static reloc_howto_type ppc_elf_howto_raw[] = -{ +static reloc_howto_type ppc_elf_howto_raw[] = { /* This reloc does nothing. */ HOWTO (R_PPC_NONE, /* type */ 0, /* rightshift */ @@ -221,7 +236,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = false), /* pcrel_offset */ /* The high order 16 bits of an address, plus 1 if the contents of - the low 16 bits, treated as a signed number, is negative. */ + the low 16 bits, treated as a signed number, is negative. */ HOWTO (R_PPC_ADDR16_HA, /* type */ 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ @@ -254,7 +269,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = /* An absolute 16 bit branch, for which bit 10 should be set to indicate that the branch is expected to be taken. The lower two - bits must be zero. */ + bits must be zero. */ HOWTO (R_PPC_ADDR14_BRTAKEN, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -286,7 +301,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = 0xfffc, /* dst_mask */ false), /* pcrel_offset */ - /* A relative 26 bit branch; the lower two bits must be zero. */ + /* A relative 26 bit branch; the lower two bits must be zero. */ HOWTO (R_PPC_REL24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -301,7 +316,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = 0x3fffffc, /* dst_mask */ true), /* pcrel_offset */ - /* A relative 16 bit branch; the lower two bits must be zero. */ + /* A relative 16 bit branch; the lower two bits must be zero. */ HOWTO (R_PPC_REL14, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -316,7 +331,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = 0xfffc, /* dst_mask */ true), /* pcrel_offset */ - /* A relative 16 bit branch. Bit 10 should be set to indicate that + /* A relative 16 bit branch. Bit 10 should be set to indicate that the branch is expected to be taken. The lower two bits must be zero. */ HOWTO (R_PPC_REL14_BRTAKEN, /* type */ @@ -333,7 +348,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = 0xfffc, /* dst_mask */ true), /* pcrel_offset */ - /* A relative 16 bit branch. Bit 10 should be set to indicate that + /* A relative 16 bit branch. Bit 10 should be set to indicate that the branch is not expected to be taken. The lower two bits must be zero. */ HOWTO (R_PPC_REL14_BRNTAKEN, /* type */ @@ -560,7 +575,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = true), /* pcrel_offset */ /* 32-bit relocation to the symbol's procedure linkage table. - FIXME: not supported. */ + FIXME: not supported. */ HOWTO (R_PPC_PLT32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -576,7 +591,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = false), /* pcrel_offset */ /* 32-bit PC relative relocation to the symbol's procedure linkage table. - FIXME: not supported. */ + FIXME: not supported. */ HOWTO (R_PPC_PLTREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -655,7 +670,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* 32-bit section relative relocation. */ + /* 32-bit section relative relocation. */ HOWTO (R_PPC_SECTOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -670,7 +685,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = 0, /* dst_mask */ true), /* pcrel_offset */ - /* 16-bit lower half section relative relocation. */ + /* 16-bit lower half section relative relocation. */ HOWTO (R_PPC_SECTOFF_LO, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ @@ -685,7 +700,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* 16-bit upper half section relative relocation. */ + /* 16-bit upper half section relative relocation. */ HOWTO (R_PPC_SECTOFF_HI, /* type */ 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ @@ -700,7 +715,7 @@ static reloc_howto_type ppc_elf_howto_raw[] = 0xffff, /* dst_mask */ false), /* pcrel_offset */ - /* 16-bit upper half adjusted section relative relocation. */ + /* 16-bit upper half adjusted section relative relocation. */ HOWTO (R_PPC_SECTOFF_HA, /* type */ 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ @@ -931,7 +946,6 @@ static reloc_howto_type ppc_elf_howto_raw[] = 0xffff, /* dst_mask */ false), /* pcrel_offset */ }; - /* Initialize the ppc_elf_howto_table, so that linear accesses can be done. */ @@ -943,11 +957,10 @@ ppc_elf_howto_init () for (i = 0; i < sizeof (ppc_elf_howto_raw) / sizeof (ppc_elf_howto_raw[0]); i++) { type = ppc_elf_howto_raw[i].type; - BFD_ASSERT (type < sizeof(ppc_elf_howto_table) / sizeof(ppc_elf_howto_table[0])); + BFD_ASSERT (type < sizeof (ppc_elf_howto_table) / sizeof (ppc_elf_howto_table[0])); ppc_elf_howto_table[type] = &ppc_elf_howto_raw[i]; } } - /* This function handles relaxing for the PPC with option --mpc860c0[=]. @@ -959,7 +972,7 @@ ppc_elf_howto_init () 3/ The branch is taken. 4/ The branch is located in the last 5 words of a page. (The EOP limit is 5 by default but may be specified as any value from 1-10.) - + Our software solution is to detect these problematic branches in a linker pass and modify them as follows: 1/ Unconditional branches - Since these are always predicted taken, @@ -975,22 +988,22 @@ ppc_elf_howto_init () static int ppc_elf_sort_rela (arg1, arg2) - const void *arg1; - const void *arg2; + const void *arg1; + const void *arg2; { const Elf_Internal_Rela **rela1 = (const Elf_Internal_Rela**) arg1; const Elf_Internal_Rela **rela2 = (const Elf_Internal_Rela**) arg2; - /* Sort by offset. */ + /* Sort by offset. */ return ((*rela1)->r_offset - (*rela2)->r_offset); } static boolean ppc_elf_relax_section (abfd, isec, link_info, again) - bfd *abfd; - asection *isec; - struct bfd_link_info *link_info; - boolean *again; + bfd *abfd; + asection *isec; + struct bfd_link_info *link_info; + boolean *again; { #define PAGESIZE 0x1000 @@ -1001,7 +1014,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again) Elf_Internal_Rela **rela_comb = NULL; int comb_curr, comb_count; - /* We never have to do this more than once per input section. */ + /* We never have to do this more than once per input section. */ *again = false; /* If needed, initialize this section's cooked size. */ @@ -1009,13 +1022,13 @@ ppc_elf_relax_section (abfd, isec, link_info, again) isec->_cooked_size = isec->_raw_size; /* We're only interested in text sections which overlap the - troublesome area at the end of a page. */ + troublesome area at the end of a page. */ if (link_info->mpc860c0 && (isec->flags & SEC_CODE) && isec->_cooked_size) { bfd_vma dot, end_page, end_section; boolean section_modified; - /* Get the section contents. */ + /* Get the section contents. */ /* Get cached copy if it exists. */ if (elf_section_data (isec)->this_hdr.contents != NULL) contents = elf_section_data (isec)->this_hdr.contents; @@ -1024,42 +1037,42 @@ ppc_elf_relax_section (abfd, isec, link_info, again) /* Go get them off disk. */ contents = (bfd_byte *) bfd_malloc (isec->_raw_size); if (contents == NULL) - goto error_return; + goto error_return; free_contents = contents; if (! bfd_get_section_contents (abfd, isec, contents, (file_ptr) 0, isec->_raw_size)) - goto error_return; + goto error_return; } comb_curr = 0; comb_count = 0; if (isec->reloc_count) - { + { unsigned n; /* Get a copy of the native relocations. */ internal_relocs = _bfd_elf32_link_read_relocs ( - abfd, isec, (PTR) NULL, (Elf_Internal_Rela *) NULL, + abfd, isec, (PTR) NULL, (Elf_Internal_Rela *) NULL, link_info->keep_memory); if (internal_relocs == NULL) goto error_return; if (! link_info->keep_memory) free_relocs = internal_relocs; - - /* Setup a faster access method for the reloc info we need. */ + + /* Setup a faster access method for the reloc info we need. */ rela_comb = (Elf_Internal_Rela**) - bfd_malloc (isec->reloc_count*sizeof(Elf_Internal_Rela*)); + bfd_malloc (isec->reloc_count*sizeof (Elf_Internal_Rela*)); if (rela_comb == NULL) goto error_return; - for (n=0; nreloc_count; ++n) + for (n = 0; n < isec->reloc_count; ++n) { long r_type; - + r_type = ELF32_R_TYPE (internal_relocs[n].r_info); - if (r_type < 0 || r_type >= (int)R_PPC_max) + if (r_type < 0 || r_type >= (int) R_PPC_max) goto error_return; - + /* Prologue constants are sometimes present in the ".text" sections and they can be identified by their associated relocation. We don't want to process those words and some others which @@ -1067,37 +1080,37 @@ ppc_elf_relax_section (abfd, isec, link_info, again) conditional branches will have a relocation so we will only ignore words that 1) have a reloc, and 2) the reloc is not applicable to a conditional branch. - The array rela_comb is built here for use in the EOP scan loop. */ + The array rela_comb is built here for use in the EOP scan loop. */ switch (r_type) { case R_PPC_ADDR14_BRNTAKEN: /* absolute, predicted not taken */ - case R_PPC_REL14: /* relative cond. br. */ + case R_PPC_REL14: /* relative cond. br. */ case R_PPC_REL14_BRNTAKEN: /* rel. cond. br., predicted not taken */ - /* We should check the instruction. */ + /* We should check the instruction. */ break; default: - /* The word is not a conditional branch - ignore it. */ + /* The word is not a conditional branch - ignore it. */ rela_comb[comb_count++] = &internal_relocs[n]; break; } } if (comb_count > 1) - qsort (rela_comb, (size_t) comb_count, sizeof (int), ppc_elf_sort_rela); - } + qsort (rela_comb, (size_t) comb_count, sizeof (int), ppc_elf_sort_rela); + } - /* Enumerate each EOP region that overlaps this section. */ + /* Enumerate each EOP region that overlaps this section. */ end_section = isec->vma + isec->_cooked_size; dot = end_page = (isec->vma | (PAGESIZE - 1)) + 1; dot -= link_info->mpc860c0; section_modified = false; if (dot < isec->vma) /* Increment the start position if this section */ - dot = isec->vma; /* begins in the middle of its first EOP region. */ + dot = isec->vma; /* begins in the middle of its first EOP region. */ for (; dot < end_section; dot += PAGESIZE, end_page += PAGESIZE) { - /* Check each word in this EOP region. */ + /* Check each word in this EOP region. */ for (; dot < end_page; dot += 4) { bfd_vma isec_offset; @@ -1105,7 +1118,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again) boolean skip, modified; /* Don't process this word if there is a relocation for it and - the relocation indicates the word is not a conditional branch. */ + the relocation indicates the word is not a conditional branch. */ skip = false; isec_offset = dot - isec->vma; for (; comb_currr_info) < (unsigned int) R_PPC_max); @@ -1354,7 +1367,7 @@ ppc_elf_addr16_ha_reloc (abfd, reloc_entry, symbol, data, input_section, return bfd_reloc_continue; } -/* Function to set whether a module needs the -mrelocatable bit set. */ +/* Function to set whether a module needs the -mrelocatable bit set. */ static boolean ppc_elf_set_private_flags (abfd, flags) @@ -1399,21 +1412,8 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd) boolean error; /* Check if we have the same endianess */ - if (ibfd->xvec->byteorder != obfd->xvec->byteorder - && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN) - { - const char *msg; - - if (bfd_big_endian (ibfd)) - msg = _("%s: compiled for a big endian system and target is little endian"); - else - msg = _("%s: compiled for a little endian system and target is big endian"); - - (*_bfd_error_handler) (msg, bfd_get_filename (ibfd)); - - bfd_set_error (bfd_error_wrong_format); - return false; - } + if (_bfd_generic_verify_endian_match (ibfd, obfd) == false) + return false; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) @@ -1475,7 +1475,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd) error = true; (*_bfd_error_handler) (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"), - bfd_get_filename (ibfd), (long)new_flags, (long)old_flags); + bfd_get_filename (ibfd), (long) new_flags, (long) old_flags); } if (error) @@ -1487,7 +1487,6 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd) return true; } - /* Handle a PowerPC specific section when reading an object file. This is called when elfcode.h finds a section with an unknown type. */ @@ -1515,7 +1514,6 @@ ppc_elf_section_from_shdr (abfd, hdr, name) bfd_set_section_flags (abfd, newsect, flags); return true; } - /* Set up any other section flags and such that may be necessary. */ @@ -1533,7 +1531,6 @@ ppc_elf_fake_sections (abfd, shdr, asect) return true; } - /* Create a special linker section */ static elf_linker_section_t * @@ -1577,10 +1574,10 @@ ppc_elf_create_linker_section (abfd, info, which) default: (*_bfd_error_handler) (_("%s: Unknown special linker type %d"), bfd_get_filename (abfd), - (int)which); + (int) which); bfd_set_error (bfd_error_bad_value); - return (elf_linker_section_t *)0; + return (elf_linker_section_t *) 0; case LINKER_SECTION_SDATA: /* .sdata/.sbss section */ defaults.name = ".sdata"; @@ -1605,10 +1602,9 @@ ppc_elf_create_linker_section (abfd, info, which) return lsect; } - -/* If we have a non-zero sized .sbss2 or .PPC.EMB.sbss0 sections, we need to bump up - the number of section headers. */ +/* If we have a non-zero sized .sbss2 or .PPC.EMB.sbss0 sections, we + need to bump up the number of section headers. */ static int ppc_elf_additional_program_headers (abfd) @@ -1634,7 +1630,7 @@ ppc_elf_additional_program_headers (abfd) return ret; } -/* Modify the segment map if needed */ +/* Modify the segment map if needed. */ static boolean ppc_elf_modify_segment_map (abfd) @@ -1655,7 +1651,7 @@ ppc_elf_create_dynamic_sections (abfd, info) register asection *s; flagword flags; - if (!_bfd_elf_create_dynamic_sections(abfd, info)) + if (!_bfd_elf_create_dynamic_sections (abfd, info)) return false; flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY @@ -1708,7 +1704,6 @@ ppc_elf_adjust_dynamic_symbol (info, h) && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0))); - /* If this is a function, put it in the procedure linkage table. We will fill in the contents of the procedure linkage table later, when we know the address of the .got section. */ @@ -1716,9 +1711,7 @@ ppc_elf_adjust_dynamic_symbol (info, h) || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) { if (! elf_hash_table (info)->dynamic_sections_created - || ((!info->shared || info->symbolic || h->dynindx == -1) - && (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) != 0) + || SYMBOL_CALLS_LOCAL (info, h) || (info->shared && h->plt.refcount <= 0)) { /* A PLT entry is not required/allowed when: @@ -1726,9 +1719,8 @@ ppc_elf_adjust_dynamic_symbol (info, h) 1. We are not using ld.so; because then the PLT entry can't be set up, so we can't use one. - 2. We know for certain that a symbol is defined in - this object, because this object is the application, - is linked with -Bsymbolic, or because the symbol is local. + 2. We know for certain that a call to this symbol + will go to this object. 3. GC has rendered the entry unused. Note, however, that in an executable all references to the @@ -1877,7 +1869,6 @@ ppc_elf_adjust_dynamic_symbol (info, h) return true; } - /* Set the sizes of the dynamic sections. */ @@ -1919,10 +1910,10 @@ ppc_elf_size_dynamic_sections (output_bfd, info) stripped from the output file below. */ static char *rela_sections[] = { ".rela.got", ".rela.sdata", ".rela.sdata2", ".rela.sbss", - (char *)0 }; + (char *) 0 }; char **p; - for (p = rela_sections; *p != (char *)0; p++) + for (p = rela_sections; *p != (char *) 0; p++) { s = bfd_get_section_by_name (dynobj, *p); if (s != NULL) @@ -1984,7 +1975,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info) asection *target; const char *outname; - /* Remember whether there are any relocation sections. */ + /* Remember whether there are any relocation sections. */ relocs = true; /* If this relocation section applies to a read only @@ -2057,12 +2048,12 @@ ppc_elf_size_dynamic_sections (output_bfd, info) { if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0)) return false; + info->flags |= DF_TEXTREL; } } return true; } - /* Look through the relocs for a section during the first phase, and allocate space in the global offset table or procedure linkage @@ -2106,7 +2097,6 @@ ppc_elf_check_relocs (abfd, info, sec, relocs) return false; } - if ((sdata2 = elf_linker_section (abfd, LINKER_SECTION_SDATA2)) == NULL) { sdata2 = ppc_elf_create_linker_section (abfd, info, LINKER_SECTION_SDATA2); @@ -2119,7 +2109,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs) local_got_refcounts = elf_local_got_refcounts (abfd); sym_hashes = elf_sym_hashes (abfd); - sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf32_External_Sym); + sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof (Elf32_External_Sym); if (!elf_bad_symtab (abfd)) sym_hashes_end -= symtab_hdr->sh_info; @@ -2250,7 +2240,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs) ((*_bfd_error_handler) (_("%s: relocation %s cannot be used when making a shared object"), bfd_get_filename (abfd), "R_PPC_EMB_SDAI16")); - return false; + return false; } if (srelgot == NULL && (h != NULL || info->shared)) @@ -2319,7 +2309,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs) ((*_bfd_error_handler) (_("%s: relocation %s cannot be used when making a shared object"), bfd_get_filename (abfd), - ppc_elf_howto_table[(int)ELF32_R_TYPE (rel->r_info)]->name)); + ppc_elf_howto_table[(int) ELF32_R_TYPE (rel->r_info)]->name)); return false; } break; @@ -2397,7 +2387,8 @@ ppc_elf_check_relocs (abfd, info, sec, relocs) case R_PPC_REL14_BRNTAKEN: case R_PPC_REL32: if (h == NULL - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0 + || SYMBOL_REFERENCES_LOCAL (info, h)) break; /* fall through */ @@ -2540,7 +2531,7 @@ ppc_elf_gc_sweep_hook (abfd, info, sec, relocs) if (h->got.refcount > 0) h->got.refcount--; } - else + else if (local_got_refcounts != NULL) { if (local_got_refcounts[r_symndx] > 0) local_got_refcounts[r_symndx]--; @@ -2571,7 +2562,6 @@ ppc_elf_gc_sweep_hook (abfd, info, sec, relocs) /* Hook called by the linker routine which adds symbols from an object file. We use it to put .comm items in .sbss, and not .bss. */ -/*ARGSUSED*/ static boolean ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) bfd *abfd; @@ -2623,7 +2613,6 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) return true; } - /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ @@ -2691,7 +2680,7 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym) 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) + if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK) == 0) sym->st_value = 0; } @@ -2719,8 +2708,7 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym) the global offset table will already have been initialized in the relocate_section function. */ if (info->shared - && (info->symbolic || h->dynindx == -1) - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)) + && SYMBOL_REFERENCES_LOCAL (info, h)) { rela.r_info = ELF32_R_INFO (0, R_PPC_RELATIVE); rela.r_addend = (h->root.u.def.value @@ -2729,7 +2717,7 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym) } else { - BFD_ASSERT((h->got.offset & 1) == 0); + BFD_ASSERT ((h->got.offset & 1) == 0); bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); rela.r_info = ELF32_R_INFO (h->dynindx, R_PPC_GLOB_DAT); rela.r_addend = 0; @@ -2785,7 +2773,6 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym) return true; } - /* Finish up the dynamic sections. */ @@ -2873,7 +2860,6 @@ ppc_elf_finish_dynamic_sections (output_bfd, info) return true; } - /* The RELOCATE_SECTION function is called by the ELF backend linker to handle the relocations for a section. @@ -2934,11 +2920,12 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, %ld relocations%s\n", bfd_get_filename (input_bfd), bfd_section_name(input_bfd, input_section), - (long)input_section->reloc_count, + (long) input_section->reloc_count, (info->relocateable) ? " (relocatable)" : ""); #endif - if (!ppc_elf_howto_table[ R_PPC_ADDR32 ]) /* Initialize howto table if needed */ + if (!ppc_elf_howto_table[R_PPC_ADDR32]) + /* Initialize howto table if needed. */ ppc_elf_howto_init (); local_got_offsets = elf_local_got_offsets (input_bfd); @@ -2956,27 +2943,29 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, bfd_vma offset = rel->r_offset; bfd_vma addend = rel->r_addend; bfd_reloc_status_type r = bfd_reloc_other; - Elf_Internal_Sym *sym = (Elf_Internal_Sym *)0; - asection *sec = (asection *)0; - struct elf_link_hash_entry *h = (struct elf_link_hash_entry *)0; - const char *sym_name = (const char *)0; + Elf_Internal_Sym *sym = (Elf_Internal_Sym *) 0; + asection *sec = (asection *) 0; + struct elf_link_hash_entry *h = (struct elf_link_hash_entry *) 0; + const char *sym_name = (const char *) 0; reloc_howto_type *howto; unsigned long r_symndx; bfd_vma relocation; + int will_become_local; /* Unknown relocation handling */ - if ((unsigned)r_type >= (unsigned)R_PPC_max || !ppc_elf_howto_table[(int)r_type]) + if ((unsigned) r_type >= (unsigned) R_PPC_max + || !ppc_elf_howto_table[(int) r_type]) { (*_bfd_error_handler) (_("%s: unknown relocation type %d"), bfd_get_filename (input_bfd), - (int)r_type); + (int) r_type); bfd_set_error (bfd_error_bad_value); ret = false; continue; } - howto = ppc_elf_howto_table[(int)r_type]; + howto = ppc_elf_howto_table[(int) r_type]; r_symndx = ELF32_R_SYM (rel->r_info); if (info->relocateable) @@ -2988,7 +2977,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; - if ((unsigned)ELF_ST_TYPE (sym->st_info) == STT_SECTION) + if ((unsigned) ELF_ST_TYPE (sym->st_info) == STT_SECTION) { sec = local_sections[r_symndx]; addend = rel->r_addend += sec->output_offset + sym->st_value; @@ -2998,10 +2987,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, #ifdef DEBUG fprintf (stderr, "\ttype = %s (%d), symbol index = %ld, offset = %ld, addend = %ld\n", howto->name, - (int)r_type, + (int) r_type, r_symndx, - (long)offset, - (long)addend); + (long) offset, + (long) addend); #endif continue; } @@ -3016,6 +3005,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocation = (sec->output_section->vma + sec->output_offset + sym->st_value); + /* Relocs to local symbols are always resolved. */ + will_become_local = 1; } else { @@ -3024,11 +3015,17 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; sym_name = h->root.root.string; + + /* Can this relocation be resolved immediately? */ + will_become_local = SYMBOL_REFERENCES_LOCAL (info, h); + if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { sec = h->root.u.def.section; - if ((r_type == R_PPC_PLT32 + if (((r_type == R_PPC_PLT32 + || r_type == R_PPC_PLTREL24) + && splt != NULL && h->plt.offset != (bfd_vma) -1) || (r_type == R_PPC_LOCAL24PC && sec->output_section == NULL) @@ -3037,20 +3034,17 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, || r_type == R_PPC_GOT16_HI || r_type == R_PPC_GOT16_HA) && elf_hash_table (info)->dynamic_sections_created - && (! info->shared - || (! info->symbolic && h->dynindx != -1) - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0)) + && (! info->shared || ! will_become_local)) || (info->shared - && ((! info->symbolic && h->dynindx != -1) - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0) + && ! will_become_local && ((input_section->flags & SEC_ALLOC) != 0 /* Testing SEC_DEBUGGING here may be wrong. It's here to avoid a crash when generating a shared library with DWARF debugging information. */ - || (input_section->flags & SEC_DEBUGGING) != 0) + || ((input_section->flags & SEC_DEBUGGING) != 0 + && (h->elf_link_hash_flags + & ELF_LINK_HASH_DEF_DYNAMIC) != 0)) && (r_type == R_PPC_ADDR32 || r_type == R_PPC_ADDR24 || r_type == R_PPC_ADDR16 @@ -3060,7 +3054,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, || r_type == R_PPC_ADDR14 || r_type == R_PPC_ADDR14_BRTAKEN || r_type == R_PPC_ADDR14_BRNTAKEN - || r_type == R_PPC_PLTREL24 || r_type == R_PPC_COPY || r_type == R_PPC_GLOB_DAT || r_type == R_PPC_JMP_SLOT @@ -3094,13 +3087,13 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocation = 0; } else if (sec->output_section == NULL) - { + { (*_bfd_error_handler) (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"), bfd_get_filename (input_bfd), h->root.root.string, bfd_get_section_name (input_bfd, input_section)); relocation = 0; - } + } else relocation = (h->root.u.def.value + sec->output_section->vma @@ -3108,13 +3101,12 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, } else if (h->root.type == bfd_link_hash_undefweak) relocation = 0; - else if (info->shared && !info->symbolic - && !info->no_undefined + else if (info->shared && !info->symbolic && !info->no_undefined && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) relocation = 0; else { - if (! (*info->callbacks->undefined_symbol)(info, + if (! (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, @@ -3127,19 +3119,19 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, } } - switch ((int)r_type) + switch ((int) r_type) { default: (*_bfd_error_handler) (_("%s: unknown relocation type %d for symbol %s"), bfd_get_filename (input_bfd), - (int)r_type, sym_name); + (int) r_type, sym_name); bfd_set_error (bfd_error_bad_value); ret = false; continue; /* Relocations that need no special processing. */ - case (int)R_PPC_LOCAL24PC: + case (int) R_PPC_LOCAL24PC: /* It makes no sense to point a local relocation at a symbol not in this object. */ if (h != NULL @@ -3160,28 +3152,29 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, /* Relocations that may need to be propagated if this is a shared object. */ - case (int)R_PPC_REL24: - case (int)R_PPC_REL32: - case (int)R_PPC_REL14: + case (int) R_PPC_REL24: + case (int) R_PPC_REL32: + case (int) R_PPC_REL14: /* If these relocations are not to a named symbol, they can be handled right here, no need to bother the dynamic linker. */ if (h == NULL - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) + || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0 + || SYMBOL_REFERENCES_LOCAL (info, h)) break; /* fall through */ /* Relocations that always need to be propagated if this is a shared object. */ - case (int)R_PPC_NONE: - case (int)R_PPC_ADDR32: - case (int)R_PPC_ADDR24: - case (int)R_PPC_ADDR16: - case (int)R_PPC_ADDR16_LO: - case (int)R_PPC_ADDR16_HI: - case (int)R_PPC_ADDR16_HA: - case (int)R_PPC_ADDR14: - case (int)R_PPC_UADDR32: - case (int)R_PPC_UADDR16: + case (int) R_PPC_NONE: + case (int) R_PPC_ADDR32: + case (int) R_PPC_ADDR24: + case (int) R_PPC_ADDR16: + case (int) R_PPC_ADDR16_LO: + case (int) R_PPC_ADDR16_HI: + case (int) R_PPC_ADDR16_HA: + case (int) R_PPC_ADDR14: + case (int) R_PPC_UADDR32: + case (int) R_PPC_UADDR16: if (info->shared) { Elf_Internal_Rela outrel; @@ -3241,12 +3234,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, memset (&outrel, 0, sizeof outrel); /* h->dynindx may be -1 if this symbol was marked to become local. */ - else if (h != NULL - && ((! info->symbolic && h->dynindx != -1) - || (h->elf_link_hash_flags - & ELF_LINK_HASH_DEF_REGULAR) == 0)) + else if (! will_become_local) { - BFD_ASSERT (h->dynindx != -1); outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); outrel.r_addend = rel->r_addend; } @@ -3283,11 +3272,11 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, osec = sec->output_section; indx = elf_section_data (osec)->dynindx; - BFD_ASSERT(indx > 0); + BFD_ASSERT (indx > 0); #ifdef DEBUG if (indx <= 0) { - printf("indx=%d section=%s flags=%08x name=%s\n", + printf ("indx=%d section=%s flags=%08x name=%s\n", indx, osec->name, osec->flags, h->root.root.string); } @@ -3328,8 +3317,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, break; /* branch taken prediction relocations */ - case (int)R_PPC_ADDR14_BRTAKEN: - case (int)R_PPC_REL14_BRTAKEN: + case (int) R_PPC_ADDR14_BRTAKEN: + case (int) R_PPC_REL14_BRTAKEN: insn = bfd_get_32 (output_bfd, contents + offset); if ((relocation - offset) & 0x8000) insn &= ~BRANCH_PREDICT_BIT; @@ -3339,8 +3328,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, break; /* branch not taken predicition relocations */ - case (int)R_PPC_ADDR14_BRNTAKEN: - case (int)R_PPC_REL14_BRNTAKEN: + case (int) R_PPC_ADDR14_BRNTAKEN: + case (int) R_PPC_REL14_BRNTAKEN: insn = bfd_get_32 (output_bfd, contents + offset); if ((relocation - offset) & 0x8000) insn |= BRANCH_PREDICT_BIT; @@ -3350,10 +3339,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, break; /* GOT16 relocations */ - case (int)R_PPC_GOT16: - case (int)R_PPC_GOT16_LO: - case (int)R_PPC_GOT16_HI: - case (int)R_PPC_GOT16_HA: + case (int) R_PPC_GOT16: + case (int) R_PPC_GOT16_LO: + case (int) R_PPC_GOT16_HI: + case (int) R_PPC_GOT16_HA: /* Relocation is to the entry for this symbol in the global offset table. */ BFD_ASSERT (sgot != NULL); @@ -3367,8 +3356,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, if (! elf_hash_table (info)->dynamic_sections_created || (info->shared - && (info->symbolic || h->dynindx == -1) - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))) + && SYMBOL_REFERENCES_LOCAL (info, h))) { /* This is actually a static link, or it is a -Bsymbolic link and the symbol is defined @@ -3441,7 +3429,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, break; /* Indirect .sdata relocation */ - case (int)R_PPC_EMB_SDAI16: + case (int) R_PPC_EMB_SDAI16: BFD_ASSERT (sdata != NULL); relocation = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd, info, sdata, h, relocation, rel, @@ -3449,7 +3437,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, break; /* Indirect .sdata2 relocation */ - case (int)R_PPC_EMB_SDA2I16: + case (int) R_PPC_EMB_SDA2I16: BFD_ASSERT (sdata2 != NULL); relocation = bfd_elf32_finish_pointer_linker_section (output_bfd, input_bfd, info, sdata2, h, relocation, rel, @@ -3460,8 +3448,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, section, not the actual VMA. This is appropriate when generating an embedded ELF object, for which the .got section acts like the AIX .toc section. */ - case (int)R_PPC_TOC16: /* phony GOT16 relocations */ - BFD_ASSERT (sec != (asection *)0); + case (int) R_PPC_TOC16: /* phony GOT16 relocations */ + BFD_ASSERT (sec != (asection *) 0); BFD_ASSERT (bfd_is_und_section (sec) || strcmp (bfd_get_section_name (abfd, sec), ".got") == 0 || strcmp (bfd_get_section_name (abfd, sec), ".cgot") == 0) @@ -3469,7 +3457,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, addend -= sec->output_section->vma + sec->output_offset + 0x8000; break; - case (int)R_PPC_PLTREL24: + case (int) R_PPC_PLTREL24: /* Relocation is to the entry for this symbol in the procedure linkage table. */ BFD_ASSERT (h != NULL); @@ -3486,14 +3474,14 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocation = (splt->output_section->vma + splt->output_offset + h->plt.offset); - break; + break; /* relocate against _SDA_BASE_ */ - case (int)R_PPC_SDAREL16: + case (int) R_PPC_SDAREL16: { const char *name; - BFD_ASSERT (sec != (asection *)0); + BFD_ASSERT (sec != (asection *) 0); name = bfd_get_section_name (abfd, sec->output_section); if (strcmp (name, ".sdata") != 0 && strcmp (name, ".sbss") != 0) @@ -3501,7 +3489,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"), bfd_get_filename (input_bfd), sym_name, - ppc_elf_howto_table[ (int)r_type ]->name, + ppc_elf_howto_table[(int) r_type]->name, name); } addend -= (sdata->sym_hash->root.u.def.value @@ -3510,22 +3498,21 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, } break; - /* relocate against _SDA2_BASE_ */ - case (int)R_PPC_EMB_SDA2REL: + case (int) R_PPC_EMB_SDA2REL: { const char *name; - BFD_ASSERT (sec != (asection *)0); + BFD_ASSERT (sec != (asection *) 0); name = bfd_get_section_name (abfd, sec->output_section); if (strcmp (name, ".sdata2") != 0 && strcmp (name, ".sbss2") != 0) { (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"), bfd_get_filename (input_bfd), sym_name, - ppc_elf_howto_table[ (int)r_type ]->name, + ppc_elf_howto_table[(int) r_type]->name, name); - + bfd_set_error (bfd_error_bad_value); ret = false; continue; @@ -3536,15 +3523,14 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, } break; - /* relocate against either _SDA_BASE_, _SDA2_BASE_, or 0 */ - case (int)R_PPC_EMB_SDA21: - case (int)R_PPC_EMB_RELSDA: + case (int) R_PPC_EMB_SDA21: + case (int) R_PPC_EMB_RELSDA: { const char *name; int reg; - BFD_ASSERT (sec != (asection *)0); + BFD_ASSERT (sec != (asection *) 0); name = bfd_get_section_name (abfd, sec->output_section); if (strcmp (name, ".sdata") == 0 || strcmp (name, ".sbss") == 0) { @@ -3554,7 +3540,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, + sdata->sym_hash->root.u.def.section->output_offset); } - else if (strcmp (name, ".sdata2") == 0 || strcmp (name, ".sbss2") == 0) + else if (strcmp (name, ".sdata2") == 0 + || strcmp (name, ".sbss2") == 0) { reg = 2; addend -= (sdata2->sym_hash->root.u.def.value @@ -3562,7 +3549,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, + sdata2->sym_hash->root.u.def.section->output_offset); } - else if (strcmp (name, ".PPC.EMB.sdata0") == 0 || strcmp (name, ".PPC.EMB.sbss0") == 0) + else if (strcmp (name, ".PPC.EMB.sdata0") == 0 + || strcmp (name, ".PPC.EMB.sbss0") == 0) { reg = 0; } @@ -3572,7 +3560,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"), bfd_get_filename (input_bfd), sym_name, - ppc_elf_howto_table[ (int)r_type ]->name, + ppc_elf_howto_table[(int) r_type]->name, name); bfd_set_error (bfd_error_bad_value); @@ -3590,75 +3578,74 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, break; /* Relocate against the beginning of the section */ - case (int)R_PPC_SECTOFF: - case (int)R_PPC_SECTOFF_LO: - case (int)R_PPC_SECTOFF_HI: - BFD_ASSERT (sec != (asection *)0); + case (int) R_PPC_SECTOFF: + case (int) R_PPC_SECTOFF_LO: + case (int) R_PPC_SECTOFF_HI: + BFD_ASSERT (sec != (asection *) 0); addend -= sec->output_section->vma; break; - case (int)R_PPC_SECTOFF_HA: - BFD_ASSERT (sec != (asection *)0); + case (int) R_PPC_SECTOFF_HA: + BFD_ASSERT (sec != (asection *) 0); addend -= sec->output_section->vma; addend += ((relocation + addend) & 0x8000) << 1; break; /* Negative relocations */ - case (int)R_PPC_EMB_NADDR32: - case (int)R_PPC_EMB_NADDR16: - case (int)R_PPC_EMB_NADDR16_LO: - case (int)R_PPC_EMB_NADDR16_HI: - addend -= 2*relocation; + case (int) R_PPC_EMB_NADDR32: + case (int) R_PPC_EMB_NADDR16: + case (int) R_PPC_EMB_NADDR16_LO: + case (int) R_PPC_EMB_NADDR16_HI: + addend -= 2 * relocation; break; - case (int)R_PPC_EMB_NADDR16_HA: - addend -= 2*relocation; + case (int) R_PPC_EMB_NADDR16_HA: + addend -= 2 * relocation; addend += ((relocation + addend) & 0x8000) << 1; break; /* NOP relocation that prevents garbage collecting linkers from omitting a reference. */ - case (int)R_PPC_EMB_MRKREF: + case (int) R_PPC_EMB_MRKREF: continue; - case (int)R_PPC_COPY: - case (int)R_PPC_GLOB_DAT: - case (int)R_PPC_JMP_SLOT: - case (int)R_PPC_RELATIVE: - case (int)R_PPC_PLT32: - case (int)R_PPC_PLTREL32: - case (int)R_PPC_PLT16_LO: - case (int)R_PPC_PLT16_HI: - case (int)R_PPC_PLT16_HA: - case (int)R_PPC_EMB_RELSEC16: - case (int)R_PPC_EMB_RELST_LO: - case (int)R_PPC_EMB_RELST_HI: - case (int)R_PPC_EMB_RELST_HA: - case (int)R_PPC_EMB_BIT_FLD: + case (int) R_PPC_COPY: + case (int) R_PPC_GLOB_DAT: + case (int) R_PPC_JMP_SLOT: + case (int) R_PPC_RELATIVE: + case (int) R_PPC_PLT32: + case (int) R_PPC_PLTREL32: + case (int) R_PPC_PLT16_LO: + case (int) R_PPC_PLT16_HI: + case (int) R_PPC_PLT16_HA: + case (int) R_PPC_EMB_RELSEC16: + case (int) R_PPC_EMB_RELST_LO: + case (int) R_PPC_EMB_RELST_HI: + case (int) R_PPC_EMB_RELST_HA: + case (int) R_PPC_EMB_BIT_FLD: (*_bfd_error_handler) (_("%s: Relocation %s is not yet supported for symbol %s."), bfd_get_filename (input_bfd), - ppc_elf_howto_table[ (int)r_type ]->name, + ppc_elf_howto_table[(int) r_type]->name, sym_name); bfd_set_error (bfd_error_invalid_operation); ret = false; continue; - case (int)R_PPC_GNU_VTINHERIT: - case (int)R_PPC_GNU_VTENTRY: + case (int) R_PPC_GNU_VTINHERIT: + case (int) R_PPC_GNU_VTENTRY: /* These are no-ops in the end. */ continue; } - #ifdef DEBUG fprintf (stderr, "\ttype = %s (%d), name = %s, symbol index = %ld, offset = %ld, addend = %ld\n", howto->name, - (int)r_type, + (int) r_type, sym_name, r_symndx, - (long)offset, - (long)addend); + (long) offset, + (long) addend); #endif r = _bfd_final_link_relocate (howto, @@ -3702,7 +3689,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, name = bfd_section_name (input_bfd, sec); } - if (! (*info->callbacks->reloc_overflow)(info, + if (! (*info->callbacks->reloc_overflow) (info, name, howto->name, (bfd_vma) 0, @@ -3721,7 +3708,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section, return ret; } - #define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec #define TARGET_LITTLE_NAME "elf32-powerpcle" diff --git a/contrib/binutils/bfd/elf32-sparc.c b/contrib/binutils/bfd/elf32-sparc.c index 1c8d0ba..4e9c6c2 100644 --- a/contrib/binutils/bfd/elf32-sparc.c +++ b/contrib/binutils/bfd/elf32-sparc.c @@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "libbfd.h" #include "elf-bfd.h" #include "elf/sparc.h" +#include "opcode/sparc.h" static reloc_howto_type *elf32_sparc_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); @@ -36,6 +37,8 @@ static boolean elf32_sparc_adjust_dynamic_symbol PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *)); static boolean elf32_sparc_size_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *)); +static boolean elf32_sparc_relax_section + PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *)); static boolean elf32_sparc_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); @@ -126,7 +129,6 @@ static reloc_howto_type elf32_sparc_vtinherit_howto = static reloc_howto_type elf32_sparc_vtentry_howto = HOWTO (R_SPARC_GNU_VTENTRY, 0,2,0,false,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_SPARC_GNU_VTENTRY", false,0,0, false); - struct elf_reloc_map { bfd_reloc_code_real_type bfd_reloc_val; unsigned char elf_reloc_val; @@ -185,7 +187,7 @@ elf32_sparc_reloc_type_lookup (abfd, code) bfd_reloc_code_real_type code; { unsigned int i; - + switch (code) { case BFD_RELOC_VTABLE_INHERIT: @@ -1016,7 +1018,12 @@ elf32_sparc_size_dynamic_sections (output_bfd, info) } /* Allocate memory for the section contents. */ - s->contents = (bfd_byte *) bfd_alloc (dynobj, s->_raw_size); + /* FIXME: This should be a call to bfd_alloc not bfd_zalloc. + Unused entries should be reclaimed before the section's contents + are written out, but at the moment this does not happen. Thus in + order to prevent writing out garbage, we initialise the section's + contents to zero. */ + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->_raw_size); if (s->contents == NULL && s->_raw_size != 0) return false; } @@ -1053,12 +1060,28 @@ elf32_sparc_size_dynamic_sections (output_bfd, info) { if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0)) return false; + info->flags |= DF_TEXTREL; } } return true; } +#define SET_SEC_DO_RELAX(section) do { elf_section_data(section)->tdata = (void *)1; } while (0) +#define SEC_DO_RELAX(section) (elf_section_data(section)->tdata == (void *)1) + +static boolean +elf32_sparc_relax_section (abfd, section, link_info, again) + bfd *abfd ATTRIBUTE_UNUSED; + asection *section ATTRIBUTE_UNUSED; + struct bfd_link_info *link_info ATTRIBUTE_UNUSED; + boolean *again; +{ + *again = false; + SET_SEC_DO_RELAX (section); + return true; +} + /* Relocate a SPARC ELF section. */ static boolean @@ -1113,7 +1136,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section, r_type = ELF32_R_TYPE (rel->r_info); - if (r_type == R_SPARC_GNU_VTINHERIT + if (r_type == R_SPARC_GNU_VTINHERIT || r_type == R_SPARC_GNU_VTENTRY) continue; @@ -1518,6 +1541,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section, break; } + r = bfd_reloc_continue; if (r_type == R_SPARC_WDISP16) { bfd_vma x; @@ -1549,12 +1573,101 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section, bfd_putl32 (/*input_bfd,*/ x, contents + rel->r_offset); r = bfd_reloc_ok; } - else + else if ((r_type == R_SPARC_WDISP30 || r_type == R_SPARC_WPLT30) + && SEC_DO_RELAX (input_section) + && rel->r_offset + 4 < input_section->_raw_size) + { +#define G0 0 +#define O7 15 +#define XCC (2 << 20) +#define COND(x) (((x)&0xf)<<25) +#define CONDA COND(0x8) +#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC) +#define INSN_BA (F2(0,2) | CONDA) +#define INSN_OR F3(2, 0x2, 0) +#define INSN_NOP F2(0,4) + + bfd_vma x, y; + + /* If the instruction is a call with either: + restore + arithmetic instruction with rd == %o7 + where rs1 != %o7 and rs2 if it is register != %o7 + then we can optimize if the call destination is near + by changing the call into a branch always. */ + x = bfd_get_32 (input_bfd, contents + rel->r_offset); + y = bfd_get_32 (input_bfd, contents + rel->r_offset + 4); + if ((x & OP(~0)) == OP(1) && (y & OP(~0)) == OP(2)) + { + if (((y & OP3(~0)) == OP3(0x3d) /* restore */ + || ((y & OP3(0x28)) == 0 /* arithmetic */ + && (y & RD(~0)) == RD(O7))) + && (y & RS1(~0)) != RS1(O7) + && ((y & F3I(~0)) + || (y & RS2(~0)) != RS2(O7))) + { + bfd_vma reloc; + + reloc = relocation + rel->r_addend - rel->r_offset; + reloc -= (input_section->output_section->vma + + input_section->output_offset); + + /* Ensure the reloc fits into simm22. */ + if ((reloc & 3) == 0 + && ((reloc & ~(bfd_vma)0x7fffff) == 0 + || ((reloc | 0x7fffff) == ~(bfd_vma)0))) + { + reloc >>= 2; + + /* Check whether it fits into simm19 on v9. */ + if (((reloc & 0x3c0000) == 0 + || (reloc & 0x3c0000) == 0x3c0000) + && (elf_elfheader (output_bfd)->e_flags & EF_SPARC_32PLUS)) + x = INSN_BPA | (reloc & 0x7ffff); /* ba,pt %xcc */ + else + x = INSN_BA | (reloc & 0x3fffff); /* ba */ + bfd_put_32 (input_bfd, x, contents + rel->r_offset); + r = bfd_reloc_ok; + if (rel->r_offset >= 4 + && (y & (0xffffffff ^ RS1(~0))) + == (INSN_OR | RD(O7) | RS2(G0))) + { + bfd_vma z; + unsigned int reg; + + z = bfd_get_32 (input_bfd, + contents + rel->r_offset - 4); + if ((z & (0xffffffff ^ RD(~0))) + != (INSN_OR | RS1(O7) | RS2(G0))) + break; + + /* The sequence was + or %o7, %g0, %rN + call foo + or %rN, %g0, %o7 + + If call foo was replaced with ba, replace + or %rN, %g0, %o7 with nop. */ + + reg = (y & RS1(~0)) >> 14; + if (reg != ((z & RD(~0)) >> 25) + || reg == G0 || reg == O7) + break; + + bfd_put_32 (input_bfd, INSN_NOP, + contents + rel->r_offset + 4); + } + + } + } + } + } + + if (r == bfd_reloc_continue) r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, relocation, rel->r_addend); - if (r != bfd_reloc_ok) { switch (r) @@ -1842,33 +1955,6 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd) error = false; -#if 0 - /* ??? The native linker doesn't do this so we can't (otherwise gcc would - have to know which linker is being used). Instead, the native linker - bumps up the architecture level when it has to. However, I still think - warnings like these are good, so it would be nice to have them turned on - by some option. */ - - /* If the output machine is normal sparc, we can't allow v9 input files. */ - if (bfd_get_mach (obfd) == bfd_mach_sparc - && (bfd_get_mach (ibfd) == bfd_mach_sparc_v8plus - || bfd_get_mach (ibfd) == bfd_mach_sparc_v8plusa)) - { - error = true; - (*_bfd_error_handler) - (_("%s: compiled for a v8plus system and target is v8"), - bfd_get_filename (ibfd)); - } - /* If the output machine is v9, we can't allow v9+vis input files. */ - if (bfd_get_mach (obfd) == bfd_mach_sparc_v8plus - && bfd_get_mach (ibfd) == bfd_mach_sparc_v8plusa) - { - error = true; - (*_bfd_error_handler) - (_("%s: compiled for a v8plusa system and target is v8plus"), - bfd_get_filename (ibfd)); - } -#else if (bfd_get_mach (ibfd) >= bfd_mach_sparc_v9) { error = true; @@ -1881,7 +1967,6 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd) if (bfd_get_mach (obfd) < bfd_get_mach (ibfd)) bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd)); } -#endif if (((elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA) != previous_ibfd_e_flags) @@ -1911,7 +1996,10 @@ elf32_sparc_object_p (abfd) { if (elf_elfheader (abfd)->e_machine == EM_SPARC32PLUS) { - if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1) + if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3) + return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, + bfd_mach_sparc_v8plusb); + else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1) return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc_v8plusa); else if (elf_elfheader (abfd)->e_flags & EF_SPARC_32PLUS) @@ -1949,6 +2037,12 @@ elf32_sparc_final_write_processing (abfd, linker) elf_elfheader (abfd)->e_flags &=~ EF_SPARC_32PLUS_MASK; elf_elfheader (abfd)->e_flags |= EF_SPARC_32PLUS | EF_SPARC_SUN_US1; break; + case bfd_mach_sparc_v8plusb : + elf_elfheader (abfd)->e_machine = EM_SPARC32PLUS; + elf_elfheader (abfd)->e_flags &=~ EF_SPARC_32PLUS_MASK; + elf_elfheader (abfd)->e_flags |= EF_SPARC_32PLUS | EF_SPARC_SUN_US1 + | EF_SPARC_SUN_US3; + break; case bfd_mach_sparc_sparclite_le : elf_elfheader (abfd)->e_machine = EM_SPARC; elf_elfheader (abfd)->e_flags |= EF_SPARC_LEDATA; @@ -1967,6 +2061,7 @@ elf32_sparc_final_write_processing (abfd, linker) #define ELF_MAXPAGESIZE 0x10000 #define bfd_elf32_bfd_reloc_type_lookup elf32_sparc_reloc_type_lookup +#define bfd_elf32_bfd_relax_section elf32_sparc_relax_section #define elf_info_to_howto elf32_sparc_info_to_howto #define elf_backend_create_dynamic_sections \ _bfd_elf_create_dynamic_sections diff --git a/contrib/binutils/bfd/elf32-v850.c b/contrib/binutils/bfd/elf32-v850.c index 4fe28fc..e71866c 100644 --- a/contrib/binutils/bfd/elf32-v850.c +++ b/contrib/binutils/bfd/elf32-v850.c @@ -17,12 +17,9 @@ 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. */ - - /* XXX FIXME: This code is littered with 32bit int, 16bit short, 8bit char dependencies. As is the gas & simulator code or the v850. */ - #include "bfd.h" #include "sysdep.h" #include "bfdlink.h" @@ -32,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* sign-extend a 24-bit number */ #define SEXT24(x) ((((x) & 0xffffff) ^ (~ 0x7fffff)) + 0x800000) - + static reloc_howto_type *v850_elf_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); static void v850_elf_info_to_howto_rel @@ -103,7 +100,7 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* dst_mask */ false), /* pcrel_offset */ - /* A PC relative 9 bit branch. */ + /* A PC relative 9 bit branch. */ HOWTO (R_V850_9_PCREL, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -118,7 +115,7 @@ static reloc_howto_type v850_elf_howto_table[] = 0x00ffffff, /* dst_mask */ true), /* pcrel_offset */ - /* A PC relative 22 bit branch. */ + /* A PC relative 22 bit branch. */ HOWTO (R_V850_22_PCREL, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -312,7 +309,7 @@ static reloc_howto_type v850_elf_howto_table[] = 0x7f, /* src_mask */ 0x7f, /* dst_mask */ false), /* pcrel_offset */ - + /* 7 bit offset from the tiny data area pointer. */ HOWTO (R_V850_TDA_7_7_OFFSET, /* type */ 0, /* rightshift */ @@ -462,7 +459,7 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* src_mask */ 0, /* dst_mask */ false), /* pcrel_offset */ - + }; /* Map BFD reloc types to V850 ELF reloc types. */ @@ -504,7 +501,6 @@ static const struct v850_elf_reloc_map v850_elf_reloc_map[] = { BFD_RELOC_VTABLE_ENTRY, R_V850_GNU_VTENTRY }, }; - /* Map a bfd relocation into the appropriate howto structure */ static reloc_howto_type * @@ -521,14 +517,13 @@ v850_elf_reloc_type_lookup (abfd, code) if (v850_elf_reloc_map[i].bfd_reloc_val == code) { BFD_ASSERT (v850_elf_howto_table[v850_elf_reloc_map[i].elf_reloc_val].type == v850_elf_reloc_map[i].elf_reloc_val); - + return & v850_elf_howto_table[v850_elf_reloc_map[i].elf_reloc_val]; } } return NULL; } - /* Set the howto pointer for an V850 ELF reloc. */ static void @@ -544,7 +539,7 @@ v850_elf_info_to_howto_rel (abfd, cache_ptr, dst) cache_ptr->howto = &v850_elf_howto_table[r_type]; } -/* Set the howto pointer for a V850 ELF reloc (type RELA). */ +/* Set the howto pointer for a V850 ELF reloc (type RELA). */ static void v850_elf_info_to_howto_rela (abfd, cache_ptr, dst) bfd * abfd ATTRIBUTE_UNUSED; @@ -557,7 +552,6 @@ v850_elf_info_to_howto_rela (abfd, cache_ptr, dst) BFD_ASSERT (r_type < (unsigned int) R_V850_max); cache_ptr->howto = &v850_elf_howto_table[r_type]; } - /* Look through the relocs for a section during the first phase, and allocate space in the global offset table or procedure linkage @@ -644,14 +638,14 @@ v850_elf_check_relocs (abfd, info, sec, relocs) other = V850_OTHER_SDA; common = ".scommon"; goto small_data_common; - + case R_V850_ZDA_16_16_SPLIT_OFFSET: case R_V850_ZDA_16_16_OFFSET: case R_V850_ZDA_15_16_OFFSET: other = V850_OTHER_ZDA; common = ".zcommon"; goto small_data_common; - + case R_V850_TDA_4_5_OFFSET: case R_V850_TDA_4_4_OFFSET: case R_V850_TDA_6_8_OFFSET: @@ -760,21 +754,21 @@ remember_hi16s_reloc (abfd, addend, address) bfd_byte * address; { hi16s_location * entry = NULL; - + /* Find a free structure. */ if (free_hi16s == NULL) free_hi16s = (hi16s_location *) bfd_zalloc (abfd, sizeof (* free_hi16s)); entry = free_hi16s; free_hi16s = free_hi16s->next; - + entry->addend = addend; entry->address = address; entry->counter = hi16s_counter ++; entry->found = false; entry->next = previous_hi16s; previous_hi16s = entry; - + /* Cope with wrap around of our counter. */ if (hi16s_counter == 0) { @@ -784,7 +778,7 @@ remember_hi16s_reloc (abfd, addend, address) hi16s_counter = 0x10000; } - + return; } @@ -798,7 +792,7 @@ find_remembered_hi16s_reloc (addend, already_found) hi16s_location * previous = NULL; hi16s_location * prev; bfd_byte * addr; - + /* Search the table. Record the most recent entry that matches. */ for (entry = previous_hi16s; entry; entry = entry->next) { @@ -808,7 +802,7 @@ find_remembered_hi16s_reloc (addend, already_found) previous = prev; match = entry; } - + prev = entry; } @@ -824,9 +818,9 @@ find_remembered_hi16s_reloc (addend, already_found) /* Note that this entry has now been used. */ match->found = true; - + return addr; -} +} /* FIXME: The code here probably ought to be removed and the code in reloc.c allowed to do its stuff instead. At least for most of the relocs, anwyay. */ @@ -839,62 +833,62 @@ v850_elf_perform_relocation (abfd, r_type, addend, address) { unsigned long insn; bfd_signed_vma saddend = (bfd_signed_vma) addend; - + switch (r_type) { default: /* fprintf (stderr, "reloc type %d not SUPPORTED\n", r_type ); */ return bfd_reloc_notsupported; - + case R_V850_32: bfd_put_32 (abfd, addend, address); return bfd_reloc_ok; - + case R_V850_22_PCREL: if (saddend > 0x1fffff || saddend < -0x200000) return bfd_reloc_overflow; - + if ((addend % 2) != 0) return bfd_reloc_dangerous; - + insn = bfd_get_32 (abfd, address); insn &= ~0xfffe003f; insn |= (((addend & 0xfffe) << 16) | ((addend & 0x3f0000) >> 16)); bfd_put_32 (abfd, insn, address); return bfd_reloc_ok; - + case R_V850_9_PCREL: if (saddend > 0xff || saddend < -0x100) return bfd_reloc_overflow; - + if ((addend % 2) != 0) return bfd_reloc_dangerous; - + insn = bfd_get_16 (abfd, address); insn &= ~ 0xf870; insn |= ((addend & 0x1f0) << 7) | ((addend & 0x0e) << 3); break; - + case R_V850_HI16: addend += (bfd_get_16 (abfd, address) << 16); addend = (addend >> 16); insn = addend; break; - + case R_V850_HI16_S: /* Remember where this relocation took place. */ remember_hi16s_reloc (abfd, addend, address); addend += (bfd_get_16 (abfd, address) << 16); addend = (addend >> 16) + ((addend & 0x8000) != 0); - - /* This relocation cannot overflow. */ + + /* This relocation cannot overflow. */ if (addend > 0x7fff) addend = 0; - + insn = addend; break; - + case R_V850_LO16: /* Calculate the sum of the value stored in the instruction and the addend and check for overflow from the low 16 bits into the high @@ -972,7 +966,6 @@ v850_elf_perform_relocation (abfd, r_type, addend, address) ------------ 0x00116fff = fred + 0x10ffff = 0x7000 + 0x10ffff - Overflow can also occur if the computation carries into the 16th bit and it also results in the 15th bit having the same value as the 15th bit of the original value. What happens is that the HI16S reloc @@ -1007,7 +1000,7 @@ v850_elf_perform_relocation (abfd, r_type, addend, address) + 0x00006fff ------------ 0x00006fff but 'fred + 0x7000' = 0x00016fff - + Note - there is no need to change anything if a carry occurs, and the 15th bit changes its value from being set to being clear, as the HI16S reloc will have already added in 1 to the high part for us: @@ -1046,7 +1039,7 @@ v850_elf_perform_relocation (abfd, r_type, addend, address) #define BIT15_SET(x) ((x) & 0x8000) #define OVERFLOWS(a,i) ((((a) & 0xffff) + (i)) > 0xffff) - + if ((BIT15_SET (result) && ! BIT15_SET (addend)) || (OVERFLOWS (addend, insn) && ((! BIT15_SET (insn)) || (BIT15_SET (addend))))) @@ -1054,7 +1047,7 @@ v850_elf_perform_relocation (abfd, r_type, addend, address) boolean already_updated; bfd_byte * hi16s_address = find_remembered_hi16s_reloc (addend, & already_updated); - + /* Amend the matching HI16_S relocation. */ if (hi16s_address != NULL) { @@ -1071,7 +1064,7 @@ v850_elf_perform_relocation (abfd, r_type, addend, address) return bfd_reloc_overflow; } } - + /* Do not complain if value has top bit set, as this has been anticipated. */ insn = result & 0xffff; break; @@ -1081,7 +1074,7 @@ v850_elf_perform_relocation (abfd, r_type, addend, address) addend += (char) bfd_get_8 (abfd, address); saddend = (bfd_signed_vma) addend; - + if (saddend > 0x7f || saddend < -0x80) return bfd_reloc_overflow; @@ -1090,150 +1083,150 @@ v850_elf_perform_relocation (abfd, r_type, addend, address) case R_V850_CALLT_16_16_OFFSET: addend += bfd_get_16 (abfd, address); - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0xffff || saddend < 0) return bfd_reloc_overflow; insn = addend; break; - + case R_V850_16: - /* drop through */ + /* drop through */ case R_V850_SDA_16_16_OFFSET: case R_V850_ZDA_16_16_OFFSET: case R_V850_TDA_16_16_OFFSET: addend += bfd_get_16 (abfd, address); - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0x7fff || saddend < -0x8000) return bfd_reloc_overflow; insn = addend; break; - + case R_V850_SDA_15_16_OFFSET: case R_V850_ZDA_15_16_OFFSET: insn = bfd_get_16 (abfd, address); addend += (insn & 0xfffe); - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0x7ffe || saddend < -0x8000) return bfd_reloc_overflow; - + if (addend & 1) return bfd_reloc_dangerous; - + insn = (addend & ~1) | (insn & 1); break; - + case R_V850_TDA_6_8_OFFSET: insn = bfd_get_16 (abfd, address); addend += ((insn & 0x7e) << 1); - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0xfc || saddend < 0) return bfd_reloc_overflow; - + if (addend & 3) return bfd_reloc_dangerous; - + insn &= 0xff81; insn |= (addend >> 1); break; - + case R_V850_TDA_7_8_OFFSET: insn = bfd_get_16 (abfd, address); addend += ((insn & 0x7f) << 1); - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0xfe || saddend < 0) return bfd_reloc_overflow; - + if (addend & 1) return bfd_reloc_dangerous; - + insn &= 0xff80; insn |= (addend >> 1); break; - + case R_V850_TDA_7_7_OFFSET: insn = bfd_get_16 (abfd, address); addend += insn & 0x7f; - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0x7f || saddend < 0) return bfd_reloc_overflow; - + insn &= 0xff80; insn |= addend; break; - + case R_V850_TDA_4_5_OFFSET: insn = bfd_get_16 (abfd, address); addend += ((insn & 0xf) << 1); - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0x1e || saddend < 0) return bfd_reloc_overflow; - + if (addend & 1) return bfd_reloc_dangerous; - + insn &= 0xfff0; insn |= (addend >> 1); break; - + case R_V850_TDA_4_4_OFFSET: insn = bfd_get_16 (abfd, address); addend += insn & 0xf; - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0xf || saddend < 0) return bfd_reloc_overflow; - + insn &= 0xfff0; insn |= addend; break; - + case R_V850_ZDA_16_16_SPLIT_OFFSET: case R_V850_SDA_16_16_SPLIT_OFFSET: insn = bfd_get_32 (abfd, address); addend += ((insn & 0xfffe0000) >> 16) + ((insn & 0x20) >> 5); - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0x7fff || saddend < -0x8000) return bfd_reloc_overflow; - + insn &= 0x0001ffdf; insn |= (addend & 1) << 5; insn |= (addend & ~1) << 16; - + bfd_put_32 (abfd, insn, address); return bfd_reloc_ok; - + case R_V850_CALLT_6_7_OFFSET: insn = bfd_get_16 (abfd, address); addend += ((insn & 0x3f) << 1); - + saddend = (bfd_signed_vma) addend; - + if (saddend > 0x7e || saddend < 0) return bfd_reloc_overflow; - + if (addend & 1) return bfd_reloc_dangerous; - + insn &= 0xff80; insn |= (addend >> 1); break; @@ -1247,7 +1240,6 @@ v850_elf_perform_relocation (abfd, r_type, addend, address) bfd_put_16 (abfd, insn, address); return bfd_reloc_ok; } - /* Insert the addend into the instruction. */ static bfd_reloc_status_type @@ -1261,7 +1253,7 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err) char ** err ATTRIBUTE_UNUSED; { long relocation; - + /* If there is an output BFD, and the symbol is not a section name (which is only defined at final link time), and either we are not putting the addend into the instruction @@ -1275,13 +1267,13 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err) reloc->address += isection->output_offset; return bfd_reloc_ok; } -#if 0 +#if 0 else if (obfd != NULL) { return bfd_reloc_continue; } #endif - + /* Catch relocs involving undefined symbols. */ if (bfd_is_und_section (symbol->section) && (symbol->flags & BSF_WEAK) == 0 @@ -1293,37 +1285,51 @@ v850_elf_reloc (abfd, reloc, symbol, data, isection, obfd, err) /* Is the address of the relocation really within the section? */ if (reloc->address > isection->_cooked_size) return bfd_reloc_outofrange; - + /* Work out which section the relocation is targetted at and the initial relocation command value. */ - + /* Get symbol value. (Common symbols are special.) */ if (bfd_is_com_section (symbol->section)) relocation = 0; else relocation = symbol->value; - + /* Convert input-section-relative symbol value to absolute + addend. */ relocation += symbol->section->output_section->vma; relocation += symbol->section->output_offset; relocation += reloc->addend; - + +#if 0 /* Since this reloc is going to be processed later on, we should + not make it pc-relative here. To test this, try assembling and + linking this program: + + .text + .globl _start + nop + _start: + jr foo + + .section ".foo","ax" + nop + foo: + nop + */ if (reloc->howto->pc_relative == true) { /* Here the variable relocation holds the final address of the symbol we are relocating against, plus any addend. */ relocation -= isection->output_section->vma + isection->output_offset; - + /* Deal with pcrel_offset */ relocation -= reloc->address; } +#endif - reloc->addend = relocation; + reloc->addend = relocation; return bfd_reloc_ok; } - -/*ARGSUSED*/ static boolean v850_elf_is_local_label_name (abfd, name) bfd * abfd ATTRIBUTE_UNUSED; @@ -1332,7 +1338,6 @@ v850_elf_is_local_label_name (abfd, name) return ( (name[0] == '.' && (name[1] == 'L' || name[1] == '.')) || (name[0] == '_' && name[1] == '.' && name[2] == 'L' && name[3] == '_')); } - /* Perform a relocation as part of a final link. */ static bfd_reloc_status_type @@ -1362,7 +1367,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, + input_section->output_offset); value -= offset; break; - + case R_V850_22_PCREL: value -= (input_section->output_section->vma + input_section->output_offset @@ -1371,10 +1376,10 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, /* If the sign extension will corrupt the value then we have overflowed. */ if (((value & 0xff000000) != 0x0) && ((value & 0xff000000) != 0xff000000)) return bfd_reloc_overflow; - + value = SEXT24 (value); /* Only the bottom 24 bits of the PC are valid */ break; - + case R_V850_HI16_S: case R_V850_HI16: case R_V850_LO16: @@ -1383,12 +1388,12 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, case R_V850_8: break; - case R_V850_ZDA_15_16_OFFSET: + case R_V850_ZDA_15_16_OFFSET: case R_V850_ZDA_16_16_OFFSET: case R_V850_ZDA_16_16_SPLIT_OFFSET: if (sym_sec == NULL) return bfd_reloc_undefined; - + value -= sym_sec->output_section->vma; break; @@ -1401,7 +1406,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, if (sym_sec == NULL) return bfd_reloc_undefined; - + /* Get the value of __gp. */ h = bfd_link_hash_lookup (info->hash, "__gp", false, false, true); if (h == (struct bfd_link_hash_entry *) NULL @@ -1426,12 +1431,12 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, { unsigned long ep; struct bfd_link_hash_entry * h; - + /* Get the value of __ep. */ h = bfd_link_hash_lookup (info->hash, "__ep", false, false, true); if (h == (struct bfd_link_hash_entry *) NULL || h->type != bfd_link_hash_defined) - return bfd_reloc_continue; /* Actually this indicates that __ep could not be found. */ + return bfd_reloc_continue; /* Actually this indicates that __ep could not be found. */ ep = (h->u.def.value + h->u.def.section->output_section->vma @@ -1440,17 +1445,17 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, value -= ep; } break; - + case R_V850_CALLT_6_7_OFFSET: { unsigned long ctbp; struct bfd_link_hash_entry * h; - + /* Get the value of __ctbp. */ h = bfd_link_hash_lookup (info->hash, "__ctbp", false, false, true); if (h == (struct bfd_link_hash_entry *) NULL || h->type != bfd_link_hash_defined) - return (bfd_reloc_dangerous + 1); /* Actually this indicates that __ctbp could not be found. */ + return (bfd_reloc_dangerous + 1); /* Actually this indicates that __ctbp could not be found. */ ctbp = (h->u.def.value + h->u.def.section->output_section->vma @@ -1458,7 +1463,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, value -= ctbp; } break; - + case R_V850_CALLT_16_16_OFFSET: { unsigned long ctbp; @@ -1466,7 +1471,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, if (sym_sec == NULL) return bfd_reloc_undefined; - + /* Get the value of __ctbp. */ h = bfd_link_hash_lookup (info->hash, "__ctbp", false, false, true); if (h == (struct bfd_link_hash_entry *) NULL @@ -1481,7 +1486,7 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, value -= (ctbp - sym_sec->output_section->vma); } break; - + case R_V850_NONE: case R_V850_GNU_VTINHERIT: case R_V850_GNU_VTENTRY: @@ -1492,9 +1497,8 @@ v850_elf_final_link_relocate (howto, input_bfd, output_bfd, } /* Perform the relocation. */ - return v850_elf_perform_relocation (input_bfd, r_type, value + addend, hit_data); + return v850_elf_perform_relocation (input_bfd, r_type, value + addend, hit_data); } - /* Relocate an V850 ELF section. */ static boolean @@ -1524,12 +1528,12 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section, return false; } - + /* Reset the list of remembered HI16S relocs to empty. */ free_hi16s = previous_hi16s; previous_hi16s = NULL; hi16s_counter = 0; - + rel = relocs; relend = relocs + input_section->reloc_count; for (; rel < relend; rel++) @@ -1596,11 +1600,11 @@ fprintf (stderr, "local: sec: %s, sym: %s (%d), value: %x + %x + %x addend %x\n" else { h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - + while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; - + if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { @@ -1696,7 +1700,7 @@ fprintf (stderr, "unknown: name: %s\n", h->root.root.string); case (bfd_reloc_dangerous + 1): msg = _("could not locate special linker symbol __ctbp"); goto common_error; - + default: msg = _("internal error: unknown error"); /* fall through */ @@ -1803,7 +1807,7 @@ v850_elf_final_write_processing (abfd, linker) elf_elfheader (abfd)->e_flags |= val; } -/* Function to keep V850 specific file flags. */ +/* Function to keep V850 specific file flags. */ static boolean v850_elf_set_private_flags (abfd, flags) bfd * abfd; @@ -1864,7 +1868,7 @@ v850_elf_merge_private_bfd_data (ibfd, obfd) to the default values. */ if (bfd_get_arch_info (ibfd)->the_default) return true; - + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; @@ -1896,14 +1900,14 @@ v850_elf_print_private_bfd_data (abfd, ptr) PTR ptr; { FILE * file = (FILE *) ptr; - + BFD_ASSERT (abfd != NULL && ptr != NULL); - + _bfd_elf_print_private_bfd_data (abfd, ptr); - + /* xgettext:c-format */ fprintf (file, _("private flags = %lx: "), elf_elfheader (abfd)->e_flags); - + switch (elf_elfheader (abfd)->e_flags & EF_V850_ARCH) { default: @@ -1911,9 +1915,9 @@ v850_elf_print_private_bfd_data (abfd, ptr) case E_V850E_ARCH: fprintf (file, _("v850e architecture")); break; case E_V850EA_ARCH: fprintf (file, _("v850ea architecture")); break; } - + fputc ('\n', file); - + return true; } @@ -1934,7 +1938,6 @@ static asection v850_elf_zcom_section; static asymbol v850_elf_zcom_symbol; static asymbol * v850_elf_zcom_symbol_ptr; - /* Given a BFD section, try to locate the corresponding ELF section index. */ @@ -1953,7 +1956,7 @@ v850_elf_section_from_bfd_section (abfd, hdr, sec, retval) *retval = SHN_V850_ZCOMMON; else return false; - + return true; } @@ -1966,34 +1969,34 @@ v850_elf_symbol_processing (abfd, asym) { elf_symbol_type * elfsym = (elf_symbol_type *) asym; unsigned short index; - + index = elfsym->internal_elf_sym.st_shndx; /* If the section index is an "ordinary" index, then it may refer to a v850 specific section created by the assembler. Check the section's type and change the index it matches. - + FIXME: Should we alter the st_shndx field as well ? */ - + if (index < elf_elfheader(abfd)[0].e_shnum) switch (elf_elfsections(abfd)[index]->sh_type) { case SHT_V850_SCOMMON: index = SHN_V850_SCOMMON; break; - + case SHT_V850_TCOMMON: index = SHN_V850_TCOMMON; break; - + case SHT_V850_ZCOMMON: index = SHN_V850_ZCOMMON; break; - + default: break; } - + switch (index) { case SHN_V850_SCOMMON: @@ -2013,7 +2016,7 @@ v850_elf_symbol_processing (abfd, asym) asym->section = & v850_elf_scom_section; asym->value = elfsym->internal_elf_sym.st_size; break; - + case SHN_V850_TCOMMON: if (v850_elf_tcom_section.name == NULL) { @@ -2055,7 +2058,6 @@ v850_elf_symbol_processing (abfd, asym) /* Hook called by the linker routine which adds symbols from an object file. We must handle the special v850 section numbers here. */ -/*ARGSUSED*/ static boolean v850_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) bfd * abfd; @@ -2067,32 +2069,32 @@ v850_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) bfd_vma * valp; { int index = sym->st_shndx; - + /* If the section index is an "ordinary" index, then it may refer to a v850 specific section created by the assembler. Check the section's type and change the index it matches. - + FIXME: Should we alter the st_shndx field as well ? */ - + if (index < elf_elfheader(abfd)[0].e_shnum) switch (elf_elfsections(abfd)[index]->sh_type) { case SHT_V850_SCOMMON: index = SHN_V850_SCOMMON; break; - + case SHT_V850_TCOMMON: index = SHN_V850_TCOMMON; break; - + case SHT_V850_ZCOMMON: index = SHN_V850_ZCOMMON; break; - + default: break; } - + switch (index) { case SHN_V850_SCOMMON: @@ -2100,13 +2102,13 @@ v850_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) (*secp)->flags |= SEC_IS_COMMON; *valp = sym->st_size; break; - + case SHN_V850_TCOMMON: *secp = bfd_make_section_old_way (abfd, ".tcommon"); (*secp)->flags |= SEC_IS_COMMON; *valp = sym->st_size; break; - + case SHN_V850_ZCOMMON: *secp = bfd_make_section_old_way (abfd, ".zcommon"); (*secp)->flags |= SEC_IS_COMMON; @@ -2129,7 +2131,7 @@ v850_elf_link_output_symbol_hook (abfd, info, name, sym, input_sec) /* If we see a common symbol, which implies a relocatable link, then if a symbol was in a special common section in an input file, mark it as a special common in the output file. */ - + if (sym->st_shndx == SHN_COMMON) { if (strcmp (input_sec->name, ".scommon") == 0) @@ -2193,18 +2195,16 @@ v850_elf_fake_sections (abfd, hdr, sec) } else if (strcmp (name, ".zcommon") == 0) hdr->sh_type = SHT_V850_ZCOMMON; - + return true; } - - #define TARGET_LITTLE_SYM bfd_elf32_v850_vec #define TARGET_LITTLE_NAME "elf32-v850" #define ELF_ARCH bfd_arch_v850 #define ELF_MACHINE_CODE EM_CYGNUS_V850 #define ELF_MAXPAGESIZE 0x1000 - + #define elf_info_to_howto v850_elf_info_to_howto_rela #define elf_info_to_howto_rel v850_elf_info_to_howto_rel @@ -2223,7 +2223,6 @@ v850_elf_fake_sections (abfd, hdr, sec) #define elf_backend_can_gc_sections 1 - #define bfd_elf32_bfd_is_local_label_name v850_elf_is_local_label_name #define bfd_elf32_bfd_reloc_type_lookup v850_elf_reloc_type_lookup #define bfd_elf32_bfd_copy_private_bfd_data v850_elf_copy_private_bfd_data diff --git a/contrib/binutils/bfd/elf32.c b/contrib/binutils/bfd/elf32.c index f222969..2d3bebf 100644 --- a/contrib/binutils/bfd/elf32.c +++ b/contrib/binutils/bfd/elf32.c @@ -19,5 +19,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ARCH_SIZE 32 - #include "elfcode.h" diff --git a/contrib/binutils/bfd/elf64-alpha.c b/contrib/binutils/bfd/elf64-alpha.c index 4c083fa..197dcff 100644 --- a/contrib/binutils/bfd/elf64-alpha.c +++ b/contrib/binutils/bfd/elf64-alpha.c @@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define NO_COFF_SYMBOLS #define NO_COFF_LINENOS -/* Get the ECOFF swapping routines. Needed for the debug information. */ +/* Get the ECOFF swapping routines. Needed for the debug information. */ #include "coff/internal.h" #include "coff/sym.h" #include "coff/symconst.h" @@ -46,7 +46,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ECOFF_64 #include "ecoffswap.h" -static boolean elf64_alpha_mkobject PARAMS ((bfd *)); +static int alpha_elf_dynamic_symbol_p + PARAMS((struct elf_link_hash_entry *, struct bfd_link_info *)); static struct bfd_hash_entry * elf64_alpha_link_hash_newfunc PARAMS((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); static struct bfd_link_hash_table * elf64_alpha_bfd_link_hash_table_create @@ -66,6 +67,8 @@ static reloc_howto_type * elf64_alpha_bfd_reloc_type_lookup static void elf64_alpha_info_to_howto PARAMS((bfd *, arelent *, Elf64_Internal_Rela *)); +static boolean elf64_alpha_mkobject + PARAMS((bfd *)); static boolean elf64_alpha_object_p PARAMS((bfd *)); static boolean elf64_alpha_section_from_shdr @@ -129,7 +132,6 @@ static boolean elf64_alpha_merge_ind_symbols PARAMS((struct alpha_elf_link_hash_entry *, PTR)); static Elf_Internal_Rela * elf64_alpha_find_reloc_at_ofs PARAMS ((Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_vma, int)); - struct alpha_elf_link_hash_entry { @@ -224,14 +226,35 @@ struct alpha_elf_link_hash_table /* Should we do dynamic things to this symbol? */ -#define alpha_elf_dynamic_symbol_p(h, info) \ - ((((info)->shared && !(info)->symbolic) \ - || (((h)->elf_link_hash_flags \ - & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)) \ - == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)) \ - || (h)->root.type == bfd_link_hash_undefweak \ - || (h)->root.type == bfd_link_hash_defweak) \ - && (h)->dynindx != -1) +static int +alpha_elf_dynamic_symbol_p (h, info) + struct elf_link_hash_entry *h; + struct bfd_link_info *info; +{ + if (h == NULL) + return false; + + while (h->root.type == bfd_link_hash_indirect + || h->root.type == bfd_link_hash_warning) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + + if (h->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; + + if ((info->shared && !info->symbolic) + || ((h->elf_link_hash_flags + & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)) + == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))) + return true; + + return false; +} /* Create an entry in a Alpha ELF linker hash table. */ @@ -711,7 +734,7 @@ static reloc_howto_type elf64_alpha_howto_table[] = false), /* pcrel_offset */ /* The high bits of a 32-bit displacement to the starting address of the - current section (the relocation target is ignored); the low bits are + current section (the relocation target is ignored); the low bits are supplied in the subsequent R_ALPHA_IMMED_LO32 relocs. */ /* XXX: Not implemented. */ HOWTO (R_ALPHA_IMMED_SCN_HI32, @@ -762,7 +785,7 @@ static reloc_howto_type elf64_alpha_howto_table[] = 0, /* dst_mask */ false), /* pcrel_offset */ - /* Misc ELF relocations. */ + /* Misc ELF relocations. */ /* A dynamic relocation to copy the target into our .dynbss section. */ /* Not generated, as all Alpha objects use PIC, so it is not needed. It @@ -979,7 +1002,7 @@ static const struct elf_reloc_map elf64_alpha_reloc_map[] = /* The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to process the explicit !!sequence relocations, and are mapped into the normal - relocations at the end of processing. */ + relocations at the end of processing. */ {BFD_RELOC_ALPHA_USER_LITERAL, R_ALPHA_LITERAL}, {BFD_RELOC_ALPHA_USER_LITUSE_BASE, R_ALPHA_LITUSE}, {BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF, R_ALPHA_LITUSE}, @@ -1022,7 +1045,7 @@ elf64_alpha_info_to_howto (abfd, cache_ptr, dst) cache_ptr->howto = &elf64_alpha_howto_table[r_type]; } -/* These functions do relaxation for Alpha ELF. +/* These functions do relaxation for Alpha ELF. Currently I'm only handling what I can do with existing compiler and assembler support, which means no instructions are removed, @@ -1062,11 +1085,11 @@ struct alpha_relax_info }; static Elf_Internal_Rela * elf64_alpha_relax_with_lituse - PARAMS((struct alpha_relax_info *info, bfd_vma symval, + PARAMS((struct alpha_relax_info *info, bfd_vma symval, Elf_Internal_Rela *irel, Elf_Internal_Rela *irelend)); static boolean elf64_alpha_relax_without_lituse - PARAMS((struct alpha_relax_info *info, bfd_vma symval, + PARAMS((struct alpha_relax_info *info, bfd_vma symval, Elf_Internal_Rela *irel)); static bfd_vma elf64_alpha_relax_opt_call @@ -1125,14 +1148,15 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) flags |= 1 << urel->r_addend; } - /* A little preparation for the loop... */ + /* A little preparation for the loop... */ disp = symval - info->gp; - fits16 = (disp >= -(bfd_signed_vma)0x8000 && disp < 0x8000); - fits32 = (disp >= -(bfd_signed_vma)0x80000000 && disp < 0x7fff8000); for (urel = irel+1, i = 0; i < count; ++i, ++urel) { unsigned int insn; + int insn_disp; + bfd_signed_vma xdisp; + insn = bfd_get_32 (info->abfd, info->contents + urel->r_offset); switch (urel->r_addend) @@ -1145,14 +1169,23 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) case 1: /* MEM FORMAT */ /* We can always optimize 16-bit displacements. */ + + /* Extract the displacement from the instruction, sign-extending + it if necessary, then test whether it is within 16 or 32 bits + displacement from GP. */ + insn_disp = insn & 0x0000ffff; + if (insn_disp & 0x00008000) + insn_disp |= 0xffff0000; /* Negative: sign-extend. */ + + xdisp = disp + insn_disp; + fits16 = (xdisp >= - (bfd_signed_vma) 0x00008000 && xdisp < 0x00008000); + fits32 = (xdisp >= - (bfd_signed_vma) 0x80000000 && xdisp < 0x7fff8000); + if (fits16) { - /* FIXME: sanity check the insn for mem format with - zero addend. */ - - /* Take the op code and dest from this insn, take the base + /* Take the op code and dest from this insn, take the base register from the literal insn. Leave the offset alone. */ - insn = (insn & 0xffe00000) | (lit_insn & 0x001f0000); + insn = (insn & 0xffe0ffff) | (lit_insn & 0x001f0000); urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), R_ALPHA_GPRELLOW); urel->r_addend = irel->r_addend; @@ -1165,8 +1198,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) /* If all mem+byte, we can optimize 32-bit mem displacements. */ else if (fits32 && !(flags & ~6)) { - /* FIXME: sanity check that lit insn Ra is mem insn Rb, and - that mem_insn disp is zero. */ + /* FIXME: sanity check that lit insn Ra is mem insn Rb. */ irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), R_ALPHA_GPRELHIGH); @@ -1215,12 +1247,12 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) { Elf_Internal_Rela *xrel; - /* Preserve branch prediction call stack when possible. */ + /* Preserve branch prediction call stack when possible. */ if ((insn & INSN_JSR_MASK) == INSN_JSR) insn = (OP_BSR << 26) | (insn & 0x03e00000); else insn = (OP_BR << 26) | (insn & 0x03e00000); - + urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), R_ALPHA_BRADDR); urel->r_addend = irel->r_addend; @@ -1234,7 +1266,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) /* Kill any HINT reloc that might exist for this insn. */ xrel = (elf64_alpha_find_reloc_at_ofs - (info->relocs, info->relend, urel->r_offset, + (info->relocs, info->relend, urel->r_offset, R_ALPHA_HINT)); if (xrel) xrel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE); @@ -1249,7 +1281,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) This does depend on every place a gp could be reloaded will be, which currently happens for all code produced by gcc, but not necessarily by hand-coded assembly, or if sibling calls - are enabled in gcc. + are enabled in gcc. Perhaps conditionalize this on a flag being set in the target object file's header, and have gcc set it? */ @@ -1295,22 +1327,22 @@ elf64_alpha_relax_opt_call (info, symval) /* If the symbol is marked NOPV, we are being told the function never needs its procedure value. */ - if (info->other == STO_ALPHA_NOPV) + if ((info->other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_NOPV) return symval; /* If the symbol is marked STD_GP, we are being told the function does - a normal ldgp in the first two words. */ - else if (info->other == STO_ALPHA_STD_GPLOAD) + a normal ldgp in the first two words. */ + else if ((info->other & STO_ALPHA_STD_GPLOAD) == STO_ALPHA_STD_GPLOAD) ; /* Otherwise, we may be able to identify a GP load in the first two words, which we can then skip. */ - else + else { Elf_Internal_Rela *tsec_relocs, *tsec_relend, *tsec_free, *gpdisp; bfd_vma ofs; - /* Load the relocations from the section that the target symbol is in. */ + /* Load the relocations from the section that the target symbol is in. */ if (info->sec == info->tsec) { tsec_relocs = info->relocs; @@ -1332,7 +1364,7 @@ elf64_alpha_relax_opt_call (info, symval) /* Recover the symbol's offset within the section. */ ofs = (symval - info->tsec->output_section->vma - info->tsec->output_offset); - + /* Look for a GPDISP reloc. */ gpdisp = (elf64_alpha_find_reloc_at_ofs (tsec_relocs, tsec_relend, ofs, R_ALPHA_GPDISP)); @@ -1347,7 +1379,7 @@ elf64_alpha_relax_opt_call (info, symval) free (tsec_free); } - /* We've now determined that we can skip an initial gp load. Verify + /* We've now determined that we can skip an initial gp load. Verify that the call and the target use the same gp. */ if (info->link_info->hash->creator != info->tsec->owner->xvec || info->gotobj != alpha_elf_tdata (info->tsec->owner)->gotobj) @@ -1408,7 +1440,7 @@ elf64_alpha_relax_without_lituse (info, symval, irel) Any such memory load insn may be substituted by a load directly off the GP. This allows the memory load insn to be issued before - the calculated GP register would otherwise be ready. + the calculated GP register would otherwise be ready. Any such jsr insn can be replaced by a bsr if it is in range. @@ -1460,7 +1492,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) if (! link_info->keep_memory) free_relocs = internal_relocs; - memset(&info, 0, sizeof(info)); + memset(&info, 0, sizeof (info)); info.abfd = abfd; info.sec = sec; info.link_info = link_info; @@ -1543,8 +1575,8 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) info.tsec = bfd_abs_section_ptr; else if (isym.st_shndx == SHN_COMMON) info.tsec = bfd_com_section_ptr; - else - continue; /* who knows. */ + else + continue; /* who knows. */ info.h = NULL; info.other = isym.st_other; @@ -1962,7 +1994,7 @@ elf64_alpha_read_ecoff_info (abfd, section, debug) char *ext_hdr = NULL; swap = get_elf_backend_data (abfd)->elf_backend_ecoff_debug_swap; - memset (debug, 0, sizeof(*debug)); + memset (debug, 0, sizeof (*debug)); ext_hdr = (char *) bfd_malloc ((size_t) swap->external_hdr_size); if (ext_hdr == NULL && swap->external_hdr_size != 0) @@ -2073,6 +2105,12 @@ elf64_alpha_find_nearest_line (abfd, section, symbols, offset, filename_ptr, { asection *msec; + 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; + msec = bfd_get_section_by_name (abfd, ".mdebug"); if (msec != NULL) { @@ -2539,7 +2577,8 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs) sreloc = bfd_make_section (dynobj, rel_sec_name); if (sreloc == NULL || !bfd_set_section_flags (dynobj, sreloc, - (SEC_ALLOC|SEC_LOAD + ((sec->flags & (SEC_ALLOC + | SEC_LOAD)) | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED @@ -2555,7 +2594,7 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs) don't know whether we'll actually need a dynamic relocation entry for this reloc. So make a record of it. Once we find out if this thing needs dynamic relocation we'll - expand the relocation sections by the appropriate amount. */ + expand the relocation sections by the appropriate amount. */ struct alpha_elf_reloc_entry *rent; @@ -3127,7 +3166,7 @@ elf64_alpha_calc_dynrel_sizes (h, info) || relent->rtype == R_ALPHA_REFQUAD) { relent->srel->_raw_size += - sizeof(Elf64_External_Rela) * relent->count; + sizeof (Elf64_External_Rela) * relent->count; } dynobj = elf_hash_table(info)->dynobj; @@ -3202,7 +3241,7 @@ elf64_alpha_size_dynamic_sections (output_bfd, info) i = alpha_elf_tdata(i)->got_link_next) count += alpha_elf_tdata(i)->n_local_got_entries; - srel->_raw_size += count * sizeof(Elf64_External_Rela); + srel->_raw_size += count * sizeof (Elf64_External_Rela); } } /* else we're not dynamic and by definition we don't need such things. */ @@ -3305,13 +3344,14 @@ elf64_alpha_size_dynamic_sections (output_bfd, info) if (! bfd_elf64_add_dynamic_entry (info, DT_RELA, 0) || ! bfd_elf64_add_dynamic_entry (info, DT_RELASZ, 0) || ! bfd_elf64_add_dynamic_entry (info, DT_RELAENT, - sizeof(Elf64_External_Rela))) + sizeof (Elf64_External_Rela))) return false; if (reltext) { if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0)) return false; + info->flags |= DF_TEXTREL; } } @@ -3394,7 +3434,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, in which case we have to adjust according to where the section symbol winds up in the output section. */ - /* The symbol associated with GPDISP and LITUSE is + /* The symbol associated with GPDISP and LITUSE is immaterial. Only the addend is significant. */ if (r_type == R_ALPHA_GPDISP || r_type == R_ALPHA_LITUSE) continue; @@ -3517,7 +3557,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, case R_ALPHA_OP_PSUB: case R_ALPHA_OP_PRSHIFT: /* We hate these silly beasts. */ - abort(); + abort (); case R_ALPHA_LITERAL: { @@ -3571,7 +3611,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, ((Elf64_External_Rela *) srelgot->contents) + srelgot->reloc_count++); - BFD_ASSERT (sizeof(Elf64_External_Rela) + BFD_ASSERT (sizeof (Elf64_External_Rela) * srelgot->reloc_count <= srelgot->_cooked_size); } @@ -3676,7 +3716,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section, ((Elf64_External_Rela *) srel->contents) + srel->reloc_count++); - BFD_ASSERT (sizeof(Elf64_External_Rela) * srel->reloc_count + BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count <= srel->_cooked_size); } goto default_reloc; @@ -3829,7 +3869,7 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym) ((Elf64_External_Rela *) srel->contents) + srel->reloc_count++); - BFD_ASSERT (sizeof(Elf64_External_Rela) * srel->reloc_count + BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count <= srel->_cooked_size); } @@ -3862,7 +3902,7 @@ elf64_alpha_finish_dynamic_symbol (output_bfd, info, h, sym) bfd_elf64_swap_reloca_out (output_bfd, &outrel, ((Elf64_External_Rela *)srel->contents + srel->reloc_count++)); - BFD_ASSERT (sizeof(Elf64_External_Rela) * srel->reloc_count + BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count <= srel->_cooked_size); } } @@ -4280,7 +4320,6 @@ elf64_alpha_final_link (abfd, info) } #endif - /* Build the external symbol information. */ einfo.abfd = abfd; einfo.info = info; @@ -4600,7 +4639,7 @@ elf64_alpha_final_link (abfd, info) /* ECOFF swapping routines. These are used when dealing with the .mdebug section, which is in the ECOFF debugging format. Copied - from elf32-mips.c. */ + from elf32-mips.c. */ static const struct ecoff_debug_swap elf64_alpha_ecoff_debug_swap = { @@ -4643,6 +4682,36 @@ elf64_alpha_ecoff_debug_swap = elf64_alpha_read_ecoff_info }; +/* Use a non-standard hash bucket size of 8. */ + +const struct elf_size_info alpha_elf_size_info = +{ + sizeof (Elf64_External_Ehdr), + sizeof (Elf64_External_Phdr), + sizeof (Elf64_External_Shdr), + sizeof (Elf64_External_Rel), + sizeof (Elf64_External_Rela), + sizeof (Elf64_External_Sym), + sizeof (Elf64_External_Dyn), + sizeof (Elf_External_Note), + 8, + 1, + 64, 8, + ELFCLASS64, EV_CURRENT, + bfd_elf64_write_out_phdrs, + bfd_elf64_write_shdrs_and_ehdr, + bfd_elf64_write_relocs, + bfd_elf64_swap_symbol_out, + bfd_elf64_slurp_reloc_table, + bfd_elf64_slurp_symbol_table, + bfd_elf64_swap_dyn_in, + bfd_elf64_swap_dyn_out, + NULL, + NULL, + NULL, + NULL +}; + #define TARGET_LITTLE_SYM bfd_elf64_alpha_vec #define TARGET_LITTLE_NAME "elf64-alpha" #define ELF_ARCH bfd_arch_alpha @@ -4698,9 +4767,10 @@ elf64_alpha_ecoff_debug_swap = #define elf_backend_ecoff_debug_swap \ &elf64_alpha_ecoff_debug_swap -/* - * A few constants that determine how the .plt section is set up. - */ +#define elf_backend_size_info \ + alpha_elf_size_info + +/* A few constants that determine how the .plt section is set up. */ #define elf_backend_want_got_plt 0 #define elf_backend_plt_readonly 0 #define elf_backend_want_plt_sym 1 diff --git a/contrib/binutils/bfd/elf64-gen.c b/contrib/binutils/bfd/elf64-gen.c index 78dc09d..c071934 100644 --- a/contrib/binutils/bfd/elf64-gen.c +++ b/contrib/binutils/bfd/elf64-gen.c @@ -58,6 +58,37 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) bfd_reloc->howto = &dummy; } +static boolean +elf64_generic_link_add_symbols (abfd, info) + bfd *abfd; + struct bfd_link_info *info; +{ + asection *o; + + /* Check if there are any relocations. */ + for (o = abfd->sections; o != NULL; o = o->next) + if ((o->flags & SEC_RELOC) != 0) + { + Elf_Internal_Ehdr *ehdrp; + + ehdrp = elf_elfheader (abfd); + if (abfd->my_archive) + (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"), + bfd_get_filename (abfd->my_archive), + bfd_get_filename (abfd), + ehdrp->e_machine); + else + (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"), + bfd_get_filename (abfd), + ehdrp->e_machine); + + bfd_set_error (bfd_error_wrong_format); + return false; + } + + return bfd_elf64_bfd_link_add_symbols (abfd, info); +} + #define TARGET_LITTLE_SYM bfd_elf64_little_generic_vec #define TARGET_LITTLE_NAME "elf64-little" #define TARGET_BIG_SYM bfd_elf64_big_generic_vec @@ -66,6 +97,7 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) #define ELF_MACHINE_CODE EM_NONE #define ELF_MAXPAGESIZE 0x1 #define bfd_elf64_bfd_reloc_type_lookup bfd_default_reloc_type_lookup +#define bfd_elf64_bfd_link_add_symbols elf64_generic_link_add_symbols #define elf_info_to_howto elf_generic_info_to_howto #define elf_info_to_howto_rel elf_generic_info_to_howto_rel diff --git a/contrib/binutils/bfd/elf64-sparc.c b/contrib/binutils/bfd/elf64-sparc.c index c9e8626..0627913 100644 --- a/contrib/binutils/bfd/elf64-sparc.c +++ b/contrib/binutils/bfd/elf64-sparc.c @@ -22,6 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "sysdep.h" #include "libbfd.h" #include "elf-bfd.h" +#include "opcode/sparc.h" /* This is defined if one wants to build upward compatible binaries with the original sparc64-elf toolchain. The support is kept in for @@ -65,6 +66,8 @@ static void sparc64_elf_symbol_processing static boolean sparc64_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *)); +static boolean sparc64_elf_relax_section + PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *)); static boolean sparc64_elf_relocate_section PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); @@ -212,7 +215,7 @@ static CONST struct elf_reloc_map sparc_reloc_map[] = static reloc_howto_type * sparc64_elf_reloc_type_lookup (abfd, code) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; bfd_reloc_code_real_type code; { unsigned int i; @@ -226,7 +229,7 @@ sparc64_elf_reloc_type_lookup (abfd, code) static void sparc64_elf_info_to_howto (abfd, cache_ptr, dst) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; arelent *cache_ptr; Elf64_Internal_Rela *dst; { @@ -237,10 +240,10 @@ sparc64_elf_info_to_howto (abfd, cache_ptr, dst) /* Due to the way how we handle R_SPARC_OLO10, each entry in a SHT_RELA section can represent up to two relocs, we must tell the user to allocate more space. */ - + static long sparc64_elf_get_reloc_upper_bound (abfd, sec) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; asection *sec; { return (sec->reloc_count * 2 + 1) * sizeof (arelent *); @@ -253,7 +256,7 @@ sparc64_elf_get_dynamic_reloc_upper_bound (abfd) return _bfd_elf_get_dynamic_reloc_upper_bound (abfd) * 2; } -/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of +/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of them. We cannot use generic elf routines for this, because R_SPARC_OLO10 has secondary addend in ELF64_R_TYPE_DATA. We handle it as two relocations for the same location, R_SPARC_LO10 and R_SPARC_13. */ @@ -266,7 +269,6 @@ sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic) asymbol **symbols; boolean dynamic; { - struct elf_backend_data * const ebd = get_elf_backend_data (abfd); PTR allocated = NULL; bfd_byte *native_relocs; arelent *relent; @@ -290,7 +292,7 @@ sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic) entsize = rel_hdr->sh_entsize; BFD_ASSERT (entsize == sizeof (Elf64_External_Rela)); - + count = rel_hdr->sh_size / entsize; for (i = 0, relent = relents; i < count; @@ -396,20 +398,20 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic) rel_hdr2 = NULL; } - asect->relocation = ((arelent *) - bfd_alloc (abfd, + asect->relocation = ((arelent *) + bfd_alloc (abfd, asect->reloc_count * 2 * sizeof (arelent))); if (asect->relocation == NULL) return false; /* The sparc64_elf_slurp_one_reloc_table routine increments reloc_count. */ asect->reloc_count = 0; - + if (!sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)) return false; - - if (rel_hdr2 + + if (rel_hdr2 && !sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr2, symbols, dynamic)) return false; @@ -501,7 +503,6 @@ sparc64_elf_write_relocs (abfd, sec, data) for (idx = 0; idx < sec->reloc_count; idx++) { bfd_vma addr; - unsigned int i; ++count; @@ -533,7 +534,7 @@ sparc64_elf_write_relocs (abfd, sec, data) if (rela_hdr->sh_type != SHT_RELA) abort (); - /* orelocation has the data, reloc_count has the count... */ + /* orelocation has the data, reloc_count has the count... */ outbound_relocas = (Elf64_External_Rela *) rela_hdr->contents; src_rela = outbound_relocas; @@ -627,7 +628,7 @@ struct sparc64_elf_link_hash_table #define sparc64_elf_hash_table(p) \ ((struct sparc64_elf_link_hash_table *) ((p)->hash)) - + /* Create a Sparc64 ELF linker hash table. */ static struct bfd_link_hash_table * @@ -650,7 +651,6 @@ sparc64_elf_bfd_link_hash_table_create (abfd) return &ret->root.root; } - /* Utility for performing the standard initial work of an instruction relocation. @@ -723,13 +723,13 @@ sparc_elf_notsup_reloc (abfd, input_section, output_bfd, error_message) - bfd *abfd; - arelent *reloc_entry; - asymbol *symbol; - PTR data; - asection *input_section; - bfd *output_bfd; - char **error_message; + bfd *abfd ATTRIBUTE_UNUSED; + arelent *reloc_entry ATTRIBUTE_UNUSED; + asymbol *symbol ATTRIBUTE_UNUSED; + PTR data ATTRIBUTE_UNUSED; + asection *input_section ATTRIBUTE_UNUSED; + bfd *output_bfd ATTRIBUTE_UNUSED; + char **error_message ATTRIBUTE_UNUSED; { return bfd_reloc_notsupported; } @@ -745,7 +745,7 @@ sparc_elf_wdisp16_reloc (abfd, reloc_entry, symbol, data, input_section, PTR data; asection *input_section; bfd *output_bfd; - char **error_message; + char **error_message ATTRIBUTE_UNUSED; { bfd_vma relocation; bfd_vma insn; @@ -783,7 +783,7 @@ sparc_elf_hix22_reloc (abfd, PTR data; asection *input_section; bfd *output_bfd; - char **error_message; + char **error_message ATTRIBUTE_UNUSED; { bfd_vma relocation; bfd_vma insn; @@ -820,7 +820,7 @@ sparc_elf_lox10_reloc (abfd, PTR data; asection *input_section; bfd *output_bfd; - char **error_message; + char **error_message ATTRIBUTE_UNUSED; { bfd_vma relocation; bfd_vma insn; @@ -847,7 +847,6 @@ sparc_elf_lox10_reloc (abfd, #define ELF_DYNAMIC_INTERPRETER "/usr/lib/sparcv9/ld.so.1" - /* Fill in the .plt section. */ static void @@ -858,7 +857,7 @@ sparc64_elf_build_plt (output_bfd, contents, nentries) { const unsigned int nop = 0x01000000; int i, j; - + /* The first four entries are reserved, and are initially undefined. We fill them with `illtrap 0' to force ld.so to do something. */ @@ -892,7 +891,7 @@ sparc64_elf_build_plt (output_bfd, contents, nentries) /* Now the tricky bit. Entries 32768 and higher are grouped in blocks of 160: 160 entries and 160 pointers. This is to separate code from data, which is much friendlier on the cache. */ - + for (; i < nentries; i += 160) { int block = (i + 160 <= nentries ? 160 : nentries - i); @@ -935,7 +934,7 @@ sparc64_elf_plt_entry_offset (index) block = (index - LARGE_PLT_THRESHOLD) / 160; ofs = (index - LARGE_PLT_THRESHOLD) % 160; - return ((bfd_vma)(LARGE_PLT_THRESHOLD + block*160) * PLT_ENTRY_SIZE + return ((bfd_vma) (LARGE_PLT_THRESHOLD + block*160) * PLT_ENTRY_SIZE + ofs * 6*4); } @@ -961,8 +960,6 @@ sparc64_elf_plt_ptr_offset (index, max) + last * 6*4 + ofs * 8); } - - /* Look through the relocs for a section during the first phase, and allocate space in the global offset table or procedure linkage @@ -1197,7 +1194,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs) case R_SPARC_UA16: /* When creating a shared object, we must copy these relocs into the output file. We create a reloc section in - dynobj and make room for the reloc. + dynobj and make room for the reloc. But don't do this for debugging sections -- this shows up with DWARF2 -- first because they are not loaded, and @@ -1246,7 +1243,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs) break; default: - (*_bfd_error_handler)(_("%s: check_relocs: unhandled reloc type %d"), + (*_bfd_error_handler) (_("%s: check_relocs: unhandled reloc type %d"), bfd_get_filename(abfd), ELF64_R_TYPE_ID (rel->r_info)); return false; @@ -1265,9 +1262,9 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) struct bfd_link_info *info; const Elf_Internal_Sym *sym; const char **namep; - flagword *flagsp; - asection **secp; - bfd_vma *valp; + flagword *flagsp ATTRIBUTE_UNUSED; + asection **secp ATTRIBUTE_UNUSED; + bfd_vma *valp ATTRIBUTE_UNUSED; { static char *stt_types[] = { "NOTYPE", "OBJECT", "FUNCTION" }; @@ -1275,7 +1272,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) { int reg; struct sparc64_elf_app_reg *p; - + reg = (int)sym->st_value; switch (reg & ~1) { @@ -1316,7 +1313,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) if (**namep) { struct elf_link_hash_entry *h; - + h = (struct elf_link_hash_entry *) bfd_link_hash_lookup (info->hash, *namep, false, false, false); @@ -1387,7 +1384,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) static boolean sparc64_elf_output_arch_syms (output_bfd, info, finfo, func) - bfd *output_bfd; + bfd *output_bfd ATTRIBUTE_UNUSED; struct bfd_link_info *info; PTR finfo; boolean (*func) PARAMS ((PTR, const char *, @@ -1460,7 +1457,7 @@ sparc64_elf_get_symbol_type (elf_sym, type) static void sparc64_elf_symbol_processing (abfd, asym) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; asymbol *asym; { elf_symbol_type *elfsym; @@ -1556,12 +1553,6 @@ sparc64_elf_adjust_dynamic_symbol (info, h) s = bfd_get_section_by_name (dynobj, ".rela.plt"); BFD_ASSERT (s != NULL); - /* The first plt entries are reserved, and the relocations must - pair up exactly. */ - if (s->_raw_size == 0) - s->_raw_size += (PLT_HEADER_SIZE/PLT_ENTRY_SIZE - * sizeof (Elf64_External_Rela)); - s->_raw_size += sizeof (Elf64_External_Rela); /* The procedure linkage table size is bounded by the magnitude @@ -1802,6 +1793,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info) { if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0)) return false; + info->flags |= DF_TEXTREL; } /* Add dynamic STT_REGISTER symbols and corresponding DT_SPARC_REGISTER @@ -1813,7 +1805,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info) if (app_regs [reg].name != NULL) { struct elf_link_local_dynamic_entry *entry, *e; - + if (! bfd_elf64_add_dynamic_entry (info, DT_SPARC_REGISTER, 0)) return false; @@ -1855,6 +1847,21 @@ sparc64_elf_size_dynamic_sections (output_bfd, info) return true; } +#define SET_SEC_DO_RELAX(section) do { elf_section_data(section)->tdata = (void *)1; } while (0) +#define SEC_DO_RELAX(section) (elf_section_data(section)->tdata == (void *)1) + +static boolean +sparc64_elf_relax_section (abfd, section, link_info, again) + bfd *abfd ATTRIBUTE_UNUSED; + asection *section ATTRIBUTE_UNUSED; + struct bfd_link_info *link_info ATTRIBUTE_UNUSED; + boolean *again; +{ + *again = false; + SET_SEC_DO_RELAX (section); + return true; +} + /* Relocate a SPARC64 ELF section. */ static boolean @@ -1898,7 +1905,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, { int r_type; reloc_howto_type *howto; - long r_symndx; + unsigned long r_symndx; struct elf_link_hash_entry *h; Elf_Internal_Sym *sym; asection *sec; @@ -2061,7 +2068,15 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, (!info->shared || info->no_undefined || ELF_ST_VISIBILITY (h->other))))) return false; - relocation = 0; + + /* To avoid generating warning messages about truncated + relocations, set the relocation's address to be the same as + the start of this section. */ + + if (input_section->output_section != NULL) + relocation = input_section->output_section->vma; + else + relocation = 0; } } @@ -2338,7 +2353,6 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, off &= ~1; else { - bfd_put_64 (output_bfd, relocation, sgot->contents + off); local_got_offsets[r_symndx] |= 1; if (info->shared) @@ -2346,6 +2360,13 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, asection *srelgot; Elf_Internal_Rela outrel; + /* The Solaris 2.7 64-bit linker adds the contents + of the location to the value of the reloc. + Note this is different behaviour to the + 32-bit linker, which both adds the contents + and ignores the addend. So clear the location. */ + bfd_put_64 (output_bfd, 0, sgot->contents + off); + /* We need to generate a R_SPARC_RELATIVE reloc for the dynamic linker. */ srelgot = bfd_get_section_by_name(dynobj, ".rela.got"); @@ -2362,6 +2383,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, + srelgot->reloc_count)); ++srelgot->reloc_count; } + else + bfd_put_64 (output_bfd, relocation, sgot->contents + off); } relocation = sgot->output_offset + off - got_base; } @@ -2396,6 +2419,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, relocation = (splt->output_section->vma + splt->output_offset + sparc64_elf_plt_entry_offset (h->plt.offset)); + if (r_type == R_SPARC_WPLT30) + goto do_wplt30; goto do_default; case R_SPARC_OLO10: @@ -2471,6 +2496,97 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, } break; + case R_SPARC_WDISP30: + do_wplt30: + if (SEC_DO_RELAX (input_section) + && rel->r_offset + 4 < input_section->_raw_size) + { +#define G0 0 +#define O7 15 +#define XCC (2 << 20) +#define COND(x) (((x)&0xf)<<25) +#define CONDA COND(0x8) +#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC) +#define INSN_BA (F2(0,2) | CONDA) +#define INSN_OR F3(2, 0x2, 0) +#define INSN_NOP F2(0,4) + + bfd_vma x, y; + + /* If the instruction is a call with either: + restore + arithmetic instruction with rd == %o7 + where rs1 != %o7 and rs2 if it is register != %o7 + then we can optimize if the call destination is near + by changing the call into a branch always. */ + x = bfd_get_32 (input_bfd, contents + rel->r_offset); + y = bfd_get_32 (input_bfd, contents + rel->r_offset + 4); + if ((x & OP(~0)) == OP(1) && (y & OP(~0)) == OP(2)) + { + if (((y & OP3(~0)) == OP3(0x3d) /* restore */ + || ((y & OP3(0x28)) == 0 /* arithmetic */ + && (y & RD(~0)) == RD(O7))) + && (y & RS1(~0)) != RS1(O7) + && ((y & F3I(~0)) + || (y & RS2(~0)) != RS2(O7))) + { + bfd_vma reloc; + + reloc = relocation + rel->r_addend - rel->r_offset; + reloc -= (input_section->output_section->vma + + input_section->output_offset); + if (reloc & 3) + goto do_default; + + /* Ensure the branch fits into simm22. */ + if ((reloc & ~(bfd_vma)0x7fffff) + && ((reloc | 0x7fffff) != MINUS_ONE)) + goto do_default; + reloc >>= 2; + + /* Check whether it fits into simm19. */ + if ((reloc & 0x3c0000) == 0 + || (reloc & 0x3c0000) == 0x3c0000) + x = INSN_BPA | (reloc & 0x7ffff); /* ba,pt %xcc */ + else + x = INSN_BA | (reloc & 0x3fffff); /* ba */ + bfd_put_32 (input_bfd, x, contents + rel->r_offset); + r = bfd_reloc_ok; + if (rel->r_offset >= 4 + && (y & (0xffffffff ^ RS1(~0))) + == (INSN_OR | RD(O7) | RS2(G0))) + { + bfd_vma z; + unsigned int reg; + + z = bfd_get_32 (input_bfd, + contents + rel->r_offset - 4); + if ((z & (0xffffffff ^ RD(~0))) + != (INSN_OR | RS1(O7) | RS2(G0))) + break; + + /* The sequence was + or %o7, %g0, %rN + call foo + or %rN, %g0, %o7 + + If call foo was replaced with ba, replace + or %rN, %g0, %o7 with nop. */ + + reg = (y & RS1(~0)) >> 14; + if (reg != ((z & RD(~0)) >> 25) + || reg == G0 || reg == O7) + break; + + bfd_put_32 (input_bfd, INSN_NOP, + contents + rel->r_offset + 4); + } + break; + } + } + } + /* FALLTHROUGH */ + default: do_default: r = _bfd_final_link_relocate (howto, input_bfd, input_section, @@ -2499,12 +2615,12 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, { /* Assume this is a call protected by other code that detect the symbol is undefined. If this is the case, - we can safely ignore the overflow. If not, the + we can safely ignore the overflow. If not, the program is hosed anyway, and a little warning isn't going to help. */ break; } - + name = h->root.root.string; } else @@ -2550,7 +2666,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym) asection *srela; Elf_Internal_Rela rela; - /* This symbol has an entry in the PLT. Set it up. */ + /* This symbol has an entry in the PLT. Set it up. */ BFD_ASSERT (h->dynindx != -1); @@ -2575,9 +2691,14 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym) rela.r_offset += (splt->output_section->vma + splt->output_offset); rela.r_info = ELF64_R_INFO (h->dynindx, R_SPARC_JMP_SLOT); + /* Adjust for the first 4 reserved elements in the .plt section + when setting the offset in the .rela.plt section. + Sun forgot to read their own ABI and copied elf32-sparc behaviour, + thus .plt[4] has corresponding .rela.plt[0] and so on. */ + bfd_elf64_swap_reloca_out (output_bfd, &rela, ((Elf64_External_Rela *) srela->contents - + h->plt.offset)); + + (h->plt.offset - 4))); if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) { @@ -2770,7 +2891,7 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info) return true; } -/* Functions for dealing with the e_flags field. */ +/* Functions for dealing with the e_flags field. */ /* Merge backend specific data from an object file to the output object file when linking. */ @@ -2796,32 +2917,33 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd) elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } - + else if (new_flags == old_flags) /* Compatible flags are ok */ ; - + else /* Incompatible flags */ { error = false; - + +#define EF_SPARC_ISA_EXTENSIONS \ + (EF_SPARC_SUN_US1 | EF_SPARC_SUN_US3 | EF_SPARC_HAL_R1) + if ((ibfd->flags & DYNAMIC) != 0) { /* We don't want dynamic objects memory ordering and architecture to have any role. That's what dynamic linker should do. */ - old_flags &= ~(EF_SPARCV9_MM | EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1); - old_flags |= (new_flags - & (EF_SPARCV9_MM - | EF_SPARC_SUN_US1 - | EF_SPARC_HAL_R1)); + new_flags &= ~(EF_SPARCV9_MM | EF_SPARC_ISA_EXTENSIONS); + new_flags |= (old_flags + & (EF_SPARCV9_MM | EF_SPARC_ISA_EXTENSIONS)); } else { /* Choose the highest architecture requirements. */ - old_flags |= (new_flags & (EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1)); - new_flags |= (old_flags & (EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1)); - if ((old_flags & (EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1)) - == (EF_SPARC_SUN_US1 | EF_SPARC_HAL_R1)) + old_flags |= (new_flags & EF_SPARC_ISA_EXTENSIONS); + new_flags |= (old_flags & EF_SPARC_ISA_EXTENSIONS); + if ((old_flags & (EF_SPARC_SUN_US1 | EF_SPARC_SUN_US3)) + && (old_flags & EF_SPARC_HAL_R1)) { error = true; (*_bfd_error_handler) @@ -2863,13 +2985,13 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd) static const char * sparc64_elf_print_symbol_all (abfd, filep, symbol) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; PTR filep; asymbol *symbol; { FILE *file = (FILE *) filep; int reg, type; - + if (ELF_ST_TYPE (((elf_symbol_type *) symbol)->internal_elf_sym.st_info) != STT_REGISTER) return NULL; @@ -2894,8 +3016,10 @@ sparc64_elf_object_p (abfd) bfd *abfd; { unsigned long mach = bfd_mach_sparc_v9; - - if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1) + + if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3) + mach = bfd_mach_sparc_v9b; + else if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US1) mach = bfd_mach_sparc_v9a; return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, mach); } @@ -2919,7 +3043,7 @@ const struct elf_size_info sparc64_elf_size_info = /* internal relocations per external relocations. For link purposes we use just 1 internal per 1 external, for assembly and slurp symbol table - we use 2. */ + we use 2. */ 1, 64, /* arch_size */ 8, /* file_align */ @@ -2952,7 +3076,7 @@ const struct elf_size_info sparc64_elf_size_info = #define bfd_elf64_bfd_link_hash_table_create \ sparc64_elf_bfd_link_hash_table_create - + #define elf_info_to_howto \ sparc64_elf_info_to_howto #define bfd_elf64_get_reloc_upper_bound \ @@ -2963,6 +3087,8 @@ const struct elf_size_info sparc64_elf_size_info = sparc64_elf_canonicalize_dynamic_reloc #define bfd_elf64_bfd_reloc_type_lookup \ sparc64_elf_reloc_type_lookup +#define bfd_elf64_bfd_relax_section \ + sparc64_elf_relax_section #define elf_backend_create_dynamic_sections \ _bfd_elf_create_dynamic_sections diff --git a/contrib/binutils/bfd/elfarm-nabi.c b/contrib/binutils/bfd/elfarm-nabi.c index 38778b7..55e1f03 100644 --- a/contrib/binutils/bfd/elfarm-nabi.c +++ b/contrib/binutils/bfd/elfarm-nabi.c @@ -43,6 +43,10 @@ static reloc_howto_type * elf32_arm_reloc_type_lookup PARAMS ((bfd * abfd, bfd_reloc_code_real_type code)); +/* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g. + R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO + in that slot. */ + static reloc_howto_type elf32_arm_howto_table[] = { /* No relocation */ @@ -262,36 +266,36 @@ static reloc_howto_type elf32_arm_howto_table[] = 0x00000000, /* dst_mask */ false), /* pcrel_offset */ - /* These next two relocs are defined, but I do not know what they do. */ - + /* BLX instruction for the ARM. */ HOWTO (R_ARM_XPC25, /* type */ - 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ - 0, /* bitsize */ - false, /* pc_relative */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 25, /* bitsize */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_XPC25", /* name */ false, /* partial_inplace */ - 0x00000000, /* src_mask */ - 0x00000000, /* dst_mask */ - false), /* pcrel_offset */ + 0x00ffffff, /* src_mask */ + 0x00ffffff, /* dst_mask */ + true), /* pcrel_offset */ + /* BLX instruction for the Thumb. */ HOWTO (R_ARM_THM_XPC22, /* type */ - 0, /* rightshift */ - 0, /* size (0 = byte, 1 = short, 2 = long) */ - 0, /* bitsize */ - false, /* pc_relative */ + 2, /* rightshift */ + 2, /* size (0 = byte, 1 = short, 2 = long) */ + 22, /* bitsize */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_XPC22", /* name */ false, /* partial_inplace */ - 0x00000000, /* src_mask */ - 0x00000000, /* dst_mask */ - false), /* pcrel_offset */ - + 0x07ff07ff, /* src_mask */ + 0x07ff07ff, /* dst_mask */ + true), /* pcrel_offset */ + /* These next three relocs are not defined, but we need to fill the space. */ HOWTO (R_ARM_NONE, /* type */ @@ -337,7 +341,7 @@ static reloc_howto_type elf32_arm_howto_table[] = false), /* pcrel_offset */ /* Relocs used in ARM Linux */ - + HOWTO (R_ARM_COPY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -365,7 +369,7 @@ static reloc_howto_type elf32_arm_howto_table[] = 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + HOWTO (R_ARM_JUMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -379,7 +383,7 @@ static reloc_howto_type elf32_arm_howto_table[] = 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + HOWTO (R_ARM_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -393,7 +397,7 @@ static reloc_howto_type elf32_arm_howto_table[] = 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + HOWTO (R_ARM_GOTOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -407,7 +411,7 @@ static reloc_howto_type elf32_arm_howto_table[] = 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + HOWTO (R_ARM_GOTPC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -421,7 +425,7 @@ static reloc_howto_type elf32_arm_howto_table[] = 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ - + HOWTO (R_ARM_GOT32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -435,7 +439,7 @@ static reloc_howto_type elf32_arm_howto_table[] = 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - + HOWTO (R_ARM_PLT32, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -449,8 +453,8 @@ static reloc_howto_type elf32_arm_howto_table[] = 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ true), /* pcrel_offset */ - - /* End of relocs used in ARM Linux */ + + /* End of relocs used in ARM Linux */ HOWTO (R_ARM_RREL32, /* type */ 0, /* rightshift */ @@ -574,7 +578,6 @@ static reloc_howto_type elf32_arm_thm_pc9_howto = 0x000000ff, /* dst_mask */ true); /* pcrel_offset */ - static void elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc) bfd * abfd ATTRIBUTE_UNUSED; @@ -582,7 +585,7 @@ elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc) Elf32_Internal_Rel * elf_reloc; { unsigned int r_type; - + r_type = ELF32_R_TYPE (elf_reloc->r_info); switch (r_type) @@ -590,19 +593,19 @@ elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc) case R_ARM_GNU_VTINHERIT: bfd_reloc->howto = & elf32_arm_vtinherit_howto; break; - + case R_ARM_GNU_VTENTRY: bfd_reloc->howto = & elf32_arm_vtentry_howto; break; - + case R_ARM_THM_PC11: bfd_reloc->howto = & elf32_arm_thm_pc11_howto; break; - + case R_ARM_THM_PC9: bfd_reloc->howto = & elf32_arm_thm_pc9_howto; break; - + default: if (r_type >= NUM_ELEM (elf32_arm_howto_table)) bfd_reloc->howto = NULL; @@ -611,7 +614,7 @@ elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc) break; } } - + struct elf32_arm_reloc_map { bfd_reloc_code_real_type bfd_reloc_val; @@ -622,6 +625,8 @@ static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] = { {BFD_RELOC_NONE, R_ARM_NONE}, {BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24}, + {BFD_RELOC_ARM_PCREL_BLX, R_ARM_XPC25}, + {BFD_RELOC_THUMB_PCREL_BLX, R_ARM_THM_XPC22}, {BFD_RELOC_32, R_ARM_ABS32}, {BFD_RELOC_32_PCREL, R_ARM_REL32}, {BFD_RELOC_8, R_ARM_ABS8}, @@ -664,7 +669,7 @@ elf32_arm_reloc_type_lookup (abfd, code) for (i = 0; i < NUM_ELEM (elf32_arm_reloc_map); i ++) if (elf32_arm_reloc_map[i].bfd_reloc_val == code) return & elf32_arm_howto_table[elf32_arm_reloc_map[i].elf_reloc_val]; - + return NULL; } } diff --git a/contrib/binutils/bfd/elfarm-oabi.c b/contrib/binutils/bfd/elfarm-oabi.c index 72f62f2..e49ea9c 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 Free Software Foundation, Inc. + Copyright 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -17,7 +17,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "elf/arm-oabi.h" +#define OLD_ARM_ABI + +#include "elf/arm.h" #include "bfd.h" #include "sysdep.h" #include "libbfd.h" @@ -263,7 +265,7 @@ static reloc_howto_type elf32_arm_howto_table[] = false), /* pcrel_offset */ /* XXX - gap in index numbering here. */ - + HOWTO (R_ARM_PLT32, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -277,7 +279,7 @@ static reloc_howto_type elf32_arm_howto_table[] = 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ true), /* pcrel_offset */ - + /* XXX - gap in index numbering here. */ HOWTO (R_ARM_RREL32, /* type */ @@ -344,7 +346,7 @@ find_howto (r_type) unsigned int r_type; { int i; - + for (i = NUM_ELEM (elf32_arm_howto_table); i--;) if (elf32_arm_howto_table [i].type == r_type) return elf32_arm_howto_table + i; @@ -388,7 +390,7 @@ static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] = {BFD_RELOC_NONE, R_ARM_SBREL32 }, {BFD_RELOC_NONE, R_ARM_AMP_VCALL9 }, {BFD_RELOC_THUMB_PCREL_BRANCH12, R_ARM_THM_PC11 }, - {BFD_RELOC_THUMB_PCREL_BRANCH9, R_ARM_THM_PC9 }, + {BFD_RELOC_THUMB_PCREL_BRANCH9, R_ARM_THM_PC9 }, {BFD_RELOC_VTABLE_INHERIT, R_ARM_GNU_VTINHERIT }, {BFD_RELOC_VTABLE_ENTRY, R_ARM_GNU_VTENTRY } }; @@ -406,7 +408,7 @@ elf32_arm_reloc_type_lookup (abfd, code) if (code == BFD_RELOC_ARM_PLT32) return find_howto (R_ARM_PLT32); - + return NULL; } diff --git a/contrib/binutils/bfd/elfcode.h b/contrib/binutils/bfd/elfcode.h index c5edf9b..1a5f63a 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 Free Software - Foundation, Inc. + Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 1999, 2000 Free + Software Foundation, Inc. Written by Fred Fish @ Cygnus Support, from information published in "UNIX System V Release 4, Programmers Guide: ANSI C and @@ -118,6 +118,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define elf_add_dynamic_entry NAME(bfd_elf,add_dynamic_entry) #define elf_write_shdrs_and_ehdr NAME(bfd_elf,write_shdrs_and_ehdr) #define elf_write_out_phdrs NAME(bfd_elf,write_out_phdrs) +#define elf_write_relocs NAME(bfd_elf,write_relocs) +#define elf_slurp_reloc_table NAME(bfd_elf,slurp_reloc_table) #define elf_link_create_dynamic_sections \ NAME(bfd_elf,link_create_dynamic_sections) #define elf_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol @@ -165,13 +167,9 @@ static void elf_swap_shdr_out #define section_from_elf_index bfd_section_from_elf_index -static boolean elf_slurp_reloc_table_from_section +static boolean elf_slurp_reloc_table_from_section PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, bfd_size_type, arelent *, asymbol **, boolean)); -static boolean elf_slurp_reloc_table - PARAMS ((bfd *, asection *, asymbol **, boolean)); - -static void write_relocs PARAMS ((bfd *, asection *, PTR)); static boolean elf_file_p PARAMS ((Elf_External_Ehdr *)); @@ -199,7 +197,7 @@ static char *elf_symbol_flags PARAMS ((flagword)); #endif /* Translate an ELF symbol in external format into an ELF symbol in internal - format. */ + format. */ void elf_swap_symbol_in (abfd, src, dst) @@ -221,7 +219,7 @@ elf_swap_symbol_in (abfd, src, dst) } /* Translate an ELF symbol in internal format into an ELF symbol in external - format. */ + format. */ void elf_swap_symbol_out (abfd, src, cdst) @@ -238,9 +236,8 @@ elf_swap_symbol_out (abfd, src, cdst) bfd_h_put_16 (abfd, src->st_shndx, dst->st_shndx); } - /* Translate an ELF file header in external format into an ELF file header in - internal format. */ + internal format. */ static void elf_swap_ehdr_in (abfd, src, dst) @@ -248,11 +245,15 @@ elf_swap_ehdr_in (abfd, src, dst) const Elf_External_Ehdr *src; Elf_Internal_Ehdr *dst; { + int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma; memcpy (dst->e_ident, src->e_ident, EI_NIDENT); dst->e_type = bfd_h_get_16 (abfd, (bfd_byte *) src->e_type); dst->e_machine = bfd_h_get_16 (abfd, (bfd_byte *) src->e_machine); dst->e_version = bfd_h_get_32 (abfd, (bfd_byte *) src->e_version); - dst->e_entry = get_word (abfd, (bfd_byte *) src->e_entry); + if (signed_vma) + dst->e_entry = get_signed_word (abfd, (bfd_byte *) src->e_entry); + else + dst->e_entry = get_word (abfd, (bfd_byte *) src->e_entry); dst->e_phoff = get_word (abfd, (bfd_byte *) src->e_phoff); dst->e_shoff = get_word (abfd, (bfd_byte *) src->e_shoff); dst->e_flags = bfd_h_get_32 (abfd, (bfd_byte *) src->e_flags); @@ -265,7 +266,7 @@ elf_swap_ehdr_in (abfd, src, dst) } /* Translate an ELF file header in internal format into an ELF file header in - external format. */ + external format. */ static void elf_swap_ehdr_out (abfd, src, dst) @@ -273,12 +274,16 @@ elf_swap_ehdr_out (abfd, src, dst) const Elf_Internal_Ehdr *src; Elf_External_Ehdr *dst; { + int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma; memcpy (dst->e_ident, src->e_ident, EI_NIDENT); - /* note that all elements of dst are *arrays of unsigned char* already... */ + /* note that all elements of dst are *arrays of unsigned char* already... */ bfd_h_put_16 (abfd, src->e_type, dst->e_type); bfd_h_put_16 (abfd, src->e_machine, dst->e_machine); bfd_h_put_32 (abfd, src->e_version, dst->e_version); - put_word (abfd, src->e_entry, dst->e_entry); + if (signed_vma) + put_signed_word (abfd, src->e_entry, dst->e_entry); + else + put_word (abfd, src->e_entry, dst->e_entry); put_word (abfd, src->e_phoff, dst->e_phoff); put_word (abfd, src->e_shoff, dst->e_shoff); bfd_h_put_32 (abfd, src->e_flags, dst->e_flags); @@ -290,9 +295,8 @@ elf_swap_ehdr_out (abfd, src, dst) bfd_h_put_16 (abfd, src->e_shstrndx, dst->e_shstrndx); } - /* Translate an ELF section header table entry in external format into an - ELF section header table entry in internal format. */ + ELF section header table entry in internal format. */ static void elf_swap_shdr_in (abfd, src, dst) @@ -320,7 +324,7 @@ elf_swap_shdr_in (abfd, src, dst) } /* Translate an ELF section header table entry in internal format into an - ELF section header table entry in external format. */ + ELF section header table entry in external format. */ static void elf_swap_shdr_out (abfd, src, dst) @@ -328,7 +332,7 @@ elf_swap_shdr_out (abfd, src, dst) const Elf_Internal_Shdr *src; Elf_External_Shdr *dst; { - /* note that all elements of dst are *arrays of unsigned char* already... */ + /* note that all elements of dst are *arrays of unsigned char* already... */ bfd_h_put_32 (abfd, src->sh_name, dst->sh_name); bfd_h_put_32 (abfd, src->sh_type, dst->sh_type); put_word (abfd, src->sh_flags, dst->sh_flags); @@ -341,9 +345,8 @@ elf_swap_shdr_out (abfd, src, dst) put_word (abfd, src->sh_entsize, dst->sh_entsize); } - /* Translate an ELF program header table entry in external format into an - ELF program header table entry in internal format. */ + ELF program header table entry in internal format. */ void elf_swap_phdr_in (abfd, src, dst) @@ -377,7 +380,7 @@ elf_swap_phdr_out (abfd, src, dst) const Elf_Internal_Phdr *src; Elf_External_Phdr *dst; { - /* note that all elements of dst are *arrays of unsigned char* already... */ + /* note that all elements of dst are *arrays of unsigned char* already... */ bfd_h_put_32 (abfd, src->p_type, dst->p_type); put_word (abfd, src->p_offset, dst->p_offset); put_word (abfd, src->p_vaddr, dst->p_vaddr); @@ -388,7 +391,7 @@ elf_swap_phdr_out (abfd, src, dst) put_word (abfd, src->p_align, dst->p_align); } -/* Translate an ELF reloc from external format to internal format. */ +/* Translate an ELF reloc from external format to internal format. */ INLINE void elf_swap_reloc_in (abfd, src, dst) bfd *abfd; @@ -410,7 +413,7 @@ elf_swap_reloca_in (abfd, src, dst) dst->r_addend = get_signed_word (abfd, (bfd_byte *) src->r_addend); } -/* Translate an ELF reloc from internal format to external format. */ +/* Translate an ELF reloc from internal format to external format. */ INLINE void elf_swap_reloc_out (abfd, src, dst) bfd *abfd; @@ -458,7 +461,6 @@ elf_swap_dyn_out (abfd, src, p) /* ELF .o/exec file reading */ - /* Begin processing a given object. First we validate the file by reading in the ELF header and checking @@ -494,9 +496,18 @@ elf_object_p (abfd) char *shstrtab; /* Internal copy of section header stringtab */ struct elf_backend_data *ebd; struct elf_obj_tdata *preserved_tdata = elf_tdata (abfd); + struct sec *preserved_sections = abfd->sections; + unsigned int preserved_section_count = abfd->section_count; + enum bfd_architecture previous_arch = bfd_get_arch (abfd); + unsigned long previous_mach = bfd_get_mach (abfd); struct elf_obj_tdata *new_tdata = NULL; asection *s; + /* Clear section information, since there might be a recognized bfd that + we now check if we can replace, and we don't want to append to it. */ + abfd->sections = NULL; + abfd->section_count = 0; + /* Read in the ELF header in external format. */ if (bfd_read ((PTR) & x_ehdr, sizeof (x_ehdr), 1, abfd) != sizeof (x_ehdr)) @@ -511,7 +522,7 @@ elf_object_p (abfd) make use of. The magic number must match, the address size ('class') and byte-swapping must match our XVEC entry, and it must have a section header table (FIXME: See comments re sections at top of this - file). */ + file). */ if ((elf_file_p (&x_ehdr) == false) || (x_ehdr.e_ident[EI_VERSION] != EV_CURRENT) || @@ -554,13 +565,13 @@ elf_object_p (abfd) if (i_ehdrp->e_type == ET_CORE) goto got_wrong_format_error; - /* If there is no section header table, we're hosed. */ + /* If there is no section header table, we're hosed. */ if (i_ehdrp->e_shoff == 0) goto got_wrong_format_error; /* As a simple sanity check, verify that the what BFD thinks is the size of each section header table entry actually matches the size - recorded in the file. */ + recorded in the file. */ if (i_ehdrp->e_shentsize != sizeof (x_shdr)) goto got_wrong_format_error; @@ -614,8 +625,8 @@ elf_object_p (abfd) goto got_no_match; } - /* Remember the entry point specified in the ELF file header. */ - bfd_get_start_address (abfd) = i_ehdrp->e_entry; + /* Remember the entry point specified in the ELF file header. */ + bfd_set_start_address (abfd, i_ehdrp->e_entry); /* Allocate space for a copy of the section header table in internal form, seek to the section header table in the file, @@ -680,7 +691,7 @@ elf_object_p (abfd) } /* Read in the string table containing the names of the sections. We - will need the base pointer to this table later. */ + will need the base pointer to this table later. */ /* We read this inline now, so that we don't have to go through bfd_section_from_shdr with it (since this particular strtab is used to find all of the ELF section names.) */ @@ -729,6 +740,16 @@ elf_object_p (abfd) return (abfd->xvec); got_wrong_format_error: + /* There is way too much undoing of half-known state here. The caller, + bfd_check_format_matches, really shouldn't iterate on live bfd's to + check match/no-match like it does. We have to rely on that a call to + bfd_default_set_arch_mach with the previously known mach, undoes what + was done by the first bfd_default_set_arch_mach (with mach 0) here. + For this to work, only elf-data and the mach may be changed by the + target-specific elf_backend_object_p function. Note that saving the + whole bfd here and restoring it would be even worse; the first thing + you notice is that the cached bfd file position gets out of sync. */ + bfd_default_set_arch_mach (abfd, previous_arch, previous_mach); bfd_set_error (bfd_error_wrong_format); got_no_match: if (new_tdata != NULL @@ -739,6 +760,8 @@ elf_object_p (abfd) if (new_tdata != NULL) bfd_release (abfd, new_tdata); elf_tdata (abfd) = preserved_tdata; + abfd->sections = preserved_sections; + abfd->section_count = preserved_section_count; return (NULL); } @@ -746,8 +769,8 @@ elf_object_p (abfd) /* Write out the relocs. */ -static void -write_relocs (abfd, sec, data) +void +elf_write_relocs (abfd, sec, data) bfd *abfd; asection *sec; PTR data; @@ -795,7 +818,7 @@ write_relocs (abfd, sec, data) SHT_REL section. */ abort (); - /* orelocation has the data, reloc_count has the count... */ + /* orelocation has the data, reloc_count has the count... */ if (use_rela_p) { outbound_relocas = (Elf_External_Rela *) rela_hdr->contents; @@ -941,7 +964,7 @@ elf_write_shdrs_and_ehdr (abfd) i_ehdrp = elf_elfheader (abfd); i_shdrp = elf_elfsections (abfd); - /* swap the header before spitting it out... */ + /* swap the header before spitting it out... */ #if DEBUG & 1 elf_debug_file (i_ehdrp); @@ -952,7 +975,7 @@ elf_write_shdrs_and_ehdr (abfd) != sizeof (x_ehdr))) return false; - /* at this point we've concocted all the ELF sections... */ + /* at this point we've concocted all the ELF sections... */ x_shdrp = (Elf_External_Shdr *) bfd_alloc (abfd, sizeof (*x_shdrp) * (i_ehdrp->e_shnum)); if (!x_shdrp) @@ -970,7 +993,7 @@ elf_write_shdrs_and_ehdr (abfd) != sizeof (*x_shdrp) * i_ehdrp->e_shnum)) return false; - /* need to dump the string table too... */ + /* need to dump the string table too... */ return true; } @@ -998,7 +1021,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic) based on a one-to-one mapping of the ELF symbols to canonical symbols. We actually use all the ELF symbols, so there will be no space left over at the end. When we have all the symbols, we - build the caller's pointer vector. */ + build the caller's pointer vector. */ if (! dynamic) { @@ -1226,7 +1249,7 @@ error_return: return -1; } -/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of +/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of them. */ static boolean @@ -1325,7 +1348,7 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, /* Read in and swap the external relocs. */ -static boolean +boolean elf_slurp_reloc_table (abfd, asect, symbols, dynamic) bfd *abfd; asection *asect; @@ -1351,7 +1374,7 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic) rel_hdr = &d->rel_hdr; reloc_count = rel_hdr->sh_size / rel_hdr->sh_entsize; rel_hdr2 = d->rel_hdr2; - reloc_count2 = (rel_hdr2 + reloc_count2 = (rel_hdr2 ? (rel_hdr2->sh_size / rel_hdr2->sh_entsize) : 0); @@ -1375,8 +1398,8 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic) reloc_count2 = 0; } - relents = ((arelent *) - bfd_alloc (abfd, + relents = ((arelent *) + bfd_alloc (abfd, (reloc_count + reloc_count2) * sizeof (arelent))); if (relents == NULL) return false; @@ -1386,15 +1409,14 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic) relents, symbols, dynamic)) return false; - - if (rel_hdr2 + + if (rel_hdr2 && !elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr2, reloc_count2, relents + reloc_count, symbols, dynamic)) return false; - asect->relocation = relents; return true; } @@ -1527,13 +1549,13 @@ const struct elf_size_info NAME(_bfd_elf,size_info) = { sizeof (Elf_External_Sym), sizeof (Elf_External_Dyn), sizeof (Elf_External_Note), - ARCH_SIZE / 8, + 4, 1, ARCH_SIZE, FILE_ALIGN, ELFCLASS, EV_CURRENT, elf_write_out_phdrs, elf_write_shdrs_and_ehdr, - write_relocs, + elf_write_relocs, elf_swap_symbol_out, elf_slurp_reloc_table, elf_slurp_symbol_table, diff --git a/contrib/binutils/bfd/elfcore.h b/contrib/binutils/bfd/elfcore.h index e4454aa..2c99e8b 100644 --- a/contrib/binutils/bfd/elfcore.h +++ b/contrib/binutils/bfd/elfcore.h @@ -17,7 +17,6 @@ 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. */ - char* elf_core_file_failing_command (abfd) bfd *abfd; @@ -32,7 +31,6 @@ elf_core_file_failing_signal (abfd) return elf_tdata (abfd)->core_signal; } - boolean elf_core_file_matches_executable_p (core_bfd, exec_bfd) bfd *core_bfd; @@ -40,7 +38,7 @@ elf_core_file_matches_executable_p (core_bfd, exec_bfd) { char* corename; - /* xvecs must match if both are ELF files for the same target. */ + /* xvecs must match if both are ELF files for the same target. */ if (core_bfd->xvec != exec_bfd->xvec) { @@ -48,7 +46,7 @@ elf_core_file_matches_executable_p (core_bfd, exec_bfd) return false; } - /* See if the name in the corefile matches the executable name. */ + /* See if the name in the corefile matches the executable name. */ corename = elf_tdata (core_bfd)->core_program; if (corename != NULL) @@ -63,7 +61,6 @@ elf_core_file_matches_executable_p (core_bfd, exec_bfd) return true; } - /* Core files are simply standard ELF formatted files that partition the file using the execution view of the file (program header table) rather than the linking view. In fact, there is no section header @@ -83,9 +80,11 @@ elf_core_file_p (abfd) { Elf_External_Ehdr x_ehdr; /* Elf file header, external form */ Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */ - Elf_Internal_Phdr *i_phdrp; /* Elf program header, internal form */ + Elf_Internal_Phdr *i_phdrp = NULL; /* Elf program header, internal form */ unsigned int phindex; struct elf_backend_data *ebd; + struct elf_obj_tdata *preserved_tdata = elf_tdata (abfd); + struct elf_obj_tdata *new_tdata = NULL; /* Read in the ELF header in external format. */ if (bfd_read ((PTR) & x_ehdr, sizeof (x_ehdr), 1, abfd) != sizeof (x_ehdr)) @@ -95,21 +94,17 @@ elf_core_file_p (abfd) return NULL; } - /* Check the magic number. */ + /* Check the magic number. */ if (elf_file_p (&x_ehdr) == false) - { - wrong: - bfd_set_error (bfd_error_wrong_format); - return NULL; - } + goto wrong; /* FIXME: Check EI_VERSION here ! */ - /* Check the address size ("class"). */ + /* Check the address size ("class"). */ if (x_ehdr.e_ident[EI_CLASS] != ELFCLASS) goto wrong; - /* Check the byteorder. */ + /* Check the byteorder. */ switch (x_ehdr.e_ident[EI_DATA]) { case ELFDATA2MSB: /* Big-endian */ @@ -124,15 +119,14 @@ elf_core_file_p (abfd) goto wrong; } - /* Give abfd an elf_obj_tdata. */ - elf_tdata (abfd) = + /* Give abfd an elf_obj_tdata. */ + new_tdata = (struct elf_obj_tdata *) bfd_zalloc (abfd, sizeof (struct elf_obj_tdata)); - if (elf_tdata (abfd) == NULL) + if (new_tdata == NULL) return NULL; + elf_tdata (abfd) = new_tdata; - /* FIXME: from here on down, "goto wrong" will leak memory. */ - - /* Swap in the rest of the header, now that we have the byte order. */ + /* Swap in the rest of the header, now that we have the byte order. */ i_ehdrp = elf_elfheader (abfd); elf_swap_ehdr_in (abfd, &x_ehdr, i_ehdrp); @@ -176,7 +170,7 @@ elf_core_file_p (abfd) } /* If there is no program header, or the type is not a core file, then - we are hosed. */ + we are hosed. */ if (i_ehdrp->e_phoff == 0 || i_ehdrp->e_type != ET_CORE) goto wrong; @@ -185,42 +179,64 @@ elf_core_file_p (abfd) if (i_ehdrp->e_phentsize != sizeof (Elf_External_Phdr)) goto wrong; - /* Allocate space for the program headers. */ + /* Move to the start of the program headers. */ + if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) != 0) + goto wrong; + + /* Allocate space for the program headers. */ i_phdrp = (Elf_Internal_Phdr *) bfd_alloc (abfd, sizeof (*i_phdrp) * i_ehdrp->e_phnum); if (!i_phdrp) - return NULL; + goto fail; elf_tdata (abfd)->phdr = i_phdrp; - /* Read and convert to internal form. */ + /* Read and convert to internal form. */ for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) { Elf_External_Phdr x_phdr; if (bfd_read ((PTR) &x_phdr, sizeof (x_phdr), 1, abfd) != sizeof (x_phdr)) - return NULL; + goto fail; elf_swap_phdr_in (abfd, &x_phdr, i_phdrp + phindex); } - /* Process each program header. */ + /* Process each program header. */ for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex) { if (!_bfd_elfcore_section_from_phdr (abfd, i_phdrp + phindex, phindex)) - return NULL; + goto fail; } - /* Set the machine architecture. */ + /* Set the machine architecture. */ if (! bfd_default_set_arch_mach (abfd, ebd->arch, 0)) { /* It's OK if this fails for the generic target. */ if (ebd->elf_machine_code != EM_NONE) - return NULL; + goto fail; } - /* Save the entry point from the ELF header. */ + /* Save the entry point from the ELF header. */ bfd_get_start_address (abfd) = i_ehdrp->e_entry; + /* Let the backend double check the format and override global + information. */ + if (ebd->elf_backend_object_p) + { + if ((*ebd->elf_backend_object_p) (abfd) == false) + goto wrong; + } + return abfd->xvec; + +wrong: + bfd_set_error (bfd_error_wrong_format); +fail: + if (i_phdrp != NULL) + bfd_release (abfd, i_phdrp); + if (new_tdata != NULL) + bfd_release (abfd, new_tdata); + elf_tdata (abfd) = preserved_tdata; + return NULL; } diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c index 8039b4f..bfaf44b 100644 --- a/contrib/binutils/bfd/elflink.c +++ b/contrib/binutils/bfd/elflink.c @@ -41,9 +41,17 @@ _bfd_elf_create_got_section (abfd, info) switch (bed->s->arch_size) { - case 32: ptralign = 2; break; - case 64: ptralign = 3; break; - default: abort(); + case 32: + ptralign = 2; + break; + + case 64: + ptralign = 3; + break; + + default: + bfd_set_error (bfd_error_bad_value); + return false; } flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY @@ -89,7 +97,6 @@ _bfd_elf_create_got_section (abfd, info) return true; } - /* Create dynamic sections when linking against a dynamic object. */ boolean @@ -104,9 +111,17 @@ _bfd_elf_create_dynamic_sections (abfd, info) switch (bed->s->arch_size) { - case 32: ptralign = 2; break; - case 64: ptralign = 3; break; - default: abort(); + case 32: + ptralign = 2; + break; + + case 64: + ptralign = 3; + break; + + default: + bfd_set_error (bfd_error_bad_value); + return false; } /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and @@ -147,7 +162,7 @@ _bfd_elf_create_dynamic_sections (abfd, info) return false; } - s = bfd_make_section (abfd, + s = bfd_make_section (abfd, bed->default_use_rela_p ? ".rela.plt" : ".rel.plt"); if (s == NULL || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY) @@ -183,9 +198,9 @@ _bfd_elf_create_dynamic_sections (abfd, info) copy relocs. */ if (! info->shared) { - s = bfd_make_section (abfd, - (bed->default_use_rela_p - ? ".rela.bss" : ".rel.bss")); + s = bfd_make_section (abfd, + (bed->default_use_rela_p + ? ".rela.bss" : ".rel.bss")); if (s == NULL || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY) || ! bfd_set_section_alignment (abfd, s, ptralign)) @@ -196,7 +211,6 @@ _bfd_elf_create_dynamic_sections (abfd, info) return true; } - /* Record a new dynamic symbol. We record the dynamic symbols as we read the input files, since we need to have a list of all of them before we can determine the final sizes of the output sections. @@ -482,7 +496,6 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults) return lsect; } - /* Find a linker generated pointer with a given addend and type. */ @@ -500,7 +513,6 @@ _bfd_elf_find_pointer_linker_section (linker_pointers, addend, which) return (elf_linker_section_pointers_t *)0; } - /* Make the .rela section corresponding to the generated linker section. */ diff --git a/contrib/binutils/bfd/elflink.h b/contrib/binutils/bfd/elflink.h index 0230892..d3b44e8 100644 --- a/contrib/binutils/bfd/elflink.h +++ b/contrib/binutils/bfd/elflink.h @@ -35,7 +35,7 @@ static boolean elf_link_add_archive_symbols static boolean elf_merge_symbol PARAMS ((bfd *, struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection **, bfd_vma *, struct elf_link_hash_entry **, - boolean *, boolean *, boolean *)); + boolean *, boolean *, boolean *, boolean)); static boolean elf_export_symbol PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_fix_symbol_flags @@ -50,14 +50,14 @@ static boolean elf_link_assign_sym_version PARAMS ((struct elf_link_hash_entry *, PTR)); static boolean elf_collect_hash_codes PARAMS ((struct elf_link_hash_entry *, PTR)); -static boolean elf_link_read_relocs_from_section +static boolean elf_link_read_relocs_from_section PARAMS ((bfd *, Elf_Internal_Shdr *, PTR, Elf_Internal_Rela *)); static void elf_link_output_relocs PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *)); static boolean elf_link_size_reloc_section PARAMS ((bfd *, Elf_Internal_Shdr *, asection *)); -static void elf_link_adjust_relocs - PARAMS ((bfd *, Elf_Internal_Shdr *, unsigned int, +static void elf_link_adjust_relocs + PARAMS ((bfd *, Elf_Internal_Shdr *, unsigned int, struct elf_link_hash_entry **)); /* Given an ELF BFD, add symbols to the global hash table as @@ -94,7 +94,7 @@ is_global_symbol_definition (abfd, sym) /* If the section is undefined, then so is the symbol. */ if (sym->st_shndx == SHN_UNDEF) return false; - + /* If the symbol is defined in the common section, then it is a common definition and so does not count. */ if (sym->st_shndx == SHN_COMMON) @@ -104,18 +104,17 @@ is_global_symbol_definition (abfd, sym) must rely upon the backend to tell us what it is. */ if (sym->st_shndx >= SHN_LORESERVE && sym->st_shndx < SHN_ABS) /* FIXME - this function is not coded yet: - + return _bfd_is_global_symbol_definition (abfd, sym); - + Instead for now assume that the definition is not global, Even if this is wrong, at least the linker will behave in the same way that it used to do. */ return false; - + return true; } - /* Search the symbol table of the archive element of the archive ABFD whoes archove map contains a mention of SYMDEF, and determine if the symbol is defined in this element. */ @@ -132,7 +131,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef) size_t extsymcount; size_t extsymoff; boolean result = false; - + abfd = _bfd_get_elt_at_filepos (abfd, symdef->file_offset); if (abfd == (bfd *) NULL) return false; @@ -146,7 +145,7 @@ elf_link_is_defined_archive_symbol (abfd, symdef) (re)include this element. */ if (abfd->archive_pass) return false; - + /* Select the appropriate symbol table. */ if ((abfd->flags & DYNAMIC) == 0 || elf_dynsymtab (abfd) == 0) hdr = &elf_tdata (abfd)->symtab_hdr; @@ -208,11 +207,10 @@ elf_link_is_defined_archive_symbol (abfd, symdef) } free (buf); - + return result; } - /* Add symbols from an ELF archive file to the linker hash table. We don't use _bfd_generic_link_add_archive_symbols because of a problem which arises on UnixWare. The UnixWare libc.so is an @@ -357,7 +355,6 @@ elf_link_add_archive_symbols (abfd, info) } /* We need to include this archive member. */ - element = _bfd_get_elt_at_filepos (abfd, symdef->file_offset); if (element == (bfd *) NULL) goto error_return; @@ -434,11 +431,12 @@ elf_link_add_archive_symbols (abfd, info) TYPE_CHANGE_OK if it is OK for the type to change. We set SIZE_CHANGE_OK if it is OK for the size to change. By OK to change, we mean that we shouldn't warn if the type or size does - change. */ + change. DT_NEEDED indicates if it comes from a DT_NEEDED entry of + a shared object. */ static boolean elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, - override, type_change_ok, size_change_ok) + override, type_change_ok, size_change_ok, dt_needed) bfd *abfd; struct bfd_link_info *info; const char *name; @@ -449,6 +447,7 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, boolean *override; boolean *type_change_ok; boolean *size_change_ok; + boolean dt_needed; { asection *sec; struct elf_link_hash_entry *h; @@ -625,9 +624,11 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, olddyncommon = false; /* It's OK to change the type if either the existing symbol or the - new symbol is weak. */ + new symbol is weak unless it comes from a DT_NEEDED entry of + a shared object, in which case, the DT_NEEDED entry may not be + required at the run time. */ - if (h->root.type == bfd_link_hash_defweak + if ((! dt_needed && h->root.type == bfd_link_hash_defweak) || h->root.type == bfd_link_hash_undefweak || bind == STB_WEAK) *type_change_ok = true; @@ -679,7 +680,9 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, object to override a weak symbol in a shared object. We prefer a non-weak definition in a shared library to a weak - definition in the executable. */ + definition in the executable unless it comes from a DT_NEEDED + entry of a shared object, in which case, the DT_NEEDED entry + may not be required at the run time. */ if (newdyn && newdef @@ -688,6 +691,7 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, && (bind == STB_WEAK || ELF_ST_TYPE (sym->st_info) == STT_FUNC))) && (h->root.type != bfd_link_hash_defweak + || dt_needed || bind == STB_WEAK)) { *override = true; @@ -822,8 +826,11 @@ elf_merge_symbol (abfd, info, name, sym, psec, pvalue, sym_hash, /* Handle the special case of a weak definition in a regular object followed by a non-weak definition in a shared object. In this - case, we prefer the definition in the shared object. */ + case, we prefer the definition in the shared object unless it + comes from a DT_NEEDED entry of a shared object, in which case, + the DT_NEEDED entry may not be required at the run time. */ if (olddef + && ! dt_needed && h->root.type == bfd_link_hash_defweak && newdef && newdyn @@ -891,6 +898,7 @@ elf_link_add_object_symbols (abfd, info) Elf_External_Sym *esym; Elf_External_Sym *esymend; struct elf_backend_data *bed; + boolean dt_needed; bed = get_elf_backend_data (abfd); add_symbol_hook = bed->elf_add_symbol_hook; @@ -1050,6 +1058,8 @@ elf_link_add_object_symbols (abfd, info) goto error_return; elf_sym_hashes (abfd) = sym_hash; + dt_needed = false; + if (! dynamic) { /* If we are creating a shared library, create all the dynamic @@ -1086,7 +1096,12 @@ elf_link_add_object_symbols (abfd, info) { name = elf_dt_name (abfd); if (*name == '\0') - add_needed = false; + { + if (elf_dt_soname (abfd) != NULL) + dt_needed = true; + + add_needed = false; + } } s = bfd_get_section_by_name (abfd, ".dynamic"); if (s != NULL) @@ -1095,6 +1110,8 @@ elf_link_add_object_symbols (abfd, info) Elf_External_Dyn *extdynend; int elfsec; unsigned long link; + int rpath; + int runpath; dynbuf = (Elf_External_Dyn *) bfd_malloc ((size_t) s->_raw_size); if (dynbuf == NULL) @@ -1128,6 +1145,8 @@ elf_link_add_object_symbols (abfd, info) extdyn = dynbuf; extdynend = extdyn + s->_raw_size / sizeof (Elf_External_Dyn); + rpath = 0; + runpath = 0; for (; extdyn < extdynend; extdyn++) { Elf_Internal_Dyn dyn; @@ -1164,6 +1183,65 @@ elf_link_add_object_symbols (abfd, info) ; *pn = n; } + if (dyn.d_tag == DT_RUNPATH) + { + struct bfd_link_needed_list *n, **pn; + char *fnm, *anm; + + /* When we see DT_RPATH before DT_RUNPATH, we have + to clear runpath. Do _NOT_ bfd_release, as that + frees all more recently bfd_alloc'd blocks as + well. */ + if (rpath && elf_hash_table (info)->runpath) + elf_hash_table (info)->runpath = NULL; + + n = ((struct bfd_link_needed_list *) + bfd_alloc (abfd, sizeof (struct bfd_link_needed_list))); + fnm = bfd_elf_string_from_elf_section (abfd, link, + dyn.d_un.d_val); + if (n == NULL || fnm == NULL) + goto error_return; + anm = bfd_alloc (abfd, strlen (fnm) + 1); + if (anm == NULL) + goto error_return; + strcpy (anm, fnm); + n->name = anm; + n->by = abfd; + n->next = NULL; + for (pn = &elf_hash_table (info)->runpath; + *pn != NULL; + pn = &(*pn)->next) + ; + *pn = n; + runpath = 1; + rpath = 0; + } + /* Ignore DT_RPATH if we have seen DT_RUNPATH. */ + if (!runpath && dyn.d_tag == DT_RPATH) + { + struct bfd_link_needed_list *n, **pn; + char *fnm, *anm; + + n = ((struct bfd_link_needed_list *) + bfd_alloc (abfd, sizeof (struct bfd_link_needed_list))); + fnm = bfd_elf_string_from_elf_section (abfd, link, + dyn.d_un.d_val); + if (n == NULL || fnm == NULL) + goto error_return; + anm = bfd_alloc (abfd, strlen (fnm) + 1); + if (anm == NULL) + goto error_return; + strcpy (anm, fnm); + n->name = anm; + n->by = abfd; + n->next = NULL; + for (pn = &elf_hash_table (info)->runpath; + *pn != NULL; + pn = &(*pn)->next) + ; + *pn = n; + rpath = 1; + } } free (dynbuf); @@ -1291,8 +1369,6 @@ elf_link_add_object_symbols (abfd, info) if (sym.st_shndx != SHN_UNDEF && sym.st_shndx != SHN_COMMON) flags = BSF_GLOBAL; - else - flags = 0; } else if (bind == STB_WEAK) flags = BSF_WEAK; @@ -1458,7 +1534,7 @@ elf_link_add_object_symbols (abfd, info) if (! elf_merge_symbol (abfd, info, name, &sym, &sec, &value, sym_hash, &override, &type_change_ok, - &size_change_ok)) + &size_change_ok, dt_needed)) goto error_return; if (override) @@ -1527,7 +1603,10 @@ elf_link_add_object_symbols (abfd, info) unsigned int align; align = bfd_log2 (sym.st_value); - if (align > old_alignment) + if (align > old_alignment + /* Permit an alignment power of zero if an alignment of one + is specified and no other alignments have been specified. */ + || (sym.st_value == 1 && old_alignment == 0)) h->root.u.c.p->alignment_power = align; } @@ -1579,10 +1658,10 @@ elf_link_add_object_symbols (abfd, info) /* Combine visibilities, using the most constraining one. */ unsigned char hvis = ELF_ST_VISIBILITY (h->other); unsigned char symvis = ELF_ST_VISIBILITY (sym.st_other); - + if (symvis && (hvis > symvis || hvis == 0)) h->other = sym.st_other; - + /* If neither has visibility, use the st_other of the definition. This is an arbitrary choice, since the other bits have no general meaning. */ @@ -1634,7 +1713,7 @@ elf_link_add_object_symbols (abfd, info) name to the fully decorated name. This will cause external references which do not specify a version to be bound to this version of the symbol. */ - if (definition) + if (definition || h->root.type == bfd_link_hash_common) { char *p; @@ -1661,7 +1740,8 @@ elf_link_add_object_symbols (abfd, info) size_change_ok = false; if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec, &value, &hi, &override, - &type_change_ok, &size_change_ok)) + &type_change_ok, + &size_change_ok, dt_needed)) goto error_return; if (! override) @@ -1778,7 +1858,8 @@ elf_link_add_object_symbols (abfd, info) size_change_ok = false; if (! elf_merge_symbol (abfd, info, shortname, &sym, &sec, &value, &hi, &override, - &type_change_ok, &size_change_ok)) + &type_change_ok, + &size_change_ok, dt_needed)) goto error_return; if (override) @@ -1859,11 +1940,58 @@ elf_link_add_object_symbols (abfd, info) switch (ELF_ST_VISIBILITY (h->other)) { case STV_INTERNAL: - case STV_HIDDEN: + case STV_HIDDEN: h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; - (*bed->elf_backend_hide_symbol) (h); + (*bed->elf_backend_hide_symbol) (info, h); break; } + + if (dt_needed && definition + && (h->elf_link_hash_flags + & ELF_LINK_HASH_REF_REGULAR) != 0) + { + bfd_size_type oldsize; + bfd_size_type strindex; + + /* The symbol from a DT_NEEDED object is referenced from + the regular object to create a dynamic executable. We + have to make sure there is a DT_NEEDED entry for it. */ + + dt_needed = false; + oldsize = _bfd_stringtab_size (elf_hash_table (info)->dynstr); + strindex = _bfd_stringtab_add (elf_hash_table (info)->dynstr, + elf_dt_soname (abfd), + true, false); + if (strindex == (bfd_size_type) -1) + goto error_return; + + if (oldsize + == _bfd_stringtab_size (elf_hash_table (info)->dynstr)) + { + asection *sdyn; + Elf_External_Dyn *dyncon, *dynconend; + + sdyn = bfd_get_section_by_name (elf_hash_table (info)->dynobj, + ".dynamic"); + BFD_ASSERT (sdyn != NULL); + + dyncon = (Elf_External_Dyn *) sdyn->contents; + dynconend = (Elf_External_Dyn *) (sdyn->contents + + sdyn->_raw_size); + for (; dyncon < dynconend; dyncon++) + { + Elf_Internal_Dyn dyn; + + elf_swap_dyn_in (elf_hash_table (info)->dynobj, + dyncon, &dyn); + BFD_ASSERT (dyn.d_tag != DT_NEEDED || + dyn.d_un.d_val != strindex); + } + } + + if (! elf_add_dynamic_entry (info, DT_NEEDED, strindex)) + goto error_return; + } } } @@ -2280,7 +2408,6 @@ elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx) return true; } - /* Read and swap the relocs from the section indicated by SHDR. This may be either a REL or a RELA section. The relocations are translated into RELA relocations and stored in INTERNAL_RELOCS, @@ -2404,7 +2531,7 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs, { size_t size; - size = (o->reloc_count * bed->s->int_rels_per_ext_rel + size = (o->reloc_count * bed->s->int_rels_per_ext_rel * sizeof (Elf_Internal_Rela)); if (keep_memory) internal_relocs = (Elf_Internal_Rela *) bfd_alloc (abfd, size); @@ -2430,8 +2557,8 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs, external_relocs, internal_relocs)) goto error_return; - if (!elf_link_read_relocs_from_section - (abfd, + if (!elf_link_read_relocs_from_section + (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 @@ -2458,7 +2585,6 @@ NAME(_bfd_elf,link_read_relocs) (abfd, o, external_relocs, internal_relocs, return NULL; } - /* Record an assignment to a symbol made by a linker script. We need this in case some dynamic object refers to this symbol. */ @@ -2765,7 +2891,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, { struct elf_info_failed eif; struct elf_link_hash_entry *h; - bfd_size_type strsize; + asection *dynstr; *sinterpptr = bfd_get_section_by_name (dynobj, ".interp"); BFD_ASSERT (*sinterpptr != NULL || info->shared); @@ -2783,6 +2909,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, { if (! elf_add_dynamic_entry (info, DT_SYMBOLIC, 0)) return false; + info->flags |= DF_SYMBOLIC; } if (rpath != NULL) @@ -2792,7 +2919,9 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr, rpath, true, true); if (indx == (bfd_size_type) -1 - || ! elf_add_dynamic_entry (info, DT_RPATH, indx)) + || ! elf_add_dynamic_entry (info, DT_RPATH, indx) + || (info->new_dtags + && ! elf_add_dynamic_entry (info, DT_RUNPATH, indx))) return false; } @@ -2867,7 +2996,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, /* If there are initialization and/or finalization functions to call then add the corresponding DT_INIT/DT_FINI entries. */ h = (info->init_function - ? elf_link_hash_lookup (elf_hash_table (info), + ? elf_link_hash_lookup (elf_hash_table (info), info->init_function, false, false, false) : NULL); @@ -2879,7 +3008,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, return false; } h = (info->fini_function - ? elf_link_hash_lookup (elf_hash_table (info), + ? elf_link_hash_lookup (elf_hash_table (info), info->fini_function, false, false, false) : NULL); @@ -2891,14 +3020,24 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, return false; } - strsize = _bfd_stringtab_size (elf_hash_table (info)->dynstr); - if (! elf_add_dynamic_entry (info, DT_HASH, 0) - || ! elf_add_dynamic_entry (info, DT_STRTAB, 0) - || ! elf_add_dynamic_entry (info, DT_SYMTAB, 0) - || ! elf_add_dynamic_entry (info, DT_STRSZ, strsize) - || ! elf_add_dynamic_entry (info, DT_SYMENT, - sizeof (Elf_External_Sym))) - return false; + dynstr = bfd_get_section_by_name (dynobj, ".dynstr"); + /* If .dynstr is excluded from the link, we don't want any of + these tags. Strictly, we should be checking each section + individually; This quick check covers for the case where + someone does a /DISCARD/ : { *(*) }. */ + if (dynstr != NULL && dynstr->output_section != bfd_abs_section_ptr) + { + bfd_size_type strsize; + + strsize = _bfd_stringtab_size (elf_hash_table (info)->dynstr); + if (! elf_add_dynamic_entry (info, DT_HASH, 0) + || ! elf_add_dynamic_entry (info, DT_STRTAB, 0) + || ! elf_add_dynamic_entry (info, DT_SYMTAB, 0) + || ! elf_add_dynamic_entry (info, DT_STRSZ, strsize) + || ! elf_add_dynamic_entry (info, DT_SYMENT, + sizeof (Elf_External_Sym))) + return false; + } } /* The backend must work out the sizes of all the other dynamic @@ -2912,7 +3051,6 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, size_t dynsymcount; asection *s; size_t bucketcount = 0; - Elf_Internal_Sym isym; size_t hash_entry_size; /* Set up the version definition section. */ @@ -3081,6 +3219,22 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, elf_tdata (output_bfd)->cverdefs = cdefs; } + if (info->new_dtags && info->flags) + { + if (! elf_add_dynamic_entry (info, DT_FLAGS, info->flags)) + return false; + } + + if (info->flags_1) + { + if (! info->shared) + info->flags_1 &= ~ (DF_1_INITFIRST + | DF_1_NODELETE + | DF_1_NOOPEN); + if (! elf_add_dynamic_entry (info, DT_FLAGS_1, info->flags_1)) + return false; + } + /* Work out the size of the version reference section. */ s = bfd_get_section_by_name (dynobj, ".gnu.version_r"); @@ -3191,7 +3345,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, } } - /* Assign dynsym indicies. In a shared library we generate a + /* Assign dynsym indicies. 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. */ @@ -3233,15 +3387,20 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, if (s->contents == NULL && s->_raw_size != 0) return false; - /* The first entry in .dynsym is a dummy symbol. */ - isym.st_value = 0; - isym.st_size = 0; - isym.st_name = 0; - isym.st_info = 0; - isym.st_other = 0; - isym.st_shndx = 0; - elf_swap_symbol_out (output_bfd, &isym, - (PTR) (Elf_External_Sym *) s->contents); + if (dynsymcount != 0) + { + Elf_Internal_Sym isym; + + /* The first entry in .dynsym is a dummy symbol. */ + isym.st_value = 0; + isym.st_size = 0; + isym.st_name = 0; + isym.st_info = 0; + isym.st_other = 0; + isym.st_shndx = 0; + elf_swap_symbol_out (output_bfd, &isym, + (PTR) (Elf_External_Sym *) s->contents); + } /* Compute the size of the hashing table. As a side effect this computes the hash values for all the names we export. */ @@ -3257,7 +3416,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath, memset (s->contents, 0, (size_t) s->_raw_size); bfd_put (8 * hash_entry_size, output_bfd, bucketcount, s->contents); - bfd_put (8 * hash_entry_size, output_bfd, dynsymcount, + bfd_put (8 * hash_entry_size, output_bfd, dynsymcount, s->contents + hash_entry_size); elf_hash_table (info)->bucketcount = bucketcount; @@ -3290,6 +3449,9 @@ elf_fix_symbol_flags (h, eif) an ELF dynamic object. */ if ((h->elf_link_hash_flags & ELF_LINK_NON_ELF) != 0) { + while (h->root.type == bfd_link_hash_indirect) + h = (struct elf_link_hash_entry *) h->root.u.i.link; + if (h->root.type != bfd_link_hash_defined && h->root.type != bfd_link_hash_defweak) h->elf_link_hash_flags |= (ELF_LINK_HASH_REF_REGULAR @@ -3705,7 +3867,7 @@ elf_link_assign_sym_version (h, data) && ! sinfo->export_dynamic) { h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; - (*bed->elf_backend_hide_symbol) (h); + (*bed->elf_backend_hide_symbol) (info, h); /* FIXME: The name of the symbol has already been recorded in the dynamic string table section. */ @@ -3729,7 +3891,7 @@ elf_link_assign_sym_version (h, data) int version_index; /* If we aren't going to export this symbol, we don't need - to worry about it. */ + to worry about it. */ if (h->dynindx == -1) return true; @@ -3817,7 +3979,7 @@ elf_link_assign_sym_version (h, data) && ! sinfo->export_dynamic) { h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; - (*bed->elf_backend_hide_symbol) (h); + (*bed->elf_backend_hide_symbol) (info, h); /* FIXME: The name of the symbol has already been recorded in the dynamic string table section. */ @@ -3839,7 +4001,7 @@ elf_link_assign_sym_version (h, data) && ! sinfo->export_dynamic) { h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL; - (*bed->elf_backend_hide_symbol) (h); + (*bed->elf_backend_hide_symbol) (info, h); /* FIXME: The name of the symbol has already been recorded in the dynamic string table section. */ } @@ -3937,11 +4099,13 @@ elf_link_size_reloc_section (abfd, rel_hdr, o) rel_hdr->sh_size = rel_hdr->sh_entsize * reloc_count; /* The contents field must last into write_object_contents, so we - allocate it with bfd_alloc rather than malloc. */ - rel_hdr->contents = (PTR) bfd_alloc (abfd, rel_hdr->sh_size); + allocate it with bfd_alloc rather than malloc. Also since we + cannot be sure that the contents will actually be filled in, + we zero the allocated space. */ + rel_hdr->contents = (PTR) bfd_zalloc (abfd, rel_hdr->sh_size); if (rel_hdr->contents == NULL && rel_hdr->sh_size != 0) return false; - + /* We only allocate one set of hash entries, so we only do it the first time we are called. */ if (elf_section_data (o)->rel_hashes == NULL) @@ -3974,6 +4138,7 @@ elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash) struct elf_link_hash_entry **rel_hash; { unsigned int i; + struct elf_backend_data *bed = get_elf_backend_data (abfd); for (i = 0; i < count; i++, rel_hash++) { @@ -3986,26 +4151,38 @@ elf_link_adjust_relocs (abfd, rel_hdr, count, rel_hash) { Elf_External_Rel *erel; Elf_Internal_Rel irel; - + erel = (Elf_External_Rel *) rel_hdr->contents + i; - elf_swap_reloc_in (abfd, erel, &irel); + if (bed->s->swap_reloc_in) + (*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_out (abfd, &irel, erel); + if (bed->s->swap_reloc_out) + (*bed->s->swap_reloc_out) (abfd, &irel, (bfd_byte *) erel); + else + elf_swap_reloc_out (abfd, &irel, erel); } else { Elf_External_Rela *erela; Elf_Internal_Rela irela; - + BFD_ASSERT (rel_hdr->sh_entsize == sizeof (Elf_External_Rela)); - + erela = (Elf_External_Rela *) rel_hdr->contents + i; - elf_swap_reloca_in (abfd, erela, &irela); + if (bed->s->swap_reloca_in) + (*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_out (abfd, &irela, erela); + if (bed->s->swap_reloca_out) + (*bed->s->swap_reloca_out) (abfd, &irela, (bfd_byte *) erela); + else + elf_swap_reloca_out (abfd, &irela, erela); } } } @@ -4100,7 +4277,7 @@ elf_bfd_final_link (abfd, info) the linker has decided to not include. */ sec->linker_mark = true; - if (info->relocateable) + if (info->relocateable || info->emitrelocations) o->reloc_count += sec->reloc_count; if (sec->_raw_size > max_contents_size) @@ -4168,7 +4345,7 @@ elf_bfd_final_link (abfd, info) /* Figure out how many relocations we will have in each section. Just using RELOC_COUNT isn't good enough since that doesn't maintain a separate value for REL vs. RELA relocations. */ - if (info->relocateable) + if (info->relocateable || info->emitrelocations) for (sub = info->input_bfds; sub != NULL; sub = sub->link_next) for (o = sub->sections; o != NULL; o = o->next) { @@ -4185,9 +4362,9 @@ elf_bfd_final_link (abfd, info) if (output_section != NULL && (o->flags & SEC_RELOC) != 0) { - struct bfd_elf_section_data *esdi + struct bfd_elf_section_data *esdi = elf_section_data (o); - struct bfd_elf_section_data *esdo + struct bfd_elf_section_data *esdo = elf_section_data (output_section); unsigned int *rel_count; unsigned int *rel_count2; @@ -4204,11 +4381,11 @@ elf_bfd_final_link (abfd, info) rel_count = &esdo->rel_count2; rel_count2 = &esdo->rel_count; } - - *rel_count += (esdi->rel_hdr.sh_size + + *rel_count += (esdi->rel_hdr.sh_size / esdi->rel_hdr.sh_entsize); if (esdi->rel_hdr2) - *rel_count2 += (esdi->rel_hdr2->sh_size + *rel_count2 += (esdi->rel_hdr2->sh_size / esdi->rel_hdr2->sh_entsize); } } @@ -4232,7 +4409,7 @@ elf_bfd_final_link (abfd, info) } /* Now, reset REL_COUNT and REL_COUNT2 so that we can use them - to count upwards while actually outputting the relocations. */ + to count upwards while actually outputting the relocations. */ elf_section_data (o)->rel_count = 0; elf_section_data (o)->rel_count2 = 0; } @@ -4276,7 +4453,7 @@ elf_bfd_final_link (abfd, info) /* Start writing out the symbol table. The first symbol is always a dummy symbol. */ - if (info->strip != strip_all || info->relocateable) + if (info->strip != strip_all || info->relocateable || info->emitrelocations) { elfsym.st_value = 0; elfsym.st_size = 0; @@ -4309,7 +4486,7 @@ elf_bfd_final_link (abfd, info) symbols have no names. We store the index of each one in the index field of the section, so that we can find it again when outputting relocs. */ - if (info->strip != strip_all || info->relocateable) + if (info->strip != strip_all || info->relocateable || info->emitrelocations) { elfsym.st_size = 0; elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION); @@ -4411,7 +4588,7 @@ elf_bfd_final_link (abfd, info) /* That wrote out all the local symbols. Finish up the symbol table with the global symbols. Even if we want to strip everything we can, we still need to deal with those global symbols that got - converted to local in a version script. */ + converted to local in a version script. */ if (info->shared) { @@ -4433,7 +4610,8 @@ elf_bfd_final_link (abfd, info) /* The sh_info field records the index of the first non local symbol. */ symtab_hdr->sh_info = bfd_get_symcount (abfd); - if (dynamic) + if (dynamic + && finfo.dynsym_sec->output_section != bfd_abs_section_ptr) { Elf_Internal_Sym sym; Elf_External_Sym *dynsym = @@ -4523,7 +4701,7 @@ elf_bfd_final_link (abfd, info) Elf_Internal_Sym *, asection *))) elf_link_output_sym)) return false; - } + } /* Flush all symbols to the file. */ if (! elf_link_flush_output_syms (&finfo)) @@ -4562,13 +4740,13 @@ elf_bfd_final_link (abfd, info) if ((o->flags & SEC_RELOC) == 0) continue; - elf_link_adjust_relocs (abfd, &elf_section_data (o)->rel_hdr, + elf_link_adjust_relocs (abfd, &elf_section_data (o)->rel_hdr, elf_section_data (o)->rel_count, elf_section_data (o)->rel_hashes); if (elf_section_data (o)->rel_hdr2 != NULL) elf_link_adjust_relocs (abfd, elf_section_data (o)->rel_hdr2, elf_section_data (o)->rel_count2, - (elf_section_data (o)->rel_hashes + (elf_section_data (o)->rel_hashes + elf_section_data (o)->rel_count)); /* Set the reloc_count field to 0 to prevent write_relocs from @@ -4698,7 +4876,8 @@ elf_bfd_final_link (abfd, info) for (o = dynobj->sections; o != NULL; o = o->next) { if ((o->flags & SEC_HAS_CONTENTS) == 0 - || o->_raw_size == 0) + || o->_raw_size == 0 + || o->output_section == bfd_abs_section_ptr) continue; if ((o->flags & SEC_LINKER_CREATED) == 0) { @@ -4912,6 +5091,7 @@ elf_link_output_extsym (h, data) referenced by regular files, because we will already have issued warnings for them. */ if (! finfo->info->relocateable + && ! finfo->info->allow_shlib_undefined && ! (finfo->info->shared && !finfo->info->no_undefined) && h->root.type == bfd_link_hash_undefined @@ -5031,12 +5211,9 @@ elf_link_output_extsym (h, data) symbol foo@@GNU_1.2 is the default, which should be used when foo is used with no version, then we add an indirect symbol foo which points to foo@@GNU_1.2. We ignore these symbols, - since the indirected symbol is already in the hash table. If - the indirect symbol is non-ELF, fall through and output it. */ - if ((h->elf_link_hash_flags & ELF_LINK_NON_ELF) == 0) - return true; + since the indirected symbol is already in the hash table. */ + return true; - /* Fall through. */ case bfd_link_hash_warning: /* We can't represent these symbols in ELF, although a warning symbol may have come from a .gnu.warning.SYMBOL section. We @@ -5087,7 +5264,7 @@ elf_link_output_extsym (h, data) } /* If a symbol is not defined locally, we clear the visibility - field. */ + field. */ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) sym.st_other ^= ELF_ST_VISIBILITY(sym.st_other); @@ -5112,7 +5289,7 @@ elf_link_output_extsym (h, data) bucketcount = elf_hash_table (finfo->info)->bucketcount; bucket = h->elf_hash_value % bucketcount; - hash_entry_size + hash_entry_size = elf_section_data (finfo->hash_sec)->this_hdr.sh_entsize; bucketpos = ((bfd_byte *) finfo->hash_sec->contents + (bucket + 2) * hash_entry_size); @@ -5172,7 +5349,7 @@ elf_link_output_extsym (h, data) OUTPUT_BFD. */ static void -elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, +elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, internal_relocs) bfd *output_bfd; asection *input_section; @@ -5184,11 +5361,12 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, Elf_Internal_Shdr *output_rel_hdr; asection *output_section; unsigned int *rel_countp = NULL; + struct elf_backend_data *bed; output_section = input_section->output_section; output_rel_hdr = NULL; - if (elf_section_data (output_section)->rel_hdr.sh_entsize + if (elf_section_data (output_section)->rel_hdr.sh_entsize == input_rel_hdr->sh_entsize) { output_rel_hdr = &elf_section_data (output_section)->rel_hdr; @@ -5203,7 +5381,8 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, } BFD_ASSERT (output_rel_hdr != NULL); - + + bed = get_elf_backend_data (output_bfd); irela = internal_relocs; irelaend = irela + input_rel_hdr->sh_size / input_rel_hdr->sh_entsize; if (input_rel_hdr->sh_entsize == sizeof (Elf_External_Rel)) @@ -5218,7 +5397,10 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, irel.r_offset = irela->r_offset; irel.r_info = irela->r_info; BFD_ASSERT (irela->r_addend == 0); - elf_swap_reloc_out (output_bfd, &irel, erel); + if (bed->s->swap_reloc_out) + (*bed->s->swap_reloc_out) (output_bfd, &irel, (PTR) erel); + else + elf_swap_reloc_out (output_bfd, &irel, erel); } } else @@ -5229,7 +5411,10 @@ elf_link_output_relocs (output_bfd, input_section, input_rel_hdr, == sizeof (Elf_External_Rela)); erela = ((Elf_External_Rela *) output_rel_hdr->contents + *rel_countp); for (; irela < irelaend; irela++, erela++) - elf_swap_reloca_out (output_bfd, irela, erela); + if (bed->s->swap_reloca_out) + (*bed->s->swap_reloca_out) (output_bfd, irela, (PTR) erela); + else + elf_swap_reloca_out (output_bfd, irela, erela); } /* Bump the counter, so that we know where to add the next set of @@ -5346,16 +5531,43 @@ elf_link_input_bfd (finfo, input_bfd) if (esym == external_syms) continue; + if (ELF_ST_TYPE (isym->st_info) == STT_SECTION) + { + asection *ksec; + + /* Save away all section symbol values. */ + if (isec != NULL) + 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 + linker will keep the first of any matching link-once + sections, so we should have already seen it's section + symbol. I trust no-one will have the bright idea of + re-ordering the bfd list... */ + if (isec != NULL + && (bfd_get_section_flags (input_bfd, isec) & SEC_LINK_ONCE) != 0 + && (ksec = isec->kept_section) != NULL) + { + isym->st_value = ksec->symbol->value; + + /* That put the value right, but the section info is all + wrong. I hope this works. */ + isec->output_offset = ksec->output_offset; + isec->output_section = ksec->output_section; + } + + /* We never output section symbols. Instead, we use the + section symbol of the corresponding section in the output + file. */ + continue; + } + /* If we are stripping all symbols, we don't want to output this one. */ if (finfo->info->strip == strip_all) continue; - /* We never output section symbols. Instead, we use the section - symbol of the corresponding section in the output file. */ - if (ELF_ST_TYPE (isym->st_info) == STT_SECTION) - continue; - /* If we are discarding all local symbols, we don't want to output this one. If we are generating a relocateable output file, then some of the local symbols may be required by @@ -5493,7 +5705,7 @@ elf_link_input_bfd (finfo, input_bfd) finfo->sections)) return false; - if (finfo->info->relocateable) + if (finfo->info->relocateable || finfo->info->emitrelocations) { Elf_Internal_Rela *irela; Elf_Internal_Rela *irelaend; @@ -5503,7 +5715,7 @@ elf_link_input_bfd (finfo, input_bfd) /* Adjust the reloc addresses and symbol indices. */ irela = internal_relocs; - irelaend = + 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 @@ -5516,6 +5728,10 @@ elf_link_input_bfd (finfo, input_bfd) irela->r_offset += o->output_offset; + /* Relocs in an executable have to be virtual addresses. */ + if (finfo->info->emitrelocations) + irela->r_offset += o->output_section->vma; + r_symndx = ELF_R_SYM (irela->r_info); if (r_symndx == 0) @@ -5552,7 +5768,7 @@ elf_link_input_bfd (finfo, input_bfd) continue; } - /* This is a reloc against a local symbol. */ + /* This is a reloc against a local symbol. */ *rel_hash = NULL; isym = finfo->internal_syms + r_symndx; @@ -5631,14 +5847,14 @@ elf_link_input_bfd (finfo, input_bfd) /* Swap out the relocs. */ input_rel_hdr = &elf_section_data (o)->rel_hdr; - elf_link_output_relocs (output_bfd, o, + elf_link_output_relocs (output_bfd, o, input_rel_hdr, internal_relocs); - internal_relocs + internal_relocs += input_rel_hdr->sh_size / input_rel_hdr->sh_entsize; input_rel_hdr = elf_section_data (o)->rel_hdr2; if (input_rel_hdr) - elf_link_output_relocs (output_bfd, o, + elf_link_output_relocs (output_bfd, o, input_rel_hdr, internal_relocs); } @@ -5685,6 +5901,7 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order) bfd_vma addend; struct elf_link_hash_entry **rel_hash_ptr; Elf_Internal_Shdr *rel_hdr; + struct elf_backend_data *bed = get_elf_backend_data (output_bfd); howto = bfd_reloc_type_lookup (output_bfd, link_order->u.reloc.p->reloc); if (howto == NULL) @@ -5808,7 +6025,10 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order) irel.r_info = ELF_R_INFO (indx, howto->type); erel = ((Elf_External_Rel *) rel_hdr->contents + elf_section_data (output_section)->rel_count); - elf_swap_reloc_out (output_bfd, &irel, erel); + if (bed->s->swap_reloc_out) + (*bed->s->swap_reloc_out) (output_bfd, &irel, (bfd_byte *) erel); + else + elf_swap_reloc_out (output_bfd, &irel, erel); } else { @@ -5820,14 +6040,16 @@ elf_reloc_link_order (output_bfd, info, output_section, link_order) irela.r_addend = addend; erela = ((Elf_External_Rela *) rel_hdr->contents + elf_section_data (output_section)->rel_count); - elf_swap_reloca_out (output_bfd, &irela, erela); + if (bed->s->swap_reloca_out) + (*bed->s->swap_reloca_out) (output_bfd, &irela, (bfd_byte *) erela); + else + elf_swap_reloca_out (output_bfd, &irela, erela); } ++elf_section_data (output_section)->rel_count; return true; } - /* Allocate a pointer to live in a linker created section. */ @@ -5950,7 +6172,6 @@ elf_create_pointer_linker_section (abfd, info, lsect, h, rel) return true; } - #if ARCH_SIZE==64 #define bfd_put_ptr(BFD,VAL,ADDR) bfd_put_64 (BFD, VAL, ADDR) @@ -6177,22 +6398,22 @@ elf_gc_mark (info, sec, gc_mark_hook) { elf_swap_symbol_in (input_bfd, &locsyms[r_symndx], &s); if (ELF_ST_BIND (s.st_info) == STB_LOCAL) - rsec = (*gc_mark_hook)(sec->owner, info, rel, NULL, &s); + rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s); else { h = sym_hashes[r_symndx - extsymoff]; - rsec = (*gc_mark_hook)(sec->owner, info, rel, h, NULL); + rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL); } } else if (r_symndx >= nlocsyms) { h = sym_hashes[r_symndx - extsymoff]; - rsec = (*gc_mark_hook)(sec->owner, info, rel, h, NULL); + rsec = (*gc_mark_hook) (sec->owner, info, rel, h, NULL); } else { elf_swap_symbol_in (input_bfd, &locsyms[r_symndx], &s); - rsec = (*gc_mark_hook)(sec->owner, info, rel, NULL, &s); + rsec = (*gc_mark_hook) (sec->owner, info, rel, NULL, &s); } if (rsec && !rsec->gc_mark) @@ -6263,7 +6484,7 @@ elf_gc_sweep (info, gc_sweep_hook) if (internal_relocs == NULL) return false; - r = (*gc_sweep_hook)(o->owner, info, o, internal_relocs); + r = (*gc_sweep_hook) (o->owner, info, o, internal_relocs); if (!info->keep_memory) free (internal_relocs); @@ -6316,7 +6537,7 @@ elf_gc_propagate_vtable_entries_used (h, okp) struct elf_link_hash_entry *h; PTR okp; { - /* Those that are not vtables. */ + /* Those that are not vtables. */ if (h->vtable_parent == NULL) return true; @@ -6422,7 +6643,7 @@ elf_gc_sections (abfd, info) struct elf_link_hash_entry *h, Elf_Internal_Sym *)); if (!get_elf_backend_data (abfd)->can_gc_sections - || info->relocateable + || info->relocateable || info->emitrelocations || elf_hash_table (info)->dynamic_sections_created) return true; @@ -6558,7 +6779,7 @@ elf_gc_record_vtentry (abfd, sec, h, addend) if (ptr) { ptr = bfd_realloc (ptr - 1, bytes); - + if (ptr != NULL) { size_t oldbytes; @@ -6572,12 +6793,12 @@ elf_gc_record_vtentry (abfd, sec, h, addend) if (ptr == NULL) return false; - + /* And arrange for that done flag to be at index -1. */ h->vtable_entries_used = ptr + 1; h->vtable_entries_size = size; } - + h->vtable_entries_used[addend / FILE_ALIGN] = true; return true; @@ -6634,7 +6855,8 @@ elf_gc_common_finalize_got_offsets (abfd, info) } } - /* Then the global .got and .plt entries. */ + /* Then the global .got entries. .plt refcounts are handled by + adjust_dynamic_symbol */ elf_link_hash_traverse (elf_hash_table (info), elf_gc_allocate_got_offsets, (PTR) &gotoff); diff --git a/contrib/binutils/bfd/elfxx-target.h b/contrib/binutils/bfd/elfxx-target.h index b1f4867..e69036f 100644 --- a/contrib/binutils/bfd/elfxx-target.h +++ b/contrib/binutils/bfd/elfxx-target.h @@ -237,6 +237,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef elf_backend_section_from_shdr #define elf_backend_section_from_shdr 0 #endif +#ifndef elf_backend_section_flags +#define elf_backend_section_flags 0 +#endif #ifndef elf_backend_section_from_phdr #define elf_backend_section_from_phdr 0 #endif @@ -313,7 +316,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol #endif - /* Previously, backends could only use SHT_REL or SHT_RELA relocation sections, but not both. They defined USE_REL to indicate SHT_REL sections, and left it undefined to indicated SHT_RELA sections. @@ -323,16 +325,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #else #undef USE_REL #define USE_REL 1 -#endif +#endif /* Use these in new code. */ -#ifndef elf_backend_may_use_rel_p +#ifndef elf_backend_may_use_rel_p #define elf_backend_may_use_rel_p USE_REL -#endif +#endif #ifndef elf_backend_may_use_rela_p #define elf_backend_may_use_rela_p !USE_REL #endif -#ifndef elf_backend_default_use_rela_p +#ifndef elf_backend_default_use_rela_p #define elf_backend_default_use_rela_p !USE_REL #endif @@ -354,6 +356,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern const struct elf_size_info _bfd_elfNN_size_info; +#ifndef INCLUDED_TARGET_FILE static CONST struct elf_backend_data elfNN_bed = { ELF_ARCH, /* arch */ @@ -368,6 +371,7 @@ static CONST struct elf_backend_data elfNN_bed = elf_backend_get_symbol_type, elf_backend_section_processing, elf_backend_section_from_shdr, + elf_backend_section_flags, elf_backend_section_from_phdr, elf_backend_fake_sections, elf_backend_section_from_bfd_section, @@ -413,6 +417,7 @@ static CONST struct elf_backend_data elfNN_bed = elf_backend_can_gc_sections, elf_backend_want_dynbss }; +#endif /* Forward declaration for use when initialising alternative_target field. */ #ifdef TARGET_LITTLE_SYM @@ -603,7 +608,7 @@ const bfd_target TARGET_LITTLE_SYM = #else NULL, #endif - + /* backend_data: */ (PTR) &elfNN_bed }; diff --git a/contrib/binutils/bfd/format.c b/contrib/binutils/bfd/format.c index c9f1f9c..ad4a6a8 100644 --- a/contrib/binutils/bfd/format.c +++ b/contrib/binutils/bfd/format.c @@ -23,7 +23,7 @@ SECTION File formats A format is a BFD concept of high level file contents type. The - formats supported by BFD are: + formats supported by BFD are: o <> @@ -37,7 +37,6 @@ SECTION The BFD contains the result of an executable core dump. - */ #include "bfd.h" @@ -68,7 +67,7 @@ DESCRIPTION the file, or an error results. The function returns <> on success, otherwise <> - with one of the following error codes: + with one of the following error codes: o <> - if <> is not one of <>, <> or @@ -109,7 +108,7 @@ DESCRIPTION Then the user may choose a format and try again. When done with the list that @var{matching} points to, the caller - should free it. + should free it. */ boolean @@ -125,20 +124,20 @@ bfd_check_format_matches (abfd, format, matching) if (!bfd_read_p (abfd) || ((int)(abfd->format) < (int)bfd_unknown) || - ((int)(abfd->format) >= (int)bfd_type_end)) { - bfd_set_error (bfd_error_invalid_operation); - return false; - } + ((int)(abfd->format) >= (int)bfd_type_end)) + { + bfd_set_error (bfd_error_invalid_operation); + return false; + } if (abfd->format != bfd_unknown) return (abfd->format == format)? true: false; - - /* Since the target type was defaulted, check them + /* Since the target type was defaulted, check them all in the hope that one will be uniquely recognized. */ - save_targ = abfd->xvec; match_count = 0; + if (matching) { matching_vector = @@ -149,119 +148,147 @@ bfd_check_format_matches (abfd, format, matching) matching_vector[0] = NULL; *matching = matching_vector; } - right_targ = 0; + right_targ = 0; - /* presume the answer is yes */ + /* Presume the answer is yes. */ abfd->format = format; /* If the target type was explicitly specified, just check that target. */ + if (!abfd->target_defaulted) + { + if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0) /* rewind! */ + return false; - if (!abfd->target_defaulted) { - if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0) /* rewind! */ - return false; - right_targ = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd)); - if (right_targ) { - abfd->xvec = right_targ; /* Set the target as returned */ - if (matching) - free (matching_vector); - return true; /* File position has moved, BTW */ - } + right_targ = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd)); - /* For a long time the code has dropped through to check all - targets if the specified target was wrong. I don't know why, - and I'm reluctant to change it. However, in the case of an - archive, it can cause problems. If the specified target does - not permit archives (e.g., the binary target), then we should - not allow some other target to recognize it as an archive, but - should instead allow the specified target to recognize it as an - object. When I first made this change, it broke the PE target, - because the specified pei-i386 target did not recognize the - actual pe-i386 archive. Since there may be other problems of - this sort, I changed this test to check only for the binary - target. */ - - if (format == bfd_archive && save_targ == &binary_vec) - { - abfd->xvec = save_targ; - abfd->format = bfd_unknown; - if (matching) - free (matching_vector); - bfd_set_error (bfd_error_file_not_recognized); - return false; - } - } + if (right_targ) + { + abfd->xvec = right_targ; /* Set the target as returned. */ - for (target = bfd_target_vector; *target != NULL; target++) { - const bfd_target *temp; + if (matching) + free (matching_vector); - if (*target == &binary_vec) - continue; + return true; /* File position has moved, BTW. */ + } - abfd->xvec = *target; /* Change BFD's target temporarily */ - if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0) - return false; - /* If _bfd_check_format neglects to set bfd_error, assume bfd_error_wrong_format. - We didn't used to even pay any attention to bfd_error, so I suspect - that some _bfd_check_format might have this problem. */ - bfd_set_error (bfd_error_wrong_format); - temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd)); - if (temp) { /* This format checks out as ok! */ - right_targ = temp; - if (matching) + /* For a long time the code has dropped through to check all + targets if the specified target was wrong. I don't know why, + and I'm reluctant to change it. However, in the case of an + archive, it can cause problems. If the specified target does + not permit archives (e.g., the binary target), then we should + not allow some other target to recognize it as an archive, but + should instead allow the specified target to recognize it as an + object. When I first made this change, it broke the PE target, + because the specified pei-i386 target did not recognize the + actual pe-i386 archive. Since there may be other problems of + this sort, I changed this test to check only for the binary + target. */ + if (format == bfd_archive && save_targ == &binary_vec) { - matching_vector[match_count] = temp->name; - matching_vector[match_count + 1] = NULL; + abfd->xvec = save_targ; + abfd->format = bfd_unknown; + + if (matching) + free (matching_vector); + + bfd_set_error (bfd_error_file_not_recognized); + + return false; } - match_count++; - /* If this is the default target, accept it, even if other targets - might match. People who want those other targets have to set - the GNUTARGET variable. */ - if (temp == bfd_default_vector[0]) - { + } + + for (target = bfd_target_vector; *target != NULL; target++) + { + const bfd_target *temp; + + if (*target == &binary_vec) + continue; + + abfd->xvec = *target; /* Change BFD's target temporarily */ + + if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0) + return false; + + /* If _bfd_check_format neglects to set bfd_error, assume + bfd_error_wrong_format. We didn't used to even pay any + attention to bfd_error, so I suspect that some + _bfd_check_format might have this problem. */ + bfd_set_error (bfd_error_wrong_format); + + temp = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd)); + + if (temp) + { /* This format checks out as ok! */ + right_targ = temp; + if (matching) { - matching_vector[0] = temp->name; - matching_vector[1] = NULL; + matching_vector[match_count] = temp->name; + matching_vector[match_count + 1] = NULL; + } + + match_count++; + + /* If this is the default target, accept it, even if other + targets might match. People who want those other targets + have to set the GNUTARGET variable. */ + if (temp == bfd_default_vector[0]) + { + if (matching) + { + matching_vector[0] = temp->name; + matching_vector[1] = NULL; + } + match_count = 1; + break; } - match_count = 1; - break; - } #ifdef GNU960 - /* Big- and little-endian b.out archives look the same, but it doesn't - * matter: there is no difference in their headers, and member file byte - * orders will (I hope) be handled appropriately by bfd. Ditto for big - * and little coff archives. And the 4 coff/b.out object formats are - * unambiguous. So accept the first match we find. - */ - break; + /* Big- and little-endian b.out archives look the same, but it + doesn't matter: there is no difference in their headers, and + member file byte orders will (I hope) be handled appropriately + by bfd. Ditto for big and little coff archives. And the 4 + coff/b.out object formats are unambiguous. So accept the + first match we find. */ + break; #endif - } else if (bfd_get_error () != bfd_error_wrong_format) { - abfd->xvec = save_targ; - abfd->format = bfd_unknown; - if (matching && bfd_get_error () != bfd_error_file_ambiguously_recognized) + } + else if (bfd_get_error () != bfd_error_wrong_format) + { + abfd->xvec = save_targ; + abfd->format = bfd_unknown; + + if (matching && bfd_get_error () + != bfd_error_file_ambiguously_recognized) + free (matching_vector); + + return false; + } + } + + if (match_count == 1) + { + abfd->xvec = right_targ; /* Change BFD's target permanently. */ + + if (matching) free (matching_vector); - return false; + + return true; /* File position has moved, BTW. */ } - } - if (match_count == 1) { - abfd->xvec = right_targ; /* Change BFD's target permanently */ - if (matching) - free (matching_vector); - return true; /* File position has moved, BTW */ - } + abfd->xvec = save_targ; /* Restore original target type. */ + abfd->format = bfd_unknown; /* Restore original format. */ - abfd->xvec = save_targ; /* Restore original target type */ - abfd->format = bfd_unknown; /* Restore original format */ if (match_count == 0) { bfd_set_error (bfd_error_file_not_recognized); + if (matching) free (matching_vector); } else bfd_set_error (bfd_error_file_ambiguously_recognized); + return false; } @@ -277,7 +304,6 @@ DESCRIPTION format @var{format}. If the target set in the BFD does not support the format requested, the format is invalid, or the BFD is not open for writing, then an error occurs. - */ boolean @@ -285,29 +311,29 @@ bfd_set_format (abfd, format) bfd *abfd; bfd_format format; { - if (bfd_read_p (abfd) || ((int)abfd->format < (int)bfd_unknown) || - ((int)abfd->format >= (int)bfd_type_end)) { - bfd_set_error (bfd_error_invalid_operation); - return false; - } + ((int)abfd->format >= (int)bfd_type_end)) + { + bfd_set_error (bfd_error_invalid_operation); + return false; + } if (abfd->format != bfd_unknown) - return (abfd->format == format) ? true:false; + return (abfd->format == format) ? true : false; - /* presume the answer is yes */ + /* Presume the answer is yes. */ abfd->format = format; - if (!BFD_SEND_FMT (abfd, _bfd_set_format, (abfd))) { - abfd->format = bfd_unknown; - return false; - } + if (!BFD_SEND_FMT (abfd, _bfd_set_format, (abfd))) + { + abfd->format = bfd_unknown; + return false; + } return true; } - /* FUNCTION bfd_format_string @@ -325,18 +351,19 @@ CONST char * bfd_format_string (format) bfd_format format; { - if (((int)format <(int) bfd_unknown) - || ((int)format >=(int) bfd_type_end)) + if (((int)format <(int) bfd_unknown) + || ((int)format >=(int) bfd_type_end)) return "invalid"; - - switch (format) { - case bfd_object: - return "object"; /* linker/assember/compiler output */ - case bfd_archive: - return "archive"; /* object archive file */ - case bfd_core: - return "core"; /* core dump */ - default: - return "unknown"; - } + + switch (format) + { + case bfd_object: + return "object"; /* Linker/assember/compiler output. */ + case bfd_archive: + return "archive"; /* Object archive file. */ + case bfd_core: + return "core"; /* Core dump. */ + default: + return "unknown"; + } } diff --git a/contrib/binutils/bfd/freebsd.h b/contrib/binutils/bfd/freebsd.h index e80c213..0203d99 100644 --- a/contrib/binutils/bfd/freebsd.h +++ b/contrib/binutils/bfd/freebsd.h @@ -59,7 +59,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. format. I think. */ #define SWAP_MAGIC(ext) bfd_getl32 (ext) - #define MY_write_object_contents MY(write_object_contents) static boolean MY(write_object_contents) PARAMS ((bfd *abfd)); diff --git a/contrib/binutils/bfd/hash.c b/contrib/binutils/bfd/hash.c index 173eaf76..a1bca28 100644 --- a/contrib/binutils/bfd/hash.c +++ b/contrib/binutils/bfd/hash.c @@ -268,7 +268,7 @@ SUBSUBSECTION Write other derived routines You will want to write other routines for your new hash table, - as well. + as well. You will want an initialization routine which calls the initialization routine of the hash table you are deriving from @@ -366,7 +366,7 @@ bfd_hash_lookup (table, string, create, copy) struct bfd_hash_entry *hashp; unsigned int len; unsigned int index; - + hash = 0; len = 0; s = (const unsigned char *) string; diff --git a/contrib/binutils/bfd/ieee.c b/contrib/binutils/bfd/ieee.c index 71b967a..70f0d13 100644 --- a/contrib/binutils/bfd/ieee.c +++ b/contrib/binutils/bfd/ieee.c @@ -1343,27 +1343,21 @@ ieee_archive_p (abfd) ieee->h.abfd = abfd; if (this_byte (&(ieee->h)) != Module_Beginning) - { - abfd->tdata.ieee_ar_data = save; - goto got_wrong_format_error; - } + goto got_wrong_format_error; next_byte (&(ieee->h)); library = read_id (&(ieee->h)); if (strcmp (library, "LIBRARY") != 0) - { - bfd_release (abfd, ieee); - abfd->tdata.ieee_ar_data = save; - goto got_wrong_format_error; - } - /* Throw away the filename */ + goto got_wrong_format_error; + + /* Throw away the filename. */ read_id (&(ieee->h)); ieee->element_count = 0; ieee->element_index = 0; - next_byte (&(ieee->h)); /* Drop the ad part */ - must_parse_int (&(ieee->h)); /* And the two dummy numbers */ + next_byte (&(ieee->h)); /* Drop the ad part. */ + must_parse_int (&(ieee->h)); /* And the two dummy numbers. */ must_parse_int (&(ieee->h)); alc_elts = 10; @@ -1371,7 +1365,7 @@ ieee_archive_p (abfd) if (elts == NULL) goto error_return; - /* Read the index of the BB table */ + /* Read the index of the BB table. */ while (1) { int rec; @@ -1400,14 +1394,14 @@ ieee_archive_p (abfd) t->file_offset = must_parse_int (&(ieee->h)); t->abfd = (bfd *) NULL; - /* Make sure that we don't go over the end of the buffer */ - + /* Make sure that we don't go over the end of the buffer. */ if ((size_t) ieee_pos (abfd) > sizeof (buffer) / 2) { - /* Past half way, reseek and reprime */ + /* Past half way, reseek and reprime. */ buffer_offset += ieee_pos (abfd); if (bfd_seek (abfd, buffer_offset, SEEK_SET) != 0) goto error_return; + /* FIXME: Check return value. I'm not sure whether it needs to read the entire buffer or not. */ bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd); @@ -1421,36 +1415,33 @@ ieee_archive_p (abfd) ieee->element_count * sizeof *ieee->elements)); if (ieee->elements == NULL) goto error_return; + memcpy (ieee->elements, elts, ieee->element_count * sizeof *ieee->elements); free (elts); elts = NULL; - /* Now scan the area again, and replace BB offsets with file */ - /* offsets */ - + /* Now scan the area again, and replace BB offsets with file offsets. */ for (i = 2; i < ieee->element_count; i++) { if (bfd_seek (abfd, ieee->elements[i].file_offset, SEEK_SET) != 0) goto error_return; + /* FIXME: Check return value. I'm not sure whether it needs to read the entire buffer or not. */ bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd); ieee->h.first_byte = buffer; ieee->h.input_p = buffer; - next_byte (&(ieee->h)); /* Drop F8 */ - next_byte (&(ieee->h)); /* Drop 14 */ - must_parse_int (&(ieee->h)); /* Drop size of block */ + next_byte (&(ieee->h)); /* Drop F8. */ + next_byte (&(ieee->h)); /* Drop 14. */ + must_parse_int (&(ieee->h)); /* Drop size of block. */ + if (must_parse_int (&(ieee->h)) != 0) - { - /* This object has been deleted */ - ieee->elements[i].file_offset = 0; - } + /* This object has been deleted. */ + ieee->elements[i].file_offset = 0; else - { - ieee->elements[i].file_offset = must_parse_int (&(ieee->h)); - } + ieee->elements[i].file_offset = must_parse_int (&(ieee->h)); } /* abfd->has_armap = ;*/ @@ -1458,10 +1449,14 @@ ieee_archive_p (abfd) return abfd->xvec; got_wrong_format_error: + bfd_release (abfd, ieee); + abfd->tdata.ieee_ar_data = save; bfd_set_error (bfd_error_wrong_format); + error_return: if (elts != NULL) free (elts); + return NULL; } @@ -3197,11 +3192,8 @@ relocate_debug (output, input) block (); } -/* - During linking, we we told about the bfds which made up our - contents, we have a list of them. They will still be open, so go to - the debug info in each, and copy it out, relocating it as we go. -*/ +/* Gather together all the debug information from each input BFD into + one place, relocating it and emitting it as we go. */ static boolean ieee_write_debug_part (abfd) @@ -3728,7 +3720,7 @@ ieee_make_empty_symbol (abfd) bfd *abfd; { ieee_symbol_type *new = - (ieee_symbol_type *) bfd_zmalloc (sizeof (ieee_symbol_type)); + (ieee_symbol_type *) bfd_zalloc (abfd, sizeof (ieee_symbol_type)); if (!new) return NULL; new->symbol.the_bfd = abfd; diff --git a/contrib/binutils/bfd/libaout.h b/contrib/binutils/bfd/libaout.h index 7001d3d..1682428 100644 --- a/contrib/binutils/bfd/libaout.h +++ b/contrib/binutils/bfd/libaout.h @@ -245,7 +245,8 @@ enum machine_type { M_SPARCLET_5 = 211, /* 0xd3, reserved */ M_SPARCLET_6 = 227, /* 0xe3, reserved */ /* M_SPARCLET_7 = 243 / * 0xf3, reserved */ - M_SPARCLITE_LE = 243 + M_SPARCLITE_LE = 243, + M_CRIS = 255 /* Axis CRIS binary. */ }; #define N_DYNAMIC(exec) ((exec).a_info & 0x80000000) diff --git a/contrib/binutils/bfd/libbfd-in.h b/contrib/binutils/bfd/libbfd-in.h index aece1e1..fb5f210 100644 --- a/contrib/binutils/bfd/libbfd-in.h +++ b/contrib/binutils/bfd/libbfd-in.h @@ -59,9 +59,9 @@ struct artdata { file_ptr first_file_filepos; /* Speed up searching the armap */ struct ar_cache *cache; - bfd *archive_head; /* Only interesting in output routines */ + bfd *archive_head; /* Only interesting in output routines */ carsym *symdefs; /* the symdef entries */ - symindex symdef_count; /* how many there are */ + symindex symdef_count; /* how many there are */ char *extended_names; /* clever intel extension */ /* when more compilers are standard C, this can be a time_t */ long armap_timestamp; /* Timestamp value written into armap. @@ -79,9 +79,9 @@ struct artdata { /* Goes in bfd's arelt_data slot */ struct areltdata { - char * arch_header; /* it's actually a string */ - unsigned int parsed_size; /* octets of filesize not including ar_hdr */ - char *filename; /* null-terminated */ + char * arch_header; /* it's actually a string */ + unsigned int parsed_size; /* octets of filesize not including ar_hdr */ + char *filename; /* null-terminated */ }; #define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size) @@ -128,11 +128,11 @@ void bfd_void PARAMS ((bfd *ignore)); bfd *_bfd_new_bfd_contained_in PARAMS ((bfd *)); const bfd_target *_bfd_dummy_target PARAMS ((bfd *abfd)); -void bfd_dont_truncate_arname PARAMS ((bfd *abfd, CONST char *filename, +void bfd_dont_truncate_arname PARAMS ((bfd *abfd, const char *filename, char *hdr)); -void bfd_bsd_truncate_arname PARAMS ((bfd *abfd, CONST char *filename, +void bfd_bsd_truncate_arname PARAMS ((bfd *abfd, const char *filename, char *hdr)); -void bfd_gnu_truncate_arname PARAMS ((bfd *abfd, CONST char *filename, +void bfd_gnu_truncate_arname PARAMS ((bfd *abfd, const char *filename, char *hdr)); boolean bsd_write_armap PARAMS ((bfd *arch, unsigned int elength, @@ -365,7 +365,8 @@ extern boolean _bfd_dwarf1_find_nearest_line /* Find the nearest line using DWARF 2 debugging information. */ extern boolean _bfd_dwarf2_find_nearest_line PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **, - const char **, unsigned int *, unsigned int)); + const char **, unsigned int *, unsigned int, + PTR *)); /* A routine to create entries for a bfd_link_hash_table. */ extern struct bfd_hash_entry *_bfd_link_hash_newfunc diff --git a/contrib/binutils/bfd/libbfd.c b/contrib/binutils/bfd/libbfd.c index 881af73..8b846f0 100644 --- a/contrib/binutils/bfd/libbfd.c +++ b/contrib/binutils/bfd/libbfd.c @@ -42,7 +42,6 @@ DESCRIPTION /* A routine which is used in target vectors for unsupported operations. */ -/*ARGSUSED*/ boolean bfd_false (ignore) bfd *ignore ATTRIBUTE_UNUSED; @@ -54,7 +53,6 @@ bfd_false (ignore) /* A routine which is used in target vectors for supported operations which do not actually do anything. */ -/*ARGSUSED*/ boolean bfd_true (ignore) bfd *ignore ATTRIBUTE_UNUSED; @@ -65,7 +63,6 @@ bfd_true (ignore) /* A routine which is used in target vectors for unsupported operations which return a pointer value. */ -/*ARGSUSED*/ PTR bfd_nullvoidptr (ignore) bfd *ignore ATTRIBUTE_UNUSED; @@ -74,23 +71,20 @@ bfd_nullvoidptr (ignore) return NULL; } -/*ARGSUSED*/ -int +int bfd_0 (ignore) bfd *ignore ATTRIBUTE_UNUSED; { return 0; } -/*ARGSUSED*/ -unsigned int +unsigned int bfd_0u (ignore) bfd *ignore ATTRIBUTE_UNUSED; { return 0; } -/*ARGUSED*/ long bfd_0l (ignore) bfd *ignore ATTRIBUTE_UNUSED; @@ -101,7 +95,6 @@ bfd_0l (ignore) /* A routine which is used in target vectors for unsupported operations which return -1 on error. */ -/*ARGSUSED*/ long _bfd_n1 (ignore_abfd) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -110,14 +103,12 @@ _bfd_n1 (ignore_abfd) return -1; } -/*ARGSUSED*/ -void +void bfd_void (ignore) bfd *ignore ATTRIBUTE_UNUSED; { } -/*ARGSUSED*/ boolean _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd) bfd *ignore_core_bfd ATTRIBUTE_UNUSED; @@ -130,7 +121,6 @@ _bfd_nocore_core_file_matches_executable_p (ignore_core_bfd, ignore_exec_bfd) /* Routine to handle core_file_failing_command entry point for targets without core file support. */ -/*ARGSUSED*/ char * _bfd_nocore_core_file_failing_command (ignore_abfd) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -142,7 +132,6 @@ _bfd_nocore_core_file_failing_command (ignore_abfd) /* Routine to handle core_file_failing_signal entry point for targets without core file support. */ -/*ARGSUSED*/ int _bfd_nocore_core_file_failing_signal (ignore_abfd) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -151,7 +140,6 @@ _bfd_nocore_core_file_failing_signal (ignore_abfd) return 0; } -/*ARGSUSED*/ const bfd_target * _bfd_dummy_target (ignore_abfd) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -217,13 +205,12 @@ bfd_zmalloc (size) /* Some IO code */ - /* Note that archive entries don't have streams; they share their parent's. This allows someone to play with the iostream behind BFD's back. Also, note that the origin pointer points to the beginning of a file's contents (0 for non-archive elements). For archive entries this is the - first octet in the file, NOT the beginning of the archive header. */ + first octet in the file, NOT the beginning of the archive header. */ static int real_read (where, a,b, file) @@ -285,7 +272,7 @@ bfd_read (ptr, size, nitems, abfd) return get; } - nread = real_read (ptr, 1, (size_t)(size*nitems), bfd_cache_lookup(abfd)); + nread = real_read (ptr, 1, (size_t) (size*nitems), bfd_cache_lookup(abfd)); if (nread > 0) abfd->where += nread; @@ -317,7 +304,7 @@ struct _bfd_window_internal { struct _bfd_window_internal *next; PTR data; bfd_size_type size; - int refcount : 31; /* should be enough... */ + int refcount : 31; /* should be enough... */ unsigned mapped : 1; /* 1 = mmap, 0 = malloc */ }; @@ -671,7 +658,7 @@ bfd_seek (abfd, position, direction) file_ptr file_position; /* For the time being, a BFD may not seek to it's end. The problem is that we don't easily have a way to recognize the end of an - element in an archive. */ + element in an archive. */ BFD_ASSERT (direction == SEEK_SET || direction == SEEK_CUR); @@ -683,19 +670,39 @@ bfd_seek (abfd, position, direction) struct bfd_in_memory *bim; bim = (struct bfd_in_memory *) abfd->iostream; - + if (direction == SEEK_SET) abfd->where = position; else abfd->where += position; - + if ((bfd_size_type) abfd->where > bim->size) { - abfd->where = bim->size; - bfd_set_error (bfd_error_file_truncated); - return -1; + if ((abfd->direction == write_direction) || + (abfd->direction == both_direction)) + { + long newsize, oldsize = (bim->size + 127) & ~127; + bim->size = abfd->where; + /* Round up to cut down on memory fragmentation */ + newsize = (bim->size + 127) & ~127; + if (newsize > oldsize) + { + bim->buffer = bfd_realloc (bim->buffer, newsize); + if (bim->buffer == 0) + { + bim->size = 0; + bfd_set_error (bfd_error_no_memory); + return -1; + } + } + } + else + { + abfd->where = bim->size; + bfd_set_error (bfd_error_file_truncated); + return -1; + } } - return 0; } @@ -776,7 +783,7 @@ bfd_seek (abfd, position, direction) /* FIXME: Should these take a count argument? Answer (gnu@cygnus.com): No, but perhaps they should be inline - functions in swap.h #ifdef __GNUC__. + functions in swap.h #ifdef __GNUC__. Gprof them later and find out. */ /* @@ -807,13 +814,13 @@ DESCRIPTION .{* Byte swapping macros for user section data. *} . .#define bfd_put_8(abfd, val, ptr) \ -. ((void) (*((unsigned char *)(ptr)) = (unsigned char)(val))) +. ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val))) .#define bfd_put_signed_8 \ . bfd_put_8 .#define bfd_get_8(abfd, ptr) \ -. (*(unsigned char *)(ptr)) +. (*(unsigned char *) (ptr)) .#define bfd_get_signed_8(abfd, ptr) \ -. ((*(unsigned char *)(ptr) ^ 0x80) - 0x80) +. ((*(unsigned char *) (ptr) ^ 0x80) - 0x80) . .#define bfd_put_16(abfd, val, ptr) \ . BFD_SEND(abfd, bfd_putx16, ((val),(ptr))) @@ -856,7 +863,7 @@ DESCRIPTION . : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \ . : (abort (), (void) 0)) . -*/ +*/ /* FUNCTION @@ -908,7 +915,7 @@ DESCRIPTION .#define bfd_h_get_signed_64(abfd, ptr) \ . BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr)) . -*/ +*/ /* Sign extension to bfd_signed_vma. */ #define COERCE16(x) (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000) @@ -951,17 +958,17 @@ bfd_putb16 (data, addr) bfd_vma data; register bfd_byte *addr; { - addr[0] = (bfd_byte)(data >> 8); + addr[0] = (bfd_byte) (data >> 8); addr[1] = (bfd_byte )data; } void bfd_putl16 (data, addr) - bfd_vma data; + bfd_vma data; register bfd_byte *addr; { addr[0] = (bfd_byte )data; - addr[1] = (bfd_byte)(data >> 8); + addr[1] = (bfd_byte) (data >> 8); } bfd_vma @@ -1116,9 +1123,9 @@ bfd_putb32 (data, addr) bfd_vma data; register bfd_byte *addr; { - addr[0] = (bfd_byte)(data >> 24); - addr[1] = (bfd_byte)(data >> 16); - addr[2] = (bfd_byte)(data >> 8); + addr[0] = (bfd_byte) (data >> 24); + addr[1] = (bfd_byte) (data >> 16); + addr[2] = (bfd_byte) (data >> 8); addr[3] = (bfd_byte)data; } @@ -1128,9 +1135,9 @@ bfd_putl32 (data, addr) register bfd_byte *addr; { addr[0] = (bfd_byte)data; - addr[1] = (bfd_byte)(data >> 8); - addr[2] = (bfd_byte)(data >> 16); - addr[3] = (bfd_byte)(data >> 24); + addr[1] = (bfd_byte) (data >> 8); + addr[2] = (bfd_byte) (data >> 16); + addr[3] = (bfd_byte) (data >> 24); } void @@ -1139,14 +1146,14 @@ bfd_putb64 (data, addr) register bfd_byte *addr ATTRIBUTE_UNUSED; { #ifdef BFD64 - addr[0] = (bfd_byte)(data >> (7*8)); - addr[1] = (bfd_byte)(data >> (6*8)); - addr[2] = (bfd_byte)(data >> (5*8)); - addr[3] = (bfd_byte)(data >> (4*8)); - addr[4] = (bfd_byte)(data >> (3*8)); - addr[5] = (bfd_byte)(data >> (2*8)); - addr[6] = (bfd_byte)(data >> (1*8)); - addr[7] = (bfd_byte)(data >> (0*8)); + addr[0] = (bfd_byte) (data >> (7*8)); + addr[1] = (bfd_byte) (data >> (6*8)); + addr[2] = (bfd_byte) (data >> (5*8)); + addr[3] = (bfd_byte) (data >> (4*8)); + addr[4] = (bfd_byte) (data >> (3*8)); + addr[5] = (bfd_byte) (data >> (2*8)); + addr[6] = (bfd_byte) (data >> (1*8)); + addr[7] = (bfd_byte) (data >> (0*8)); #else BFD_FAIL(); #endif @@ -1158,18 +1165,66 @@ bfd_putl64 (data, addr) register bfd_byte *addr ATTRIBUTE_UNUSED; { #ifdef BFD64 - addr[7] = (bfd_byte)(data >> (7*8)); - addr[6] = (bfd_byte)(data >> (6*8)); - addr[5] = (bfd_byte)(data >> (5*8)); - addr[4] = (bfd_byte)(data >> (4*8)); - addr[3] = (bfd_byte)(data >> (3*8)); - addr[2] = (bfd_byte)(data >> (2*8)); - addr[1] = (bfd_byte)(data >> (1*8)); - addr[0] = (bfd_byte)(data >> (0*8)); + addr[7] = (bfd_byte) (data >> (7*8)); + addr[6] = (bfd_byte) (data >> (6*8)); + addr[5] = (bfd_byte) (data >> (5*8)); + addr[4] = (bfd_byte) (data >> (4*8)); + addr[3] = (bfd_byte) (data >> (3*8)); + addr[2] = (bfd_byte) (data >> (2*8)); + addr[1] = (bfd_byte) (data >> (1*8)); + addr[0] = (bfd_byte) (data >> (0*8)); #else BFD_FAIL(); #endif } + +void +bfd_put_bits (data, addr, bits, big_p) + bfd_vma data; + bfd_byte *addr; + int bits; + boolean big_p; +{ + int i; + int bytes; + + if (bits % 8 != 0) + abort (); + + bytes = bits / 8; + for (i = 0; i < bytes; i++) + { + int index = big_p ? bytes - i - 1 : i; + + addr[index] = (bfd_byte) data; + data >>= 8; + } +} + +bfd_vma +bfd_get_bits (addr, bits, big_p) + bfd_byte *addr; + int bits; + boolean big_p; +{ + bfd_vma data; + int i; + int bytes; + + if (bits % 8 != 0) + abort (); + + data = 0; + bytes = bits / 8; + for (i = 0; i < bytes; i++) + { + int index = big_p ? i : bytes - i - 1; + + data = (data << 8) | addr[index]; + } + + return data; +} /* Default implementation */ @@ -1306,13 +1361,17 @@ _bfd_generic_verify_endian_match (ibfd, obfd) bfd *obfd; { if (ibfd->xvec->byteorder != obfd->xvec->byteorder + && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN) { - (*_bfd_error_handler) - ("%s: compiled for a %s endian system and target is %s endian", - bfd_get_filename (ibfd), - bfd_big_endian (ibfd) ? "big" : "little", - bfd_big_endian (obfd) ? "big" : "little"); + const char *msg; + + if (bfd_big_endian (ibfd)) + msg = _("%s: compiled for a big endian system and target is little endian"); + else + msg = _("%s: compiled for a little endian system and target is big endian"); + + (*_bfd_error_handler) (msg, bfd_get_filename (ibfd)); bfd_set_error (bfd_error_wrong_format); return false; diff --git a/contrib/binutils/bfd/libbfd.h b/contrib/binutils/bfd/libbfd.h index d8b5c24..d6e3939 100644 --- a/contrib/binutils/bfd/libbfd.h +++ b/contrib/binutils/bfd/libbfd.h @@ -59,9 +59,9 @@ struct artdata { file_ptr first_file_filepos; /* Speed up searching the armap */ struct ar_cache *cache; - bfd *archive_head; /* Only interesting in output routines */ + bfd *archive_head; /* Only interesting in output routines */ carsym *symdefs; /* the symdef entries */ - symindex symdef_count; /* how many there are */ + symindex symdef_count; /* how many there are */ char *extended_names; /* clever intel extension */ /* when more compilers are standard C, this can be a time_t */ long armap_timestamp; /* Timestamp value written into armap. @@ -79,9 +79,9 @@ struct artdata { /* Goes in bfd's arelt_data slot */ struct areltdata { - char * arch_header; /* it's actually a string */ - unsigned int parsed_size; /* octets of filesize not including ar_hdr */ - char *filename; /* null-terminated */ + char * arch_header; /* it's actually a string */ + unsigned int parsed_size; /* octets of filesize not including ar_hdr */ + char *filename; /* null-terminated */ }; #define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size) @@ -128,11 +128,11 @@ void bfd_void PARAMS ((bfd *ignore)); bfd *_bfd_new_bfd_contained_in PARAMS ((bfd *)); const bfd_target *_bfd_dummy_target PARAMS ((bfd *abfd)); -void bfd_dont_truncate_arname PARAMS ((bfd *abfd, CONST char *filename, +void bfd_dont_truncate_arname PARAMS ((bfd *abfd, const char *filename, char *hdr)); -void bfd_bsd_truncate_arname PARAMS ((bfd *abfd, CONST char *filename, +void bfd_bsd_truncate_arname PARAMS ((bfd *abfd, const char *filename, char *hdr)); -void bfd_gnu_truncate_arname PARAMS ((bfd *abfd, CONST char *filename, +void bfd_gnu_truncate_arname PARAMS ((bfd *abfd, const char *filename, char *hdr)); boolean bsd_write_armap PARAMS ((bfd *arch, unsigned int elength, @@ -365,7 +365,8 @@ extern boolean _bfd_dwarf1_find_nearest_line /* Find the nearest line using DWARF 2 debugging information. */ extern boolean _bfd_dwarf2_find_nearest_line PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **, - const char **, unsigned int *, unsigned int)); + const char **, unsigned int *, unsigned int, + PTR *)); /* A routine to create entries for a bfd_link_hash_table. */ extern struct bfd_hash_entry *_bfd_link_hash_newfunc @@ -551,10 +552,10 @@ extern boolean _bfd_sh_align_load_span /* And more follows */ -void +void bfd_write_bigendian_4byte_int PARAMS ((bfd *abfd, int i)); -unsigned int +unsigned int bfd_log2 PARAMS ((bfd_vma x)); #define BFD_CACHE_MAX_OPEN 10 @@ -562,15 +563,15 @@ extern bfd *bfd_last_cache; #define bfd_cache_lookup(x) \ ((x)==bfd_last_cache? \ - (FILE*)(bfd_last_cache->iostream): \ + (FILE*) (bfd_last_cache->iostream): \ bfd_cache_lookup_worker(x)) -boolean -bfd_cache_init PARAMS ((bfd *abfd)); +boolean +bfd_cache_init PARAMS ((bfd *abfd)); -boolean -bfd_cache_close PARAMS ((bfd *abfd)); +boolean +bfd_cache_close PARAMS ((bfd *abfd)); -FILE* +FILE* bfd_open_file PARAMS ((bfd *abfd)); FILE * @@ -714,6 +715,14 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_386_RELATIVE", "BFD_RELOC_386_GOTOFF", "BFD_RELOC_386_GOTPC", + "BFD_RELOC_X86_64_GOT32", + "BFD_RELOC_X86_64_PLT32", + "BFD_RELOC_X86_64_COPY", + "BFD_RELOC_X86_64_GLOB_DAT", + "BFD_RELOC_X86_64_JUMP_SLOT", + "BFD_RELOC_X86_64_RELATIVE", + "BFD_RELOC_X86_64_GOTPCREL", + "BFD_RELOC_X86_64_32S", "BFD_RELOC_NS32K_IMM_8", "BFD_RELOC_NS32K_IMM_16", "BFD_RELOC_NS32K_IMM_32", @@ -765,6 +774,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_I370_D12", "BFD_RELOC_CTOR", "BFD_RELOC_ARM_PCREL_BRANCH", + "BFD_RELOC_ARM_PCREL_BLX", + "BFD_RELOC_THUMB_PCREL_BLX", "BFD_RELOC_ARM_IMMEDIATE", "BFD_RELOC_ARM_ADRL_IMMEDIATE", "BFD_RELOC_ARM_OFFSET_IMM", @@ -809,6 +820,13 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_SH_CODE", "BFD_RELOC_SH_DATA", "BFD_RELOC_SH_LABEL", + "BFD_RELOC_SH_LOOP_START", + "BFD_RELOC_SH_LOOP_END", + "BFD_RELOC_SH_COPY", + "BFD_RELOC_SH_GLOB_DAT", + "BFD_RELOC_SH_JMP_SLOT", + "BFD_RELOC_SH_RELATIVE", + "BFD_RELOC_SH_GOTPC", "BFD_RELOC_THUMB_PCREL_BRANCH9", "BFD_RELOC_THUMB_PCREL_BRANCH12", "BFD_RELOC_THUMB_PCREL_BRANCH23", @@ -857,6 +875,11 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_MN10300_32_PCREL", "BFD_RELOC_MN10300_16_PCREL", "BFD_RELOC_TIC30_LDP", + "BFD_RELOC_TIC54X_PARTLS7", + "BFD_RELOC_TIC54X_PARTMS9", + "BFD_RELOC_TIC54X_23", + "BFD_RELOC_TIC54X_16_OF_23", + "BFD_RELOC_TIC54X_MS7_OF_23", "BFD_RELOC_FR30_48", "BFD_RELOC_FR30_20", "BFD_RELOC_FR30_6_IN_4", @@ -889,28 +912,128 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_AVR_CALL", "BFD_RELOC_VTABLE_INHERIT", "BFD_RELOC_VTABLE_ENTRY", + "BFD_RELOC_IA64_IMM14", + "BFD_RELOC_IA64_IMM22", + "BFD_RELOC_IA64_IMM64", + "BFD_RELOC_IA64_DIR32MSB", + "BFD_RELOC_IA64_DIR32LSB", + "BFD_RELOC_IA64_DIR64MSB", + "BFD_RELOC_IA64_DIR64LSB", + "BFD_RELOC_IA64_GPREL22", + "BFD_RELOC_IA64_GPREL64I", + "BFD_RELOC_IA64_GPREL32MSB", + "BFD_RELOC_IA64_GPREL32LSB", + "BFD_RELOC_IA64_GPREL64MSB", + "BFD_RELOC_IA64_GPREL64LSB", + "BFD_RELOC_IA64_LTOFF22", + "BFD_RELOC_IA64_LTOFF64I", + "BFD_RELOC_IA64_PLTOFF22", + "BFD_RELOC_IA64_PLTOFF64I", + "BFD_RELOC_IA64_PLTOFF64MSB", + "BFD_RELOC_IA64_PLTOFF64LSB", + "BFD_RELOC_IA64_FPTR64I", + "BFD_RELOC_IA64_FPTR32MSB", + "BFD_RELOC_IA64_FPTR32LSB", + "BFD_RELOC_IA64_FPTR64MSB", + "BFD_RELOC_IA64_FPTR64LSB", + "BFD_RELOC_IA64_PCREL21B", + "BFD_RELOC_IA64_PCREL21BI", + "BFD_RELOC_IA64_PCREL21M", + "BFD_RELOC_IA64_PCREL21F", + "BFD_RELOC_IA64_PCREL22", + "BFD_RELOC_IA64_PCREL60B", + "BFD_RELOC_IA64_PCREL64I", + "BFD_RELOC_IA64_PCREL32MSB", + "BFD_RELOC_IA64_PCREL32LSB", + "BFD_RELOC_IA64_PCREL64MSB", + "BFD_RELOC_IA64_PCREL64LSB", + "BFD_RELOC_IA64_LTOFF_FPTR22", + "BFD_RELOC_IA64_LTOFF_FPTR64I", + "BFD_RELOC_IA64_LTOFF_FPTR64MSB", + "BFD_RELOC_IA64_LTOFF_FPTR64LSB", + "BFD_RELOC_IA64_SEGREL32MSB", + "BFD_RELOC_IA64_SEGREL32LSB", + "BFD_RELOC_IA64_SEGREL64MSB", + "BFD_RELOC_IA64_SEGREL64LSB", + "BFD_RELOC_IA64_SECREL32MSB", + "BFD_RELOC_IA64_SECREL32LSB", + "BFD_RELOC_IA64_SECREL64MSB", + "BFD_RELOC_IA64_SECREL64LSB", + "BFD_RELOC_IA64_REL32MSB", + "BFD_RELOC_IA64_REL32LSB", + "BFD_RELOC_IA64_REL64MSB", + "BFD_RELOC_IA64_REL64LSB", + "BFD_RELOC_IA64_LTV32MSB", + "BFD_RELOC_IA64_LTV32LSB", + "BFD_RELOC_IA64_LTV64MSB", + "BFD_RELOC_IA64_LTV64LSB", + "BFD_RELOC_IA64_IPLTMSB", + "BFD_RELOC_IA64_IPLTLSB", + "BFD_RELOC_IA64_COPY", + "BFD_RELOC_IA64_TPREL22", + "BFD_RELOC_IA64_TPREL64MSB", + "BFD_RELOC_IA64_TPREL64LSB", + "BFD_RELOC_IA64_LTOFF_TP22", + "BFD_RELOC_IA64_LTOFF22X", + "BFD_RELOC_IA64_LDXMOV", + "BFD_RELOC_M68HC11_HI8", + "BFD_RELOC_M68HC11_LO8", + "BFD_RELOC_M68HC11_3B", + "BFD_RELOC_CRIS_BDISP8", + "BFD_RELOC_CRIS_UNSIGNED_5", + "BFD_RELOC_CRIS_SIGNED_6", + "BFD_RELOC_CRIS_UNSIGNED_6", + "BFD_RELOC_CRIS_UNSIGNED_4", + "BFD_RELOC_860_COPY", + "BFD_RELOC_860_GLOB_DAT", + "BFD_RELOC_860_JUMP_SLOT", + "BFD_RELOC_860_RELATIVE", + "BFD_RELOC_860_PC26", + "BFD_RELOC_860_PLT26", + "BFD_RELOC_860_PC16", + "BFD_RELOC_860_LOW0", + "BFD_RELOC_860_SPLIT0", + "BFD_RELOC_860_LOW1", + "BFD_RELOC_860_SPLIT1", + "BFD_RELOC_860_LOW2", + "BFD_RELOC_860_SPLIT2", + "BFD_RELOC_860_LOW3", + "BFD_RELOC_860_LOGOT0", + "BFD_RELOC_860_SPGOT0", + "BFD_RELOC_860_LOGOT1", + "BFD_RELOC_860_SPGOT1", + "BFD_RELOC_860_LOGOTOFF0", + "BFD_RELOC_860_SPGOTOFF0", + "BFD_RELOC_860_LOGOTOFF1", + "BFD_RELOC_860_SPGOTOFF1", + "BFD_RELOC_860_LOGOTOFF2", + "BFD_RELOC_860_LOGOTOFF3", + "BFD_RELOC_860_LOPC", + "BFD_RELOC_860_HIGHADJ", + "BFD_RELOC_860_HAGOT", + "BFD_RELOC_860_HAGOTOFF", + "BFD_RELOC_860_HAPC", + "BFD_RELOC_860_HIGH", + "BFD_RELOC_860_HIGOT", + "BFD_RELOC_860_HIGOTOFF", "@@overflow: BFD_RELOC_UNUSED@@", }; #endif reloc_howto_type * -bfd_default_reloc_type_lookup - PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); +bfd_default_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); -boolean -bfd_generic_relax_section - PARAMS ((bfd *abfd, +boolean +bfd_generic_relax_section PARAMS ((bfd *abfd, asection *section, struct bfd_link_info *, boolean *)); -boolean -bfd_generic_gc_sections - PARAMS ((bfd *, struct bfd_link_info *)); +boolean +bfd_generic_gc_sections PARAMS ((bfd *, struct bfd_link_info *)); bfd_byte * - -bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd, +bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, @@ -918,19 +1041,18 @@ bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd, asymbol **symbols)); extern const bfd_arch_info_type bfd_default_arch_struct; -boolean +boolean bfd_default_set_arch_mach PARAMS ((bfd *abfd, enum bfd_architecture arch, unsigned long mach)); const bfd_arch_info_type * -bfd_default_compatible - PARAMS ((const bfd_arch_info_type *a, +bfd_default_compatible PARAMS ((const bfd_arch_info_type *a, const bfd_arch_info_type *b)); -boolean +boolean bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string)); struct elf_internal_shdr * -bfd_elf_find_section PARAMS ((bfd *abfd, char *name)); +bfd_elf_find_section PARAMS ((bfd *abfd, char *name)); diff --git a/contrib/binutils/bfd/libcoff-in.h b/contrib/binutils/bfd/libcoff-in.h index 9b1a026..e5f5f9e 100644 --- a/contrib/binutils/bfd/libcoff-in.h +++ b/contrib/binutils/bfd/libcoff-in.h @@ -43,6 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define obj_coff_strings(bfd) (coff_data (bfd)->strings) #define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings) #define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes) +#define obj_coff_strings_written(bfd) (coff_data (bfd)->strings_written) #define obj_coff_local_toc_table(bfd) (coff_data(bfd)->local_toc_sym_map) @@ -83,6 +84,8 @@ typedef struct coff_tdata char *strings; /* If this is true, the strings may not be freed. */ boolean keep_strings; + /* If this is true, the strings have been written out already. */ + boolean strings_written; /* is this a PE format coff file */ int pe; @@ -97,6 +100,9 @@ typedef struct coff_tdata /* Used by coff_find_nearest_line. */ PTR line_info; + /* A place to stash dwarf2 info for this bfd. */ + PTR dwarf2_find_line_info; + /* The timestamp from the COFF file header. */ long timestamp; @@ -126,6 +132,9 @@ struct xcoff_tdata /* Basic COFF information. */ coff_data_type coff; + /* True if this is an XCOFF64 file. */ + boolean xcoff64; + /* True if a large a.out header should be generated. */ boolean full_aouthdr; diff --git a/contrib/binutils/bfd/libcoff.h b/contrib/binutils/bfd/libcoff.h index bee4ce9..5115538 100644 --- a/contrib/binutils/bfd/libcoff.h +++ b/contrib/binutils/bfd/libcoff.h @@ -43,6 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define obj_coff_strings(bfd) (coff_data (bfd)->strings) #define obj_coff_keep_strings(bfd) (coff_data (bfd)->keep_strings) #define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes) +#define obj_coff_strings_written(bfd) (coff_data (bfd)->strings_written) #define obj_coff_local_toc_table(bfd) (coff_data(bfd)->local_toc_sym_map) @@ -83,6 +84,8 @@ typedef struct coff_tdata char *strings; /* If this is true, the strings may not be freed. */ boolean keep_strings; + /* If this is true, the strings have been written out already. */ + boolean strings_written; /* is this a PE format coff file */ int pe; @@ -97,6 +100,9 @@ typedef struct coff_tdata /* Used by coff_find_nearest_line. */ PTR line_info; + /* A place to stash dwarf2 info for this bfd. */ + PTR dwarf2_find_line_info; + /* The timestamp from the COFF file header. */ long timestamp; @@ -126,6 +132,9 @@ struct xcoff_tdata /* Basic COFF information. */ coff_data_type coff; + /* True if this is an XCOFF64 file. */ + boolean xcoff64; + /* True if a large a.out header should be generated. */ boolean full_aouthdr; @@ -575,32 +584,32 @@ extern boolean ppc_process_before_allocation typedef struct coff_ptr_struct { - /* Remembers the offset from the first symbol in the file for + /* Remembers the offset from the first symbol in the file for this symbol. Generated by coff_renumber_symbols. */ unsigned int offset; - /* Should the value of this symbol be renumbered. Used for + /* Should the value of this symbol be renumbered. Used for XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */ unsigned int fix_value : 1; - /* Should the tag field of this symbol be renumbered. + /* Should the tag field of this symbol be renumbered. Created by coff_pointerize_aux. */ unsigned int fix_tag : 1; - /* Should the endidx field of this symbol be renumbered. + /* Should the endidx field of this symbol be renumbered. Created by coff_pointerize_aux. */ unsigned int fix_end : 1; - /* Should the x_csect.x_scnlen field be renumbered. + /* Should the x_csect.x_scnlen field be renumbered. Created by coff_pointerize_aux. */ unsigned int fix_scnlen : 1; - /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the + /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the index into the line number entries. Set by coff_slurp_symbol_table. */ unsigned int fix_line : 1; - /* The container for the symbol structure as read and translated + /* The container for the symbol structure as read and translated from the file. */ union { @@ -610,35 +619,35 @@ union { } combined_entry_type; - /* Each canonical asymbol really looks like this: */ +/* Each canonical asymbol really looks like this: */ typedef struct coff_symbol_struct { - /* The actual symbol which the rest of BFD works with */ + /* The actual symbol which the rest of BFD works with */ asymbol symbol; - /* A pointer to the hidden information for this symbol */ + /* A pointer to the hidden information for this symbol */ combined_entry_type *native; - /* A pointer to the linenumber information for this symbol */ + /* A pointer to the linenumber information for this symbol */ struct lineno_cache_entry *lineno; - /* Have the line numbers been relocated yet ? */ + /* Have the line numbers been relocated yet ? */ boolean done_lineno; } coff_symbol_type; - /* COFF symbol classifications. */ +/* COFF symbol classifications. */ enum coff_symbol_classification { - /* Global symbol. */ + /* Global symbol. */ COFF_SYMBOL_GLOBAL, - /* Common symbol. */ + /* Common symbol. */ COFF_SYMBOL_COMMON, - /* Undefined symbol. */ + /* Undefined symbol. */ COFF_SYMBOL_UNDEFINED, - /* Local symbol. */ + /* Local symbol. */ COFF_SYMBOL_LOCAL, - /* PE section symbol. */ + /* PE section symbol. */ COFF_SYMBOL_PE_SECTION }; @@ -713,6 +722,8 @@ typedef struct boolean _bfd_coff_long_filenames; boolean _bfd_coff_long_section_names; unsigned int _bfd_coff_default_section_alignment_power; + boolean _bfd_coff_force_symnames_in_strings; + unsigned int _bfd_coff_debug_string_prefix_length; void (*_bfd_coff_swap_filehdr_in) PARAMS (( bfd *abfd, PTR ext, @@ -815,12 +826,12 @@ typedef struct struct bfd_link_info *info, bfd *abfd, const char *name, - flagword flags, + flagword flags, asection *section, bfd_vma value, const char *string, boolean copy, - boolean collect, + boolean collect, struct bfd_link_hash_entry **hashp)); boolean (*_bfd_coff_link_output_has_begun) PARAMS (( @@ -910,6 +921,12 @@ typedef struct #define bfd_coff_symname_in_debug(abfd, sym)\ ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym)) +#define bfd_coff_force_symnames_in_strings(abfd)\ + (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings) + +#define bfd_coff_debug_string_prefix_length(abfd)\ + (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length) + #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\ ((coff_backend_info (abfd)->_bfd_coff_print_aux)\ (abfd, file, base, symbol, aux, indaux)) diff --git a/contrib/binutils/bfd/linker.c b/contrib/binutils/bfd/linker.c index 6e9ee65..1fb3cc5 100644 --- a/contrib/binutils/bfd/linker.c +++ b/contrib/binutils/bfd/linker.c @@ -60,7 +60,7 @@ SECTION a.out (in <>) and ECOFF (in <>). The a.out routines are used as examples throughout this section. -@menu +@menu @* Creating a Linker Hash Table:: @* Adding Symbols to the Hash Table:: @* Performing the Final Link:: @@ -601,7 +601,7 @@ bfd_wrapped_link_hash_lookup (abfd, info, string, create, copy, follow) struct bfd_link_hash_entry * with no explicit cast required on the call. */ -void +void bfd_link_hash_traverse (table, func, info) struct bfd_link_hash_table *table; boolean (*func) PARAMS ((struct bfd_link_hash_entry *, PTR)); @@ -1361,7 +1361,7 @@ enum link_row enum link_action { - FAIL, /* Abort. */ + FAIL, /* Abort. */ UND, /* Mark symbol undefined. */ WEAK, /* Mark symbol weak undefined. */ DEF, /* Mark symbol defined. */ @@ -1464,7 +1464,7 @@ hash_entry_bfd (h) or destructor names as collect2 does. HASHP, if not NULL, is a place to store the created hash table entry; if *HASHP is not NULL, the caller has already looked up - the hash table entry, and stored it in *HASHP. */ + the hash table entry, and stored it in *HASHP. */ boolean _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value, @@ -2054,7 +2054,7 @@ _bfd_generic_final_link (abfd, info) } } } - + return true; } @@ -2452,7 +2452,7 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order) r = (arelent *) bfd_alloc (abfd, sizeof (arelent)); if (r == (arelent *) NULL) return false; - + r->address = link_order->offset; r->howto = bfd_reloc_type_lookup (abfd, link_order->u.reloc.p->reloc); if (r->howto == 0) @@ -2524,7 +2524,7 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order) break; } ok = bfd_set_section_contents (abfd, sec, (PTR) buf, - (file_ptr) + (file_ptr) (link_order->offset * bfd_octets_per_byte (abfd)), size); free (buf); @@ -2594,7 +2594,7 @@ _bfd_default_link_order (abfd, info, sec, link_order) case bfd_data_link_order: return bfd_set_section_contents (abfd, sec, (PTR) link_order->u.data.contents, - (file_ptr) + (file_ptr) (link_order->offset * bfd_octets_per_byte (abfd)), link_order->size); @@ -2603,7 +2603,6 @@ _bfd_default_link_order (abfd, info, sec, link_order) /* Default routine to handle a bfd_fill_link_order. */ -/*ARGSUSED*/ static boolean default_fill_link_order (abfd, info, sec, link_order) bfd *abfd; @@ -2630,8 +2629,8 @@ default_fill_link_order (abfd, info, sec, link_order) for (i = 1; i < size; i += 2) space[i] = fill; result = bfd_set_section_contents (abfd, sec, space, - (file_ptr) - (link_order->offset * + (file_ptr) + (link_order->offset * bfd_octets_per_byte (abfd)), link_order->size); free (space); @@ -2732,7 +2731,7 @@ default_indirect_link_order (output_bfd, info, output_section, link_order, if (h != NULL) set_symbol_from_hash (sym, h); } - } + } } /* Get and relocate the section contents. */ @@ -2750,8 +2749,8 @@ default_indirect_link_order (output_bfd, info, output_section, link_order, if (! bfd_set_section_contents (output_bfd, output_section, (PTR) new_contents, (file_ptr) - (link_order->offset * - bfd_octets_per_byte (output_bfd)), + (link_order->offset * + bfd_octets_per_byte (output_bfd)), link_order->size)) goto error_return; @@ -2803,8 +2802,6 @@ DESCRIPTION */ - - boolean _bfd_generic_link_split_section (abfd, sec) bfd *abfd ATTRIBUTE_UNUSED; diff --git a/contrib/binutils/bfd/netbsd-core.c b/contrib/binutils/bfd/netbsd-core.c index 828c2a1..b94c4a1 100644 --- a/contrib/binutils/bfd/netbsd-core.c +++ b/contrib/binutils/bfd/netbsd-core.c @@ -16,7 +16,7 @@ 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. */ +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include /* - * FIXME: On NetBSD/sparc CORE_FPU_OFFSET should be (sizeof(struct trapframe)) + * FIXME: On NetBSD/sparc CORE_FPU_OFFSET should be (sizeof (struct trapframe)) */ struct netbsd_core_struct { @@ -98,7 +98,7 @@ netbsd_core_file_p (abfd) offset += core.c_seghdrsize; - asect = (asection *) bfd_zalloc (abfd, sizeof(asection)); + asect = (asection *) bfd_zalloc (abfd, sizeof (asection)); if (asect == NULL) { bfd_set_error(bfd_error_no_memory); goto punt; @@ -118,7 +118,7 @@ netbsd_core_file_p (abfd) asect->name = ".reg"; asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS; #ifdef CORE_FPU_OFFSET - /* Hackish... */ + /* Hackish... */ asect->_raw_size = CORE_FPU_OFFSET; asect2 = (asection *)bfd_zalloc (abfd, sizeof (asection)); @@ -193,9 +193,9 @@ netbsd_core_file_matches_executable_p (core_bfd, exec_bfd) /* If somebody calls any byte-swapping routines, shoot them. */ static void -swap_abort() +swap_abort () { - abort(); /* This way doesn't require any declaration for ANSI to fuck up */ + abort (); /* This way doesn't require any declaration for ANSI to fuck up */ } #define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) #define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) @@ -236,7 +236,7 @@ const bfd_target netbsd_core_vec = bfd_false, bfd_false, bfd_false, bfd_false }, - + BFD_JUMP_TABLE_GENERIC (_bfd_generic), BFD_JUMP_TABLE_COPY (_bfd_generic), BFD_JUMP_TABLE_CORE (netbsd), @@ -248,6 +248,6 @@ const bfd_target netbsd_core_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + (PTR) 0 /* backend_data */ }; diff --git a/contrib/binutils/bfd/netbsd.h b/contrib/binutils/bfd/netbsd.h index 760ed95..d717824 100644 --- a/contrib/binutils/bfd/netbsd.h +++ b/contrib/binutils/bfd/netbsd.h @@ -19,33 +19,33 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Check for our machine type (part of magic number). */ +/* Check for our machine type (part of magic number). */ #ifndef MACHTYPE_OK #define MACHTYPE_OK(m) ((m) == DEFAULT_MID || (m) == M_UNKNOWN) #endif -/* This is the normal load address for executables. */ +/* This is the normal load address for executables. */ #define TEXT_START_ADDR TARGET_PAGE_SIZE /* NetBSD ZMAGIC has its header in the text segment. */ #define N_HEADER_IN_TEXT(x) 1 -/* Determine if this is a shared library using the flags. */ +/* Determine if this is a shared library using the flags. */ #define N_SHARED_LIB(x) (N_DYNAMIC(x)) /* We have 6 bits of flags and 10 bits of machine ID. */ #define N_MACHTYPE(exec) \ - ((enum machine_type)(((exec).a_info >> 16) & 0x03ff)) + ((enum machine_type) (((exec).a_info >> 16) & 0x03ff)) #define N_FLAGS(exec) \ (((exec).a_info >> 26) & 0x3f) #define N_SET_INFO(exec, magic, type, flags) \ ((exec).a_info = ((magic) & 0xffff) \ - | (((int)(type) & 0x3ff) << 16) \ + | (((int) (type) & 0x3ff) << 16) \ | (((flags) & 0x3f) << 24)) #define N_SET_MACHTYPE(exec, machtype) \ ((exec).a_info = \ - ((exec).a_info & 0xfb00ffff) | ((((int)(machtype))&0x3ff) << 16)) + ((exec).a_info & 0xfb00ffff) | ((((int) (machtype))&0x3ff) << 16)) #define N_SET_FLAGS(exec, flags) \ ((exec).a_info = \ ((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26)) diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c index 57ca0d0a2..39947da 100644 --- a/contrib/binutils/bfd/opncls.c +++ b/contrib/binutils/bfd/opncls.c @@ -1,5 +1,5 @@ /* opncls.c -- open and close a BFD. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 + Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -248,7 +248,7 @@ bfd_fdopenr (filename, target, fd) be written through, although doing so requires that we end the previous clause with a preposition. */ /* (O_ACCMODE) parens are to avoid Ultrix header file bug */ - switch (fdflags & O_ACCMODE) + switch (fdflags & (O_ACCMODE)) { case O_RDONLY: nbfd->direction = read_direction; break; case O_WRONLY: nbfd->direction = write_direction; break; diff --git a/contrib/binutils/bfd/pe-arm.c b/contrib/binutils/bfd/pe-arm.c index 6c6b659..a4e128b 100644 --- a/contrib/binutils/bfd/pe-arm.c +++ b/contrib/binutils/bfd/pe-arm.c @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define PCRELOFFSET true #define COFF_LONG_SECTION_NAMES -#ifndef bfd_arm_allocate_interworking_sections +#ifndef bfd_arm_allocate_interworking_sections #define bfd_arm_allocate_interworking_sections \ bfd_arm_pe_allocate_interworking_sections #define bfd_arm_get_bfd_for_interworking \ @@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define bfd_arm_process_before_allocation \ bfd_arm_pe_process_before_allocation #endif - + #ifdef ARM_WINCE #define TARGET_UNDERSCORE 0 #endif diff --git a/contrib/binutils/bfd/pe-i386.c b/contrib/binutils/bfd/pe-i386.c index a2eb784..1e7e66e 100644 --- a/contrib/binutils/bfd/pe-i386.c +++ b/contrib/binutils/bfd/pe-i386.c @@ -20,7 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" - #define TARGET_SYM i386pe_vec #define TARGET_NAME "pe-i386" #define COFF_WITH_PE diff --git a/contrib/binutils/bfd/pe-ppc.c b/contrib/binutils/bfd/pe-ppc.c index 7d4a547..f96e68b 100644 --- a/contrib/binutils/bfd/pe-ppc.c +++ b/contrib/binutils/bfd/pe-ppc.c @@ -21,7 +21,6 @@ Boston, MA 02111-1307, USA. */ #include "bfd.h" #include "sysdep.h" - #define E_FILENMLEN 18 #define PPC_PE diff --git a/contrib/binutils/bfd/po/POTFILES.in b/contrib/binutils/bfd/po/POTFILES.in index 409bf1d..f75b4ca 100644 --- a/contrib/binutils/bfd/po/POTFILES.in +++ b/contrib/binutils/bfd/po/POTFILES.in @@ -4,6 +4,7 @@ aout32.c aout64.c aout-adobe.c aout-arm.c +aout-cris.c aoutf1.h aout-ns32k.c aout-sparcle.c @@ -21,6 +22,7 @@ cf-i386lynx.c cf-m68klynx.c cf-sparclynx.c cisco-core.c +coff64-rs6000.c coff-a29k.c coff-alpha.c coff-apollo.c @@ -46,6 +48,7 @@ coff-stgo32.c coff-svm68k.c coffswap.h coff-tic30.c +coff-tic54x.c coff-tic80.c coff-u68k.c coff-w65.c @@ -57,6 +60,7 @@ cpu-alpha.c cpu-arc.c cpu-arm.c cpu-avr.c +cpu-cris.c cpu-d10v.c cpu-d30v.c cpu-fr30.c @@ -67,9 +71,12 @@ cpu-i370.c cpu-i386.c cpu-i860.c cpu-i960.c +cpu-ia64.c cpu-m10200.c cpu-m10300.c cpu-m32r.c +cpu-m68hc11.c +cpu-m68hc12.c cpu-m68k.c cpu-m88k.c cpu-mcore.c @@ -81,6 +88,7 @@ cpu-rs6000.c cpu-sh.c cpu-sparc.c cpu-tic30.c +cpu-tic54x.c cpu-tic80.c cpu-v850.c cpu-vax.c @@ -93,19 +101,26 @@ dwarf2.c ecoff.c ecofflink.c ecoffswap.h +efi-app-ia32.c +efi-app-ia64.c elf32-arc.c elf32-arm.h elf32-avr.c elf32.c +elf32-cris.c elf32-d10v.c elf32-d30v.c elf32-fr30.c elf32-gen.c +elf32-hppa.c +elf32-hppa.h elf32-i370.c elf32-i386.c elf32-i860.c elf32-i960.c elf32-m32r.c +elf32-m68hc11.c +elf32-m68hc12.c elf32-m68k.c elf32-m88k.c elf32-mcore.c @@ -113,19 +128,24 @@ elf32-mips.c elf32-pj.c elf32-ppc.c elf32-sh.c +elf32-sh-lin.c elf32-sparc.c elf32-v850.c elf64-alpha.c elf64.c elf64-gen.c +elf64-hppa.c +elf64-hppa.h elf64-mips.c elf64-sparc.c +elf64-x86-64.c elfarm-nabi.c elfarm-oabi.c elf-bfd.h elf.c elfcode.h elfcore.h +elf-hppa.h elflink.c elflink.h elf-m10200.c @@ -232,3 +252,4 @@ vms-hdr.c vms-misc.c vms-tir.c xcofflink.c +xcoff-target.h diff --git a/contrib/binutils/bfd/po/bfd.pot b/contrib/binutils/bfd/po/bfd.pot index b08ec36..e77b05d 100644 --- a/contrib/binutils/bfd/po/bfd.pot +++ b/contrib/binutils/bfd/po/bfd.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-04-04 22:10+0930\n" +"POT-Creation-Date: 2001-01-11 11:54-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -14,140 +14,155 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" -#: aout-adobe.c:183 +#: aout-adobe.c:189 #, c-format msgid "%s: Unknown section type in a.out.adobe file: %x\n" msgstr "" -#: aoutx.h:1244 aoutx.h:1658 +#: aout-cris.c:205 +#, c-format +msgid "%s: Invalid relocation type exported: %d" +msgstr "" + +#: aout-cris.c:249 +#, c-format +msgid "%s: Invalid relocation type imported: %d" +msgstr "" + +#: aout-cris.c:260 +#, c-format +msgid "%s: Bad relocation record imported: %d" +msgstr "" + +#: aoutx.h:1259 aoutx.h:1673 #, c-format msgid "%s: can not represent section `%s' in a.out object file format" msgstr "" -#: aoutx.h:1628 +#: aoutx.h:1643 #, c-format msgid "" "%s: can not represent section for symbol `%s' in a.out object file format" msgstr "" -#: aoutx.h:1630 +#: aoutx.h:1645 msgid "*unknown*" msgstr "" -#: aoutx.h:3674 +#: aoutx.h:3684 #, c-format msgid "%s: relocateable link from %s to %s not supported" msgstr "" -#: archive.c:1724 +#: archive.c:1820 msgid "Warning: writing archive was slow: rewriting timestamp\n" msgstr "" -#: archive.c:1990 +#: archive.c:2086 msgid "Reading archive file mod timestamp" msgstr "" #. FIXME: bfd can't call perror. -#: archive.c:2014 +#: archive.c:2113 msgid "Writing updated armap timestamp" msgstr "" -#: bfd.c:274 +#: bfd.c:273 msgid "No error" msgstr "" -#: bfd.c:275 +#: bfd.c:274 msgid "System call error" msgstr "" -#: bfd.c:276 +#: bfd.c:275 msgid "Invalid bfd target" msgstr "" -#: bfd.c:277 +#: bfd.c:276 msgid "File in wrong format" msgstr "" -#: bfd.c:278 +#: bfd.c:277 msgid "Invalid operation" msgstr "" -#: bfd.c:279 +#: bfd.c:278 msgid "Memory exhausted" msgstr "" -#: bfd.c:280 +#: bfd.c:279 msgid "No symbols" msgstr "" -#: bfd.c:281 +#: bfd.c:280 msgid "Archive has no index; run ranlib to add one" msgstr "" -#: bfd.c:282 +#: bfd.c:281 msgid "No more archived files" msgstr "" -#: bfd.c:283 +#: bfd.c:282 msgid "Malformed archive" msgstr "" -#: bfd.c:284 +#: bfd.c:283 msgid "File format not recognized" msgstr "" -#: bfd.c:285 +#: bfd.c:284 msgid "File format is ambiguous" msgstr "" -#: bfd.c:286 +#: bfd.c:285 msgid "Section has no contents" msgstr "" -#: bfd.c:287 +#: bfd.c:286 msgid "Nonrepresentable section on output" msgstr "" -#: bfd.c:288 +#: bfd.c:287 msgid "Symbol needs debug section which does not exist" msgstr "" -#: bfd.c:289 +#: bfd.c:288 msgid "Bad value" msgstr "" -#: bfd.c:290 +#: bfd.c:289 msgid "File truncated" msgstr "" -#: bfd.c:291 +#: bfd.c:290 msgid "File too big" msgstr "" -#: bfd.c:292 +#: bfd.c:291 msgid "#" msgstr "" -#: bfd.c:679 +#: bfd.c:675 #, c-format msgid "bfd assertion fail %s:%d" msgstr "" -#: bfd.c:697 +#: bfd.c:693 #, c-format msgid "BFD internal error, aborting at %s line %d in %s\n" msgstr "" -#: bfd.c:701 +#: bfd.c:697 #, c-format msgid "BFD internal error, aborting at %s line %d\n" msgstr "" -#: bfd.c:703 +#: bfd.c:699 msgid "Please report this bug.\n" msgstr "" -#: binary.c:298 +#: binary.c:303 #, c-format msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx." msgstr "" @@ -156,19 +171,19 @@ msgstr "" msgid "Missing IHCONST" msgstr "" -#: coff-a29k.c:182 +#: coff-a29k.c:181 msgid "Missing IHIHALF" msgstr "" -#: coff-a29k.c:214 +#: coff-a29k.c:213 msgid "Unrecognized reloc" msgstr "" -#: coff-a29k.c:427 +#: coff-a29k.c:425 msgid "missing IHCONST reloc" msgstr "" -#: coff-a29k.c:518 +#: coff-a29k.c:516 msgid "missing IHIHALF reloc" msgstr "" @@ -176,126 +191,126 @@ msgstr "" msgid "GP relative relocation used when GP not defined" msgstr "" -#: coff-alpha.c:1486 elf64-alpha.c:3990 +#: coff-alpha.c:1486 elf64-alpha.c:4004 msgid "using multiple gp values" msgstr "" -#: coff-alpha.c:1992 coff-mips.c:1435 +#: coff-alpha.c:1992 coff-mips.c:1434 msgid "GP relative relocation when GP not defined" msgstr "" -#: coff-arm.c:1020 elf32-arm.h:258 +#: coff-arm.c:1018 elf32-arm.h:246 #, c-format msgid "%s: unable to find THUMB glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1049 elf32-arm.h:291 +#: coff-arm.c:1047 elf32-arm.h:281 #, c-format msgid "%s: unable to find ARM glue '%s' for `%s'" msgstr "" -#: coff-arm.c:1331 coff-arm.c:1426 elf32-arm.h:857 elf32-arm.h:955 +#: coff-arm.c:1335 coff-arm.c:1430 elf32-arm.h:841 elf32-arm.h:946 #, c-format msgid "%s(%s): warning: interworking not enabled." msgstr "" -#: coff-arm.c:1335 elf32-arm.h:958 +#: coff-arm.c:1339 elf32-arm.h:949 #, c-format msgid " first occurrence: %s: arm call to thumb" msgstr "" -#: coff-arm.c:1430 elf32-arm.h:860 +#: coff-arm.c:1434 elf32-arm.h:844 #, c-format msgid " first occurrence: %s: thumb call to arm" msgstr "" -#: coff-arm.c:1433 +#: coff-arm.c:1437 msgid " consider relinking with --support-old-code enabled" msgstr "" -#: coff-arm.c:1722 coff-tic80.c:682 cofflink.c:2980 +#: coff-arm.c:1726 coff-tic80.c:682 cofflink.c:2991 #, c-format msgid "%s: bad reloc address 0x%lx in section `%s'" msgstr "" -#: coff-arm.c:2060 +#: coff-arm.c:2063 #, c-format msgid "%s: illegal symbol index in reloc: %d" msgstr "" -#: coff-arm.c:2189 +#: coff-arm.c:2191 #, c-format msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d" msgstr "" -#: coff-arm.c:2204 +#: coff-arm.c:2206 #, c-format msgid "" "%s: ERROR: passes floats in float registers whereas target %s uses integer " "registers" msgstr "" -#: coff-arm.c:2207 +#: coff-arm.c:2209 #, c-format msgid "" "%s: ERROR: passes floats in integer registers whereas target %s uses float " "registers" msgstr "" -#: coff-arm.c:2222 +#: coff-arm.c:2224 #, c-format msgid "" "%s: ERROR: compiled as position independent code, whereas target %s is " "absolute position" msgstr "" -#: coff-arm.c:2225 +#: coff-arm.c:2227 #, c-format msgid "" "%s: ERROR: compiled as absolute position code, whereas target %s is position " "independent" msgstr "" -#: coff-arm.c:2254 +#: coff-arm.c:2256 #, c-format msgid "Warning: input file %s supports interworking, whereas %s does not." msgstr "" -#: coff-arm.c:2257 +#: coff-arm.c:2259 #, c-format msgid "Warning: input file %s does not support interworking, whereas %s does." msgstr "" -#: coff-arm.c:2285 +#: coff-arm.c:2286 #, c-format msgid "private flags = %x:" msgstr "" -#: coff-arm.c:2293 elf32-arm.h:2089 +#: coff-arm.c:2294 elf32-arm.h:2210 msgid " [floats passed in float registers]" msgstr "" -#: coff-arm.c:2295 elf32-arm.h:2091 +#: coff-arm.c:2296 msgid " [floats passed in integer registers]" msgstr "" -#: coff-arm.c:2298 elf32-arm.h:2094 +#: coff-arm.c:2299 elf32-arm.h:2213 msgid " [position independent]" msgstr "" -#: coff-arm.c:2300 elf32-arm.h:2096 +#: coff-arm.c:2301 msgid " [absolute position]" msgstr "" -#: coff-arm.c:2304 +#: coff-arm.c:2305 msgid " [interworking flag not initialised]" msgstr "" -#: coff-arm.c:2306 +#: coff-arm.c:2307 msgid " [interworking supported]" msgstr "" -#: coff-arm.c:2308 +#: coff-arm.c:2309 msgid " [interworking not supported]" msgstr "" @@ -311,42 +326,47 @@ msgstr "" msgid "Warning: Clearing the interworking flag of %s due to outside request" msgstr "" -#: coffcode.h:3965 +#: coffcode.h:2136 +#, c-format +msgid "Unrecognized TI COFF target id '0x%x'" +msgstr "" + +#: coffcode.h:4194 #, c-format msgid "%s: warning: illegal symbol index %ld in line numbers" msgstr "" -#: coffcode.h:3979 +#: coffcode.h:4208 #, c-format msgid "%s: warning: duplicate line number information for `%s'" msgstr "" -#: coffcode.h:4334 +#: coffcode.h:4568 #, c-format msgid "%s: Unrecognized storage class %d for %s symbol `%s'" msgstr "" -#: coffcode.h:4465 +#: coffcode.h:4699 #, c-format msgid "warning: %s: local symbol `%s' has no section" msgstr "" -#: coffcode.h:4578 +#: coff-tic54x.c:376 coffcode.h:4810 #, c-format msgid "%s: warning: illegal symbol index %ld in relocs" msgstr "" -#: coffcode.h:4616 +#: coffcode.h:4848 #, c-format msgid "%s: illegal relocation type %d at address 0x%lx" msgstr "" -#: coffgen.c:1613 +#: coffgen.c:1631 #, c-format msgid "%s: bad string table size %lu" msgstr "" -#: coffgen.c:2076 +#: coffgen.c:2093 #, c-format msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld" msgstr "" @@ -355,296 +375,426 @@ msgstr "" msgid "uncertain calling convention for non-COFF symbol" msgstr "" -#: cofflink.c:518 elflink.h:1568 +#: cofflink.c:526 elflink.h:1648 #, c-format msgid "Warning: type of symbol `%s' changed from %d to %d in %s" msgstr "" -#: cofflink.c:2285 +#: cofflink.c:2289 #, c-format msgid "%s: relocs in section `%s', but it has no contents" msgstr "" -#: cofflink.c:2619 coffswap.h:904 +#: cofflink.c:2628 coffswap.h:894 #, c-format msgid "%s: %s: reloc overflow: 0x%lx > 0xffff" msgstr "" -#: cofflink.c:2628 coffswap.h:891 +#: cofflink.c:2637 coffswap.h:880 #, c-format msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff" msgstr "" -#: coff-mips.c:875 elf32-mips.c:1406 -msgid "GP relative relocation when _gp not defined" +#: coff-m68k.c:475 coff-mips.c:2432 elf32-m68k.c:2265 +msgid "unsupported reloc type" msgstr "" -#: coff-mips.c:2433 -msgid "unsupported reloc type" +#: coff-mips.c:875 elf32-mips.c:1417 +msgid "GP relative relocation when _gp not defined" msgstr "" #. No other sections should appear in -membedded-pic #. code. -#: coff-mips.c:2470 +#: coff-mips.c:2469 msgid "reloc against unsupported section" msgstr "" -#: coff-mips.c:2478 +#: coff-mips.c:2477 msgid "reloc not properly aligned" msgstr "" -#: coff-tic80.c:445 +#: coff-tic54x.c:263 coff-tic80.c:445 #, c-format msgid "Unrecognized reloc type 0x%x" msgstr "" -#: coff-w65.c:383 +#: coff-w65.c:369 #, c-format msgid "ignoring reloc %s\n" msgstr "" -#: dwarf2.c:429 +#: dwarf2.c:423 msgid "Dwarf Error: Can't find .debug_abbrev section." msgstr "" -#: dwarf2.c:447 +#: dwarf2.c:441 #, c-format msgid "Dwarf Error: Abbrev offset (%u) bigger than abbrev size (%u)." msgstr "" -#: dwarf2.c:627 +#: dwarf2.c:624 #, c-format msgid "Dwarf Error: Invalid or unhandled FORM value: %d." msgstr "" -#: dwarf2.c:700 +#: dwarf2.c:697 msgid "Dwarf Error: mangled line number section (bad file number)." msgstr "" -#: dwarf2.c:791 +#: dwarf2.c:782 msgid "Dwarf Error: Can't find .debug_line section." msgstr "" -#: dwarf2.c:963 +#: dwarf2.c:806 +#, c-format +msgid "Dwarf Error: Line offset (%u) bigger than line size (%u)." +msgstr "" + +#: dwarf2.c:973 msgid "Dwarf Error: mangled line number section." msgstr "" -#: dwarf2.c:1151 dwarf2.c:1307 +#: dwarf2.c:1152 dwarf2.c:1306 #, c-format msgid "Dwarf Error: Could not find abbrev number %d." msgstr "" -#: dwarf2.c:1268 +#: dwarf2.c:1267 #, c-format msgid "" "Dwarf Error: found dwarf version '%hu', this reader only handles version 2 " "information." msgstr "" -#: dwarf2.c:1275 +#: dwarf2.c:1274 #, c-format msgid "" "Dwarf Error: found address size '%u', this reader can not handle sizes " "greater than '%u'." msgstr "" -#: dwarf2.c:1298 +#: dwarf2.c:1297 #, c-format msgid "Dwarf Error: Bad abbrev number: %d." msgstr "" -#: ecoff.c:1325 +#: ecoff.c:1323 #, c-format msgid "Unknown basic type %d" msgstr "" -#: ecoff.c:1597 +#: ecoff.c:1592 #, c-format msgid "" "\n" " End+1 symbol: %ld" msgstr "" -#: ecoff.c:1604 ecoff.c:1607 +#: ecoff.c:1599 ecoff.c:1602 #, c-format msgid "" "\n" " First symbol: %ld" msgstr "" -#: ecoff.c:1619 +#: ecoff.c:1614 #, c-format msgid "" "\n" " End+1 symbol: %-7ld Type: %s" msgstr "" -#: ecoff.c:1626 +#: ecoff.c:1621 #, c-format msgid "" "\n" " Local symbol: %ld" msgstr "" -#: ecoff.c:1634 +#: ecoff.c:1629 #, c-format msgid "" "\n" " struct; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1639 +#: ecoff.c:1634 #, c-format msgid "" "\n" " union; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1644 +#: ecoff.c:1639 #, c-format msgid "" "\n" " enum; End+1 symbol: %ld" msgstr "" -#: ecoff.c:1650 +#: ecoff.c:1645 #, c-format msgid "" "\n" " Type: %s" msgstr "" -#: elf32-arm.h:1787 elf32-i386.c:1304 elf32-ppc.c:3092 +#: elf32-arm.h:1179 +#, c-format +msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'." +msgstr "" + +#: elf32-arm.h:1375 +#, c-format +msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'." +msgstr "" + +#: elf-hppa.h:1369 elf-hppa.h:1402 elf32-arm.h:1853 elf32-i386.c:1428 +#: elf32-ppc.c:3096 elf32-sh.c:2997 elf64-x86-64.c:271 #, c-format msgid "" "%s: warning: unresolvable relocation against symbol `%s' from %s section" msgstr "" -#: elf-m10200.c:455 elf-m10300.c:670 elf32-arm.h:1853 elf32-avr.c:844 -#: elf32-d10v.c:493 elf32-fr30.c:651 elf32-m32r.c:1265 elf32-v850.c:1677 +#: elf-m10200.c:455 elf-m10300.c:669 elf32-arm.h:1927 elf32-avr.c:842 +#: elf32-cris.c:431 elf32-d10v.c:478 elf32-fr30.c:651 elf32-i860.c:1051 +#: elf32-m32r.c:1265 elf32-v850.c:1672 msgid "internal error: out of range error" msgstr "" -#: elf-m10200.c:459 elf-m10300.c:674 elf32-arm.h:1857 elf32-avr.c:848 -#: elf32-d10v.c:497 elf32-fr30.c:655 elf32-m32r.c:1269 elf32-v850.c:1681 +#: elf-m10200.c:459 elf-m10300.c:673 elf32-arm.h:1931 elf32-avr.c:846 +#: elf32-cris.c:435 elf32-d10v.c:482 elf32-fr30.c:655 elf32-i860.c:1055 +#: elf32-m32r.c:1269 elf32-v850.c:1676 msgid "internal error: unsupported relocation error" msgstr "" -#: elf-m10200.c:463 elf-m10300.c:678 elf32-arm.h:1861 elf32-d10v.c:501 +#: elf-m10200.c:463 elf-m10300.c:677 elf32-arm.h:1935 elf32-d10v.c:486 #: elf32-m32r.c:1273 msgid "internal error: dangerous error" msgstr "" -#: elf-m10200.c:467 elf-m10300.c:682 elf32-arm.h:1865 elf32-avr.c:856 -#: elf32-d10v.c:505 elf32-fr30.c:663 elf32-m32r.c:1277 elf32-v850.c:1701 +#: elf-m10200.c:467 elf-m10300.c:681 elf32-arm.h:1939 elf32-avr.c:854 +#: elf32-cris.c:443 elf32-d10v.c:490 elf32-fr30.c:663 elf32-i860.c:1063 +#: elf32-m32r.c:1277 elf32-v850.c:1696 msgid "internal error: unknown error" msgstr "" -#: elf32-arm.h:1891 +#: elf32-arm.h:1967 #, c-format msgid "" "Warning: Not setting interwork flag of %s since it has already been " "specified as non-interworking" msgstr "" -#: elf32-arm.h:1895 +#: elf32-arm.h:1971 #, c-format msgid "Warning: Clearing the interwork flag of %s due to outside request" msgstr "" -#: elf32-arm.h:1943 +#: elf32-arm.h:2019 #, c-format msgid "" "Warning: Clearing the interwork flag in %s because non-interworking code in " "%s has been linked with it" msgstr "" -#: elf32-arm.h:1977 +#: elf32-arm.h:2113 #, c-format -msgid "%s: compiled for a %s endian system and target is %s endian" +msgid "" +"Error: %s compiled for EABI version %d, whereas %s is compiled for version %d" msgstr "" -#: elf32-arm.h:2023 +#: elf32-arm.h:2127 #, c-format msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d" msgstr "" -#: elf32-arm.h:2031 +#: elf32-arm.h:2138 #, c-format msgid "" "Error: %s passes floats in %s registers, whereas %s passes them in %s " "registers" msgstr "" -#: elf32-arm.h:2034 elf32-arm.h:2036 +#: elf32-arm.h:2141 elf32-arm.h:2143 msgid "float" msgstr "" -#: elf32-arm.h:2034 elf32-arm.h:2036 +#: elf32-arm.h:2141 elf32-arm.h:2143 msgid "integer" msgstr "" -#: elf32-arm.h:2039 +#: elf32-arm.h:2150 #, c-format -msgid "Error: %s is compiled as position %s code, whereas %s is not" +msgid "Error: %s uses %s floating point, whereas %s uses %s floating point" msgstr "" -#: elf32-arm.h:2042 -msgid "independent" +#: elf32-arm.h:2153 elf32-arm.h:2155 +msgid "soft" msgstr "" -#: elf32-arm.h:2042 -msgid "dependent" +#: elf32-arm.h:2153 elf32-arm.h:2155 +msgid "hard" msgstr "" -#: elf32-arm.h:2048 +#: elf32-arm.h:2162 #, c-format msgid "Warning: %s %s interworking, whereas %s %s" msgstr "" -#: elf32-arm.h:2051 +#: elf32-arm.h:2165 msgid "supports" msgstr "" -#: elf32-arm.h:2051 +#: elf32-arm.h:2165 msgid "does not support" msgstr "" -#: elf32-arm.h:2053 +#: elf32-arm.h:2167 msgid "does not" msgstr "" -#: elf32-arm.h:2053 +#: elf32-arm.h:2167 msgid "does" msgstr "" -#. Ignore init flag - it may not be set, despite the flags field containing valid data. -#: elf32-arm.h:2076 elf32-m68k.c:430 elf32-mips.c:2634 +#. Ignore init flag - it may not be set, despite the flags field +#. containing valid data. +#: elf32-arm.h:2193 elf32-cris.c:615 elf32-m68k.c:430 elf32-mips.c:2695 #, c-format msgid "private flags = %lx:" msgstr "" -#: elf32-arm.h:2079 +#: elf32-arm.h:2202 msgid " [interworking enabled]" msgstr "" -#: elf32-arm.h:2081 -msgid " [interworking not enabled]" -msgstr "" - -#: elf32-arm.h:2084 +#: elf32-arm.h:2205 msgid " [APCS-26]" msgstr "" -#: elf32-arm.h:2086 +#: elf32-arm.h:2207 msgid " [APCS-32]" msgstr "" -#: elf32-avr.c:852 elf32-fr30.c:659 elf32-v850.c:1685 +#: elf32-arm.h:2216 +msgid " [new ABI]" +msgstr "" + +#: elf32-arm.h:2219 +msgid " [old ABI]" +msgstr "" + +#: elf32-arm.h:2222 +msgid " [software FP]" +msgstr "" + +#: elf32-arm.h:2229 +msgid " [Version1 EABI]" +msgstr "" + +#: elf32-arm.h:2232 +msgid " [sorted symbol table]" +msgstr "" + +#: elf32-arm.h:2234 +msgid " [unsorted symbol table]" +msgstr "" + +#: elf32-arm.h:2240 +msgid " " +msgstr "" + +#: elf32-arm.h:2247 +msgid " [relocatable executable]" +msgstr "" + +#: elf32-arm.h:2250 +msgid " [has entry point]" +msgstr "" + +#: elf32-arm.h:2255 +msgid "" +msgstr "" + +#: elf32-avr.c:850 elf32-cris.c:439 elf32-fr30.c:659 elf32-i860.c:1059 +#: elf32-v850.c:1680 msgid "internal error: dangerous relocation" msgstr "" -#: elf32-i386.c:239 +#: elf32-cris.c:618 +msgid " [symbols have a _ prefix]" +msgstr "" + +#: elf32-cris.c:657 +#, c-format +msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols" +msgstr "" + +#: elf32-cris.c:658 +#, c-format +msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols" +msgstr "" + +#: elf32-hppa.c:606 +#, c-format +msgid "%s(%s+0x%lx): cannot find stub entry %s" +msgstr "" + +#: elf32-hppa.c:667 +#, c-format +msgid "%s: cannot create stub entry %s" +msgstr "" + +#: elf32-hppa.c:859 +#, c-format +msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections" +msgstr "" + +#: elf32-hppa.c:872 elf32-hppa.c:1568 +#, c-format +msgid "Could not find relocation section for %s" +msgstr "" + +#: elf32-hppa.c:1011 elf32-hppa.c:3362 +#, c-format +msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections" +msgstr "" + +#: elf32-hppa.c:1323 +#, c-format +msgid "" +"%s: relocation %s can not be used when making a shared object; recompile " +"with -fPIC" +msgstr "" + +#: elf32-hppa.c:1343 +#, c-format +msgid "" +"%s: relocation %s should not be used when making a shared object; recompile " +"with -fPIC" +msgstr "" + +#: elf32-hppa.c:2755 +#, c-format +msgid "%s: duplicate export stub %s" +msgstr "" + +#: elf32-hppa.c:3253 +#, c-format +msgid "%s(%s+0x%lx): fixing %s" +msgstr "" + +#: elf32-hppa.c:3856 +#, c-format +msgid "%s(%s+0x%lx): cannot handle %s for %s" +msgstr "" + +#: elf32-hppa.c:4173 +msgid ".got section not immediately after .plt section" +msgstr "" + +#: elf32-i386.c:273 #, c-format msgid "%s: invalid relocation type %d" msgstr "" @@ -685,149 +835,151 @@ msgstr "" msgid " [cpu32]" msgstr "" -#: elf32-mcore.c:329 -#, c-format -msgid "%s: compiled for a %s endian system and target is %s endian.\n" -msgstr "" - -#: elf32-mcore.c:377 elf32-mcore.c:504 +#: elf32-mcore.c:366 elf32-mcore.c:493 #, c-format msgid "%s: Relocation %s (%d) is not currently supported.\n" msgstr "" -#: elf32-mcore.c:463 +#: elf32-mcore.c:452 #, c-format msgid "%s: Unknown relocation type %d\n" msgstr "" -#: elf32-mips.c:1565 +#: elf32-mips.c:1576 msgid "32bits gp relative relocation occurs for an external symbol" msgstr "" -#: elf32-mips.c:1714 +#: elf32-mips.c:1725 #, c-format msgid "Linking mips16 objects into %s format is not supported" msgstr "" -#: elf32-mips.c:2469 elf32-ppc.c:1408 -#, c-format -msgid "%s: compiled for a big endian system and target is little endian" -msgstr "" - -#: elf32-mips.c:2471 elf32-ppc.c:1410 -#, c-format -msgid "%s: compiled for a little endian system and target is big endian" -msgstr "" - -#: elf32-mips.c:2520 +#: elf32-mips.c:2582 #, c-format msgid "%s: linking PIC files with non-PIC files" msgstr "" -#: elf32-mips.c:2530 +#: elf32-mips.c:2592 #, c-format msgid "%s: linking abicalls files with non-abicalls files" msgstr "" -#: elf32-mips.c:2560 +#: elf32-mips.c:2621 #, c-format msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)" msgstr "" -#: elf32-mips.c:2569 +#: elf32-mips.c:2630 #, c-format msgid "%s: ISA mismatch (%d) with previous modules (%d)" msgstr "" -#: elf32-mips.c:2592 +#: elf32-mips.c:2653 #, c-format msgid "%s: ABI mismatch: linking %s module with previous %s modules" msgstr "" -#: elf32-mips.c:2606 elf32-ppc.c:1477 elf64-sparc.c:2844 +#: elf32-mips.c:2667 elf32-ppc.c:1477 elf64-sparc.c:2971 #, c-format msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)" msgstr "" -#: elf32-mips.c:2637 +#: elf32-mips.c:2698 msgid " [abi=O32]" msgstr "" -#: elf32-mips.c:2639 +#: elf32-mips.c:2700 msgid " [abi=O64]" msgstr "" -#: elf32-mips.c:2641 +#: elf32-mips.c:2702 msgid " [abi=EABI32]" msgstr "" -#: elf32-mips.c:2643 +#: elf32-mips.c:2704 msgid " [abi=EABI64]" msgstr "" -#: elf32-mips.c:2645 +#: elf32-mips.c:2706 msgid " [abi unknown]" msgstr "" -#: elf32-mips.c:2647 +#: elf32-mips.c:2708 msgid " [abi=N32]" msgstr "" -#: elf32-mips.c:2649 +#: elf32-mips.c:2710 msgid " [abi=64]" msgstr "" -#: elf32-mips.c:2651 +#: elf32-mips.c:2712 msgid " [no abi set]" msgstr "" -#: elf32-mips.c:2654 +#: elf32-mips.c:2715 msgid " [mips1]" msgstr "" -#: elf32-mips.c:2656 +#: elf32-mips.c:2717 msgid " [mips2]" msgstr "" -#: elf32-mips.c:2658 +#: elf32-mips.c:2719 msgid " [mips3]" msgstr "" -#: elf32-mips.c:2660 +#: elf32-mips.c:2721 msgid " [mips4]" msgstr "" -#: elf32-mips.c:2662 +#: elf32-mips.c:2723 +msgid " [mips5]" +msgstr "" + +#: elf32-mips.c:2725 +msgid " [mips32]" +msgstr "" + +#: elf32-mips.c:2727 +msgid " [mips64]" +msgstr "" + +#: elf32-mips.c:2729 msgid " [unknown ISA]" msgstr "" -#: elf32-mips.c:2665 +#: elf32-mips.c:2732 msgid " [32bitmode]" msgstr "" -#: elf32-mips.c:2667 +#: elf32-mips.c:2734 msgid " [not 32bitmode]" msgstr "" -#: elf32-mips.c:4270 +#: elf32-mips.c:4388 msgid "static procedure (no name)" msgstr "" -#: elf32-mips.c:4887 elf64-alpha.c:4364 +#: elf32-mips.c:5005 elf64-alpha.c:4377 #, c-format msgid "%s: illegal section name `%s'" msgstr "" -#: elf32-mips.c:5414 +#: elf32-mips.c:5570 msgid "not enough GOT space for local GOT entries" msgstr "" -#: elf32-mips.c:6493 +#: elf32-mips.c:6686 #, c-format msgid "%s: %s+0x%lx: jump to stub routine which is not jal" msgstr "" -#: elf32-mips.c:7521 +#: elf32-mips.c:7673 +#, c-format +msgid "Malformed reloc detected for section %s" +msgstr "" + +#: elf32-mips.c:7750 #, c-format msgid "%s: CALL16 reloc at 0x%lx not against global symbol" msgstr "" @@ -849,156 +1001,146 @@ msgstr "" msgid "%s: Unknown special linker type %d" msgstr "" -#: elf32-ppc.c:2251 elf32-ppc.c:2285 elf32-ppc.c:2320 +#: elf32-ppc.c:2245 elf32-ppc.c:2279 elf32-ppc.c:2314 #, c-format msgid "%s: relocation %s cannot be used when making a shared object" msgstr "" -#: elf32-ppc.c:3123 +#: elf32-ppc.c:3129 #, c-format msgid "%s: unknown relocation type %d for symbol %s" msgstr "" -#: elf32-ppc.c:3491 elf32-ppc.c:3513 elf32-ppc.c:3562 +#: elf32-ppc.c:3493 elf32-ppc.c:3514 elf32-ppc.c:3564 #, c-format msgid "" "%s: The target (%s) of a %s relocation is in the wrong output section (%s)" msgstr "" -#: elf32-ppc.c:3628 +#: elf32-ppc.c:3630 #, c-format msgid "%s: Relocation %s is not yet supported for symbol %s." msgstr "" -#: elf32-sh.c:681 +#: elf32-sh.c:1084 #, c-format msgid "%s: 0x%lx: warning: bad R_SH_USES offset" msgstr "" -#: elf32-sh.c:693 +#: elf32-sh.c:1096 #, c-format msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x" msgstr "" -#: elf32-sh.c:710 +#: elf32-sh.c:1113 #, c-format msgid "%s: 0x%lx: warning: bad R_SH_USES load offset" msgstr "" -#: elf32-sh.c:725 +#: elf32-sh.c:1128 #, c-format msgid "%s: 0x%lx: warning: could not find expected reloc" msgstr "" -#: elf32-sh.c:762 +#: elf32-sh.c:1165 #, c-format msgid "%s: 0x%lx: warning: symbol in unexpected section" msgstr "" -#: elf32-sh.c:884 +#: elf32-sh.c:1287 #, c-format msgid "%s: 0x%lx: warning: could not find expected COUNT reloc" msgstr "" -#: elf32-sh.c:893 +#: elf32-sh.c:1296 #, c-format msgid "%s: 0x%lx: warning: bad count" msgstr "" -#: elf32-sh.c:1279 elf32-sh.c:1666 +#: elf32-sh.c:1689 elf32-sh.c:2076 #, c-format msgid "%s: 0x%lx: fatal: reloc overflow while relaxing" msgstr "" -#: elf32-sparc.c:1486 elf64-sparc.c:2242 +#: elf32-sparc.c:1512 elf64-sparc.c:2262 #, c-format msgid "%s: probably compiled without -fPIC?" msgstr "" -#: elf32-sparc.c:1856 -#, c-format -msgid "%s: compiled for a v8plus system and target is v8" -msgstr "" - -#: elf32-sparc.c:1865 -#, c-format -msgid "%s: compiled for a v8plusa system and target is v8plus" -msgstr "" - -#: elf32-sparc.c:1873 +#: elf32-sparc.c:1962 #, c-format msgid "%s: compiled for a 64 bit system and target is 32 bit" msgstr "" -#: elf32-sparc.c:1888 +#: elf32-sparc.c:1976 #, c-format msgid "%s: linking little endian files with big endian files" msgstr "" -#: elf32-v850.c:680 +#: elf32-v850.c:677 #, c-format msgid "Variable `%s' cannot occupy in multiple small data regions" msgstr "" -#: elf32-v850.c:683 +#: elf32-v850.c:680 #, c-format msgid "" "Variable `%s' can only be in one of the small, zero, and tiny data regions" msgstr "" -#: elf32-v850.c:686 +#: elf32-v850.c:683 #, c-format msgid "" "Variable `%s' cannot be in both small and zero data regions simultaneously" msgstr "" -#: elf32-v850.c:689 +#: elf32-v850.c:686 #, c-format msgid "" "Variable `%s' cannot be in both small and tiny data regions simultaneously" msgstr "" -#: elf32-v850.c:692 +#: elf32-v850.c:689 #, c-format msgid "" "Variable `%s' cannot be in both zero and tiny data regions simultaneously" msgstr "" -#: elf32-v850.c:1070 +#: elf32-v850.c:1066 msgid "FAILED to find previous HI16 reloc\n" msgstr "" -#: elf32-v850.c:1689 +#: elf32-v850.c:1684 msgid "could not locate special linker symbol __gp" msgstr "" -#: elf32-v850.c:1693 +#: elf32-v850.c:1688 msgid "could not locate special linker symbol __ep" msgstr "" -#: elf32-v850.c:1697 +#: elf32-v850.c:1692 msgid "could not locate special linker symbol __ctbp" msgstr "" -#: elf32-v850.c:1886 +#: elf32-v850.c:1881 #, c-format msgid "%s: Architecture mismatch with previous modules" msgstr "" -#: elf32-v850.c:1905 +#: elf32-v850.c:1900 #, c-format msgid "private flags = %lx: " msgstr "" -#: elf32-v850.c:1910 +#: elf32-v850.c:1905 msgid "v850 architecture" msgstr "" -#: elf32-v850.c:1911 +#: elf32-v850.c:1906 msgid "v850e architecture" msgstr "" -#: elf32-v850.c:1912 +#: elf32-v850.c:1907 msgid "v850ea architecture" msgstr "" @@ -1006,175 +1148,175 @@ msgstr "" msgid "GPDISP relocation did not find ldah and lda instructions" msgstr "" -#: elf64-alpha.c:3004 +#: elf64-alpha.c:3014 #, c-format msgid "%s: .got subsegment exceeds 64K (size %d)" msgstr "" -#: elf64-sparc.c:1249 +#: elf64-sparc.c:1248 #, c-format msgid "%s: check_relocs: unhandled reloc type %d" msgstr "" -#: elf64-sparc.c:1286 +#: elf64-sparc.c:1285 msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER" msgstr "" -#: elf64-sparc.c:1306 +#: elf64-sparc.c:1305 msgid "" "Register %%g%d used incompatibly: previously declared in %s to %s, in %s " "redefined to %s" msgstr "" -#: elf64-sparc.c:1329 +#: elf64-sparc.c:1328 #, c-format msgid "Symbol `%s' has differing types: previously %s, REGISTER in %s" msgstr "" -#: elf64-sparc.c:1375 +#: elf64-sparc.c:1374 #, c-format msgid "Symbol `%s' has differing types: REGISTER in %s, %s in %s" msgstr "" -#: elf64-sparc.c:2825 +#: elf64-sparc.c:2952 #, c-format msgid "%s: linking UltraSPARC specific with HAL specific code" msgstr "" -#: elf.c:323 +#: elf.c:325 #, c-format msgid "%s: invalid string offset %u >= %lu for section `%s'" msgstr "" -#: elf.c:546 +#: elf.c:566 msgid "" "\n" "Program Header:\n" msgstr "" -#: elf.c:594 +#: elf.c:614 msgid "" "\n" "Dynamic Section:\n" msgstr "" -#: elf.c:696 +#: elf.c:743 msgid "" "\n" "Version definitions:\n" msgstr "" -#: elf.c:719 +#: elf.c:766 msgid "" "\n" "Version References:\n" msgstr "" -#: elf.c:724 +#: elf.c:771 #, c-format msgid " required from %s:\n" msgstr "" -#: elf.c:1286 +#: elf.c:1359 #, c-format msgid "%s: invalid link %lu for reloc section %s (index %u)" msgstr "" -#: elf.c:2045 +#: elf.c:2113 #, c-format msgid "" "creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = " "0x%.8lx\n" msgstr "" -#: elf.c:2648 +#: elf.c:2716 #, c-format msgid "%s: Not enough room for program headers (allocated %u, need %u)" msgstr "" -#: elf.c:2747 +#: elf.c:2815 #, c-format msgid "%s: Not enough room for program headers, try linking with -N" msgstr "" -#: elf.c:2873 +#: elf.c:2941 #, c-format msgid "Error: First section in segment (%s) starts at 0x%x" msgstr "" -#: elf.c:2876 +#: elf.c:2944 #, c-format msgid " whereas segment starts at 0x%x" msgstr "" -#: elf.c:3146 +#: elf.c:3217 #, c-format msgid "%s: warning: allocated section `%s' not in segment" msgstr "" -#: elf.c:3528 +#: elf.c:3616 #, c-format msgid "%s: symbol `%s' required but not present" msgstr "" -#: elf.c:3537 +#: elf.c:3625 #, c-format msgid "" "elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = " "0x%.8lx%s\n" msgstr "" -#: elf.c:3679 +#: elf.c:3866 #, c-format msgid "%s: warning: Empty loadable segment detected\n" msgstr "" -#: elf.c:4956 +#: elf.c:5213 #, c-format msgid "%s: unsupported relocation type %s" msgstr "" -#: elfcode.h:1061 +#: elfcode.h:1084 #, c-format msgid "%s: version count (%ld) does not match symbol count (%ld)" msgstr "" -#: elflink.c:423 +#: elflink.c:432 #, c-format msgid "%s: Section %s is already to large to put hole of %ld bytes in" msgstr "" -#: elflink.h:1388 +#: elflink.h:1465 #, c-format msgid "%s: %s: invalid version %u (max %d)" msgstr "" -#: elflink.h:1429 +#: elflink.h:1506 #, c-format msgid "%s: %s: invalid needed version %d" msgstr "" -#: elflink.h:1546 +#: elflink.h:1626 #, c-format msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s" msgstr "" -#: elflink.h:1790 +#: elflink.h:1872 #, c-format msgid "%s: warning: unexpected redefinition of `%s'" msgstr "" -#: elflink.h:3480 +#: elflink.h:3659 #, c-format msgid "warning: type and size of dynamic symbol `%s' are not defined" msgstr "" -#: elflink.h:3752 +#: elflink.h:3931 #, c-format msgid "%s: undefined versioned symbol name %s" msgstr "" -#: elflink.h:4983 +#: elflink.h:5180 #, c-format msgid "%s: could not find output section %s for input section %s" msgstr "" @@ -1274,16 +1416,26 @@ msgstr "" msgid "%s: address 0x%s out of range for Intex Hex file" msgstr "" -#: libbfd.c:484 +#: libbfd.c:471 #, c-format msgid "not mapping: data=%lx mapped=%d\n" msgstr "" -#: libbfd.c:487 +#: libbfd.c:474 msgid "not mapping: env var not set\n" msgstr "" -#: linker.c:2679 +#: libbfd.c:1370 +#, c-format +msgid "%s: compiled for a big endian system and target is little endian" +msgstr "" + +#: libbfd.c:1372 +#, c-format +msgid "%s: compiled for a little endian system and target is big endian" +msgstr "" + +#: linker.c:2678 #, c-format msgid "Attempt to do relocateable link with %s input and %s output" msgstr "" @@ -1299,330 +1451,328 @@ msgid "Unhandled OSF/1 core file section type %d\n" msgstr "" #. XXX code yet to be written. -#: peicode.h:806 +#: peicode.h:807 #, c-format msgid "%s: Unhandled import type; %x" msgstr "" -#: peicode.h:811 +#: peicode.h:812 #, c-format msgid "%s: Unrecognised import type; %x" msgstr "" -#: peicode.h:825 +#: peicode.h:826 #, c-format msgid "%s: Unrecognised import name type; %x" msgstr "" -#: peicode.h:1182 +#: peicode.h:1183 #, c-format msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive" msgstr "" -#: peicode.h:1194 +#: peicode.h:1195 #, c-format msgid "" "%s: Recognised but unhandled machine type (0x%x) in Import Library Format " "archive" msgstr "" -#: peicode.h:1211 +#: peicode.h:1212 #, c-format msgid "%s: size field is zero in Import Library Format header" msgstr "" -#: peicode.h:1239 +#: peicode.h:1240 #, c-format msgid "%s: string not null terminated in ILF object file." msgstr "" -#: peigen.c:938 +#: peigen.c:993 #, c-format msgid "%s: line number overflow: 0x%lx > 0xffff" msgstr "" -#: peigen.c:950 +#: peigen.c:1011 #, c-format -msgid "%s: reloc overflow: 0x%lx > 0xffff" +msgid "%s: reloc overflow 1: 0x%lx > 0xffff" msgstr "" -#: peigen.c:963 +#: peigen.c:1024 msgid "Export Directory [.edata (or where ever we found it)]" msgstr "" -#: peigen.c:964 +#: peigen.c:1025 msgid "Import Directory [parts of .idata]" msgstr "" -#: peigen.c:965 +#: peigen.c:1026 msgid "Resource Directory [.rsrc]" msgstr "" -#: peigen.c:966 +#: peigen.c:1027 msgid "Exception Directory [.pdata]" msgstr "" -#: peigen.c:967 +#: peigen.c:1028 msgid "Security Directory" msgstr "" -#: peigen.c:968 +#: peigen.c:1029 msgid "Base Relocation Directory [.reloc]" msgstr "" -#: peigen.c:969 +#: peigen.c:1030 msgid "Debug Directory" msgstr "" -#: peigen.c:970 +#: peigen.c:1031 msgid "Description Directory" msgstr "" -#: peigen.c:971 +#: peigen.c:1032 msgid "Special Directory" msgstr "" -#: peigen.c:972 +#: peigen.c:1033 msgid "Thread Storage Directory [.tls]" msgstr "" -#: peigen.c:973 +#: peigen.c:1034 msgid "Load Configuration Directory" msgstr "" -#: peigen.c:974 +#: peigen.c:1035 msgid "Bound Import Directory" msgstr "" -#: peigen.c:975 +#: peigen.c:1036 msgid "Import Address Table Directory" msgstr "" -#: peigen.c:976 peigen.c:977 peigen.c:978 -msgid "Reserved" +#: peigen.c:1037 +msgid "Delay Import Directory" msgstr "" -#: peigen.c:1022 -msgid "" -"\n" -"The import table is the .idata section\n" +#: peigen.c:1038 peigen.c:1039 +msgid "Reserved" msgstr "" -#: peigen.c:1044 +#: peigen.c:1103 msgid "" "\n" "There is an import table, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1048 +#: peigen.c:1108 #, c-format msgid "" "\n" "There is an import table in %s at 0x%lx\n" msgstr "" -#: peigen.c:1089 +#: peigen.c:1147 #, c-format msgid "" "\n" "Function descriptor located at the start address: %04lx\n" msgstr "" -#: peigen.c:1092 +#: peigen.c:1150 #, c-format msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n" msgstr "" -#: peigen.c:1098 +#: peigen.c:1156 msgid "" "\n" "No reldata section! Function descriptor not decoded.\n" msgstr "" -#: peigen.c:1103 +#: peigen.c:1161 +#, c-format msgid "" "\n" -"The Import Tables (interpreted .idata section contents)\n" +"The Import Tables (interpreted %s section contents)\n" msgstr "" -#: peigen.c:1105 +#: peigen.c:1164 msgid " vma: Hint Time Forward DLL First\n" msgstr "" -#: peigen.c:1107 +#: peigen.c:1166 msgid " Table Stamp Chain Name Thunk\n" msgstr "" -#: peigen.c:1157 +#: peigen.c:1216 #, c-format msgid "" "\n" "\tDLL Name: %s\n" msgstr "" -#: peigen.c:1161 peigen.c:1224 +#: peigen.c:1220 peigen.c:1283 msgid "\tvma: Hint/Ord Member-Name\n" msgstr "" -#: peigen.c:1223 +#: peigen.c:1282 msgid "\tThe Import Address Table (difference found)\n" msgstr "" -#: peigen.c:1230 +#: peigen.c:1289 msgid "\t>>> Ran out of IAT members!\n" msgstr "" -#: peigen.c:1248 +#: peigen.c:1308 msgid "\tThe Import Address Table is identical\n" msgstr "" -#: peigen.c:1297 -msgid "" -"\n" -"The export table is the .edata section\n" -msgstr "" - -#: peigen.c:1319 +#: peigen.c:1381 msgid "" "\n" "There is an export table, but the section containing it could not be found\n" msgstr "" -#: peigen.c:1323 +#: peigen.c:1386 #, c-format msgid "" "\n" "There is an export table in %s at 0x%lx\n" msgstr "" -#: peigen.c:1355 +#: peigen.c:1417 +#, c-format msgid "" "\n" -"The Export Tables (interpreted .edata section contents)\n" +"The Export Tables (interpreted %s section contents)\n" "\n" msgstr "" -#: peigen.c:1358 +#: peigen.c:1421 #, c-format msgid "Export Flags \t\t\t%lx\n" msgstr "" -#: peigen.c:1361 +#: peigen.c:1424 #, c-format msgid "Time/Date stamp \t\t%lx\n" msgstr "" -#: peigen.c:1364 +#: peigen.c:1427 #, c-format msgid "Major/Minor \t\t\t%d/%d\n" msgstr "" -#: peigen.c:1367 +#: peigen.c:1430 msgid "Name \t\t\t\t" msgstr "" -#: peigen.c:1373 +#: peigen.c:1436 #, c-format msgid "Ordinal Base \t\t\t%ld\n" msgstr "" -#: peigen.c:1376 +#: peigen.c:1439 msgid "Number in:\n" msgstr "" -#: peigen.c:1379 +#: peigen.c:1442 #, c-format -msgid "\tExport Address Table \t\t%lx\n" +msgid "\tExport Address Table \t\t%08lx\n" msgstr "" -#: peigen.c:1383 +#: peigen.c:1446 #, c-format -msgid "\t[Name Pointer/Ordinal] Table\t%lu\n" +msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n" msgstr "" -#: peigen.c:1386 +#: peigen.c:1449 msgid "Table Addresses\n" msgstr "" -#: peigen.c:1389 +#: peigen.c:1452 msgid "\tExport Address Table \t\t" msgstr "" -#: peigen.c:1394 +#: peigen.c:1457 msgid "\tName Pointer Table \t\t" msgstr "" -#: peigen.c:1399 +#: peigen.c:1462 msgid "\tOrdinal Table \t\t\t" msgstr "" -#: peigen.c:1415 +#: peigen.c:1476 #, c-format msgid "" "\n" "Export Address Table -- Ordinal Base %ld\n" msgstr "" -#: peigen.c:1436 +#: peigen.c:1495 msgid "Forwarder RVA" msgstr "" -#: peigen.c:1444 +#: peigen.c:1506 msgid "Export RVA" msgstr "" -#: peigen.c:1451 +#: peigen.c:1513 msgid "" "\n" "[Ordinal/Name Pointer] Table\n" msgstr "" -#: peigen.c:1496 +#: peigen.c:1568 #, c-format msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n" msgstr "" -#: peigen.c:1500 +#: peigen.c:1572 msgid "" "\n" "The Function Table (interpreted .pdata section contents)\n" msgstr "" -#: peigen.c:1502 +#: peigen.c:1575 +msgid " vma:\t\t\tBegin Address End Address Unwind Info\n" +msgstr "" + +#: peigen.c:1578 msgid " vma:\t\tBegin End EH EH PrologEnd Exception\n" msgstr "" -#: peigen.c:1504 +#: peigen.c:1580 msgid " \t\tAddress Address Handler Data Address Mask\n" msgstr "" -#: peigen.c:1576 +#: peigen.c:1652 msgid " Register save millicode" msgstr "" -#: peigen.c:1579 +#: peigen.c:1655 msgid " Register restore millicode" msgstr "" -#: peigen.c:1582 +#: peigen.c:1658 msgid " Glue code sequence" msgstr "" -#: peigen.c:1628 +#: peigen.c:1709 msgid "" "\n" "\n" "PE File Base Relocations (interpreted .reloc section contents)\n" msgstr "" -#: peigen.c:1663 +#: peigen.c:1744 #, c-format msgid "" "\n" "Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n" msgstr "" -#: peigen.c:1676 +#: peigen.c:1757 #, c-format msgid "\treloc %4d offset %4x [%4lx] %s" msgstr "" @@ -1630,232 +1780,242 @@ msgstr "" #. The MS dumpbin program reportedly ands with 0xff0f before #. printing the characteristics field. Not sure why. No reason to #. emulate it here. -#: peigen.c:1714 +#: peigen.c:1796 #, c-format msgid "" "\n" "Characteristics 0x%x\n" msgstr "" -#: pe-mips.c:657 +#: pe-mips.c:653 #, c-format msgid "%s: `ld -r' not supported with PE MIPS objects\n" msgstr "" -#: pe-mips.c:820 +#. OK, at this point the following variables are set up: +#. src = VMA of the memory we're fixing up +#. mem = pointer to memory we're fixing up +#. val = VMA of what we need to refer to +#. +#: pe-mips.c:789 +#, c-format +msgid "%s: unimplemented %s\n" +msgstr "" + +#: pe-mips.c:815 #, c-format msgid "%s: jump too far away\n" msgstr "" -#: pe-mips.c:847 +#: pe-mips.c:842 #, c-format msgid "%s: bad pair/reflo after refhi\n" msgstr "" -#: ppcboot.c:418 +#: ppcboot.c:422 msgid "" "\n" "ppcboot header:\n" msgstr "" -#: ppcboot.c:419 +#: ppcboot.c:423 #, c-format msgid "Entry offset = 0x%.8lx (%ld)\n" msgstr "" -#: ppcboot.c:420 +#: ppcboot.c:424 #, c-format msgid "Length = 0x%.8lx (%ld)\n" msgstr "" -#: ppcboot.c:423 +#: ppcboot.c:427 #, c-format msgid "Flag field = 0x%.2x\n" msgstr "" -#: ppcboot.c:429 +#: ppcboot.c:433 #, c-format msgid "Partition name = \"%s\"\n" msgstr "" -#: ppcboot.c:448 +#: ppcboot.c:452 #, c-format msgid "" "\n" "Partition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" msgstr "" -#: ppcboot.c:454 +#: ppcboot.c:458 #, c-format msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n" msgstr "" -#: ppcboot.c:460 +#: ppcboot.c:464 #, c-format msgid "Partition[%d] sector = 0x%.8lx (%ld)\n" msgstr "" -#: ppcboot.c:461 +#: ppcboot.c:465 #, c-format msgid "Partition[%d] length = 0x%.8lx (%ld)\n" msgstr "" -#: som.c:5335 +#: som.c:5355 msgid "som_sizeof_headers unimplemented" msgstr "" -#: srec.c:290 +#: srec.c:300 #, c-format msgid "%s:%d: Unexpected character `%s' in S-record file\n" msgstr "" -#: syms.c:974 +#: syms.c:968 msgid "Unsupported .stab relocation" msgstr "" -#: vms-gsd.c:357 +#: vms-gsd.c:354 #, c-format msgid "bfd_make_section (%s) failed" msgstr "" -#: vms-gsd.c:371 +#: vms-gsd.c:368 #, c-format msgid "bfd_set_section_flags (%s, %x) failed" msgstr "" -#: vms-gsd.c:407 +#: vms-gsd.c:404 #, c-format msgid "Size mismatch section %s=%lx, %s=%lx" msgstr "" -#: vms-gsd.c:702 +#: vms-gsd.c:699 #, c-format msgid "unknown gsd/egsd subtype %d" msgstr "" -#: vms-hdr.c:405 +#: vms-hdr.c:403 msgid "Object module NOT error-free !\n" msgstr "" -#: vms-misc.c:541 +#: vms-misc.c:539 #, c-format msgid "Stack overflow (%d) in _bfd_vms_push" msgstr "" -#: vms-misc.c:560 +#: vms-misc.c:557 msgid "Stack underflow in _bfd_vms_pop" msgstr "" -#: vms-misc.c:931 +#: vms-misc.c:915 msgid "_bfd_vms_output_counted called with zero bytes" msgstr "" -#: vms-misc.c:936 +#: vms-misc.c:920 msgid "_bfd_vms_output_counted called with too many bytes" msgstr "" -#: vms-misc.c:1069 +#: vms-misc.c:1051 #, c-format msgid "Symbol %s replaced by %s\n" msgstr "" -#: vms-misc.c:1133 +#: vms-misc.c:1113 #, c-format msgid "failed to enter %s" msgstr "" -#: vms-tir.c:69 +#: vms-tir.c:68 msgid "No Mem !" msgstr "" -#: vms-tir.c:309 +#: vms-tir.c:302 msgid "Bad section index in ETIR_S_C_STA_PQ" msgstr "" -#: vms-tir.c:324 +#: vms-tir.c:317 #, c-format msgid "Unsupported STA cmd %d" msgstr "" -#: vms-tir.c:329 vms-tir.c:1287 +#: vms-tir.c:322 vms-tir.c:1274 #, c-format msgid "Reserved STA cmd %d" msgstr "" -#: vms-tir.c:436 +#: vms-tir.c:428 #, c-format msgid "ETIR_S_C_STO_GBL: no symbol \"%s\"" msgstr "" -#: vms-tir.c:457 +#: vms-tir.c:449 #, c-format msgid "ETIR_S_C_STO_CA: no symbol \"%s\"" msgstr "" -#: vms-tir.c:470 +#: vms-tir.c:462 msgid "ETIR_S_C_STO_RB/AB: Not supported" msgstr "" -#: vms-tir.c:528 +#: vms-tir.c:520 msgid "ETIR_S_C_STO_LP_PSB: Not supported" msgstr "" -#: vms-tir.c:534 +#: vms-tir.c:526 msgid "ETIR_S_C_STO_HINT_GBL: not implemented" msgstr "" -#: vms-tir.c:540 +#: vms-tir.c:532 msgid "ETIR_S_C_STO_HINT_PS: not implemented" msgstr "" -#: vms-tir.c:544 vms-tir.c:1460 +#: vms-tir.c:536 vms-tir.c:1446 #, c-format msgid "Reserved STO cmd %d" msgstr "" -#: vms-tir.c:657 +#: vms-tir.c:649 msgid "ETIR_S_C_OPR_INSV: Not supported" msgstr "" -#: vms-tir.c:675 +#: vms-tir.c:667 msgid "ETIR_S_C_OPR_USH: Not supported" msgstr "" -#: vms-tir.c:681 +#: vms-tir.c:673 msgid "ETIR_S_C_OPR_ROT: Not supported" msgstr "" -#: vms-tir.c:700 +#: vms-tir.c:692 msgid "ETIR_S_C_OPR_REDEF: Not supported" msgstr "" -#: vms-tir.c:706 +#: vms-tir.c:698 msgid "ETIR_S_C_OPR_DFLIT: Not supported" msgstr "" -#: vms-tir.c:710 vms-tir.c:1656 +#: vms-tir.c:702 vms-tir.c:1641 #, c-format msgid "Reserved OPR cmd %d" msgstr "" -#: vms-tir.c:779 vms-tir.c:1726 +#: vms-tir.c:770 vms-tir.c:1710 #, c-format msgid "Reserved CTL cmd %d" msgstr "" -#: vms-tir.c:808 +#: vms-tir.c:798 msgid "ETIR_S_C_STC_LP: not supported" msgstr "" -#: vms-tir.c:826 +#: vms-tir.c:816 msgid "ETIR_S_C_STC_GBL: not supported" msgstr "" -#: vms-tir.c:834 +#: vms-tir.c:824 msgid "ETIR_S_C_STC_GCA: not supported" msgstr "" -#: vms-tir.c:843 +#: vms-tir.c:833 msgid "ETIR_S_C_STC_PS: not supported" msgstr "" @@ -1864,11 +2024,11 @@ msgstr "" #. * arg: - #. * #. -#: vms-tir.c:1187 +#: vms-tir.c:1174 msgid "Stack-from-image not implemented" msgstr "" -#: vms-tir.c:1207 +#: vms-tir.c:1194 msgid "Stack-entry-mask not fully implemented" msgstr "" @@ -1881,171 +2041,171 @@ msgstr "" #. * compare argument descriptor with symbol argument (ARG$V_PASSMECH) #. * and stack TRUE (args match) or FALSE (args dont match) value #. -#: vms-tir.c:1223 +#: vms-tir.c:1210 msgid "PASSMECH not fully implemented" msgstr "" -#: vms-tir.c:1243 +#: vms-tir.c:1230 msgid "Stack-local-symbol not fully implemented" msgstr "" -#: vms-tir.c:1258 +#: vms-tir.c:1245 msgid "Stack-literal not fully implemented" msgstr "" -#: vms-tir.c:1280 +#: vms-tir.c:1267 msgid "Stack-local-symbol-entry-point-mask not fully implemented" msgstr "" -#: vms-tir.c:1456 +#: vms-tir.c:1442 #, c-format msgid "Unimplemented STO cmd %d" msgstr "" -#: vms-tir.c:1596 +#: vms-tir.c:1581 msgid "TIR_S_C_OPR_ASH incomplete" msgstr "" -#: vms-tir.c:1610 +#: vms-tir.c:1595 msgid "TIR_S_C_OPR_USH incomplete" msgstr "" -#: vms-tir.c:1624 +#: vms-tir.c:1609 msgid "TIR_S_C_OPR_ROT incomplete" msgstr "" #. #. * redefine symbol to current location #. -#: vms-tir.c:1645 +#: vms-tir.c:1630 msgid "TIR_S_C_OPR_REDEF not supported" msgstr "" #. #. * define a literal #. -#: vms-tir.c:1652 +#: vms-tir.c:1637 msgid "TIR_S_C_OPR_DFLIT not supported" msgstr "" -#: vms-tir.c:1707 +#: vms-tir.c:1691 msgid "TIR_S_C_CTL_DFLOC not fully implemented" msgstr "" -#: vms-tir.c:1715 +#: vms-tir.c:1699 msgid "TIR_S_C_CTL_STLOC not fully implemented" msgstr "" -#: vms-tir.c:1723 +#: vms-tir.c:1707 msgid "TIR_S_C_CTL_STKDL not fully implemented" msgstr "" -#: vms-tir.c:1778 +#: vms-tir.c:1761 #, c-format msgid "Obj code %d not found" msgstr "" -#: vms-tir.c:2127 +#: vms-tir.c:2102 #, c-format msgid "SEC_RELOC with no relocs in section %s" msgstr "" -#: vms-tir.c:2401 +#: vms-tir.c:2376 #, c-format msgid "Unhandled relocation %s" msgstr "" -#: xcofflink.c:1661 +#: xcofflink.c:1634 #, c-format msgid "%s: `%s' has line numbers but no enclosing section" msgstr "" -#: xcofflink.c:1713 +#: xcofflink.c:1686 #, c-format msgid "%s: class %d symbol `%s' has no aux entries" msgstr "" -#: xcofflink.c:1736 +#: xcofflink.c:1709 #, c-format msgid "%s: symbol `%s' has unrecognized csect type %d" msgstr "" -#: xcofflink.c:1748 +#: xcofflink.c:1721 #, c-format msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d" msgstr "" -#: xcofflink.c:1787 +#: xcofflink.c:1760 #, c-format msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d" msgstr "" -#: xcofflink.c:1911 +#: xcofflink.c:1883 #, c-format msgid "%s: symbol `%s' has unrecognized smclas %d" msgstr "" -#: xcofflink.c:1930 +#: xcofflink.c:1902 #, c-format msgid "%s: csect `%s' not in enclosing section" msgstr "" -#: xcofflink.c:2034 +#: xcofflink.c:2006 #, c-format msgid "%s: misplaced XTY_LD `%s'" msgstr "" -#: xcofflink.c:2345 +#: xcofflink.c:2317 #, c-format msgid "%s: reloc %s:%d not in csect" msgstr "" -#: xcofflink.c:2480 +#: xcofflink.c:2452 #, c-format msgid "%s: XCOFF shared object when not producing XCOFF output" msgstr "" -#: xcofflink.c:2501 +#: xcofflink.c:2473 #, c-format msgid "%s: dynamic object with no .loader section" msgstr "" -#: xcofflink.c:3141 +#: xcofflink.c:3113 #, c-format msgid "%s: no such symbol" msgstr "" -#: xcofflink.c:3733 +#: xcofflink.c:3704 #, c-format msgid "warning: attempt to export undefined symbol `%s'" msgstr "" -#: xcofflink.c:4709 +#: xcofflink.c:4698 #, c-format msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling" msgstr "" -#: xcofflink.c:5534 xcofflink.c:5890 xcofflink.c:5927 xcofflink.c:6244 +#: xcofflink.c:5523 xcofflink.c:5879 xcofflink.c:5916 xcofflink.c:6233 #, c-format msgid "%s: loader reloc in unrecognized section `%s'" msgstr "" -#: xcofflink.c:5556 xcofflink.c:6255 +#: xcofflink.c:5545 xcofflink.c:6244 #, c-format msgid "%s: `%s' in loader reloc but not loader sym" msgstr "" -#: xcofflink.c:5571 +#: xcofflink.c:5560 #, c-format msgid "%s: loader reloc in read-only section %s" msgstr "" -#: xcofflink.c:6451 +#: xcofflink.c:6440 #, c-format msgid "%s: unsupported relocation type 0x%02x" msgstr "" -#: xcofflink.c:6497 +#: xcofflink.c:6486 #, c-format msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry" msgstr "" diff --git a/contrib/binutils/bfd/ppcboot.c b/contrib/binutils/bfd/ppcboot.c index 9441848..d92a0a6 100644 --- a/contrib/binutils/bfd/ppcboot.c +++ b/contrib/binutils/bfd/ppcboot.c @@ -234,7 +234,7 @@ ppcboot_get_section_contents (abfd, section, location, offset, count) file_ptr offset; bfd_size_type count; { - if (bfd_seek (abfd, offset + sizeof(ppcboot_hdr_t), SEEK_SET) != 0 + if (bfd_seek (abfd, offset + sizeof (ppcboot_hdr_t), SEEK_SET) != 0 || bfd_read (location, 1, count, abfd) != count) return false; return true; @@ -536,6 +536,6 @@ const bfd_target ppcboot_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + NULL }; diff --git a/contrib/binutils/bfd/ptrace-core.c b/contrib/binutils/bfd/ptrace-core.c index 0969dce..2c19f6d 100644 --- a/contrib/binutils/bfd/ptrace-core.c +++ b/contrib/binutils/bfd/ptrace-core.c @@ -32,7 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include - struct trad_core_struct { asection *data_section; @@ -66,7 +65,7 @@ ptrace_unix_core_file_p (abfd) struct trad_core_struct *rawptr; val = bfd_read ((void *)&u, 1, sizeof u, abfd); - if (val != sizeof u || u.pt_magic != _BCS_PTRACE_MAGIC + if (val != sizeof u || u.pt_magic != _BCS_PTRACE_MAGIC || u.pt_rev != _BCS_PTRACE_REV) { /* Too small to be a core file */ @@ -83,7 +82,7 @@ ptrace_unix_core_file_p (abfd) if (rawptr == NULL) return 0; - + abfd->tdata.trad_core_data = rawptr; rawptr->u = u; /*Copy the uarea into the tdata part of the bfd */ @@ -107,8 +106,7 @@ ptrace_unix_core_file_p (abfd) /* FIXME: Need to worry about shared memory, library data, and library text. I don't think that any of these things are supported on the - system on which I am developing this for though. */ - + system on which I am developing this for though. */ core_stacksec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS; @@ -116,11 +114,11 @@ ptrace_unix_core_file_p (abfd) core_datasec (abfd)->_raw_size = u.pt_dsize; core_stacksec (abfd)->_raw_size = u.pt_ssize; - core_regsec (abfd)->_raw_size = sizeof(u); + core_regsec (abfd)->_raw_size = sizeof (u); core_datasec (abfd)->vma = u.pt_o_data_start; core_stacksec (abfd)->vma = USRSTACK - u.pt_ssize; - core_regsec (abfd)->vma = 0 - sizeof(u); /* see trad-core.c */ + core_regsec (abfd)->vma = 0 - sizeof (u); /* see trad-core.c */ core_datasec (abfd)->filepos = (int) u.pt_dataptr; core_stacksec (abfd)->filepos = (int) (u.pt_dataptr + u.pt_dsize); @@ -163,16 +161,16 @@ boolean ptrace_unix_core_file_matches_executable_p (core_bfd, exec_bfd) bfd *core_bfd, *exec_bfd; { - /* FIXME: Use pt_timdat field of the ptrace_user structure to match + /* FIXME: Use pt_timdat field of the ptrace_user structure to match the date of the executable */ return true; } /* If somebody calls any byte-swapping routines, shoot them. */ static void -swap_abort() +swap_abort () { - abort(); /* This way doesn't require any declaration for ANSI to fuck up */ + abort (); /* This way doesn't require any declaration for ANSI to fuck up */ } #define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) #define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) @@ -213,7 +211,7 @@ const bfd_target ptrace_core_vec = bfd_false, bfd_false, bfd_false, bfd_false }, - + BFD_JUMP_TABLE_GENERIC (_bfd_generic), BFD_JUMP_TABLE_COPY (_bfd_generic), BFD_JUMP_TABLE_CORE (ptrace_unix), @@ -225,7 +223,7 @@ const bfd_target ptrace_core_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + (PTR) 0 /* backend_data */ }; diff --git a/contrib/binutils/bfd/reloc.c b/contrib/binutils/bfd/reloc.c index ef2375a..f37a6a9 100644 --- a/contrib/binutils/bfd/reloc.c +++ b/contrib/binutils/bfd/reloc.c @@ -146,7 +146,6 @@ DESCRIPTION to the relocation offset. Its interpretation is dependent upon the howto. For example, on the 68k the code: - | char foo[]; | main() | { @@ -161,11 +160,9 @@ DESCRIPTION | unlk fp | rts - This could create a reloc pointing to <>, but leave the offset in the data, something like: - |RELOCATION RECORDS FOR [.text]: |offset type value |00000006 32 _foo @@ -176,21 +173,17 @@ DESCRIPTION |0000000c 4e5e ; unlk fp |0000000e 4e75 ; rts - Using coff and an 88k, some instructions don't have enough space in them to represent the full address range, and pointers have to be loaded in two parts. So you'd get something like: - | or.u r13,r0,hi16(_foo+0x12345678) | ld.b r2,r13,lo16(_foo+0x12345678) | jmp r1 - This should create two relocs, both pointing to <<_foo>>, and with 0x12340000 in their addend field. The data would consist of: - |RELOCATION RECORDS FOR [.text]: |offset type value |00000002 HVRT16 _foo+0x12340000 @@ -200,7 +193,6 @@ DESCRIPTION |00000004 1c4d5678 ; ld.b r2,r13,0x5678 |00000008 f400c001 ; jmp r1 - The relocation routine digs out the value from the data, adds it to the addend to get the original offset, and then adds the value of <<_foo>>. Note that all 32 bits have to be kept around @@ -223,7 +215,6 @@ DESCRIPTION Both relocs contain a pointer to <>, and the offsets contain junk. - |RELOCATION RECORDS FOR [.text]: |offset type value |00000004 HI22 _foo+0x12345678 @@ -235,7 +226,6 @@ DESCRIPTION |0000000c 81c7e008 ; ret |00000010 81e80000 ; restore - o <> The <> field can be imagined as a @@ -391,7 +381,6 @@ FUNCTION DESCRIPTION The HOWTO define is horrible and will go away. - .#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ . {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC} @@ -399,7 +388,6 @@ DESCRIPTION And will be replaced with the totally magic way. But for the moment, we are compatible, so do it this way. - .#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN) . @@ -589,7 +577,6 @@ DESCRIPTION */ - bfd_reloc_status_type bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd, error_message) @@ -651,7 +638,6 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd, else relocation = symbol->value; - reloc_target_output_section = symbol->section->output_section; /* Convert input-section-relative symbol value to absolute. */ @@ -728,8 +714,6 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd, /* WTF?? */ if (abfd->xvec->flavour == bfd_target_coff_flavour - && strcmp (abfd->xvec->name, "aixcoff-rs6000") != 0 - && strcmp (abfd->xvec->name, "xcoff-powermac") != 0 && strcmp (abfd->xvec->name, "coff-Intel-little") != 0 && strcmp (abfd->xvec->name, "coff-Intel-big") != 0) { @@ -992,7 +976,6 @@ DESCRIPTION */ - bfd_reloc_status_type bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset, input_section, error_message) @@ -1124,8 +1107,6 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset, /* WTF?? */ if (abfd->xvec->flavour == bfd_target_coff_flavour - && strcmp (abfd->xvec->name, "aixcoff-rs6000") != 0 - && strcmp (abfd->xvec->name, "xcoff-powermac") != 0 && strcmp (abfd->xvec->name, "coff-Intel-little") != 0 && strcmp (abfd->xvec->name, "coff-Intel-big") != 0) { @@ -1784,7 +1765,6 @@ displacements off that register. These relocation types are handled specially, because the value the register will have is decided relatively late. - ENUM BFD_RELOC_I960_CALLJ ENUMDOC @@ -2082,6 +2062,25 @@ ENUMDOC i386/elf relocations ENUM + BFD_RELOC_X86_64_GOT32 +ENUMX + BFD_RELOC_X86_64_PLT32 +ENUMX + BFD_RELOC_X86_64_COPY +ENUMX + BFD_RELOC_X86_64_GLOB_DAT +ENUMX + BFD_RELOC_X86_64_JUMP_SLOT +ENUMX + BFD_RELOC_X86_64_RELATIVE +ENUMX + BFD_RELOC_X86_64_GOTPCREL +ENUMX + BFD_RELOC_X86_64_32S +ENUMDOC + x86-64/elf relocations + +ENUM BFD_RELOC_NS32K_IMM_8 ENUMX BFD_RELOC_NS32K_IMM_16 @@ -2204,6 +2203,18 @@ ENUMDOC ARM 26 bit pc-relative branch. The lowest two bits must be zero and are not stored in the instruction. ENUM + BFD_RELOC_ARM_PCREL_BLX +ENUMDOC + ARM 26 bit pc-relative branch. The lowest bit must be zero and is + not stored in the instruction. The 2nd lowest bit comes from a 1 bit + field in the instruction. +ENUM + BFD_RELOC_THUMB_PCREL_BLX +ENUMDOC + Thumb 22 bit pc-relative branch. The lowest bit must be zero and is + not stored in the instruction. The 2nd lowest bit comes from a 1 bit + field in the instruction. +ENUM BFD_RELOC_ARM_IMMEDIATE ENUMX BFD_RELOC_ARM_ADRL_IMMEDIATE @@ -2295,6 +2306,20 @@ ENUMX BFD_RELOC_SH_DATA ENUMX BFD_RELOC_SH_LABEL +ENUMX + BFD_RELOC_SH_LOOP_START +ENUMX + BFD_RELOC_SH_LOOP_END +ENUMX + BFD_RELOC_SH_COPY +ENUMX + BFD_RELOC_SH_GLOB_DAT +ENUMX + BFD_RELOC_SH_JMP_SLOT +ENUMX + BFD_RELOC_SH_RELATIVE +ENUMX + BFD_RELOC_SH_GOTPC ENUMDOC Hitachi SH relocs. Not all of these appear in object files. @@ -2311,7 +2336,7 @@ ENUMDOC ENUM BFD_RELOC_ARC_B22_PCREL ENUMDOC - Argonaut RISC Core (ARC) relocs. + ARC Cores relocs. ARC 22 bit pc-relative branch. The lowest two bits must be zero and are not stored in the instruction. The high 20 bits are installed in bits 26 through 7 of the instruction. @@ -2538,6 +2563,39 @@ ENUMDOC significant 8 bits of the opcode. ENUM + BFD_RELOC_TIC54X_PARTLS7 +ENUMDOC + This is a 7bit reloc for the tms320c54x, where the least + significant 7 bits of a 16 bit word are placed into the least + significant 7 bits of the opcode. + +ENUM + BFD_RELOC_TIC54X_PARTMS9 +ENUMDOC + This is a 9bit DP reloc for the tms320c54x, where the most + significant 9 bits of a 16 bit word are placed into the least + significant 9 bits of the opcode. + +ENUM + BFD_RELOC_TIC54X_23 +ENUMDOC + This is an extended address 23-bit reloc for the tms320c54x. + +ENUM + BFD_RELOC_TIC54X_16_OF_23 +ENUMDOC + This is a 16-bit reloc for the tms320c54x, where the least + significant 16 bits of a 23-bit extended address are placed into + the opcode. + +ENUM + BFD_RELOC_TIC54X_MS7_OF_23 +ENUMDOC + This is a reloc for the tms320c54x, where the most + significant 7 bits of a 23-bit extended address are placed into + the opcode. + +ENUM BFD_RELOC_FR30_48 ENUMDOC This is a 48 bit reloc for the FR30 that stores 32 bits. @@ -2606,7 +2664,7 @@ ENUM BFD_RELOC_AVR_16_PM ENUMDOC This is a 16 bit reloc for the AVR that stores 17 bit value (usually - program memory address) into 16 bits. + program memory address) into 16 bits. ENUM BFD_RELOC_AVR_LO8_LDI ENUMDOC @@ -2700,6 +2758,234 @@ ENUMDOC is stored in the reloc's addend. For Rel hosts, we are forced to put this offset in the reloc's section offset. +ENUM + BFD_RELOC_IA64_IMM14 +ENUMX + BFD_RELOC_IA64_IMM22 +ENUMX + BFD_RELOC_IA64_IMM64 +ENUMX + BFD_RELOC_IA64_DIR32MSB +ENUMX + BFD_RELOC_IA64_DIR32LSB +ENUMX + BFD_RELOC_IA64_DIR64MSB +ENUMX + BFD_RELOC_IA64_DIR64LSB +ENUMX + BFD_RELOC_IA64_GPREL22 +ENUMX + BFD_RELOC_IA64_GPREL64I +ENUMX + BFD_RELOC_IA64_GPREL32MSB +ENUMX + BFD_RELOC_IA64_GPREL32LSB +ENUMX + BFD_RELOC_IA64_GPREL64MSB +ENUMX + BFD_RELOC_IA64_GPREL64LSB +ENUMX + BFD_RELOC_IA64_LTOFF22 +ENUMX + BFD_RELOC_IA64_LTOFF64I +ENUMX + BFD_RELOC_IA64_PLTOFF22 +ENUMX + BFD_RELOC_IA64_PLTOFF64I +ENUMX + BFD_RELOC_IA64_PLTOFF64MSB +ENUMX + BFD_RELOC_IA64_PLTOFF64LSB +ENUMX + BFD_RELOC_IA64_FPTR64I +ENUMX + BFD_RELOC_IA64_FPTR32MSB +ENUMX + BFD_RELOC_IA64_FPTR32LSB +ENUMX + BFD_RELOC_IA64_FPTR64MSB +ENUMX + BFD_RELOC_IA64_FPTR64LSB +ENUMX + BFD_RELOC_IA64_PCREL21B +ENUMX + BFD_RELOC_IA64_PCREL21BI +ENUMX + BFD_RELOC_IA64_PCREL21M +ENUMX + BFD_RELOC_IA64_PCREL21F +ENUMX + BFD_RELOC_IA64_PCREL22 +ENUMX + BFD_RELOC_IA64_PCREL60B +ENUMX + BFD_RELOC_IA64_PCREL64I +ENUMX + BFD_RELOC_IA64_PCREL32MSB +ENUMX + BFD_RELOC_IA64_PCREL32LSB +ENUMX + BFD_RELOC_IA64_PCREL64MSB +ENUMX + BFD_RELOC_IA64_PCREL64LSB +ENUMX + BFD_RELOC_IA64_LTOFF_FPTR22 +ENUMX + BFD_RELOC_IA64_LTOFF_FPTR64I +ENUMX + BFD_RELOC_IA64_LTOFF_FPTR64MSB +ENUMX + BFD_RELOC_IA64_LTOFF_FPTR64LSB +ENUMX + BFD_RELOC_IA64_SEGREL32MSB +ENUMX + BFD_RELOC_IA64_SEGREL32LSB +ENUMX + BFD_RELOC_IA64_SEGREL64MSB +ENUMX + BFD_RELOC_IA64_SEGREL64LSB +ENUMX + BFD_RELOC_IA64_SECREL32MSB +ENUMX + BFD_RELOC_IA64_SECREL32LSB +ENUMX + BFD_RELOC_IA64_SECREL64MSB +ENUMX + BFD_RELOC_IA64_SECREL64LSB +ENUMX + BFD_RELOC_IA64_REL32MSB +ENUMX + BFD_RELOC_IA64_REL32LSB +ENUMX + BFD_RELOC_IA64_REL64MSB +ENUMX + BFD_RELOC_IA64_REL64LSB +ENUMX + BFD_RELOC_IA64_LTV32MSB +ENUMX + BFD_RELOC_IA64_LTV32LSB +ENUMX + BFD_RELOC_IA64_LTV64MSB +ENUMX + BFD_RELOC_IA64_LTV64LSB +ENUMX + BFD_RELOC_IA64_IPLTMSB +ENUMX + BFD_RELOC_IA64_IPLTLSB +ENUMX + BFD_RELOC_IA64_COPY +ENUMX + BFD_RELOC_IA64_TPREL22 +ENUMX + BFD_RELOC_IA64_TPREL64MSB +ENUMX + BFD_RELOC_IA64_TPREL64LSB +ENUMX + BFD_RELOC_IA64_LTOFF_TP22 +ENUMX + BFD_RELOC_IA64_LTOFF22X +ENUMX + BFD_RELOC_IA64_LDXMOV +ENUMDOC + Intel IA64 Relocations. + +ENUM + BFD_RELOC_M68HC11_HI8 +ENUMDOC + Motorola 68HC11 reloc. + This is the 8 bits high part of an absolute address. +ENUM + BFD_RELOC_M68HC11_LO8 +ENUMDOC + Motorola 68HC11 reloc. + This is the 8 bits low part of an absolute address. +ENUM + BFD_RELOC_M68HC11_3B +ENUMDOC + Motorola 68HC11 reloc. + This is the 3 bits of a value. + +ENUM + BFD_RELOC_CRIS_BDISP8 +ENUMX + BFD_RELOC_CRIS_UNSIGNED_5 +ENUMX + BFD_RELOC_CRIS_SIGNED_6 +ENUMX + BFD_RELOC_CRIS_UNSIGNED_6 +ENUMX + BFD_RELOC_CRIS_UNSIGNED_4 +ENUMDOC + These relocs are only used within the CRIS assembler. They are not + (at present) written to any object files. + +ENUM + BFD_RELOC_860_COPY +ENUMX + BFD_RELOC_860_GLOB_DAT +ENUMX + BFD_RELOC_860_JUMP_SLOT +ENUMX + BFD_RELOC_860_RELATIVE +ENUMX + BFD_RELOC_860_PC26 +ENUMX + BFD_RELOC_860_PLT26 +ENUMX + BFD_RELOC_860_PC16 +ENUMX + BFD_RELOC_860_LOW0 +ENUMX + BFD_RELOC_860_SPLIT0 +ENUMX + BFD_RELOC_860_LOW1 +ENUMX + BFD_RELOC_860_SPLIT1 +ENUMX + BFD_RELOC_860_LOW2 +ENUMX + BFD_RELOC_860_SPLIT2 +ENUMX + BFD_RELOC_860_LOW3 +ENUMX + BFD_RELOC_860_LOGOT0 +ENUMX + BFD_RELOC_860_SPGOT0 +ENUMX + BFD_RELOC_860_LOGOT1 +ENUMX + BFD_RELOC_860_SPGOT1 +ENUMX + BFD_RELOC_860_LOGOTOFF0 +ENUMX + BFD_RELOC_860_SPGOTOFF0 +ENUMX + BFD_RELOC_860_LOGOTOFF1 +ENUMX + BFD_RELOC_860_SPGOTOFF1 +ENUMX + BFD_RELOC_860_LOGOTOFF2 +ENUMX + BFD_RELOC_860_LOGOTOFF3 +ENUMX + BFD_RELOC_860_LOPC +ENUMX + BFD_RELOC_860_HIGHADJ +ENUMX + BFD_RELOC_860_HAGOT +ENUMX + BFD_RELOC_860_HAGOTOFF +ENUMX + BFD_RELOC_860_HAPC +ENUMX + BFD_RELOC_860_HIGH +ENUMX + BFD_RELOC_860_HIGOT +ENUMX + BFD_RELOC_860_HIGOTOFF +ENUMDOC + Intel i860 Relocations. + ENDSENUM BFD_RELOC_UNUSED CODE_FRAGMENT @@ -2707,7 +2993,6 @@ CODE_FRAGMENT .typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; */ - /* FUNCTION bfd_reloc_type_lookup @@ -2723,7 +3008,6 @@ DESCRIPTION */ - reloc_howto_type * bfd_reloc_type_lookup (abfd, code) bfd *abfd; @@ -2735,7 +3019,6 @@ bfd_reloc_type_lookup (abfd, code) static reloc_howto_type bfd_howto_32 = HOWTO (0, 00, 2, 32, false, 0, complain_overflow_bitfield, 0, "VRT32", false, 0xffffffff, 0xffffffff, true); - /* INTERNAL_FUNCTION bfd_default_reloc_type_lookup @@ -2747,7 +3030,6 @@ SYNOPSIS DESCRIPTION Provides a default relocation lookup routine for any architecture. - */ reloc_howto_type * diff --git a/contrib/binutils/bfd/reloc16.c b/contrib/binutils/bfd/reloc16.c index 0e7c18a..cb9636f 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, 1998 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -19,10 +19,7 @@ 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, - sac@cygnus.com -*/ +/* Most of this hacked by Steve Chamberlain . */ /* These routines are used by coff-h8300 and coff-z8k to do relocation. @@ -53,7 +50,7 @@ bfd_coff_reloc16_get_value (reloc, link_info, input_section) asymbol *symbol = *(reloc->sym_ptr_ptr); /* A symbol holds a pointer to a section, and an offset from the base of the section. To relocate, we find where the section will - live in the output and add that in */ + live in the output and add that in. */ if (bfd_is_und_section (symbol->section) || bfd_is_com_section (symbol->section)) @@ -79,29 +76,29 @@ bfd_coff_reloc16_get_value (reloc, link_info, input_section) value = h->u.c.size; else { - if (! ((*link_info->callbacks->undefined_symbol) - (link_info, bfd_asymbol_name (symbol), - input_section->owner, input_section, reloc->address, - true))) + if (!((*link_info->callbacks->undefined_symbol) + (link_info, bfd_asymbol_name (symbol), + input_section->owner, input_section, reloc->address, + true))) abort (); value = 0; } } - else + else { - value = symbol->value + - symbol->section->output_offset + - symbol->section->output_section->vma; + value = symbol->value + + symbol->section->output_offset + + symbol->section->output_section->vma; } - - /* Add the value contained in the relocation */ + + /* Add the value contained in the relocation. */ value += reloc->addend; - + return value; } void -bfd_perform_slip(abfd, slip, input_section, value) +bfd_perform_slip (abfd, slip, input_section, value) bfd *abfd; unsigned int slip; asection *input_section; @@ -113,13 +110,13 @@ bfd_perform_slip(abfd, slip, input_section, value) BFD_ASSERT (s != (asymbol **) NULL); /* Find all symbols past this point, and make them know - what's happened */ - while (*s) + what's happened. */ + while (*s) { asymbol *p = *s; - if (p->section == input_section) + if (p->section == input_section) { - /* This was pointing into this section, so mangle it */ + /* This was pointing into this section, so mangle it. */ if (p->value > value) { p->value -= slip; @@ -136,17 +133,17 @@ bfd_perform_slip(abfd, slip, input_section, value) } } s++; - } + } } -boolean +boolean bfd_coff_reloc16_relax_section (abfd, i, link_info, again) bfd *abfd; asection *i; struct bfd_link_info *link_info; boolean *again; { - /* Get enough memory to hold the stuff */ + /* Get enough memory to hold the stuff. */ bfd *input_bfd = i->owner; asection *input_section = i; int *shrinks; @@ -166,7 +163,7 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again) if (!reloc_vector && reloc_size > 0) return false; - /* Get the relocs and think about them */ + /* Get the relocs and think about them. */ reloc_count = bfd_canonicalize_reloc (input_bfd, input_section, reloc_vector, _bfd_generic_link_get_symbols (input_bfd)); @@ -190,7 +187,7 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again) entire link, we could use the generic relaxing code in the linker and get better results, particularly for jsr->bsr and 24->16 bit memory reference relaxations. */ - + if (reloc_count > 0) { int another_pass = 0; @@ -208,7 +205,7 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again) another_pass = 0; - for (i = 0, parent = reloc_vector; *parent; parent++, i++) + for (i = 0, parent = reloc_vector; *parent; parent++, i++) { /* Let the target/machine dependent code examine each reloc in this section and attempt to shrink it. */ @@ -224,15 +221,15 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again) shrinks[j] += shrink - shrinks[i]; } } - - } while (another_pass); + } + while (another_pass); shrink = shrinks[reloc_count]; - free((char *)shrinks); + free ((char *) shrinks); } - input_section->_cooked_size -= shrink; - free((char *)reloc_vector); + input_section->_cooked_size -= shrink; + free ((char *) reloc_vector); return true; } @@ -250,7 +247,7 @@ bfd_coff_reloc16_get_relocated_section_contents(in_abfd, boolean relocateable; asymbol **symbols; { - /* Get enough memory to hold the stuff */ + /* Get enough memory to hold the stuff. */ bfd *input_bfd = link_order->u.indirect.section->owner; asection *input_section = link_order->u.indirect.section; long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section); @@ -267,20 +264,19 @@ bfd_coff_reloc16_get_relocated_section_contents(in_abfd, data, relocateable, symbols); - /* read in the section */ - if (! bfd_get_section_contents(input_bfd, - input_section, - data, - 0, - input_section->_raw_size)) + /* Read in the section. */ + if (!bfd_get_section_contents(input_bfd, + input_section, + data, + 0, + input_section->_raw_size)) return NULL; - - - reloc_vector = (arelent **) bfd_malloc((size_t) reloc_size); + + reloc_vector = (arelent **) bfd_malloc ((size_t) reloc_size); if (!reloc_vector && reloc_size != 0) return NULL; - - reloc_count = bfd_canonicalize_reloc (input_bfd, + + reloc_count = bfd_canonicalize_reloc (input_bfd, input_section, reloc_vector, symbols); @@ -289,49 +285,46 @@ bfd_coff_reloc16_get_relocated_section_contents(in_abfd, free (reloc_vector); return NULL; } - + if (reloc_count > 0) { arelent **parent = reloc_vector; - arelent *reloc ; + arelent *reloc; unsigned int dst_address = 0; unsigned int src_address = 0; unsigned int run; unsigned int idx; - - /* Find how long a run we can do */ - while (dst_address < link_order->size) + + /* Find how long a run we can do. */ + while (dst_address < link_order->size) { reloc = *parent; - if (reloc) + if (reloc) { /* Note that the relaxing didn't tie up the addresses in the relocation, so we use the original address to work out the - run of non-relocated data */ + run of non-relocated data. */ run = reloc->address - src_address; parent++; } - else + else { run = link_order->size - dst_address; } - /* Copy the bytes */ + + /* Copy the bytes. */ for (idx = 0; idx < run; idx++) - { - data[dst_address++] = data[src_address++]; - } - - /* Now do the relocation */ - - if (reloc) + data[dst_address++] = data[src_address++]; + + /* Now do the relocation. */ + if (reloc) { bfd_coff_reloc16_extra_cases (input_bfd, link_info, link_order, reloc, data, &src_address, &dst_address); - } + } } } - free((char *)reloc_vector); + free ((char *) reloc_vector); return data; } - diff --git a/contrib/binutils/bfd/sco5-core.c b/contrib/binutils/bfd/sco5-core.c index 46c97d2..5d5677e 100644 --- a/contrib/binutils/bfd/sco5-core.c +++ b/contrib/binutils/bfd/sco5-core.c @@ -84,7 +84,7 @@ sco5_core_make_empty_symbol (abfd) new->the_bfd = abfd; return new; } - + static struct user * read_uarea(abfd, filepos) bfd *abfd; @@ -109,7 +109,7 @@ read_uarea(abfd, filepos) } /* Sanity check perhaps??? */ - if (rawptr->u.u_dsize > 0x1000000) /* Remember, it's in pages... */ + if (rawptr->u.u_dsize > 0x1000000) /* Remember, it's in pages... */ { bfd_set_error (bfd_error_wrong_format); return NULL; @@ -154,7 +154,7 @@ sco5_core_file_p (abfd) || (bfd_read ((void *)&coffset_siz, 1, sizeof coffset_siz, abfd) != sizeof coffset_siz) ) { - bfd_set_error (bfd_error_wrong_format); + bfd_set_error (bfd_error_wrong_format); return NULL; } @@ -165,50 +165,49 @@ sco5_core_file_p (abfd) != sizeof coffsets) || ((coffsets.u_info != 1) && (coffsets.u_info != C_VERSION))) { - bfd_set_error (bfd_error_wrong_format); + bfd_set_error (bfd_error_wrong_format); return NULL; } - - if (coffsets.u_info == 1) - { + if (coffsets.u_info == 1) + { /* Old version, no section heads, read info from user struct */ u = read_uarea(abfd, coffsets.u_user); if (! u) return NULL; - if (!make_bfd_asection (abfd, ".reg", SEC_HAS_CONTENTS, + if (!make_bfd_asection (abfd, ".reg", SEC_HAS_CONTENTS, (bfd_size_type) coffsets.u_usize, 0 - (bfd_vma) u->u_ar0, (file_ptr) coffsets.u_user)) return NULL; - - if (!make_bfd_asection (abfd, ".data", + + if (!make_bfd_asection (abfd, ".data", SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS, ((bfd_size_type) u->u_exdata.ux_dsize + u->u_exdata.ux_bsize), (bfd_vma) u->u_exdata.ux_datorg, (file_ptr) coffsets.u_data)) return NULL; - - if (!make_bfd_asection (abfd, ".stack", - SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS, + + if (!make_bfd_asection (abfd, ".stack", + SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS, (bfd_size_type) u->u_ssize * NBPC, (bfd_vma) u->u_sub, (file_ptr) coffsets.u_stack)) return NULL; return abfd->xvec; /* Done for version 1 */ - } + } /* Immediately before coreoffsets region is a long with offset in core to first coresecthead (CORES_OFFSETS), the long before this is the number of section heads in the list. Read both longs and read the coresecthead and check its validity */ - - if ((bfd_seek (abfd, - coresize - coffset_siz - 2 * sizeof coffset_siz, + + if ((bfd_seek (abfd, + coresize - coffset_siz - 2 * sizeof coffset_siz, SEEK_SET) != 0) || (bfd_read ((void *)&nsecs, 1, sizeof nsecs, abfd) != sizeof nsecs) || (bfd_read ((void *)&cheadoffs, 1, sizeof cheadoffs, abfd) @@ -226,16 +225,16 @@ sco5_core_file_p (abfd) /* Now loop over all regions and map them */ nsecs--; /* We've seen CORES_OFFSETS already */ - for (; nsecs; nsecs--) + for (; nsecs; nsecs--) { if ((bfd_seek (abfd, chead.cs_hseek, SEEK_SET) != 0) || bfd_read ((void *)&chead, 1, sizeof chead, abfd) != sizeof chead) { - bfd_set_error (bfd_error_wrong_format); + bfd_set_error (bfd_error_wrong_format); return NULL; } - switch (chead.cs_stype) + switch (chead.cs_stype) { case CORES_MAGIC: /* Core header, check magic */ if (chead.cs_x.csx_magic != COREMAGIC_NUMBER) @@ -259,7 +258,7 @@ sco5_core_file_p (abfd) *u_ar0. The other is that u_ar0 is sometimes an absolute address in kernel memory, and on other systems it is an offset from the beginning of the `struct user'. - + As a practical matter, we don't know where the registers actually are, so we have to pass the whole area to GDB. We encode the value of u_ar0 by setting the .regs section @@ -267,11 +266,10 @@ sco5_core_file_p (abfd) pointed to by u_ar0 (by setting the vma of the start of the section to -u_ar0). GDB uses this info to locate the regs, using minor trickery to get around the - offset-or-absolute-addr problem. */ + offset-or-absolute-addr problem. */ chead.cs_vaddr = 0 - (bfd_vma) u->u_ar0; - secname = ".reg"; flags = SEC_HAS_CONTENTS; @@ -345,8 +343,8 @@ int sco5_core_file_failing_signal (ignore_abfd) bfd *ignore_abfd; { - return ((ignore_abfd->tdata.sco5_core_data->u.u_sysabort != 0) - ? ignore_abfd->tdata.sco5_core_data->u.u_sysabort + return ((ignore_abfd->tdata.sco5_core_data->u.u_sysabort != 0) + ? ignore_abfd->tdata.sco5_core_data->u.u_sysabort : -1); } @@ -371,9 +369,9 @@ sco5_core_file_matches_executable_p (core_bfd, exec_bfd) /* If somebody calls any byte-swapping routines, shoot them. */ static void -swap_abort() +swap_abort () { - abort(); /* This way doesn't require any declaration for ANSI to fuck up */ + abort (); /* This way doesn't require any declaration for ANSI to fuck up */ } #define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) #define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) @@ -426,6 +424,6 @@ const bfd_target sco5_core_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + (PTR) 0 /* backend_data */ }; diff --git a/contrib/binutils/bfd/section.c b/contrib/binutils/bfd/section.c index b3b7608..13e10d3 100644 --- a/contrib/binutils/bfd/section.c +++ b/contrib/binutils/bfd/section.c @@ -1,5 +1,5 @@ /* Object file "section" support for the BFD library. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -111,7 +111,6 @@ SUBSECTION | size 0x103 | | output_section --------| - SUBSECTION Link orders @@ -133,7 +132,6 @@ SUBSECTION */ - #include "bfd.h" #include "sysdep.h" #include "libbfd.h" @@ -150,10 +148,10 @@ SUBSECTION CODE_FRAGMENT . -. {* This structure is used for a comdat section, as in PE. A comdat -. section is associated with a particular symbol. When the linker -. sees a comdat section, it keeps only one of the sections with a -. given name and associated with a given symbol. *} +.{* This structure is used for a comdat section, as in PE. A comdat +. section is associated with a particular symbol. When the linker +. sees a comdat section, it keeps only one of the sections with a +. given name and associated with a given symbol. *} . .struct bfd_comdat_info .{ @@ -165,340 +163,362 @@ CODE_FRAGMENT . specific code; it is not an index into the list returned by . bfd_canonicalize_symtab. *} . long symbol; -. -. {* If this section is being discarded, the linker uses this field -. to point to the input section which is being kept. *} -. struct sec *sec; .}; . .typedef struct sec .{ -. {* The name of the section; the name isn't a copy, the pointer is -. the same as that passed to bfd_make_section. *} +. {* The name of the section; the name isn't a copy, the pointer is +. the same as that passed to bfd_make_section. *} +. +. const char *name; +. +. {* A unique sequence number. *} . -. CONST char *name; +. int id; . -. {* Which section is it; 0..nth. *} +. {* Which section is it; 0..nth. *} . -. int index; +. int index; . -. {* The next section in the list belonging to the BFD, or NULL. *} +. {* The next section in the list belonging to the BFD, or NULL. *} . -. struct sec *next; +. struct sec *next; . -. {* The field flags contains attributes of the section. Some -. flags are read in from the object file, and some are -. synthesized from other information. *} +. {* The field flags contains attributes of the section. Some +. flags are read in from the object file, and some are +. synthesized from other information. *} . -. flagword flags; +. flagword flags; . .#define SEC_NO_FLAGS 0x000 . -. {* Tells the OS to allocate space for this section when loading. -. This is clear for a section containing debug information -. only. *} +. {* Tells the OS to allocate space for this section when loading. +. This is clear for a section containing debug information only. *} .#define SEC_ALLOC 0x001 . -. {* Tells the OS to load the section from the file when loading. -. This is clear for a .bss section. *} +. {* Tells the OS to load the section from the file when loading. +. This is clear for a .bss section. *} .#define SEC_LOAD 0x002 . -. {* The section contains data still to be relocated, so there is -. some relocation information too. *} +. {* The section contains data still to be relocated, so there is +. some relocation information too. *} .#define SEC_RELOC 0x004 . .#if 0 {* Obsolete ? *} .#define SEC_BALIGN 0x008 .#endif . -. {* A signal to the OS that the section contains read only -. data. *} +. {* A signal to the OS that the section contains read only data. *} .#define SEC_READONLY 0x010 . -. {* The section contains code only. *} +. {* The section contains code only. *} .#define SEC_CODE 0x020 . -. {* The section contains data only. *} +. {* The section contains data only. *} .#define SEC_DATA 0x040 . -. {* The section will reside in ROM. *} +. {* The section will reside in ROM. *} .#define SEC_ROM 0x080 . -. {* The section contains constructor information. This section -. type is used by the linker to create lists of constructors and -. destructors used by <>. When a back end sees a symbol -. which should be used in a constructor list, it creates a new -. section for the type of name (e.g., <<__CTOR_LIST__>>), attaches -. the symbol to it, and builds a relocation. To build the lists -. of constructors, all the linker has to do is catenate all the -. sections called <<__CTOR_LIST__>> and relocate the data -. contained within - exactly the operations it would peform on -. standard data. *} +. {* The section contains constructor information. This section +. type is used by the linker to create lists of constructors and +. destructors used by <>. When a back end sees a symbol +. which should be used in a constructor list, it creates a new +. section for the type of name (e.g., <<__CTOR_LIST__>>), attaches +. the symbol to it, and builds a relocation. To build the lists +. of constructors, all the linker has to do is catenate all the +. sections called <<__CTOR_LIST__>> and relocate the data +. contained within - exactly the operations it would peform on +. standard data. *} .#define SEC_CONSTRUCTOR 0x100 . -. {* The section is a constructor, and should be placed at the -. end of the text, data, or bss section(?). *} +. {* The section is a constructor, and should be placed at the +. end of the text, data, or bss section(?). *} .#define SEC_CONSTRUCTOR_TEXT 0x1100 .#define SEC_CONSTRUCTOR_DATA 0x2100 .#define SEC_CONSTRUCTOR_BSS 0x3100 . -. {* The section has contents - a data section could be -. <> | <>; a debug section could be -. <> *} +. {* The section has contents - a data section could be +. <> | <>; a debug section could be +. <> *} .#define SEC_HAS_CONTENTS 0x200 . -. {* An instruction to the linker to not output the section -. even if it has information which would normally be written. *} +. {* An instruction to the linker to not output the section +. even if it has information which would normally be written. *} .#define SEC_NEVER_LOAD 0x400 . -. {* The section is a COFF shared library section. This flag is -. only for the linker. If this type of section appears in -. the input file, the linker must copy it to the output file -. without changing the vma or size. FIXME: Although this -. was originally intended to be general, it really is COFF -. specific (and the flag was renamed to indicate this). It -. might be cleaner to have some more general mechanism to -. allow the back end to control what the linker does with -. sections. *} +. {* The section is a COFF shared library section. This flag is +. only for the linker. If this type of section appears in +. the input file, the linker must copy it to the output file +. without changing the vma or size. FIXME: Although this +. was originally intended to be general, it really is COFF +. specific (and the flag was renamed to indicate this). It +. might be cleaner to have some more general mechanism to +. allow the back end to control what the linker does with +. sections. *} .#define SEC_COFF_SHARED_LIBRARY 0x800 . -. {* The section contains common symbols (symbols may be defined -. multiple times, the value of a symbol is the amount of -. space it requires, and the largest symbol value is the one -. used). Most targets have exactly one of these (which we -. translate to bfd_com_section_ptr), but ECOFF has two. *} +. {* The section has GOT references. This flag is only for the +. linker, and is currently only used by the elf32-hppa back end. +. It will be set if global offset table references were detected +. in this section, which indicate to the linker that the section +. contains PIC code, and must be handled specially when doing a +. static link. *} +.#define SEC_HAS_GOT_REF 0x4000 +. +. {* The section contains common symbols (symbols may be defined +. multiple times, the value of a symbol is the amount of +. space it requires, and the largest symbol value is the one +. used). Most targets have exactly one of these (which we +. translate to bfd_com_section_ptr), but ECOFF has two. *} .#define SEC_IS_COMMON 0x8000 . -. {* The section contains only debugging information. For -. example, this is set for ELF .debug and .stab sections. -. strip tests this flag to see if a section can be -. discarded. *} +. {* The section contains only debugging information. For +. example, this is set for ELF .debug and .stab sections. +. strip tests this flag to see if a section can be +. discarded. *} .#define SEC_DEBUGGING 0x10000 . -. {* The contents of this section are held in memory pointed to -. by the contents field. This is checked by -. bfd_get_section_contents, and the data is retrieved from -. memory if appropriate. *} +. {* The contents of this section are held in memory pointed to +. by the contents field. This is checked by bfd_get_section_contents, +. and the data is retrieved from memory if appropriate. *} .#define SEC_IN_MEMORY 0x20000 . -. {* The contents of this section are to be excluded by the -. linker for executable and shared objects unless those -. objects are to be further relocated. *} +. {* The contents of this section are to be excluded by the +. linker for executable and shared objects unless those +. objects are to be further relocated. *} .#define SEC_EXCLUDE 0x40000 . -. {* The contents of this section are to be sorted by the -. based on the address specified in the associated symbol -. table. *} +. {* The contents of this section are to be sorted by the +. based on the address specified in the associated symbol +. table. *} .#define SEC_SORT_ENTRIES 0x80000 . -. {* When linking, duplicate sections of the same name should be -. discarded, rather than being combined into a single section as -. is usually done. This is similar to how common symbols are -. handled. See SEC_LINK_DUPLICATES below. *} +. {* When linking, duplicate sections of the same name should be +. discarded, rather than being combined into a single section as +. is usually done. This is similar to how common symbols are +. handled. See SEC_LINK_DUPLICATES below. *} .#define SEC_LINK_ONCE 0x100000 . -. {* If SEC_LINK_ONCE is set, this bitfield describes how the linker -. should handle duplicate sections. *} +. {* If SEC_LINK_ONCE is set, this bitfield describes how the linker +. should handle duplicate sections. *} .#define SEC_LINK_DUPLICATES 0x600000 . -. {* This value for SEC_LINK_DUPLICATES means that duplicate -. sections with the same name should simply be discarded. *} +. {* This value for SEC_LINK_DUPLICATES means that duplicate +. sections with the same name should simply be discarded. *} .#define SEC_LINK_DUPLICATES_DISCARD 0x0 . -. {* This value for SEC_LINK_DUPLICATES means that the linker -. should warn if there are any duplicate sections, although -. it should still only link one copy. *} +. {* This value for SEC_LINK_DUPLICATES means that the linker +. should warn if there are any duplicate sections, although +. it should still only link one copy. *} .#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000 . -. {* This value for SEC_LINK_DUPLICATES means that the linker -. should warn if any duplicate sections are a different size. *} +. {* This value for SEC_LINK_DUPLICATES means that the linker +. should warn if any duplicate sections are a different size. *} .#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000 . -. {* This value for SEC_LINK_DUPLICATES means that the linker -. should warn if any duplicate sections contain different -. contents. *} +. {* This value for SEC_LINK_DUPLICATES means that the linker +. should warn if any duplicate sections contain different +. contents. *} .#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000 . -. {* This section was created by the linker as part of dynamic -. relocation or other arcane processing. It is skipped when -. going through the first-pass output, trusting that someone -. else up the line will take care of it later. *} +. {* This section was created by the linker as part of dynamic +. relocation or other arcane processing. It is skipped when +. going through the first-pass output, trusting that someone +. else up the line will take care of it later. *} .#define SEC_LINKER_CREATED 0x800000 . -. {* This section should not be subject to garbage collection. *} +. {* This section should not be subject to garbage collection. *} .#define SEC_KEEP 0x1000000 . -. {* This section contains "short" data, and should be placed -. "near" the GP. *} +. {* This section contains "short" data, and should be placed +. "near" the GP. *} .#define SEC_SMALL_DATA 0x2000000 . -. {* This section contains data which may be shared with other -. executables or shared objects. *} +. {* This section contains data which may be shared with other +. executables or shared objects. *} .#define SEC_SHARED 0x4000000 . -. {* End of section flags. *} +. {* When a section with this flag is being linked, then if the size of +. the input section is less than a page, it should not cross a page +. boundary. If the size of the input section is one page or more, it +. should be aligned on a page boundary. *} +.#define SEC_BLOCK 0x8000000 . -. {* Some internal packed boolean fields. *} +. {* Conditionally link this section; do not link if there are no +. references found to any symbol in the section. *} +.#define SEC_CLINK 0x10000000 . -. {* See the vma field. *} -. unsigned int user_set_vma : 1; +. {* End of section flags. *} . -. {* Whether relocations have been processed. *} -. unsigned int reloc_done : 1; +. {* Some internal packed boolean fields. *} . -. {* A mark flag used by some of the linker backends. *} -. unsigned int linker_mark : 1; +. {* See the vma field. *} +. unsigned int user_set_vma : 1; . -. {* A mark flag used by some linker backends for garbage collection. *} -. unsigned int gc_mark : 1; +. {* Whether relocations have been processed. *} +. unsigned int reloc_done : 1; . -. {* End of internal packed boolean fields. *} +. {* A mark flag used by some of the linker backends. *} +. unsigned int linker_mark : 1; . -. {* The virtual memory address of the section - where it will be -. at run time. The symbols are relocated against this. The -. user_set_vma flag is maintained by bfd; if it's not set, the -. backend can assign addresses (for example, in <>, where -. the default address for <<.data>> is dependent on the specific -. target and various flags). *} +. {* A mark flag used by some linker backends for garbage collection. *} +. unsigned int gc_mark : 1; . -. bfd_vma vma; +. {* Used by the ELF code to mark sections which have been allocated to segments. *} +. unsigned int segment_mark : 1; . -. {* The load address of the section - where it would be in a -. rom image; really only used for writing section header -. information. *} +. {* End of internal packed boolean fields. *} . -. bfd_vma lma; +. {* The virtual memory address of the section - where it will be +. at run time. The symbols are relocated against this. The +. user_set_vma flag is maintained by bfd; if it's not set, the +. backend can assign addresses (for example, in <>, where +. the default address for <<.data>> is dependent on the specific +. target and various flags). *} . -. {* The size of the section in octets, as it will be output. -. Contains a value even if the section has no contents (e.g., the -. size of <<.bss>>). This will be filled in after relocation. *} +. bfd_vma vma; . -. bfd_size_type _cooked_size; +. {* The load address of the section - where it would be in a +. rom image; really only used for writing section header +. information. *} . -. {* The original size on disk of the section, in octets. Normally this -. value is the same as the size, but if some relaxing has -. been done, then this value will be bigger. *} +. bfd_vma lma; . -. bfd_size_type _raw_size; +. {* The size of the section in octets, as it will be output. +. Contains a value even if the section has no contents (e.g., the +. size of <<.bss>>). This will be filled in after relocation. *} . -. {* If this section is going to be output, then this value is the -. offset in *bytes* into the output section of the first byte in the -. input section (byte ==> smallest addressable unit on the -. target). In most cases, if this was going to start at the -. 100th octet (8-bit quantity) in the output section, this value -. would be 100. However, if the target byte size is 16 bits -. (bfd_octets_per_byte is "2"), this value would be 50. *} +. bfd_size_type _cooked_size; . -. bfd_vma output_offset; +. {* The original size on disk of the section, in octets. Normally this +. value is the same as the size, but if some relaxing has +. been done, then this value will be bigger. *} . -. {* The output section through which to map on output. *} +. bfd_size_type _raw_size; . -. struct sec *output_section; +. {* If this section is going to be output, then this value is the +. offset in *bytes* into the output section of the first byte in the +. input section (byte ==> smallest addressable unit on the +. target). In most cases, if this was going to start at the +. 100th octet (8-bit quantity) in the output section, this value +. would be 100. However, if the target byte size is 16 bits +. (bfd_octets_per_byte is "2"), this value would be 50. *} . -. {* The alignment requirement of the section, as an exponent of 2 - -. e.g., 3 aligns to 2^3 (or 8). *} +. bfd_vma output_offset; . -. unsigned int alignment_power; +. {* The output section through which to map on output. *} . -. {* If an input section, a pointer to a vector of relocation -. records for the data in this section. *} +. struct sec *output_section; . -. struct reloc_cache_entry *relocation; +. {* The alignment requirement of the section, as an exponent of 2 - +. e.g., 3 aligns to 2^3 (or 8). *} . -. {* If an output section, a pointer to a vector of pointers to -. relocation records for the data in this section. *} +. unsigned int alignment_power; . -. struct reloc_cache_entry **orelocation; +. {* If an input section, a pointer to a vector of relocation +. records for the data in this section. *} . -. {* The number of relocation records in one of the above *} +. struct reloc_cache_entry *relocation; . -. unsigned reloc_count; +. {* If an output section, a pointer to a vector of pointers to +. relocation records for the data in this section. *} . -. {* Information below is back end specific - and not always used -. or updated. *} +. struct reloc_cache_entry **orelocation; . -. {* File position of section data *} +. {* The number of relocation records in one of the above *} . -. file_ptr filepos; +. unsigned reloc_count; . -. {* File position of relocation info *} +. {* Information below is back end specific - and not always used +. or updated. *} . -. file_ptr rel_filepos; +. {* File position of section data. *} . -. {* File position of line data *} +. file_ptr filepos; . -. file_ptr line_filepos; +. {* File position of relocation info. *} . -. {* Pointer to data for applications *} +. file_ptr rel_filepos; . -. PTR userdata; +. {* File position of line data. *} . -. {* If the SEC_IN_MEMORY flag is set, this points to the actual -. contents. *} -. unsigned char *contents; +. file_ptr line_filepos; . -. {* Attached line number information *} +. {* Pointer to data for applications. *} . -. alent *lineno; +. PTR userdata; . -. {* Number of line number records *} +. {* If the SEC_IN_MEMORY flag is set, this points to the actual +. contents. *} +. unsigned char *contents; . -. unsigned int lineno_count; +. {* Attached line number information. *} . -. {* Optional information about a COMDAT entry; NULL if not COMDAT *} +. alent *lineno; . -. struct bfd_comdat_info *comdat; +. {* Number of line number records. *} . -. {* When a section is being output, this value changes as more -. linenumbers are written out *} +. unsigned int lineno_count; . -. file_ptr moving_line_filepos; +. {* Optional information about a COMDAT entry; NULL if not COMDAT. *} . -. {* What the section number is in the target world *} +. struct bfd_comdat_info *comdat; . -. int target_index; +. {* Points to the kept section if this section is a link-once section, +. and is discarded. *} +. struct sec *kept_section; . -. PTR used_by_bfd; +. {* When a section is being output, this value changes as more +. linenumbers are written out. *} . -. {* If this is a constructor section then here is a list of the -. relocations created to relocate items within it. *} +. file_ptr moving_line_filepos; . -. struct relent_chain *constructor_chain; +. {* What the section number is in the target world. *} . -. {* The BFD which owns the section. *} +. int target_index; . -. bfd *owner; +. PTR used_by_bfd; . -. {* A symbol which points at this section only *} -. struct symbol_cache_entry *symbol; -. struct symbol_cache_entry **symbol_ptr_ptr; +. {* If this is a constructor section then here is a list of the +. relocations created to relocate items within it. *} . -. struct bfd_link_order *link_order_head; -. struct bfd_link_order *link_order_tail; +. struct relent_chain *constructor_chain; +. +. {* The BFD which owns the section. *} +. +. bfd *owner; +. +. {* A symbol which points at this section only *} +. struct symbol_cache_entry *symbol; +. struct symbol_cache_entry **symbol_ptr_ptr; +. +. struct bfd_link_order *link_order_head; +. struct bfd_link_order *link_order_tail; .} asection ; . -. {* These sections are global, and are managed by BFD. The application -. and target back end are not permitted to change the values in -. these sections. New code should use the section_ptr macros rather -. than referring directly to the const sections. The const sections -. may eventually vanish. *} +.{* These sections are global, and are managed by BFD. The application +. and target back end are not permitted to change the values in +. these sections. New code should use the section_ptr macros rather +. than referring directly to the const sections. The const sections +. may eventually vanish. *} .#define BFD_ABS_SECTION_NAME "*ABS*" .#define BFD_UND_SECTION_NAME "*UND*" .#define BFD_COM_SECTION_NAME "*COM*" .#define BFD_IND_SECTION_NAME "*IND*" . -. {* the absolute section *} +.{* the absolute section *} .extern const asection bfd_abs_section; .#define bfd_abs_section_ptr ((asection *) &bfd_abs_section) .#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) -. {* Pointer to the undefined section *} +.{* Pointer to the undefined section *} .extern const asection bfd_und_section; .#define bfd_und_section_ptr ((asection *) &bfd_und_section) .#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) -. {* Pointer to the common section *} +.{* Pointer to the common section *} .extern const asection bfd_com_section; .#define bfd_com_section_ptr ((asection *) &bfd_com_section) -. {* Pointer to the indirect section *} +.{* Pointer to the indirect section *} .extern const asection bfd_ind_section; .#define bfd_ind_section_ptr ((asection *) &bfd_ind_section) .#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) @@ -538,29 +558,38 @@ static const asymbol global_syms[] = GLOBAL_SYM_INIT (BFD_IND_SECTION_NAME, &bfd_ind_section) }; -#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ - const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \ - const asection SEC = \ - /* name, index, next, flags, set_vma, reloc_done, linker_mark, gc_mark */ \ - { NAME, 0, 0, FLAGS, 0, 0, 0, 0, \ - \ - /* vma, lma, _cooked_size, _raw_size, output_offset, output_section, */ \ - 0, 0, 0, 0, 0, (struct sec *) &SEC, \ - \ - /* 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 *) &global_syms[IDX], \ - \ - /* symbol_ptr_ptr, link_order_head, ..._tail */ \ - (struct symbol_cache_entry **) &SYM, 0, 0 \ +#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \ + const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \ + const asection SEC = \ + /* 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, \ + \ + /* _raw_size, output_offset, output_section, alignment_power, */ \ + 0, 0, (struct sec *) &SEC, 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, target_index, */ \ + NULL, NULL, 0, 0, \ + \ + /* used_by_bfd, constructor_chain, owner, */ \ + NULL, NULL, NULL, \ + \ + /* symbol, */ \ + (struct symbol_cache_entry *) &global_syms[IDX], \ + \ + /* symbol_ptr_ptr, */ \ + (struct symbol_cache_entry **) &SYM, \ + \ + /* link_order_head, link_order_tail */ \ + NULL, NULL \ } STD_SECTION (bfd_com_section, SEC_IS_COMMON, bfd_com_symbol, @@ -585,7 +614,7 @@ FUNCTION bfd_get_section_by_name SYNOPSIS - asection *bfd_get_section_by_name(bfd *abfd, CONST char *name); + asection *bfd_get_section_by_name(bfd *abfd, const char *name); DESCRIPTION Run through @var{abfd} and return the one of the @@ -601,7 +630,7 @@ DESCRIPTION asection * bfd_get_section_by_name (abfd, name) bfd *abfd; - CONST char *name; + const char *name; { asection *sect; @@ -611,13 +640,62 @@ bfd_get_section_by_name (abfd, name) return NULL; } +/* +FUNCTION + bfd_get_unique_section_name + +SYNOPSIS + char *bfd_get_unique_section_name(bfd *abfd, + const char *templat, + int *count); + +DESCRIPTION + Invent a section name that is unique in @var{abfd} by tacking + a dot and a digit suffix onto the original @var{templat}. If + @var{count} is non-NULL, then it specifies the first number + tried as a suffix to generate a unique name. The value + pointed to by @var{count} will be incremented in this case. +*/ + +char * +bfd_get_unique_section_name (abfd, templat, count) + bfd *abfd; + const char *templat; + int *count; +{ + int num; + unsigned int len; + char *sname; + + len = strlen (templat); + sname = bfd_malloc (len + 8); + if (sname == NULL) + return NULL; + strcpy (sname, templat); + num = 1; + if (count != NULL) + num = *count; + + do + { + /* If we have a million sections, something is badly wrong. */ + if (num > 999999) + abort (); + sprintf (sname + len, ".%d", num++); + } + while (bfd_get_section_by_name (abfd, sname) != NULL); + + if (count != NULL) + *count = num; + return sname; +} /* FUNCTION bfd_make_section_old_way SYNOPSIS - asection *bfd_make_section_old_way(bfd *abfd, CONST char *name); + asection *bfd_make_section_old_way(bfd *abfd, const char *name); DESCRIPTION Create a new empty section called @var{name} @@ -637,11 +715,10 @@ DESCRIPTION */ - asection * bfd_make_section_old_way (abfd, name) bfd *abfd; - CONST char *name; + const char *name; { asection *sec = bfd_get_section_by_name (abfd, name); if (sec == (asection *) NULL) @@ -656,7 +733,7 @@ FUNCTION bfd_make_section_anyway SYNOPSIS - asection *bfd_make_section_anyway(bfd *abfd, CONST char *name); + asection *bfd_make_section_anyway(bfd *abfd, const char *name); DESCRIPTION Create a new empty section called @var{name} and attach it to the end of @@ -671,8 +748,9 @@ DESCRIPTION sec_ptr bfd_make_section_anyway (abfd, name) bfd *abfd; - CONST char *name; + const char *name; { + static int section_id = 0x10; /* id 0 to 3 used by STD_SECTION. */ asection *newsect; asection **prev = &abfd->sections; asection *sect = abfd->sections; @@ -694,6 +772,7 @@ bfd_make_section_anyway (abfd, name) return NULL; newsect->name = name; + newsect->id = section_id++; newsect->index = abfd->section_count++; newsect->flags = SEC_NO_FLAGS; @@ -705,13 +784,17 @@ bfd_make_section_anyway (abfd, name) newsect->line_filepos = 0; newsect->owner = abfd; newsect->comdat = NULL; + newsect->kept_section = NULL; /* Create a symbol whos only job is to point to this section. This is useful for things like relocs which are relative to the base of a section. */ newsect->symbol = bfd_make_empty_symbol (abfd); if (newsect->symbol == NULL) - return NULL; + { + bfd_release (abfd, newsect); + return NULL; + } newsect->symbol->name = name; newsect->symbol->value = 0; newsect->symbol->section = newsect; @@ -721,7 +804,7 @@ bfd_make_section_anyway (abfd, name) if (BFD_SEND (abfd, _new_section_hook, (abfd, newsect)) != true) { - free (newsect); + bfd_release (abfd, newsect); return NULL; } @@ -734,7 +817,7 @@ FUNCTION bfd_make_section SYNOPSIS - asection *bfd_make_section(bfd *, CONST char *name); + asection *bfd_make_section(bfd *, const char *name); DESCRIPTION Like <>, but return <> (without calling @@ -746,7 +829,7 @@ DESCRIPTION asection * bfd_make_section (abfd, name) bfd *abfd; - CONST char *name; + const char *name; { asection *sect = abfd->sections; @@ -779,7 +862,6 @@ bfd_make_section (abfd, name) return bfd_make_section_anyway (abfd, name); } - /* FUNCTION bfd_set_section_flags @@ -823,14 +905,13 @@ bfd_set_section_flags (abfd, section, flags) return true; } - /* FUNCTION bfd_map_over_sections SYNOPSIS void bfd_map_over_sections(bfd *abfd, - void (*func)(bfd *abfd, + void (*func) (bfd *abfd, asection *sect, PTR obj), PTR obj); @@ -849,7 +930,6 @@ DESCRIPTION | for (p = abfd->sections; p != NULL; p = p->next) | func(abfd, p, ...) - */ /*VARARGS2*/ @@ -869,7 +949,6 @@ bfd_map_over_sections (abfd, operation, user_storage) abort (); } - /* FUNCTION bfd_set_section_size @@ -894,7 +973,7 @@ bfd_set_section_size (abfd, ptr, val) bfd_size_type val; { /* Once you've started writing to any section you cannot create or change - the size of any others. */ + the size of any others. */ if (abfd->output_has_begun) { @@ -920,15 +999,12 @@ SYNOPSIS file_ptr offset, bfd_size_type count); - DESCRIPTION Sets the contents of the section @var{section} in BFD @var{abfd} to the data starting in memory at @var{data}. The data is written to the output section starting at offset @var{offset} for @var{count} octets. - - Normally <> is returned, else <>. Possible error returns are: o <> - @@ -939,7 +1015,6 @@ DESCRIPTION This routine is front end to the back end function <<_bfd_set_section_contents>>. - */ #define bfd_get_section_size_now(abfd,sec) \ @@ -993,6 +1068,11 @@ bfd_set_section_contents (abfd, section, location, offset, count) break; } + /* Record a copy of the data in memory if desired. */ + if (section->contents + && location != section->contents + offset) + memcpy (section->contents + offset, location, count); + if (BFD_SEND (abfd, _bfd_set_section_contents, (abfd, section, location, offset, count))) { @@ -1024,8 +1104,6 @@ DESCRIPTION with zeroes. If no errors occur, <> is returned, else <>. - - */ boolean bfd_get_section_contents (abfd, section, location, offset, count) @@ -1159,7 +1237,7 @@ _bfd_strip_section_from_output (info, s) } /* If the output section is empty, remove it too. Careful about sections - that have been discarded in the link script -- they are mapped to + that have been discarded in the link script -- they are mapped to bfd_abs_section, which has no owner. */ if (!keep_os && os->owner != NULL) { diff --git a/contrib/binutils/bfd/sparclinux.c b/contrib/binutils/bfd/sparclinux.c index 73a29b3..57bf6c6 100644 --- a/contrib/binutils/bfd/sparclinux.c +++ b/contrib/binutils/bfd/sparclinux.c @@ -95,7 +95,7 @@ sparclinux_write_object_contents (abfd) #define IS_GOT_SYM(name) \ (strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0) -/* See if a symbol name is a reference to the procedure linkage table. */ +/* See if a symbol name is a reference to the procedure linkage table. */ #ifndef PLT_REF_PREFIX #define PLT_REF_PREFIX "__PLT_" @@ -478,7 +478,7 @@ linux_tally_symbols (h, data) (h->root.root.root.string + sizeof PLT_REF_PREFIX - 1), false, false, true); - /* h2 does not follow indirect symbols. */ + /* h2 does not follow indirect symbols. */ h2 = linux_link_hash_lookup (linux_hash_table (info), (h->root.root.root.string + sizeof PLT_REF_PREFIX - 1), @@ -535,7 +535,7 @@ linux_tally_symbols (h, data) } /* Quick and dirty way of stripping these symbols from the - symtab. */ + symtab. */ if (bfd_is_abs_section (h->root.root.u.def.section)) h->root.written = true; } @@ -560,7 +560,7 @@ bfd_sparclinux_size_dynamic_sections (output_bfd, info) if (output_bfd->xvec != &MY(vec)) return true; - /* First find the fixups... */ + /* First find the fixups... */ linux_link_hash_traverse (linux_hash_table (info), linux_tally_symbols, (PTR) info); diff --git a/contrib/binutils/bfd/sparcnetbsd.c b/contrib/binutils/bfd/sparcnetbsd.c index 4277bb8..c21f063 100644 --- a/contrib/binutils/bfd/sparcnetbsd.c +++ b/contrib/binutils/bfd/sparcnetbsd.c @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define TARGET_IS_BIG_ENDIAN_P /* SPARC chips use either 4K or 8K pages, but object files always - assume 8K page alignment so they will work on either one. */ + assume 8K page alignment so they will work on either one. */ #define TARGET_PAGE_SIZE 0x2000 #define DEFAULT_ARCH bfd_arch_sparc diff --git a/contrib/binutils/bfd/srec.c b/contrib/binutils/bfd/srec.c index 31f69b0..5602239 100644 --- a/contrib/binutils/bfd/srec.c +++ b/contrib/binutils/bfd/srec.c @@ -1,5 +1,5 @@ /* BFD back-end for s-record objects. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support . @@ -24,7 +24,7 @@ SUBSECTION S-Record handling DESCRIPTION - + Ordinary S-Records cannot hold anything but addresses and data, so that's all that we implement. @@ -42,10 +42,10 @@ DESCRIPTION up and output them when it's time to close the bfd. An s record looks like: - + EXAMPLE S
- + DESCRIPTION Where o length @@ -61,7 +61,7 @@ DESCRIPTION 7) four byte address termination record 8) three byte address termination record 9) two byte address termination record - + o address is the start address of the data following, or in the case of a termination record, the start address of the image @@ -71,7 +71,6 @@ DESCRIPTION is the sum of all the raw byte data in the record, from the length upwards, modulo 256 and subtracted from 255. - SUBSECTION Symbol S-Record handling @@ -101,7 +100,7 @@ EXAMPLE DESCRIPTION We allow symbols to be anywhere in the data stream - the module names are always ignored. - + */ #include "bfd.h" @@ -142,7 +141,7 @@ static asymbol *srec_make_empty_symbol PARAMS ((bfd *)); static long srec_get_symtab_upper_bound PARAMS ((bfd *)); static long srec_get_symtab PARAMS ((bfd *, asymbol **)); -/* Macros for converting between hex and binary. */ +/* Macros for converting between hex and binary. */ static CONST char digs[] = "0123456789ABCDEF"; @@ -154,7 +153,7 @@ static CONST char digs[] = "0123456789ABCDEF"; ch += ((x) & 0xff); #define ISHEX(x) hex_p(x) -/* Initialize by filling in the hex conversion array. */ +/* Initialize by filling in the hex conversion array. */ static void srec_init () @@ -168,10 +167,21 @@ srec_init () } } -/* The maximum number of bytes on a line is FF */ +/* The maximum number of bytes on a line is FF. */ #define MAXCHUNK 0xff -/* The number of bytes we fit onto a line on output */ -#define CHUNK 16 + +/* Default size for a CHUNK. */ +#define DEFAULT_CHUNK 16 + +/* The number of bytes we actually fit onto a line on output. + This variable can be modified by objcopy's --srec-len parameter. + For a 0x75 byte record you should set --srec-len=0x70. */ +unsigned int Chunk = DEFAULT_CHUNK; + +/* The type of srec output (free or forced to S3). + This variable can be modified by objcopy's --srec-forceS3 + parameter. */ +boolean S3Forced = 0; /* When writing an S-record file, the S-records can not be output as they are seen. This structure is used to hold them in memory. */ @@ -467,7 +477,8 @@ srec_scan (abfd) if (! srec_new_symbol (abfd, symname, symval)) goto error_return; } - while (c == ' ' || c == '\t'); + while (c == ' ' || c == '\t') + ; if (c == '\n') ++lineno; @@ -478,7 +489,7 @@ srec_scan (abfd) } break; - + case 'S': { file_ptr pos; @@ -839,7 +850,7 @@ srec_set_arch_mach (abfd, arch, mach) return bfd_default_set_arch_mach (abfd, arch, mach); } -/* we have to save up all the Srecords for a splurge before output */ +/* We have to save up all the Srecords for a splurge before output. */ static boolean srec_set_section_contents (abfd, section, location, offset, bytes_to_do) @@ -866,19 +877,17 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do) return false; memcpy ((PTR) data, location, (size_t) bytes_to_do); - if ((section->lma + offset + bytes_to_do - 1) <= 0xffff) - { - - } + /* Ff S3Forced is true then always select S3 records, + regardless of the siez of the addresses. */ + if (S3Forced) + tdata->type = 3; + else if ((section->lma + offset + bytes_to_do - 1) <= 0xffff) + ; /* The default, S1, is OK. */ else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff && tdata->type <= 2) - { - tdata->type = 2; - } + tdata->type = 2; else - { - tdata->type = 3; - } + tdata->type = 3; entry->data = data; entry->where = section->lma + offset; @@ -912,8 +921,8 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do) /* Write a record of type, of the supplied number of bytes. The supplied bytes and length don't have a checksum. That's worked out - here -*/ + here. */ + static boolean srec_write_record (abfd, type, address, data, end) bfd *abfd; @@ -933,7 +942,7 @@ srec_write_record (abfd, type, address, data, end) *dst++ = '0' + type; length = dst; - dst += 2; /* leave room for dst*/ + dst += 2; /* Leave room for dst. */ switch (type) { @@ -961,7 +970,7 @@ srec_write_record (abfd, type, address, data, end) dst += 2; } - /* Fill in the length */ + /* Fill in the length. */ TOHEX (length, (dst - length) / 2, check_sum); check_sum &= 0xff; check_sum = 255 - check_sum; @@ -976,8 +985,6 @@ srec_write_record (abfd, type, address, data, end) return true; } - - static boolean srec_write_header (abfd) bfd *abfd; @@ -986,11 +993,10 @@ srec_write_header (abfd) bfd_byte *dst = buffer; unsigned int i; - /* I'll put an arbitary 40 char limit on header size */ + /* I'll put an arbitary 40 char limit on header size. */ for (i = 0; i < 40 && abfd->filename[i]; i++) - { - *dst++ = abfd->filename[i]; - } + *dst++ = abfd->filename[i]; + return srec_write_record (abfd, 0, 0, buffer, dst); } @@ -1008,8 +1014,8 @@ srec_write_section (abfd, tdata, list) bfd_vma address; unsigned int octets_this_chunk = list->size - octets_written; - if (octets_this_chunk > CHUNK) - octets_this_chunk = CHUNK; + if (octets_this_chunk > Chunk) + octets_this_chunk = Chunk; address = list->where + octets_written / bfd_octets_per_byte (abfd); @@ -1038,14 +1044,12 @@ srec_write_terminator (abfd, tdata) abfd->start_address, buffer, buffer); } - - static boolean srec_write_symbols (abfd) bfd *abfd; { char buffer[MAXCHUNK]; - /* Dump out the symbols of a bfd */ + /* Dump out the symbols of a bfd. */ int i; int count = bfd_get_symcount (abfd); @@ -1065,7 +1069,7 @@ srec_write_symbols (abfd) if (! bfd_is_local_label (abfd, s) && (s->flags & BSF_DEBUGGING) == 0) { - /* Just dump out non debug symbols */ + /* Just dump out non debug symbols. */ bfd_size_type l; char buf2[40], *p; @@ -1107,7 +1111,7 @@ internal_srec_write_object_contents (abfd, symbols) if (! srec_write_header (abfd)) return false; - /* Now wander though all the sections provided and output them */ + /* Now wander though all the sections provided and output them. */ list = tdata->head; while (list != (srec_data_list_type *) NULL) @@ -1133,7 +1137,6 @@ symbolsrec_write_object_contents (abfd) return internal_srec_write_object_contents (abfd, 1); } -/*ARGSUSED*/ static int srec_sizeof_headers (abfd, exec) bfd *abfd ATTRIBUTE_UNUSED; @@ -1195,7 +1198,7 @@ srec_get_symtab (abfd, alocation) c->udata.p = NULL; } } - + for (i = 0; i < symcount; i++) *alocation++ = csymbols++; *alocation = NULL; @@ -1203,7 +1206,6 @@ srec_get_symtab (abfd, alocation) return symcount; } -/*ARGSUSED*/ static void srec_get_symbol_info (ignore_abfd, symbol, ret) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -1213,7 +1215,6 @@ srec_get_symbol_info (ignore_abfd, symbol, ret) bfd_symbol_info (symbol, ret); } -/*ARGSUSED*/ static void srec_print_symbol (ignore_abfd, afile, symbol, how) bfd *ignore_abfd ATTRIBUTE_UNUSED; @@ -1316,12 +1317,10 @@ const bfd_target srec_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + (PTR) 0 }; - - const bfd_target symbolsrec_vec = { "symbolsrec", /* name */ @@ -1373,6 +1372,6 @@ const bfd_target symbolsrec_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + (PTR) 0 }; diff --git a/contrib/binutils/bfd/stab-syms.c b/contrib/binutils/bfd/stab-syms.c index f4fe6c8..4b0827f 100644 --- a/contrib/binutils/bfd/stab-syms.c +++ b/contrib/binutils/bfd/stab-syms.c @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "bfd.h" -#define ARCH_SIZE 32 /* Value doesn't matter. */ +#define ARCH_SIZE 32 /* Value doesn't matter. */ #include "libaout.h" #include "aout/aout64.h" @@ -32,13 +32,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* These are not really stab symbols, but it is convenient to have them here for the sake of nm. For completeness, we could also add N_TEXT etc, but those - are never needed, since nm treats those specially. */ + are never needed, since nm treats those specially. */ #define EXTRA_SYMBOLS \ __define_name (N_SETA, "SETA")/* Absolute set element symbol */ \ __define_name (N_SETT, "SETT")/* Text set element symbol */ \ __define_name (N_SETD, "SETD")/* Data set element symbol */ \ __define_name (N_SETB, "SETB")/* Bss set element symbol */ \ - __define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \ + __define_name (N_SETV, "SETV")/* Pointer to set vector in data area. */ \ __define_name (N_INDR, "INDR") \ __define_name (N_WARNING, "WARNING") diff --git a/contrib/binutils/bfd/stabs.c b/contrib/binutils/bfd/stabs.c index e9ac167..eb9ce8a 100644 --- a/contrib/binutils/bfd/stabs.c +++ b/contrib/binutils/bfd/stabs.c @@ -108,7 +108,7 @@ struct stab_section_info as the input offsets, because no stabs have been deleted from this section. Otherwise the i'th entry is the number of bytes of stabs that have been deleted prior to the i'th - stab. */ + stab. */ bfd_size_type *cumulative_skips; /* This is an array of string indices. For each stab symbol, we @@ -464,7 +464,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo) sinfo->stabstr->_cooked_size = _bfd_stringtab_size (sinfo->strings); /* Calculate the `cumulative_skips' array now that stabs have been - deleted for this section. */ + deleted for this section. */ if (skip != 0) { diff --git a/contrib/binutils/bfd/syms.c b/contrib/binutils/bfd/syms.c index 6546f585..8f4c92f 100644 --- a/contrib/binutils/bfd/syms.c +++ b/contrib/binutils/bfd/syms.c @@ -1,5 +1,5 @@ /* Generic symbol-table support for the BFD library. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -91,7 +91,6 @@ SUBSECTION All storage for the symbols themselves is in an objalloc connected to the BFD; it is freed when the BFD is closed. - INODE Writing Symbols, Mini Symbols, Reading Symbols, Symbols SUBSECTION @@ -163,8 +162,6 @@ SUBSECTION */ - - /* DOCDD INODE @@ -390,14 +387,12 @@ DESCRIPTION Return the actual number of symbol pointers, not including the NULL. - .#define bfd_canonicalize_symtab(abfd, location) \ . BFD_SEND (abfd, _bfd_canonicalize_symtab,\ . (abfd, location)) */ - /* FUNCTION bfd_set_symtab @@ -474,7 +469,6 @@ bfd_print_symbol_vandf (arg, symbol) : ((type & BSF_OBJECT) ? 'O' : ' ')))); } - /* FUNCTION bfd_make_empty_symbol @@ -537,7 +531,7 @@ static CONST struct section_to_type stt[] = }; /* Return the single-character symbol type corresponding to - section S, or '?' for an unknown COFF section. + section S, or '?' for an unknown COFF section. Check for any leading string which matches, so .text5 returns 't' as well as .text */ @@ -548,7 +542,7 @@ coff_section_type (s) { CONST struct section_to_type *t; - for (t = &stt[0]; t->section; t++) + for (t = &stt[0]; t->section; t++) if (!strncmp (s, t->section, strlen (t->section))) return t->type; @@ -631,7 +625,7 @@ bfd_decode_symclass (symbol) /* FUNCTION - bfd_is_undefined_symclass + bfd_is_undefined_symclass DESCRIPTION Returns non-zero if the class symbol returned by @@ -668,12 +662,12 @@ bfd_symbol_info (symbol, ret) symbol_info *ret; { ret->type = bfd_decode_symclass (symbol); - + if (bfd_is_undefined_symclass (ret->type)) ret->value = 0; else ret->value = symbol->value + symbol->section->vma; - + ret->name = symbol->name; } @@ -788,8 +782,8 @@ struct indexentry static int cmpindexentry (a, b) - const PTR *a; - const PTR *b; + const PTR a; + const PTR b; { const struct indexentry *contestantA = (const struct indexentry *) a; const struct indexentry *contestantB = (const struct indexentry *) b; @@ -1005,7 +999,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, if (bfd_get_32 (abfd, stab + STRDXOFF) == 0) continue; - /* if we did not see a function def, leave space for one. */ + /* if we did not see a function def, leave space for one. */ if (saw_fun == 0) ++info->indextablesize; @@ -1027,7 +1021,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, if (saw_fun == 0) ++info->indextablesize; - + if (info->indextablesize == 0) return true; ++info->indextablesize; @@ -1063,8 +1057,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, /* The following code creates a new indextable entry with a NULL function name if there were no N_FUNs in a file. Note that a N_SO without a file name is an EOF and - there could be 2 N_SO following it with the new filename - and directory. */ + there could be 2 N_SO following it with the new filename + and directory. */ if (saw_fun == 0) { info->indextable[i].val = bfd_get_32 (abfd, last_stab + VALOFF); @@ -1076,7 +1070,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, ++i; } saw_fun = 0; - + file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); if (*file_name == '\0') { @@ -1262,7 +1256,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound, *pfound = true; - if (file_name[0] == '/' || directory_name == NULL) + if (IS_ABSOLUTE_PATH(file_name) || directory_name == NULL) *pfilename = file_name; else { diff --git a/contrib/binutils/bfd/sysdep.h b/contrib/binutils/bfd/sysdep.h index 77b5e50a..e344eaf 100644 --- a/contrib/binutils/bfd/sysdep.h +++ b/contrib/binutils/bfd/sysdep.h @@ -126,6 +126,18 @@ extern char *getenv (); #ifdef ENABLE_NLS #include +/* Note the use of dgetext() and PACKAGE here, rather than gettext(). + + This is because the code in this directory is used to build a library which + will be linked with code in other directories to form programs. We want to + maintain a seperate translation file for this directory however, rather + than being forced to merge it with that of any program linked to libbfd. + This is a library, so it cannot depend on the catalog currently loaded. + + In order to do this, we have to make sure that when we extract messages we + use the OPCODES domain rather than the domain of the program that included + the bfd library, (eg OBJDUMP). Hence we use dgettext (PACKAGE, String) + and define PACKAGE to be 'bfd'. (See the code in configure). */ #define _(String) dgettext (PACKAGE, String) #ifdef gettext_noop #define N_(String) gettext_noop (String) diff --git a/contrib/binutils/bfd/targets.c b/contrib/binutils/bfd/targets.c index 1f2217b..8f831f0 100644 --- a/contrib/binutils/bfd/targets.c +++ b/contrib/binutils/bfd/targets.c @@ -1,5 +1,5 @@ /* Generic target-file-type support for the BFD library. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. Written by Cygnus Support. @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "fnmatch.h" /* -SECTION +SECTION Targets DESCRIPTION @@ -34,7 +34,7 @@ DESCRIPTION part of BFD is a structure containing pointers to functions which perform certain low level operations on files. BFD translates the applications's requests through a pointer into - calls to the back end routines. + calls to the back end routines. When a file is opened with <>, its format and target are unknown. BFD uses various mechanisms to determine @@ -42,11 +42,11 @@ DESCRIPTION o Create a BFD by calling the internal routine <<_bfd_new_bfd>>, then call <> with the - target string supplied to <> and the new BFD pointer. + target string supplied to <> and the new BFD pointer. o If a null target string was provided to <>, look up the environment variable <> and use - that as the target string. + that as the target string. o If the target string is still <>, or the target string is <>, then use the first item in the target vector @@ -56,7 +56,7 @@ DESCRIPTION o Otherwise, inspect the elements in the target vector one by one, until a match on target name is found. When found, - use it. + use it. o Otherwise return the error <> to <>. @@ -66,7 +66,7 @@ DESCRIPTION Once the BFD has been opened and the target selected, the file format may be determined. This is done by calling - <> on the BFD with a suggested format. + <> on the BFD with a suggested format. If <> has been set, each possible target type is tried to see if it recognizes the specified format. <> returns <> when the caller guesses right. @@ -75,7 +75,6 @@ DESCRIPTION @end menu */ - /* INODE @@ -87,17 +86,17 @@ SUBSECTION DESCRIPTION This structure contains everything that BFD knows about a target. It includes things like its byte order, name, and which - routines to call to do various operations. + routines to call to do various operations. Every BFD points to a target structure with its <> - member. + member. The macros below are used to dispatch to functions through the <> vector. They are used in a number of macros further down in @file{bfd.h}, and are also used when calling various routines by hand inside the BFD implementation. The @var{arglist} argument must be parenthesized; it contains all the arguments - to the called function. + to the called function. They make the documentation (more) unpleasant to read, so if someone wants to fix this and not break the above, please do. @@ -116,13 +115,13 @@ DESCRIPTION For operations which index on the BFD format: .#define BFD_SEND_FMT(bfd, message, arglist) \ -. (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) +. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) . .#ifdef DEBUG_BFD_SEND .#undef BFD_SEND_FMT .#define BFD_SEND_FMT(bfd, message, arglist) \ . (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \ -. (((bfd)->xvec->message[(int)((bfd)->format)]) arglist) : \ +. (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \ . (bfd_assert (__FILE__,__LINE__), NULL)) .#endif @@ -131,16 +130,16 @@ DESCRIPTION module that implements access to a different target under BFD, defines one of these. - FIXME, these names should be rationalised with the names of the entry points which call them. Too bad we can't have one - macro to define them both! + macro to define them both! .enum bfd_flavour { . bfd_target_unknown_flavour, . bfd_target_aout_flavour, . bfd_target_coff_flavour, . bfd_target_ecoff_flavour, +. bfd_target_xcoff_flavour, . bfd_target_elf_flavour, . bfd_target_ieee_flavour, . bfd_target_nlm_flavour, @@ -184,21 +183,21 @@ The order of bytes within the header parts of a file. A mask of all the flags which an executable may have set - from the set <>, <>, ...<>. -. flagword object_flags; +. flagword object_flags; A mask of all the flags which a section may have set - from the set <>, <>, ...<>. . flagword section_flags; -The character normally found at the front of a symbol +The character normally found at the front of a symbol (if any), perhaps `_'. . char symbol_leading_char; The pad character for file names within an archive header. -. char ar_pad_char; +. char ar_pad_char; The maximum number of characters in an archive header. @@ -233,15 +232,15 @@ Byte swapping for the headers Format dependent routines: these are vectors of entry points within the target vector structure, one for each format to check. -Check the format of a file being read. Return a <> or zero. +Check the format of a file being read. Return a <> or zero. . const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *)); -Set the format of a file being written. +Set the format of a file being written. . boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *)); -Write cached information into a file being written, at <>. +Write cached information into a file being written, at <>. . boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *)); @@ -264,7 +263,7 @@ BFD_JUMP_TABLE macros. . {* Called when a new section is created. *} . boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr)); . {* Read the contents of a section. *} -. boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, +. boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR, . file_ptr, bfd_size_type)); . boolean (*_bfd_get_section_contents_in_window) . PARAMS ((bfd *, sec_ptr, bfd_window *, @@ -288,7 +287,7 @@ BFD_JUMP_TABLE macros. . to another. *} . boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr, . bfd *, sec_ptr)); -. {* Called to copy BFD private symbol data from one symbol +. {* Called to copy BFD private symbol data from one symbol . to another. *} . boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *, . bfd *, asymbol *)); @@ -324,10 +323,10 @@ BFD_JUMP_TABLE macros. . boolean (*_bfd_construct_extended_name_table) . PARAMS ((bfd *, char **, bfd_size_type *, const char **)); . void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *)); -. boolean (*write_armap) PARAMS ((bfd *arch, +. boolean (*write_armap) PARAMS ((bfd *arch, . unsigned int elength, . struct orl *map, -. unsigned int orl_count, +. unsigned int orl_count, . int stridx)); . PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *)); . bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev)); @@ -467,15 +466,15 @@ and little endian code, and target chosen by the linker has the wrong endianness. The function open_output() in ld/ldlang.c uses this field to find an alternative output format that is suitable. -. {* Opposite endian version of this target. *} +. {* Opposite endian version of this target. *} . const struct bfd_target * alternative_target; -. +. Data for use by back-end routines, which isn't generic enough to belong in this structure. . PTR backend_data; -. +. .} bfd_target; */ @@ -486,49 +485,57 @@ in this structure. we can't intermix extern's and initializers. */ extern const bfd_target a29kcoff_big_vec; extern const bfd_target a_out_adobe_vec; +extern const bfd_target aout0_big_vec; extern const bfd_target aout_arm_big_vec; extern const bfd_target aout_arm_little_vec; extern const bfd_target aout_mips_big_vec; extern const bfd_target aout_mips_little_vec; -extern const bfd_target aout0_big_vec; extern const bfd_target apollocoff_vec; -extern const bfd_target armcoff_little_vec; +extern const bfd_target arm_epoc_pe_big_vec; +extern const bfd_target arm_epoc_pe_little_vec; +extern const bfd_target arm_epoc_pei_big_vec; +extern const bfd_target arm_epoc_pei_little_vec; extern const bfd_target armcoff_big_vec; +extern const bfd_target armcoff_little_vec; extern const bfd_target armnetbsd_vec; -extern const bfd_target armpe_little_vec; extern const bfd_target armpe_big_vec; -extern const bfd_target armpei_little_vec; +extern const bfd_target armpe_little_vec; extern const bfd_target armpei_big_vec; -extern const bfd_target arm_epoc_pe_little_vec; -extern const bfd_target arm_epoc_pe_big_vec; -extern const bfd_target arm_epoc_pei_little_vec; -extern const bfd_target arm_epoc_pei_big_vec; +extern const bfd_target armpei_little_vec; extern const bfd_target b_out_vec_big_host; extern const bfd_target b_out_vec_little_host; -extern const bfd_target bfd_elf64_alpha_vec; +extern const bfd_target bfd_efi_app_ia32_vec; +extern const bfd_target bfd_efi_app_ia64_vec; extern const bfd_target bfd_elf32_avr_vec; +extern const bfd_target bfd_elf32_big_generic_vec; extern const bfd_target bfd_elf32_bigarc_vec; -extern const bfd_target bfd_elf32_bigarm_vec; extern const bfd_target bfd_elf32_bigarm_oabi_vec; -extern const bfd_target bfd_elf32_littlearc_vec; -extern const bfd_target bfd_elf32_littlearm_vec; -extern const bfd_target bfd_elf32_littlearm_oabi_vec; -extern const bfd_target bfd_elf32_big_generic_vec; +extern const bfd_target bfd_elf32_bigarm_vec; extern const bfd_target bfd_elf32_bigmips_vec; -extern const bfd_target bfd_elf64_bigmips_vec; +extern const bfd_target bfd_elf32_cris_vec; extern const bfd_target bfd_elf32_d10v_vec; extern const bfd_target bfd_elf32_d30v_vec; +extern const bfd_target bfd_elf32_fr30_vec; +extern const bfd_target bfd_elf32_hppa_linux_vec; extern const bfd_target bfd_elf32_hppa_vec; extern const bfd_target bfd_elf32_i370_vec; extern const bfd_target bfd_elf32_i386_vec; +extern const bfd_target bfd_elf32_i860_little_vec; extern const bfd_target bfd_elf32_i860_vec; extern const bfd_target bfd_elf32_i960_vec; +extern const bfd_target bfd_elf32_ia64_big_vec; extern const bfd_target bfd_elf32_little_generic_vec; +extern const bfd_target bfd_elf32_littlearc_vec; +extern const bfd_target bfd_elf32_littlearm_oabi_vec; +extern const bfd_target bfd_elf32_littlearm_vec; extern const bfd_target bfd_elf32_littlemips_vec; -extern const bfd_target bfd_elf64_littlemips_vec; extern const bfd_target bfd_elf32_m32r_vec; +extern const bfd_target bfd_elf32_m68hc11_vec; +extern const bfd_target bfd_elf32_m68hc12_vec; extern const bfd_target bfd_elf32_m68k_vec; extern const bfd_target bfd_elf32_m88k_vec; +extern const bfd_target bfd_elf32_mcore_big_vec; +extern const bfd_target bfd_elf32_mcore_little_vec; extern const bfd_target bfd_elf32_mn10200_vec; extern const bfd_target bfd_elf32_mn10300_vec; extern const bfd_target bfd_elf32_pj_vec; @@ -536,50 +543,61 @@ extern const bfd_target bfd_elf32_pjl_vec; extern const bfd_target bfd_elf32_powerpc_vec; extern const bfd_target bfd_elf32_powerpcle_vec; extern const bfd_target bfd_elf32_sh_vec; +extern const bfd_target bfd_elf32_shblin_vec; extern const bfd_target bfd_elf32_shl_vec; +extern const bfd_target bfd_elf32_shlin_vec; extern const bfd_target bfd_elf32_sparc_vec; +extern const bfd_target bfd_elf32_tradbigmips_vec; +extern const bfd_target bfd_elf32_tradlittlemips_vec; +extern const bfd_target bfd_elf32_us_cris_vec; extern const bfd_target bfd_elf32_v850_vec; -extern const bfd_target bfd_elf32_fr30_vec; -extern const bfd_target bfd_elf32_mcore_big_vec; -extern const bfd_target bfd_elf32_mcore_little_vec; +extern const bfd_target bfd_elf64_alpha_vec; extern const bfd_target bfd_elf64_big_generic_vec; +extern const bfd_target bfd_elf64_bigmips_vec; +extern const bfd_target bfd_elf64_hppa_linux_vec; +extern const bfd_target bfd_elf64_hppa_vec; +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_sparc_vec; +extern const bfd_target bfd_elf64_x86_64_vec; +extern const bfd_target bfd_powerpc_pe_vec; +extern const bfd_target bfd_powerpc_pei_vec; +extern const bfd_target bfd_powerpcle_pe_vec; +extern const bfd_target bfd_powerpcle_pei_vec; +extern const bfd_target cris_aout_vec; extern const bfd_target demo_64_vec; extern const bfd_target ecoff_big_vec; -extern const bfd_target ecoff_little_vec; extern const bfd_target ecoff_biglittle_vec; +extern const bfd_target ecoff_little_vec; extern const bfd_target ecoffalpha_little_vec; +extern const bfd_target go32coff_vec; +extern const bfd_target go32stubbedcoff_vec; extern const bfd_target h8300coff_vec; extern const bfd_target h8500coff_vec; extern const bfd_target host_aout_vec; extern const bfd_target hp300bsd_vec; extern const bfd_target hp300hpux_vec; -extern const bfd_target som_vec; extern const bfd_target i386aout_vec; extern const bfd_target i386bsd_vec; +extern const bfd_target i386coff_vec; extern const bfd_target i386dynix_vec; extern const bfd_target i386freebsd_vec; -extern const bfd_target i386os9k_vec; -extern const bfd_target i386coff_vec; -extern const bfd_target bfd_powerpc_pe_vec; -extern const bfd_target bfd_powerpcle_pe_vec; -extern const bfd_target bfd_powerpc_pei_vec; -extern const bfd_target bfd_powerpcle_pei_vec; -extern const bfd_target i386pe_vec; -extern const bfd_target i386pei_vec; -extern const bfd_target go32coff_vec; -extern const bfd_target go32stubbedcoff_vec; extern const bfd_target i386linux_vec; extern const bfd_target i386lynx_aout_vec; extern const bfd_target i386lynx_coff_vec; extern const bfd_target i386mach3_vec; extern const bfd_target i386msdos_vec; extern const bfd_target i386netbsd_vec; +extern const bfd_target i386os9k_vec; +extern const bfd_target i386pe_vec; +extern const bfd_target i386pei_vec; extern const bfd_target i860coff_vec; extern const bfd_target icoff_big_vec; extern const bfd_target icoff_little_vec; extern const bfd_target ieee_vec; +extern const bfd_target m68k4knetbsd_vec; extern const bfd_target m68kaux_coff_vec; extern const bfd_target m68kcoff_vec; extern const bfd_target m68kcoffun_vec; @@ -588,50 +606,57 @@ extern const bfd_target m68klynx_aout_vec; extern const bfd_target m68klynx_coff_vec; extern const bfd_target m68knetbsd_vec; extern const bfd_target m68ksysvcoff_vec; -extern const bfd_target m68k4knetbsd_vec; extern const bfd_target m88kbcs_vec; extern const bfd_target m88kmach3_vec; -extern const bfd_target mipslpe_vec; -extern const bfd_target mipslpei_vec; extern const bfd_target mcore_pe_big_vec; extern const bfd_target mcore_pe_little_vec; extern const bfd_target mcore_pei_big_vec; extern const bfd_target mcore_pei_little_vec; +extern const bfd_target mipslpe_vec; +extern const bfd_target mipslpei_vec; extern const bfd_target newsos3_vec; -extern const bfd_target nlm32_i386_vec; -extern const bfd_target nlm32_sparc_vec; extern const bfd_target nlm32_alpha_vec; +extern const bfd_target nlm32_i386_vec; extern const bfd_target nlm32_powerpc_vec; -extern const bfd_target pc532netbsd_vec; +extern const bfd_target nlm32_sparc_vec; extern const bfd_target oasys_vec; extern const bfd_target pc532machaout_vec; +extern const bfd_target pc532netbsd_vec; +extern const bfd_target pmac_xcoff_vec; extern const bfd_target ppcboot_vec; extern const bfd_target riscix_vec; -extern const bfd_target pmac_xcoff_vec; +extern const bfd_target rs6000coff64_vec; extern const bfd_target rs6000coff_vec; -extern const bfd_target shcoff_vec; -extern const bfd_target shlcoff_vec; extern const bfd_target shcoff_small_vec; +extern const bfd_target shcoff_vec; extern const bfd_target shlcoff_small_vec; +extern const bfd_target shlcoff_vec; extern const bfd_target shlpe_vec; extern const bfd_target shlpei_vec; +extern const bfd_target som_vec; +extern const bfd_target sparccoff_vec; extern const bfd_target sparcle_aout_vec; extern const bfd_target sparclinux_vec; extern const bfd_target sparclynx_aout_vec; extern const bfd_target sparclynx_coff_vec; extern const bfd_target sparcnetbsd_vec; -extern const bfd_target sparccoff_vec; extern const bfd_target sunos_big_vec; extern const bfd_target tekhex_vec; extern const bfd_target tic30_aout_vec; extern const bfd_target tic30_coff_vec; +extern const bfd_target tic54x_coff0_beh_vec; +extern const bfd_target tic54x_coff0_vec; +extern const bfd_target tic54x_coff1_beh_vec; +extern const bfd_target tic54x_coff1_vec; +extern const bfd_target tic54x_coff2_beh_vec; +extern const bfd_target tic54x_coff2_vec; extern const bfd_target tic80coff_vec; extern const bfd_target vaxnetbsd_vec; extern const bfd_target versados_vec; extern const bfd_target vms_alpha_vec; extern const bfd_target vms_vax_vec; -extern const bfd_target we32kcoff_vec; extern const bfd_target w65_vec; +extern const bfd_target we32kcoff_vec; extern const bfd_target z8kcoff_vec; /* srec is always included. */ @@ -683,6 +708,11 @@ const bfd_target * const bfd_target_vector[] = { &b_out_vec_big_host, &b_out_vec_little_host, + &bfd_efi_app_ia32_vec, +#ifdef BFD64 + &bfd_efi_app_ia64_vec, +#endif + /* This, and other vectors, may not be used in any *.mt configuration. But that does not mean they are unnecessary. If configured with --enable-targets=all, objdump or gdb should be able to examine @@ -690,6 +720,10 @@ const bfd_target * const bfd_target_vector[] = { &bfd_elf32_big_generic_vec, #ifdef BFD64 &bfd_elf64_alpha_vec, + &bfd_elf64_hppa_vec, + &bfd_elf64_hppa_linux_vec, + &bfd_elf64_ia64_little_vec, + &bfd_elf64_ia64_big_vec, #endif &bfd_elf32_avr_vec, &bfd_elf32_bigarc_vec, @@ -699,14 +733,19 @@ const bfd_target * const bfd_target_vector[] = { #ifdef BFD64 &bfd_elf64_bigmips_vec, #endif + &bfd_elf32_cris_vec, + &bfd_elf32_us_cris_vec, &bfd_elf32_d10v_vec, &bfd_elf32_d30v_vec, -#if 0 &bfd_elf32_hppa_vec, -#endif + &bfd_elf32_hppa_linux_vec, &bfd_elf32_i370_vec, &bfd_elf32_i386_vec, +#ifdef BFD64 + &bfd_elf64_x86_64_vec, +#endif &bfd_elf32_i860_vec, + &bfd_elf32_i860_little_vec, &bfd_elf32_i960_vec, &bfd_elf32_little_generic_vec, &bfd_elf32_littlearc_vec, @@ -719,6 +758,8 @@ const bfd_target * const bfd_target_vector[] = { &bfd_elf32_m32r_vec, &bfd_elf32_mn10200_vec, &bfd_elf32_mn10300_vec, + &bfd_elf32_m68hc11_vec, + &bfd_elf32_m68hc12_vec, &bfd_elf32_m68k_vec, &bfd_elf32_m88k_vec, &bfd_elf32_sparc_vec, @@ -730,6 +771,8 @@ const bfd_target * const bfd_target_vector[] = { &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. */ &bfd_elf64_big_generic_vec, &bfd_elf64_little_generic_vec, @@ -740,6 +783,8 @@ const bfd_target * const bfd_target_vector[] = { /* We don't include cisco_core_*_vec. Although it has a magic number, the magic number isn't at the beginning of the file, and thus might spuriously match other kinds of files. */ + + &cris_aout_vec, #ifdef BFD64 &demo_64_vec, /* Only compiled if host has long-long support */ #endif @@ -844,10 +889,13 @@ const bfd_target * const bfd_target_vector[] = { &riscix_vec, #endif #if 0 - /* This has the same magic number as RS/6000. */ + /* This has the same magic number as RS/6000. */ &pmac_xcoff_vec, #endif &rs6000coff_vec, +#ifdef BFD64 + &rs6000coff64_vec, +#endif &ppcboot_vec, &shcoff_vec, &shlcoff_vec, @@ -862,6 +910,12 @@ const bfd_target * const bfd_target_vector[] = { &aout0_big_vec, &tic30_aout_vec, &tic30_coff_vec, + &tic54x_coff0_vec, + &tic54x_coff0_beh_vec, + &tic54x_coff1_vec, + &tic54x_coff1_beh_vec, + &tic54x_coff2_vec, + &tic54x_coff2_beh_vec, &tic80coff_vec, &vaxnetbsd_vec, &versados_vec, @@ -931,7 +985,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. */ @@ -1031,7 +1085,7 @@ DESCRIPTION variable to "default" will cause the first entry in the target list to be returned, and "target_defaulted" will be set in the BFD. This causes <> to loop over all the - targets to find the one that matches the file being read. + targets to find the one that matches the file being read. */ const bfd_target * @@ -1114,7 +1168,7 @@ FUNCTION bfd_seach_for_target SYNOPSIS - const bfd_target * bfd_search_for_target (int (* search_func)(const bfd_target *, void *), void *); + const bfd_target * bfd_search_for_target (int (* search_func) (const bfd_target *, void *), void *); DESCRIPTION Return a pointer to the first transfer vector in the list of diff --git a/contrib/binutils/bfd/tekhex.c b/contrib/binutils/bfd/tekhex.c index b1ffe75..e5fa95a 100644 --- a/contrib/binutils/bfd/tekhex.c +++ b/contrib/binutils/bfd/tekhex.c @@ -24,11 +24,11 @@ SUBSECTION Tektronix Hex Format handling DESCRIPTION - + Tek Hex records can hold symbols and data, but not relocations. Their main application is communication with devices like PROM programmers and ICE equipment. - + It seems that the sections are descibed as being really big, the example I have says that the text section is 0..ffffffff. BFD would barf with this, many apps would try to alloc 4GB to @@ -49,11 +49,10 @@ DESCRIPTION Any number of sections may be created for output, we save them up and output them when it's time to close the bfd. - A TekHex record looks like: EXAMPLE % - + DESCRIPTION Where o length @@ -63,7 +62,6 @@ DESCRIPTION 3) symbol record 6) data record 8) termination record - The data can come out of order, and may be discontigous. This is a serial protocol, so big files are unlikely, so we keep a list of 8k chunks @@ -123,7 +121,7 @@ static const bfd_target *tekhex_object_p PARAMS ((bfd *)); static boolean tekhex_mkobject PARAMS ((bfd *)); static long tekhex_get_symtab_upper_bound PARAMS ((bfd *)); static long tekhex_get_symtab PARAMS ((bfd *, asymbol **)); -static void pass_over PARAMS ((bfd *, void (*)(bfd*, int, char *))); +static void pass_over PARAMS ((bfd *, void (*) (bfd*, int, char *))); static void first_phase PARAMS ((bfd *, int, char *)); static void insert_byte PARAMS ((bfd *, int, bfd_vma)); static struct data_struct *find_chunk PARAMS ((bfd *, bfd_vma)); @@ -216,7 +214,6 @@ fcffffff g T_SEGMENT i$1 00000000 g T_SEGMENT $ 00000010 g T_SEGMENT $ - RELOCATION RECORDS FOR [D00000000]: (none) RELOCATION RECORDS FOR [D00008000]: (none) @@ -425,7 +422,7 @@ first_phase (abfd, type, src) char *n = bfd_alloc (abfd, len + 1); if (!n) - abort(); /* FIXME */ + abort (); /* FIXME */ memcpy (n, sym, len + 1); section = bfd_make_section (abfd, n); } @@ -454,7 +451,7 @@ first_phase (abfd, type, src) char type = (*src); if (!new) - abort(); /* FIXME */ + abort (); /* FIXME */ new->symbol.the_bfd = abfd; src++; abfd->symcount++; @@ -464,7 +461,7 @@ first_phase (abfd, type, src) len = getsym (sym, &src); new->symbol.name = bfd_alloc (abfd, len + 1); if (!new->symbol.name) - abort(); /* FIXME */ + abort (); /* FIXME */ memcpy ((char *) (new->symbol.name), sym, len + 1); new->symbol.section = section; if (type <= '4') @@ -1063,6 +1060,6 @@ const bfd_target tekhex_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + (PTR) 0 }; diff --git a/contrib/binutils/bfd/trad-core.c b/contrib/binutils/bfd/trad-core.c index aea6366..194da15 100644 --- a/contrib/binutils/bfd/trad-core.c +++ b/contrib/binutils/bfd/trad-core.c @@ -25,7 +25,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "libaout.h" /* BFD a.out internal data structures */ #include -#include +#ifdef HAVE_DIRENT_H +# include +#else +# ifdef HAVE_SYS_NDIR_H +# include +# endif +# ifdef HAVE_SYS_DIR_H +# include +# endif +# ifdef HAVE_NDIR_H +# include +# endif +#endif #include #include /* After a.out.h */ @@ -34,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include TRAD_HEADER #endif - struct trad_core_struct + struct trad_core_struct { asection *data_section; asection *stack_section; @@ -73,7 +85,7 @@ trad_unix_core_file_p (abfd) if (bfd_seek (abfd, TRAD_CORE_USER_OFFSET, SEEK_SET) != 0) return 0; #endif - + val = bfd_read ((void *)&u, 1, sizeof u, abfd); if (val != sizeof u) { @@ -83,7 +95,7 @@ trad_unix_core_file_p (abfd) } /* Sanity check perhaps??? */ - if (u.u_dsize > 0x1000000) /* Remember, it's in pages... */ + if (u.u_dsize > 0x1000000) /* Remember, it's in pages... */ { bfd_set_error (bfd_error_wrong_format); return 0; @@ -140,7 +152,7 @@ trad_unix_core_file_p (abfd) bfd_zmalloc (sizeof (struct trad_core_struct)); if (rawptr == NULL) return 0; - + abfd->tdata.trad_core_data = rawptr; rawptr->u = u; /*Copy the uarea into the tdata part of the bfd */ @@ -195,13 +207,13 @@ trad_unix_core_file_p (abfd) from *u_ar0. The other is that u_ar0 is sometimes an absolute address in kernel memory, and on other systems it is an offset from the beginning of the `struct user'. - + As a practical matter, we don't know where the registers actually are, so we have to pass the whole area to GDB. We encode the value of u_ar0 by setting the .regs section up so that its virtual memory address 0 is at the place pointed to by u_ar0 (by setting the vma of the start of the section to -u_ar0). GDB uses this info to locate the regs, - using minor trickery to get around the offset-or-absolute-addr problem. */ + using minor trickery to get around the offset-or-absolute-addr problem. */ core_regsec (abfd)->vma = - (bfd_vma) u.u_ar0; core_datasec (abfd)->filepos = NBPG * UPAGES; @@ -261,9 +273,9 @@ trad_unix_core_file_matches_executable_p (core_bfd, exec_bfd) /* If somebody calls any byte-swapping routines, shoot them. */ static void -swap_abort() +swap_abort () { - abort(); /* This way doesn't require any declaration for ANSI to fuck up */ + abort (); /* This way doesn't require any declaration for ANSI to fuck up */ } #define NO_GET ((bfd_vma (*) PARAMS (( const bfd_byte *))) swap_abort ) #define NO_PUT ((void (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort ) @@ -304,7 +316,7 @@ const bfd_target trad_core_vec = bfd_false, bfd_false, bfd_false, bfd_false }, - + BFD_JUMP_TABLE_GENERIC (_bfd_generic), BFD_JUMP_TABLE_COPY (_bfd_generic), BFD_JUMP_TABLE_CORE (trad_unix), @@ -316,6 +328,6 @@ const bfd_target trad_core_vec = BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic), NULL, - + (PTR) 0 /* backend_data */ }; diff --git a/contrib/binutils/binutils/ChangeLog b/contrib/binutils/binutils/ChangeLog index 77775a8..37b784a 100644 --- a/contrib/binutils/binutils/ChangeLog +++ b/contrib/binutils/binutils/ChangeLog @@ -1,50 +1,402 @@ -2000-11-01 Philip Blundell +2001-03-16 Philip Blundell - From 2000-06-15 H.J. Lu - * dyn-string.c: Removed. Not needed with dyn-string.c in - libiberty. - * dyn-string.h: Likewise. - * Makefile.am: Remove references to dyn-string.c and - dyn-string.h. Rebuild dependency. - * Makefile.in: Rebuild. + * configure: Regenerate. + +2001-03-11 Philip Blundell + + * configure.in: Set version to 2.11. + +2001-02-13 Hans-Peter Nilsson + + * acinclude.m4 (AM_PROG_LEX): Override installed definition. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2001-02-10 Alan Modra + + * nm.c (print_symbol_info_bsd): Don't #ifdef inside printf in case + printf is a macro. + +2001-02-04 Philip Blundell + + * configure.in (OBJDUMP_DEFS): Match `arm*-*', not just `arm-*'. + * configure: Regenerate. + +2001-01-31 Steve deRosier + + * ieee.c (ieee_add_bb11): Don't check for backslashes + unless HAVE_DOS_BASED_FILE_SYSTEM is defined. + +2001-01-24 Mark Elbrecht + + * ieee.c: Update copyright. + (ieee_start_compilation_unit): Don't check for backslashes + unless HAVE_DOS_BASED_FILE_SYSTEM is defined. + + * stabs.c: Update copyright. Include "filenames.h". + (parse_stab): Use IS_ABSOLUTE_PATH. Ignore N_WARNING stabs. + +2001-01-23 Jakub Jelinek + + * readelf.c (process_version_sections): Check if VERDEF or VERNEED + sections are present before using them. Remove code duplication. + (process_symbol_table): Check if VERDEF or VERNEED sections are + present before using them. + +2001-01-17 Nick Clifton + + * objcopy.c (copy_object): Fail if attempting to convert the + endianness of the input object file. + + * binutils.texi: Explain that objcopy cannot convert endianness. + +2001-01-16 Nick Clifton + + * readelf.c (string_table_length): New variable. + (SECTION_NAME): Catch out of range indices and missing section + pointers. + (process_section_headers): Delete useless local variable + string_table_offset. Set the value of string_table_length + after loading the string table. + (process_mips_specific): Use SECTION_NAME macro. + (process_file): Set string_table_length to 0 when it is freed. + +2001-01-12 Nick Clifton + + * version.c (print_version): Update copyright date. + +2001-01-11 Peter Targett + + * readelf.c (dump_relocations): Include selection with EM_ARC. + (get_machine_name) Update name to "ARC". + +2001-01-09 Nick Clifton + + * Makefile.am: Add rule to build objdump.o from objdump.c and + using OBJDUMP_DEFS. + * Makefile.in: Regenerate. + + * configure.in: Define OBJDUMP_DEFS. Default to empty. + (arm, xscale, d10v): For these targets define OBJDUMP_DEFS to + -DDISASSEMBLER_NEEDS_RELOCS. + * configure: Regenerate. -2000-10-16 Philip Blundell + * objdump.c (disassemble_bytes): If DISASSEMBLER_NEEDS_RELOCS + is defined read in the relocs even if dump_reloc_info is + false. + +2001-01-07 Philip Blundell + + * binutils.texi (Bug Reporting): Replace `bug-gnu-utils' with + `bug-binutils'. + * README: Likewise. + +2000-12-19 Nick Clifton - * configure.in: Set version number to 2.10.1. + * dlltool.c: Add missing support for arm-epoc-pe. + * configure.in: Add missing support for arm-epoc-pe. * configure: Regenerate. -2000-10-14 Philip Blundell +2000-12-15 Nick Clifton + + * MAINTAINERS: Add Diego Novillo as a maintainer for the Intel + Mode parts of the x86 port. + +2000-12-04 Andreas Jaeger + + * readelf.c (guess_is_rela): Add EM_X86_64. + (dump_relocations): Add EM_X86_64. + (get_machine_name): Add EM_X86_64. + Include "elf/x86-64.h". + +2000-12-12 Nick Clifton + + * readelf.c: Fix formatting. + +Mon Dec 11 14:30:21 MET 2000 Jan Hubicka + + * MAINTAINERS: Add myself and Andreas Jaeger as x86_64 maintainer. + +2000-12-07 Andrew Haley + + * readelf.c (display_debug_frames): Only display columns that are + referenced by the frame debug info. + +2000-12-05 Nick Clifton + + * MAINTAINERS: Add Jason Merrill as DWARF2 maintainer. + +2000-12-04 Jason Merrill + + * readelf.c (process_section_headers): Handle linkonce.wi sections. + (display_debug_section): Likewise. + (display_debug_info): Display CU header before bailing. + +2000-12-01 Chris Demetriou + + * readelf.c (get_machine_flags): Recognize MIPS32 ISA in + EF_MIPS_ARCH. Replace use of E_MIPS_MACH_MIPS32 with + E_MIPS_MACH_MIPS32_4K and adjust printed CPU name similarly. + + * readelf.c (get_machine_flags): Add cases for E_MIPS_ARCH_5, + and E_MIPS_ARCH_64. + + * readelf.c (get_machine_flags): Add case for + E_MIPS_MACH_SB1. + +2000-11-30 Richard Earnshaw + + * readelf.c (frame_display_row): Output 's' for DW_CFA_same_value. + +2000-11-28 Hans-Peter Nilsson - * config.sub, config.guess: Update from mainline sources. + * MAINTAINERS: Add Jörn Rennecke and self as SH maintainers. + Change sourceware.cygnus.com to sources.redhat.com. + Fix typo for "amongst". - From 2000-09-07 H.J. Lu +2000-11-28 Nick Clifton + + * strip.1 (COPYING): Mention that the GNU Free Documentation + License is present in the sources, but not the output, and + also available from the GNU website. + (GNU Free Documentation License): Comment out this section. + * strings.1: Ditto. + * size.1: Ditto. + * ranlib.1: Ditto. + * objdump.1: Ditto. + * objcopy.1: Ditto. + * nm.1: Ditto. + * nlmconv.1: Ditto. + * ar.1: Ditto. + * addr2line.1: Ditto. + +2000-11-27 DJ Delorie + + * readelf.c (usage): Add -wf (--debug-dump=frames) option. + (parse_args): Support -wf option. + (process_section_headers): Ditto. + (debug_displays): Ditto. + (display_debug_frames): New, dump *_frame sections. + (frame_need_space): Support for above. + (frame_display_row): Ditto. + * binutils.texi: Document it. + +2000-11-24 Nick Clifton + + * NEWS: Announce support for v5t, v5te and XScale. + +2000-11-22 Nick Clifton + + * readelf.c (get_machine_name): Add EM_JAVELIN, EM_FIREPATH, + EM_ZSP, EM_MMIX, EM_HUANY, EM_PRISM. + (get_section_type_name): Add SHT_GROUP and SHT_SYMTAB_SHNDX. + (get_elf_section_flags: Add SHF_GROUP. + (process_section_headers): Adjust output for 32-bit binaries + to look nice on an 80 column terminal. + +2000-11-20 H.J. Lu + + * readelf.c (get_osabi_name): Change ELFOSABI_MONTEREY to + ELFOSABI_AIX. + +2000-11-17 Richard Henderson + + * readelf.c (display_debug_lines): Adjust last change to + use sizeof (external->li_length). + +2000-11-17 Richard Henderson + + * readelf.c (display_debug_lines): Fix section length check + and end_of_sequence computation. + +2000-11-06 Nick Clifton + + * binutils.texi: Add GNU Free Documentation License. + * objcopy.1: Add GNU Free Documentation License. + * objdump.1: Add GNU Free Documentation License. + * addr2line.1: Add GNU Free Documentation License. + * ar.1: Add GNU Free Documentation License. + * nlmconv.1: Add GNU Free Documentation License. + * nm.1: Add GNU Free Documentation License. + * ranlib.1: Add GNU Free Documentation License. + * size.1: Add GNU Free Documentation License. + * strings.1: Add GNU Free Documentation License. + * strip.1: Add GNU Free Documentation License. + +2000-10-06 Luciano Gemme + + * objcopy.c (--srec-len=nn): New parameter to set the + maximum length of generated Srecords. + (--srec-forceS3): New parameter that restricts the generation of + Srecords to type S3 only. + * binutils.texi: Document new command line switches. + * objcopy.1: Docuemnt the new command line switches. + * NEWS: Announce the existence of the new command line switches. + +2000-10-31 Nick Clifton + + * MAINTAINERS: Add Jim Wilson as the maintainer for the IA64 + code. Add Eric Chrisopher as maintainer of MN10300 port. + +2000-10-12 Roger Sayle + + * Make comma after string after icon/control optional. + +2000-09-13 Anders Norlander + + * readelf.c (get_machine_flags): Also print EF_MIPS_MACH field. + + * NEWS: Mention support for MIPS32. + +2000-09-08 Nick Clifton + + * MAINTAINERS: Add Stephane Carrez as maintainer for 68HC[11|12]. + +2000-09-07 H.J. Lu * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM. * configure: Rebuild. - From 2000-08-17 Nick Clifton +2000-09-06 Alexandre Oliva + + * configure: Rebuilt with new libtool.m4. + +2000-09-05 Nick Clifton + + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * configure: Regenerate. + +2000-09-04 Todd Vierling + + * strip.1: Fix stray '\' in -o formatting. + +2000-09-02 Nick Clifton + + * configure.in: Increase version number to 2.10.91. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * po/binutils.pot: Regenerate. + +2000-08-31 Alexandre Oliva + + * acinclude.m4: Include libtool and gettext macros from the + top level. + * aclocal.m4, configure: Rebuilt. + +2000-08-30 Jamie Guinan + + * resrc.c (close_input_stream): Delete extraneous logic + +2000-08-24 Hans-Peter Nilsson + + * NEWS: Mention support for CRIS. + +2000-08-21 Nick Clifton + + * addr2line.c: Changed email address for Ulrich Lauther. + +2000-08-17 Christopher C. Chimelis + + * objdump.c (LONGEST_ARCH): Set to sizeof("powerpc:common"). + +2000-08-17 Nick Clifton * readelf.c (display_debug_pubnames): Only issue warning message once. Terminate message with a new line. (display_debug_aranges): Only display version 2 debug info. - - From 2000-07-19 H.J. Lu + +2000-08-14 Todd Vierling + + * objcopy.c (strip_main): Silently accept -d as an alias for -g + for compatability with old BSD systems. + +2000-08-14 Jason Eckhardt + + * NEWS: Mention i860 support. + +2000-08-11 Carlo Wood + + * addr2line.c (main): Add const to char *. + +2000-08-11 Geoff Keating + + * ar.c (main): Don't crash if called with no arguments + or only '-X32_64' as an argument. + +2000-08-08 DJ Delorie + + * resrc.c: use "gcc -xc" instead of -xc-header + +2000-08-05 Jason Eckhardt + + * readelf.c (elf/i860.h): Include. + (dump_relocations): Add recognition of i860 architecture. + (guess_is_rela): Add recognition of i860 architecture. + +2000-08-03 Nick Clifton + + * MAINTAINERS: Add information about CGEN maintainers. + +2000-07-26 Geoff Keating + + * nm.c (main): Ignore '-X32_64' as an option. + * ar.c (main): Likewise. + * binutils.texi (nm): Document new option. + (ar): Likewise. + +2000-07-23 Michael Sokolov + + * rdcoff.c (external_coff_symbol_p): K&R-ise. + +2000-07-20 H.J. Lu + + * binutils/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 + switch. + +2000-07-20 Hans-Peter Nilsson + + * MAINTAINERS: Add self as CRIS port maintainer. + * readelf.c: Include elf/cris.h. + (guess_is_rela): Handle EM_CRIS. + (dump_relocations): Ditto. + (get_machine_name): Ditto. + * Makefile.am: Rebuild dependencies. + * Makefile.in: Regenerate. + * po/binutils.pot: Regenerate. + +2000-07-19 H.J. Lu * readelf.c (get_dynamic_type): Change "AUXILARY" to "AUXILIARY". (process_dynamic_segment): Print out strings for DT_CONFIG, DT_DEPAUDIT, DT_AUDIT and DT_RUNPATH. - From 2000-07-19 H.J. Lu +2000-07-19 Mark Kettenis + + * nm.c (usage): Change output of `nm --help' to include a + description of the purpose of the program and a detailed + description of the accepted options. + +2000-07-19 H.J. Lu * readelf.c (process_dynamic_segment): Change DF_1_NODEPLIB to DF_1_NODEFLIB. - From 2000-07-19 H.J. Lu +2000-07-19 H.J. Lu * readelf.c (get_dynamic_type): Fix DT_CHECKSUM. - From 2000-07-19 H.J. Lu +2000-07-19 H.J. Lu * readelf.c (get_dynamic_type): Change DT_FEATURE_1 to DT_FEATURE. @@ -55,50 +407,154 @@ (process_dynamic_segment): Handle DTF_1_CONFEXP, DF_1_NODEPLIB, DF_1_NODUMP and DF_1_CONLFAT. - From 2000-07-01 Alexander Aganichev - - * stabs.c (parse_stab_type): Divide size in bits by 8 as binutils - struct debug_type stores size in bytes. - - From 2000-08-17 Christopher C. Chimelis +2000-07-18 Nick Clifton - * objdump.c (LONGEST_ARCH): Set to sizeof("powerpc:common"). + * binutils.texi (readelf): Fix spelling typo. - From 2000-07-11 Mark Kettenis +2000-07-11 Mark Kettenis * objdump.c (usage): Make output of `objdump --help' more consistent with the rest of the GNU world. Add a line describing the purpose of the program. - - From 2000-06-24 Nick Clifton + +2000-07-10 David Huggins-Daines + + * stabs.c (parse_stab_range_type): Cast to proper type to fix + warning. + +2000-07-10 Ryan Bradetich + + * readelf.c (get_dynamic_data): Add casts and use unsigned chars + to fix warnings. + (process_symbol_table): Ditto. + (procesS_extended_line_op): Ditto. + (display_debug_lines): Ditto. + (display_debug_pubnames): Ditto. + (read_and_display_attr): Ditto. + +2000-07-09 Nick Clifton + + * MAINTAINERS: Add several more port specific maintainers. + +2000-07-05 Nick Clifton + + * MAINTAINERS: Add blanket write privs for Michael Meissner. + +2000-06-05 DJ Delorie + + * MAINTAINERS: New. + +2000-07-01 Eric Fifer + + * dllwrap.c: Changed mistaken dyn_string_append() calls + to dyn_string_append_cstr(). + +2000-07-01 Alexander Aganichev + + * stabs.c (parse_stab_type): Divide size in bits by 8 as binutils + struct debug_type stores size in bytes. + +2000-07-01 Alan Modra + + * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed + (CLEANFILES): Add DEPA. + * Makefile.in: Regenerate. + +2000-06-27 Alan Modra + + * ar.c: Revert incorrect 2000-06-25 patch. + * bucomm.c: Likewise. + +2000-06-25 Mark Elbrecht + + * rdcoff (parse_coff_symbol): Treat GNU weak symbols as external. + (external_coff_symbol_p): New function. + (parse_coff): Use it. + +2000-06-25 Alexander Aganichev + + * ar.c (normalize): Advance past both characters in a DOS based + : filepath prefix. + (main): Likewise. + * bucomm.c (make_tempname): Likewise. + +2000-06-24 Nick Clifton * objdump.c (usage): Fix description of --stabs switch. - From 2000-07-18 Nick Clifton +2000-06-22 Alan Modra - * binutils.texi (readelf): Fix spelling typo. + * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we + find one. + * Makefile.in: Regenerate. - From 2000-07-19 Mark Kettenis +2000-06-20 Alexander Aganichev - * nm.c (usage): Change output of `nm --help' to include a - description of the purpose of the program and a detailed - description of the accepted options. + * ar.c (normalize): Correct pointer comparison when checking for + backslashes. + (main): Likewise. + * bucomm.c (make_tempname): Likewise. -2000-09-05 Todd Vierling + * ieee.c (ieee_start_compilation_unit): Correct pointer comparison + and search for backslashes in the original pathname. + (ieee_add_bb11): Likewise. - From 2000-08-14 Todd Vierling - * objcopy.c (strip_main): Silently accept -d as an alias for -g - for compatability with old BSD systems. +2000-06-18 Nick Clifton -2000-09-04 Todd Vierling + * ar.c (print_contents): Improve verbose message. - * strip.1: Fix stray '\' in -o formatting. +2000-06-15 H.J. Lu + + * dyn-string.c: Removed. Not needed with dyn-string.c in + libiberty. + * dyn-string.h: Likewise. + + * Makefile.am: Remove references to dyn-string.c and + dyn-string.h. Rebuild dependency. + * Makefile.in: Rebuild. + +2000-06-15 H.J. Lu + + * binutils.texi: Put a warning on copying relocatable object + files between two different formats. + +2000-06-13 DJ Delorie + + * rcparse.y (control): ICON controls take an id as the first + parameter, not an optional string. Also, call new convenience + function that takes res_id's. + * resrc.c (define_control): missing text means zero-length string, + not zero ID. + (define_icon_control): New. + * windres.h: declare define_icon_control. + +2000-06-13 H.J. Lu + + * configure: Regenerate. + +2000-06-08 David O'Brien + + * configure.in (VERSION): Update to show this is the CVS mainline. + +2000-06-02 David O'Brien + + * strings.c (isgraphic): Interpret as a printable character, + analogous to . 2000-05-30 Alan Modra * objdump.c (display_target_list): Use bfd_close_all_done, not bfd_close to fix crash caused by 2000-05-24 change. +2000-05-25 DJ Delorie + + * resrc.c (close_input_stream): zero out cpp_pipe after closing it. + +2000-05-26 Alan Modra + + * Makefile.am: Update dependencies with "make dep-am" + * Makefile.in: Regenerate. + 2000-05-26 Eli Zaretskii * ar.c: Include filenames.h. @@ -143,10 +599,38 @@ * objdump.c (display_target_list): Close the bfd. (display_info_table): Likewise. -2000-05-23 Philip Blundell +2000-05-14 H.J. Lu (hjl@gnu.org) - * configure.in: Set version to 2.10. - * configure: Regenerate. + * objcopy.c (filter_symbols): Don't strip global symbols in + relocatable object files. + +2000-05-14 Alan Modra + + * size.c (usage): Associate short options with corresponding long + option to give a clue as to their function. + +2000-05-14 Philippe De Muyter + + * size.c (main): Accept and ignore `-f' option. + +2000-05-13 Alan Modra + + * bucomm.h (gettext, dgettext, dcgettext, textdomain, + bindtextdomain): Replace defines with those from intl/libgettext.h + to quieten gcc warnings. + +2000-05-12 H.J. Lu + + * nlmconv.c (temp_filename): Removed. + + * nlmconv.c (link_inputs): Use make_temp_file () instead of + choose_temp_base (). + * objdump.c (display_target_list): Likewise. + (display_info_table): Likewise. + +2000-05-08 Alan Modra + + * objcopy.c (setup_section): Add const and gettext calls for err. 2000-05-02 H.J. Lu @@ -156,12 +640,36 @@ ELFOSABI_FREEBSD, ELFOSABI_TRU64, ELFOSABI_MODESTO and ELFOSABI_OPENBSD. +2000-05-02 Kazu Hirata + + * coffgrok.c: Add ATTRIBUTE_UNUSED as appropriate. + * srconv.c: Likewise. + * sysdump.c: Likewise. + +Sun Apr 23 14:23:26 2000 Denis Chertykov + + * readelf.c (guess_is_rela): AVR uses RELA relocations. + (get_machine_name): machine name for EM_AVR added. + +Fri Apr 21 13:20:53 2000 Richard Henderson + David Mosberger + + * Makefile.am (readelf.o): Add elf/ia64.h. + * Makefile.in: Rebuild. + * readelf.c: Include elf/ia64.h. + (guess_is_rela, dump_relocations): Handle EM_IA_64. + +2000-04-17 Timothy Wall + + * objdump.c (disassemble_data): Set octets per byte *after* + resolving arch/mach for binary files. + 2000-04-14 Michael Sokolov * arlex.l: Add directives to increase lex buffer size. * objdump.c, readelf.c: Don't include strarg.h or varargs.h. They are - already included by bucomm.h. + already included by bucomm.h. 2000-04-10 Philippe De Muyter @@ -169,6 +677,13 @@ `strftime' since strftime is not available on all systems. (process_mips_specific): Ditto. +Fri Apr 7 15:56:57 2000 Andrew Cagney + + * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add + --enable-build-warnings option. + * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions. + * Makefile.in, configure: Re-generate. + 2000-04-06 Alan Modra * addr2line.c: Update copyright. @@ -265,6 +780,27 @@ (integer_arg): And here. * sysdump.c (main): And here. +2000-04-06 Timothy Wall + + * objdump.c (dump_section_header): Print CLINK and BLOCK flags. + +2000-04-06 Jason Merrill + + * readelf.c (decode_location_expression): Loop through multiple + operations. + (read_and_display_attr): Pass in length. + + * readelf.c (read_and_display_attr): Add CU offset to references. + (display_debug_info): Pass it in. + +2000-04-06 Nick Clifton + + * readelf.c (decode_ARM_machine_flags): New function. + (get_machine_flags): Call decode_ARM_machine_flags for ARM + targets. + + (get_machine_name): Catch EM_AVR + 2000-04-05 Alan Modra * binutils.texi: Remove optional `=' from long options that have @@ -438,15 +974,15 @@ * binutils/objdump.c (dump_section_header, find_symbol_for_address, show_line, disassemble_bytes, disassemble_data, dump_data): distinguish between octets and bytes. - + 2000-01-27 Thomas de Lellis - * nm.c (print_symbol_info_bsd): Use bfd_is_undefined_symclass to + * nm.c (print_symbol_info_bsd): Use bfd_is_undefined_symclass to check to unresolved symbols. - (print_symbol_info_sysv): Ditto. - (print_symbol_info_posix): Ditto. + (print_symbol_info_sysv): Ditto. + (print_symbol_info_posix): Ditto. - * binutils.texi: Document new 'V' symclass flag for nm. + * binutils.texi: Document new 'V' symclass flag for nm. 2000-01-27 Nick Clifton @@ -492,28 +1028,28 @@ 2000-01-07 Mumit Khan - * windres.c (long_options): Add --use-temp-file and + * windres.c (long_options): Add --use-temp-file and --no-use-temp-file options. (usage): Document. (main): Handle. - + * windres.h: Update read_rc_file prototype. - + * resrc.c (cpp_temp_file): New static variable. (istream_type): New static variable. (close_pipe): Delete function. (run_cmd): New static function. (open_input_stream): New static function. (close_input_stream): New static function. - (look_for_default): Handle DOS directory separator. Use + (look_for_default): Handle DOS directory separator. Use open_input_stream instead of popen. (read_rc_file): Likewise. - + * binutils.texi: Document --use-temp-file, --no-use-temp-file - options. + options. 2000-01-04 Mumit Khan - + * dlltool.c (create_compat_implib): New variable. (gen_exp_file): Use. (make_one_lib_file): Use. @@ -527,7119 +1063,9 @@ 2000-01-03 Nick Clifton * binutils.texi: Document new, ARM specific disassembler - command line switch "-M force-thumb". - -1999-12-28 Nick Clifton - - * readelf.c: Update with new constants added by Oct 4, 1999 - ELF ABI draft. - (guess_is_rela): Add new machine codes, but leave - rel type undetermined. - (get_machine_name): Add new machine codes. - (get_section_type_name): Add new section types. - (get_elf_section_flags): New funciton: Decode section flags. - (process_section_headers): Call get_elf_section_flags() in - order to decode flags in section header. - (get_dynamic_flags): New function: Decode dynamic section - flags. - (process_dynamic_section): Display flags (if present). - (get_symbol_type): Add STT_COMMON. - (get_symbol_visibility): New function: Decode a symbol's - visibility. - (process_symbol_table): Call get_symbol_visibility(). - (get_note_type): Add NT_PRXFPREGS. - -1999-12-26 Ian Lance Taylor - - * strings.c (main): Correct handling of numeric argument. - -1999-12-23 Andrew Haley - - * dlltool.c (mtable): mcore how_jtab_roff is 4 bytes into the - jtab; was 8. - -1999-12-17 Nick Clifton - - * dlltool.c (mtable): Stop compile time warnings about missing - initialisers. - (yyerror): Stop compile time warnings about unused paramater. - (INIT_SEC_DATA): New macro: initialise an entry in the secdata - array. - (secdata): Stop ccompile time warnings about uninitialised - fields. - (dtab): Stop compile time warnings about unused parameter. - (long_options): Stop compile time warning about missing - initialiser. - -1999-12-10 Nick Clifton - - * readelf.c (print_vma): Support native 64bit ELF systems. - -1999-12-09 Nick Clifton - - * dlltool.c (mtable): Add epoc-arm specific entry. - Make default arm entry pass -mpacs-26 to assembler. - (flush_page): Do not mangle null entries. - -1999-12-07 H . J . Lu hjl@valinux.com - - * readelf.c: Fix compile time warnings. Support more than 999 - symbols. - -1999-12-03 Nick Clifton - - * readelf.c (enum print_mode): New type. - (print_vma): New function. - (dump_relocations): Use print_vma to display bfd_vma values. - (process_file_header): Use print_vma to display bfd_vma values. - (process_program_headers): Use print_vma to display bfd_vma values. - (process_section_headers): Use print_vma to display bfd_vma values. - (dynamic_segment_parisc_val): Use print_vma to display bfd_vma values. - (process_dynamic_segment): Use print_vma to display bfd_vma values. - (process_symbol_table): Use print_vma to display bfd_vma values. - (process_mips_specific): Use print_vma to display bfd_vma values. - -1999-11-25 Fred Fish - - * readelf.c (process_note): Change arg from Elf_External_Note - to Elf32_Internal_Note, which also turns the function body - into little more than a call to printf. - (process_corefile_note_segment): Substantially rewritten - to properly handle case where target and host are different - endianness, handle note sections with padding, and add some - cruft to handle notes with unterminated name data. - -1999-11-22 Nick Clifton - - * objcopy.c (copy_usage): Reformat. - (strip_usage): Reformat. - -1999-11-21 Nick Clifton - - * objdump.c (usage): Overhaul output: One line per switch. - Textual description of each switch. Distinguish between - optional switches and required switches. - (long_options): Add 'g', 'G' and 'z' short options. - (main): Distinguish between optional switches and required - switches. - - * binutils.texi: Add -g -G and -z short options for - --debugging, --stabs and --disassemble-zeroes. - -1999-11-03 Nick Clifton - - * dlltool.c (flush_page): Clip short values to prevent warnings - from the assembler. - Change default mcore machine name to 'mcore-le' and rename - big-endian version to 'mcore-be'. - -1999-10-27 Fred Fish - - * objdump.c (display_bfd): Break into two functions. The - actual dumping code moves to dump_bfd. If bfd is not - unambiguously recognized as a bfd_object, attempt to dump - it as a bfd_core. - (dump_bfd): New function. - -1999-10-26 Nick Clifton - - * dlltool.c (assemble_file): Remove spurious test of exp_name. - -1999-10-22 Nick Clifton - - * dlltool.c (struct mac): Add new field 'how_default_as_switches'. - (mtable): Initialise new field. Some machines have a non empty - string for this field. - (HOW_BFD_TARGET): Undefine and replace with... - (HOW_BFD_READ_TARGET): New macro: bfd target to use when opening a - file for reading. This is set to 0 so that any recognisable bfd - format can be read. - (HOW_BFD_WRITE_TARGET): New macro: bfd target to use when opening - a file for writing. This is set to the target machine type. - (ASM_SWITCHES): New macro: default switches to use when assembling - a file. - (assemble_file): New function: Assemble a source file into a - destination object file. - (gen_exp_file): Use assemble_file to create the exp file. - (make_one_lib_file): Use assemble_file to create the lib file. - Open output file use HOW_BFD_WRITE_TARGET and input files using - HOW_BFD_READ_TARGET. - (make_head): Use assemble_file to create the head file. - (make_tail): Use assemble_file to create the tail file. - (gen_lib_file): Open output file use HOW_BFD_WRITE_TARGET. - -1999-10-15 Ian Lance Taylor - - * ar.c (normalize): Fix full_pathname code. - -1999-10-08 Ben Elliston - - * binutils.texi: Some rewording and clarifications. - -1999-09-15 Ulrich Drepper - - * readelf.c (dynamic_segment_parisc_val): Print 0 for DLD_FLAGS if - the value is zero. - (process_symbol_table): Don't print histogram if hash table is empty. - -1999-09-15 Ulrich Drepper - - * readelf.c (get_parisc_dynamic_type): Handle DT_HP_GST_* values. - -1999-09-02 Ulrich Drepper - - * readelf.c (get_symbol_type): Add support for HPUX and PARISC - specific symbol types. - - * readelf.c: Add HPUX and PARISC extensions to dynamic and program - header table printing. - - * readelf.c (get_machine_flags): Add handling of PARISC. - -1999-09-29 Mumit Khan - - * dlltool.c (scan_drectve_symbols): Handle type tags in exported - symbols. - (scan_filtered_symbols): Likewise. - -1999-09-19 Ian Lance Taylor - - * resrc.c (write_rc_rcdata): Fix local variable shadowing - problem. If RCDATA_BUFFER data can be read as strings, modify - code to print the strings as comments. - * resres.c: Add casts to avoid warnings. - (write_res_data, read_res_data): Don't put the program name in the - error message; fatal already puts it there. - -1999-09-14 Michael Meissner - - * configure.in (Canonicalization of target names): Remove adding - ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 - generates $ac_config_sub with a ${CONFIG_SHELL} already. - * configure: Regenerate. - -1999-09-12 Ian Lance Taylor - - * ar.c (main): Clear output_file if we don't change the archive. - (delete_members, replace_members): Likewise. - -1999-09-12 Donn Terry - - * objdump.c (dump_headers): If wide_output, print Flags header. - - * objdump.c (dump_section_header): Print any comdat information. - - * objcopy.c (parse_flags): Handle "noload", "debug", and "share". - * binutils.texi, objcopy.1: Document new flags. - - * ar.c (counted_name_mode): New static variable. - (counted_name_counter): New static variable. - (map_over_members): Handle counted mode. - (usage): Mention N modifier. - (main): Handle N modifier. - (delete_members): Handle counted mode. - * binutils.texi, ar.1: Document N modifier. - - * ar.c (print_contents): Change printing of member name for - POSIX.2 conformance. - - * ar.c (output_filename): Make const. - (open_inarch): If creating a new empty archive, set - output_filename. - -1999-09-12 Ian Lance Taylor - - * ar.c (full_pathname): New static variable. - (map_over_members): Call normalize on command line parameter. - (usage): Mention P modifier. - (normalize): If full_pathname is true, don't do anything. - (main): Accept P modifier. - (delete_members): Call normalize on command line parameter. - * binutils.texi, ar.1: Document P modifier. - -1999-09-09 Andreas Schwab - - * binutils.texi: Add info dir entries for all programs described - here. Fix arguments of @var to not contain punctuation. - -1999-09-06 Donn Terry - - * nm.c (print_symbol_info_bsd): Check for 'w' as well as 'U'. - (print_symbol_info_sysv): Likewise. - (print_symbol_info_posix): Likewise. - -1999-09-04 Steve Chamberlain - - * readelf.c: Include "elf/pj.h". - (dump_relocations): Handle EM_PJ. - (get_machine_name): Likewise. - (get_machine_flags): Likewise. - -1999-08-31 Scott Bambrough - - * readelf.c (get_note_type): New function: Decode the e_type - value of a note. - (process_note): New function: Display the contents of a core note. - (process_corefile_note_segment): New function. - (process_corefile_note_segments): New function. - (process_corefile_contents): New function. - (process_file): Add call to process_corefile_contents. - (parse_args): Add parsing of -n/--notes command line switch. - (usage): Document new command line switch. - - * binutils.texi: Documemnt new command line switch to readelf. - -1999-08-31 Ian Lance Taylor - - * binutils.texi (Bug Reporting): Clarify that large files should - not be sent to bug-gnu-utils. - -1999-08-28 Stephane Carrez - - * readelf.c (process_extended_line_op): New parameter pointer_size, - read the address according to pointer_size. - (debug_line_pointer_size): New global to indicate the - size of address in .debug_line section. - (debug_displays, prescan_debug_info): Prescan the .debug_info section - to record the size of address in `debug_line_pointer_size'. - (process_section_contents): Before dumping any section, execute - the pre-scan operation defined for some debug sections. - -1999-08-27 Jim Wilson - - * readelf.c (display_debug_lines): Use i-1 not i in standard_opcodes - access. - (display_debug_aranges): New local excess. Use for calculating padding - and add that into ranges. Break from loop only if length is also 0. - -1999-08-27 Jim Wilson - - * readelf.c (display_debug_lines, case DW_LNS_const_add_pc): Multiply - adv by info.li_min_insn_length. - -1999-08-26 Jakub Jelinek - - * readelf.c (get_sparc64_dynamic_type): New function. - (get_dynamic_type): Use it. - -1999-08-26 Jim Wilson - - * readelf.c (display_debug_lines, case default): Change second line - setting adv to use = not +=. - -1999-08-19 Nick Clifton - - * dlltool.c: Added more examples to the comment at the start. - -1999-08-18 Nick Clifton - - * dlltool.c (make_head): Only emit interworking directive if - necessary. - -Thu Jul 15 22:44:21 1999 Hans-Peter Nilsson - - * readelf.c (process_abbrev_section): Handle standard-conforming - single zero at the end of the section. - -1999-08-09 Ian Lance Taylor - - * objdump.c (exit_status): New static variable. - (nonfatal): New static function. - (disassemble_data): Set exit_status on error. - (read_section_stabs): Likewise. - (display_bfd): Likewise. Call nonfatal rather than bfd_nonfatal. - (display_file): Call nonfatal rather than bfd_nonfatal. - (display_target_list, display_info_table): Likewise. - (main): Return exit_status rather than 0. - -1999-08-08 Ian Lance Taylor - - * objdump.c (dump_section_header): Update for renaming of - SEC_SHORT to SEC_SMALL_DATA. Print SEC_SHARED flag. - - From Eli Zaretskii : - * binutils.texi: Document cxxfilt as MS-DOS name for c++filt. - - * configure.in: Define and substitute DEMANGLER_NAME. - * Makefile.am (DEMANGLER_PROG): Set to cxxfilt. - (man_MANS): Use DEMANGLER_NAME rather than DEMANGLER_PROG. - (bin_PROGRAMS): Remove $(DEMANGLER_PROG). - (noinst_PROGRAMS): Add $(DEMANGLER_PROG). - (cxxfilt_SOURCES): Rename from c__filt_SOURCES. - (cxxfilt_LDADD): Rename from c__filt_LDADD. - ($(DEMANGLER_NAME).1): Rename from $(DEMANGLER_PROG).1. Use - DEMANGLER_NAME rather than DEMANGLER_PROG in substitution. - (MOSTLYCLEANFILES): Use DEMANGLER_NAME rather than - DEMANGLER_PROG. - (install-exec-local): When installing noinst_PROGRAMS, change - cxxfilt to $(DEMANGLER_NAME). - * configure, Makefile.in: Rebuild. - - * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to - MKDEP. - * Makefile.in: Rebuild. - -1999-08-05 Donn Terry - - * Makefile.am (YACC): If bison is not in the source tree, use - @YACC@ rather than bison -y. - (LEX): If flex is not in the source tree, use @LEX@ rather than - flex. - * configure.in: Build dlltool for i[3-6]86-*-interix. - * Makefile.in, configure: Rebuild. - -1999-07-21 Ian Lance Taylor - - From Mark Elbrecht: - * configure.bat: Remove; obsolete. - -1999-07-16 Jakub Jelinek - - * readelf.c (get_machine_flags): Print EF_SPARC_SUN_US3. - -1999-07-15 Ian Lance Taylor - - * configure.in: Bump version number to 2.9.5. - * configure: Rebuild. - -1999-07-14 Richard Henderson - - * objdump.c (dump_section_header): Print SEC_SHORT. - -1999-07-11 Ian Lance Taylor - - * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED - as appropriate. Add variable initializations. Add casts. - * objdump.c (disassemble_bytes): Change j to bfd_vma. - * readelf.c (process_syminfo): Change i to unsigned int. - (display_debug_info): Change abbrev_number to unsigned long. - (process_mips_specific): Change fcnt to size_t. - -1999-07-09 Nick Clifton - - * readelf.c: Only support decoding 64bit ELF files if the compiler - supports a 64 bit data type. - Add -I equivalent for --histogram. - Add -A command-line option to display architecture specific information. - -1999-07-08 Jakub Jelinek - - * readelf.c (guess_is_rela): Sparcv9 and v8plus use rela. - (dump_relocations): Use ELF64_R_TYPE_ID for Sparc, for R_SPARC_OLO10 - print the secondary addend. - (get_machine_flags): Print Sparc machine flags. - (get_symbol_type): Print STT_REGISTER. - -1999-07-08 Ian Lance Taylor - - * stabs.c (parse_stab_type): Fix handling of template names with - template parameters containing `::'. - (stab_demangle_type): Handle a qualified name in a pointer to - member. - -1999-06-23 Ian Lance Taylor - - * Makefile.am (dlltool_SOURCES): Add dyn-string.c. - * Makefile.in: Rebuild. - -1999-06-23 Mumit Khan - - * configure.in (HAVE_EXECUTABLE_SUFFIX): Define. - * dlltool.c (look_for_prog): Use HAVE_EXECUTABLE_SUFFIX. - * dllwrap.c (look_for_prog): Likewise. - * resrc.c (look_for_default): Likewise. - * configure, config.in: Rebuild. - -1999-06-22 Ian Lance Taylor - - Based on patches from Mumit Khan : - * configure.in: Define EXECUTABLE_SUFFIX. - * dlltool.c: Include "dyn-string.h". Include based on - ANSI_PROTOTYPES, not __STDC__. - (outfile): Remove. - (gen_exp_file): Change uses of outfile to use alloca. - (make_one_lib_file, make_head, make_tail): Likewise. - (gen_lib_file): Likewise. - (look_for_prog): New static function. - (deduce_name): Rewrite to use look_for_prog. - (mcore_elf_gen_out_file): Use dyn_string_t rather than outfile. - * dllwrap.c: Don't include , , , - , or . Include and either - or . - (driver_name): Initialize to NULL, not "gcc". - (dlltool_name): Initialize to NULL, not "dlltool". - (display, inform, look_for_prog, deduce_name): New static - functions. - (usage): Mention -mno-cygwin. - (OPTION_MNO_CYGWIN): Define. - (main): Handle -mno-cygwin. Deduce driver_name and dlltool_name. - * resrc.c (look_for_default): Make static. Remove unused local - path. Check using EXECUTABLE_SUFFIX. - (read_rc_file): Allocate enough space to hold EXECUTABLE_SUFFIX. - * Makefile.am: Rebuild dependencies. - (dllwrap_LDADD): Add $(INTLLIBS). - * configure, Makefile.in, config.in: Rebuild. - -Mon Jun 21 16:49:11 1999 Jeffrey A Law (law@cygnus.com) - - * readelf.c (dump_relocations): Use elf_hppa_reloc_type instead of - elf32_hppa_reloc_type. - -1999-06-17 Nick Clifton - - * dlltool.c (mcore_elf_gen_out_file): Link object files with the - .exp file, not the .lib file. - -Fri Jun 18 20:17:51 1999 Mumit Khan - - * deflex.l: Accept single-character symbol names. - -1999-06-16 Nick Clifton - - * readelf.c (get_symbol_type): Detect ARM symbols typed as Thumb - functions. - -1999-06-14 Nick Clifton - - * objdump.c (disassembler_options): New variable. - (usage): Document new -M/--disassembler-options option. - (long_options): Add --disassembler-options. - (disassemble_data): Initialise disassembler_options field of - disassembler_info structure. - (main): Add parsing of -M option. - - * binutils.texi: Document new command line switch to objdump. - - * NEWS: Describe new command line switch to objdump. - - -Mon Jun 14 10:27:54 1999 Andreas Schwab - - * binutils.texi: Fix typos. - -1999-06-13 Ian Lance Taylor - - * objdump.c (disassemble_bytes): If the disassembler returns an - error, print out anything it may have printed to the buffer. From - H.J. Lu . - - * defparse.y (explist): Remove separate expline to eliminate - shift/reduce conflict. - - From Kai-Uwe Rommel : - * defparse.y: Add tokens NONSHARED, SINGLE, MULTIPLE, - INITINSTANCE, INITGLOBAL, TERMINSTANCE, and TERMGLOBAL. - (command): Add option_list after LIBRARY. - (attr): Accept and ignore NONSHARED, SINGLE, and MULTIPLE. - (option_list, option): New nonterminals. - * deflex.l: Recognize NONSHARED, SINGLE, MULTIPLE, INITINSTANCE, - INITGLOBAL, TERMINSTANCE, and TERMGLOBAL. - -1999-06-12 Ian Lance Taylor - - * ar.c (O_BINARY): Define as 0 if not defined. - (ranlib_touch): Open file with O_BINARY. - - * rename.c (O_BINARY): Define as 0 if not defined. - (simple_copy): Open files with O_BINARY. - - Based on patch from H. Peter Anvin : - * objcopy.c (struct section_list): Add copy field. - (sections_copied): New static variable. - (copy_options): Add "only-section". - (copy_usage): Mention -j and --only-section. - (find_section_list): Initialize copy field. - (is_strip_section): Check for copying sections. - (copy_object): Check sections_copied when calling filter_symbols. - (setup_section): Check for copying sections. - (copy_section): Likewise. - (copy_main): Handle -j/--only-section. - * binutils.texi, objcopy.1: Document -j/--only-section. - - * configure.in: If frexp is not available, check in -lm. - * configure: Rebuild. - - * readelf.c (get_elf_class): Use correct printf format for type. - (get_data_encoding): Likewise. - (get_osabi_name): Likewise. - (process_file_header): Don't pass an extra argument to printf. - (process_dynamic_segment): Cast dynamic_size to long before - printing. - (decode_location_expression): Cast byte_get to long before - printing. - -Wed Jun 9 11:40:16 1999 Andreas Schwab - - * readelf.c (dump_section): Cast values from byte_get to - [unsigned] long for printing, in case it is wider than long. - (display_block): Likewise. - (read_and_display_attr): Likewise. - (decode_location_expression): Likewise. Don't depend on - evaluation order. - -Mon Jun 7 12:14:57 1999 Andreas Schwab - - * windres.c (usage): Fix typo. - -1999-06-04 Nick Clifton - - * readelf.c: Use 64bit wide fields in internal strcutures even if - targetting a 32bit architecture. - (dump_relocations): Take a new parameter - the number of symbols - in the symbol table. - -1999-06-04 Nick Clifton - - * readelf.c: Add support for 64bit ELF files. - -1999-06-03 Nick Clifton - - * dlltool.c (mcore_elf_gen_out_file): Use constants for temporary - file names. - -Wed Jun 2 12:34:36 1999 Richard Henderson - - * dlltool.c (gen_exp_file): Revert 19990411 change. - -Mon May 31 09:56:22 1999 Andreas Schwab - - * readelf.c (process_relocs): Determine type of reloc from - DT_PLTREL and from section type. - -1999-05-29 Nick Clifton - - * readelf.c (get_elf_class): Display unknown class number. - (get_data_encoding): Display unknown encoding number. - (get_osabi_name): Display unknown ABI number. - (process_file_header): Display unknown version number. - -1999-05-29 Nick Clifton - - * readelf.c (dump_relocations): Fix typo. - -1999-05-28 Nick Clifton - - * readelf.c (dump_relocations): Add extra parameter: is_rela to - specify the kind of relocations to be dumped. Call guess_is_rela - if this parameter has a value of UNKNOWN. - (guess_is_rela): New function: Guess the kind of reloc being used - baced on the machine number. - (process_relocs): Determine type of reloc before calling - dump_relocations. - -1999-05-28 Ian Lance Taylor - - * readelf.c: Include "elf/i960.h". - (dump_relocations): Handle EM_960. - -Thu May 27 11:58:33 1999 Andreas Schwab - - * objcopy.c (copy_archive): Preserve dates of archive members if - requested. - - * readelf.c (dump_relocations): Always print the addend on RELA - systems even if there is no symbol. - (process_program_headers): Reset dynamic_size before looping - through the program headers. - (process_version_sections): Cast sh_offset to unsigned long for - printing in case bfd_vma is wider. - (process_symbol_table): Use get_symbol_index_type when printing - st_shndx. - -1999-05-17 DJ Delorie - - * windres.c: add verbose option - (main): process verbose option - * resrc.c (look_for_default): new. Look for the default - preprocessor in a given location. - (read_rc_file): for foo/bar-windres, look for foo/bar-gcc, - foo/gcc (in case of foo/windres), and then gcc (the old default). - -1999-05-16 Nick Clifton - - * dlltool.c (deduce_name): New function: Deduce name of program to - run. - (mcore_elf_out_file): New variable: Name of mcore-elf output file. - (mcore_elf_linker): New variable: Name of linker to use. - (mcore_elf_linker_flags): New variable: Linker flags to pass. - (scan_obj_file): Cache filenames if necessary. - (usage): Document new command line options. - (main): Support new command line options: -M (generate an - mcore-elf output file) -L (name of linker to use) -F (flags to - pass to linker). - (mcore_elf_cache_filename): Store a filename in a cache. - (mcore_elf_gen_out_file): New function: Generate an output file - per the mcore-elf spec. - -1999-05-15 Nick Clifton - - * configure.in (BUILD_MISC): Build dlltool for mcore - * configure: Regenerate. - * dlltool.c: Update example in comment. - (DLLTOOL_MCORE): Define. - (DLLTOOL_MCORE_ELF): Define. - (DRECTVE_SECTION_NAME): Define. - (mcore_be_jtab, mcore_le_jtab): Binary for performing an mcore - jump to address. - (mtable): Add entries for mcore variants. - (rvaafter, rvabefore, asm_prefix): Add mcore suppport. - (scan_drectve_symbols): Use DRECTVE_SECTION_NAME. - (make_head, make_tail): Cope if file cannot be created. - (usage): Improve layout. - -1999-05-13 DJ Delorie - - * rclex.l: add code to suppress certain output from cpp, replace - all returns with MAYBE_RETURN - (MAYBE_RETURN): new, implement the suppression by returning - IGNORED_TOKEN as needed. - (cpp_line): remember which file we're in, mark data from included - *.h files for suppression. - * rcparse.y (input): allow IGNORED_TOKEN outside of known constructs - -1999-05-10 DJ Delorie - - * windres.c (quot): Quote shell metacharacters in a string - (main): quote parameters to cpp that might have metacharacters in - them. Allow -D as an alias for --define to allow for sharing make - macros with gcc. - - * objdump.c (dump_reloc_set): don't core if howto->name is NULL - - * Makefile.am: Give rescoff.c a cpu-specific -D so it can set - the correct BFD. - * Makefile.in: ditto - * rescoff.c (write_coff_file): Set the correct BFD - -1999-05-06 Ian Lance Taylor - - * rename.c (smart_rename): Fix test of whether file exists. - -1999-05-06 Nick Clifton - - * objdump.c (disassemble_data): Set display_endian based on target - endianism. - -1999-05-05 Catherine Moore - - * dlltool.c (interwork): Remove. - (arm_interwork_jtab): Use bx insn. - (thumb_jtab): Likewise. - (MARM_INTERWORK): New machine type. - (rvaafter): Handle it. - (rvabefore) Likewise. - (asm_prefix): Likewise. - (gen_exp_type): Check machine type instead of - interwork flag. - (make_one_lib_file): Likewise. - (make_head): Likewise. - (make_tail): Likewise. - (usage): Update machine types. - (main): Remove -interwork support. - -1999-05-05 Catherine Moore - - * readelf.c (get_machine_flags): Check for EF_CPU32. - (get_data_encoding): Fix typo. - -1999-04-26 Tom Tromey - - * aclocal.m4, configure: Updated for new version of libtool. - -1999-04-18 Ian Lance Taylor - - * stabs.c (parse_stab_range_type): Correct parenthesization in - BFD64 case. - - * readelf.c (get_section_type_name): Use correct types in printf - formats. - (process_relocs): Likewise. - (process_dynamic_segment): Likewise. - (process_symbol_table): Likewise. - (process_mips_specific): Likewise. - -Tue Apr 13 21:22:00 1999 Catherine Moore - - * dlltool.c (make_one_lib_file): Mark thumb functions as - C_THUMBEXTFUNC. - -1999-04-11 Richard Henderson - - * bucomm.h (environ): Declare it, if needed. - (alloca) [C_ALLOCA]: Don't use gcc's builtin or . - * configure.in (environ): Detect declaration. - * nm.c (main): Don't declare environ. - * configure, config.in: Rebuild. - - * dlltool.c (gen_exp_file): Pad out the .reloc section to a - 32-byte boundary with dummy relocations, to make the BeOS loader - happy. Patch from Bob Manson . - -1999-04-08 Tom Tromey - - * binutils.texi (c++filt): Updated for -j/--java, and hp/edg - formats. - -1999-04-08 Nick Clifton - - * readelf.c: Add ability to decode new constants found in April 25 - 1998 Draft of System V ABI spec. - -1999-04-06 Ian Lance Taylor - - * bucomm.h (LC_MESSAGES): Never define. - * addr2line.c (main): Don't pass LC_MESSAGES to setlocale if the - system does not define it. - * ar.c (main): Likewise. - * coffdump.c (main): Likewise. - * dlltool.c (main): Likewise. - * nlmconv.c (main): Likewise. - * nm.c (main): Likewise. - * objcopy.c (main): Likewise. - * objdump.c (main): Likewise. - * size.c (main): Likewise. - * srconv.c (main): Likewise. - * strings.c (main): Likewise. - * sysdump.c (main): Likewise. - * windres.c (main): Likewise. - * readelf.c (main): Call locale setting functions. - -1999-04-05 Nick Clifton - - * readelf.c (decode_location_expression): Fix DW_OP_const8{s|u} - decodes. - -1999-04-04 Ian Lance Taylor - - * rename.c: New file, copied out of objcopy.c with a few changes. - * bucomm.h (set_times, smart_rename): Declare. - * ar.c: Don't include . - (extract_file): Call set_times rather than utime. - (write_archive): Call smart_rename rather than unlink and rename. - * objcopy.c: Don't include . - (simple_copy, smart_rename, set_times): Move to rename.c. - (strip_main): Update smart_rename call for new parameter. - (copy_main): Likewise. - * Makefile.am: Rebuild dependencies. - (CFILES): Add rename.c. - (objcopy_SOURCES, strip_new_SOURCES): Add rename.c. - (ar_SOURCES, ranlib_SOURCES): Add rename.c. - * Makefile.in: Rebuild. - - * Makefile.am: Rebuild dependencies. - (EXTRA_PROGRAMS): Remove backslash which troubles current version - of automake. - * Makefile.in: Rebuild. - - * dllwrap.c (main): Expect correct type in format string. - * resres.c: Include "bfd.h", "bucomm.h", "libiberty.h", and - . Don't include and . - (write_res_file): Remove unused locals e and i. - (read_resource_entry): Remove unused locals rtype and n. - (read_unistring): Remove unused local n. - -1999-04-03 Ian Lance Taylor - - * arparse.y: Declare yylex. - * objdump.c (disassemble_bytes): Initialize bytes. Add comment - for incorrect use of bytes. - * readelf.c: Change many formats to avoid warnings. - -1999-04-01 Nick Clifton - - * readelf.c (reset_state_machine): New function. Resets the - registers of the source line number state machine. - (process_extended_line_op): Use state machine. - (display_debug_lines): Use state machine. Handle multiple line - number blocks within the same section. - -1999-03-29 Jason Merrill - - * readelf.c (process_extended_line_op): end_sequence also resets - the line number. - (display_debug_lines): advance_line takes a signed operand. - (read_and_display_attr): Print refs as <%x>, addresses as %#x, - others as %d. Handle other location expression attributes. - (display_debug_info): Handle nesting. Always print the offset. - -1999-03-23 Ian Lance Taylor - - * objcopy.c (filter_symbols): When checking whether to keep a - symbol, check the BFD section symbol for a symbol with - BSF_SECTION_SYM set. - -1999-03-10 Ulrich Drepper - - * readelf.c (process_dynamic_segment): Print new Solaris dynamic - section entries. Correct printing of DT_POSFLAG_1 and DT_FLAGS_1. - -1999-03-10 Nick Clifton - - * readelf.c (request_dump): New function. - Removed arbitary limit on the number of sections that can be - dumped. - -Wed Mar 10 15:10:14 1999 Stan Cox - - * dlltool.c (make_one_lib_file): Use %05d to output the stub name so - order in the import library is preserved. - -1999-02-19 Nick Clifton - - * readelf.c: Fix compile time warings. - -1999-02-17 DJ Delorie - - * resbin.c (res_to_bin_versioninfo): Instead of entering a value - length of zero in a version info string, enter the appropriate - length. - -Tue Feb 16 16:00:33 1999 Ian Lance Taylor - - * configure.in: Require autoconf 2.13. Change AM_PROG_INSTALL to - AC_PROG_INSTALL. Add comments for AC_DEFINE calls. - * acconfig.h: Remove. - * aclocal.m4: Rebuild. - * configure: Rebuild. - * Makefile.in: Rebuild. - * config.in: Rebuild. - -1999-02-02 Nick Clifton - - * readelf.c (read_and_display_attr): Add display of basic type - encodings. - (display_debug_aranges): New function: Display the contents of a - .debug_aranges section. - (display_debug_info): Dump tags found after compunit entry. - - * binutils.texi: Fixed bug in readelf documentation. - -Mon Feb 1 12:38:01 1999 Catherine Moore - - * readelf.c (dump_relocations): Handle EM_ARM as REL. - -1999-01-29 Nick Clifton - - * readelf.c (process_symbol_table): Do not produce a histogram of - bucket chains if none were found. - -1999-01-27 Nick Clifton - - * version.c: Add 1999 copyright. - - * binutils.texi (readelf): Document new command line options - --debug-dump and --histogram. - - * readelf.c: Add ability to display contents of some or all of the - Dwarf2 debug sections. {Work only partially completed}. - (display_debug_section): New function. - (display_debug_info): New function. - (display_debug_not_supported): New function. - (display_debug_line): New function. - (display_debug_abbrev): New function. - (process_abbrev_section): New function. - (read_leb128): New function. - (process_extended_line_op): New function. - (get_TAG_name): New function. - (get_AT_name): New function. - (get_FORM_name): New function. - (free_abbrevs): New function. - (add_abbrev): New function. - (add_abbrev_attr): New function. - (read_and_display_attr): New function. - (display_block): New function. - -Thu Jan 14 23:36:11 1999 Jeffrey A Law (law@cygnus.com) - - * coffdump.c (xcalloc): Remove, in libiberty now. - * srconv.c (xcalloc): Likewise. - * sysdump.c (xcalloc): Likewise. - -1999-01-14 Nick Clifton - - * readelf.c (process_section_headers): Omit trailing space at end - of section header contents line. - -Wed Dec 16 17:20:05 1998 Doug Evans - - * aclocal.m4: Regenerate. - -Mon Dec 14 12:55:36 1998 Jim Wilson - - * dllwrap.c: Include bfd.h and bucomm.h. Move getopt.h include - after libiberty.h include. - -Tue Dec 8 16:29:43 1998 Ian Lance Taylor - - * objdump.1: Fix typo (-d to -D). From Nokubi Hirotaka - . - -Sun Dec 6 13:28:09 1998 Ian Lance Taylor - - * objdump.c (SFILE): Add size field. - (objdump_sprintf): Merge both versions into one. Increase buffer - size as needed to avoid overflow. - (disassemble_bytes): Change buf from 1000 bytes to 50. Change - initialization and use of sfile to match changes to - objdump_sprintf. - - * strip.1: Fix typo (-V to -v). From Issei Hirayama - . - -1998-12-03 Ulrich Drepper - - * readelf.c (process_dynamic_segment): Improve output format for - various DT_* values. - -1998-12-02 Ulrich Drepper - - * readelf.c (process_mips_specific): Print .conflict section - content. - - * readelf.c (process_mips_specific): Print l_flags in liblist in - textual form. - -1998-11-30 Nick Clifton - - * ar.c (extract_file): Add some paranoia checks for negatively - sized files. - -Tue Nov 24 09:39:24 1998 Nick Clifton - - * stabs.c (DIR_SEPARATOR): Define as '\\' if WIN32 is defined. - -Tue Nov 17 10:25:26 1998 Nick Clifton - - * Makefile.in: Regenerate. - -Mon Nov 16 19:17:23 1998 Dave Brolley - - * po/binutils.pot: Regenerate. - -Mon Nov 16 10:18:53 1998 Nick Clifton - - * Makefile.am: Regernated dependencies. - * aclocal.m4: Regenerated. - * configure: Regenerated. - -Sat Nov 14 14:50:56 1998 Ian Lance Taylor - - * debug.c (debug_name_type): Correct return type from false to - DEBUG_TYPE_NULL. - -Sat Nov 14 14:48:21 1998 Andreas Schwab - - * objdump.c (disassemble_data): Skip over relocs below start - address. - -Tue Nov 10 15:31:52 1998 Nick Clifton - - * Makefile.am: Add dependency of readelf.c on elf/fr30.h - * Makefile.in: Regenerate. - -Wed Nov 4 16:25:55 1998 Nick Clifton - - * readelf.c: Add support for the FR30. - -Mon Nov 2 14:59:33 1998 Geoffrey Noer - - * configure.in: detect cygwin* instead of cygwin32* - * configure: regenerate - -Fri Oct 30 15:14:49 1998 Geoffrey Noer - - * dllwrap.c: change all references to cygwin32_ to cygwin_, - change Cygwin target def to CYGWIN. - -Wed Oct 28 10:31:19 1998 Nick Clifton - - * objdump.c (disassemble_data): Replace 'unsigned long' with - 'bfd_vma'. - -Tue Oct 27 14:39:00 1998 Nick Clifton - - * objdump.c (disassemble_bytes): Applied this patch from Philip - Blundell : Make address variables unsigned to - avoid problems when disassembling code at high-bit-set addresses. - -Mon Oct 26 14:07:59 1998 Mumit Khan - - * dllwrap.c (strhash): New function. - (main): Use it to supply image base if not supplied by user. - (program_version): Up to 0.2.4. - -Mon Oct 26 14:07:59 1998 Mumit Khan - - * dlltool.c (add_stdcall_alias): New global. - (long_options): Add --add-stdcall-alias option. - (main): Handle it. - (scan_drectve_symbols): Add alias if --add-stdcall-alias is - specified. - (scan_filtered_symbols): Likewise. - (gen_def_file): Output alias for stdcall syms if appropriate. - - * binutils.texi (dlltool): Document --add-stdcall-alias option. - - * dllwrap.c (long_options): Add --add-stdcall-alias option. - (main): Handle it. - - * defparse.y (opt_name): Allow "." in name. - * dlltool.c (def_name): Set dll_name from NAME entry in def file. - (def_library): Set dll_name from LIBRARY entry in def file. - -Mon Oct 26 14:07:59 1998 Mumit Khan - - * dllwrap.c (long_options): --implib synonym for --output-lib. - (main): Pass --export-all to dlltool only if specified. - (program_version): Up to 0.2.3. - -Mon Oct 26 14:07:59 1998 Mumit Khan - - * dllwrap.c (mybasename): New function. - (main): Run dlltool to create export definition file and import - library file if necessary. - Change exp_file_name so that it's based on the dll name. - -Sun Oct 25 10:37:45 1998 Mumit Khan - - * dlltool.c (scan_all_symbols): Fix patch error. - -Fri Oct 16 22:56:20 1998 Felix Lee - - * nm.c (display_rel_file): fix "no symbols" messages. - * objdump.c (slurp_symtab): ditto. - * po/POTFILES.in, po/binutils.pot: rebuilt - -Mon Oct 12 14:28:03 1998 Nick Clifton - - * readelf.c (dump_relocations): Rename field from Value to Info to - match name of field in ELF structures. - -Thu Oct 8 15:33:08 1998 Geoffrey Noer - - * configure.in: call AC_EXEEXT instead of AM_EXEEXT and - AM_CYGWIN32. - * aclocal.m4: remove local AM_EXEEXT/AM_CYGWIN32 macros. - * configure: regenerate - -Thu Oct 8 15:33:08 1998 Geoffrey Noer - - From Mumit Khan : - * dlltool.c (scan_all_symbols): Don't re-export symbols exported - by other DLLs. - -Thu Oct 8 15:33:08 1998 Geoffrey Noer - - * Makefile.am (BUILD_DLLWRAP): Add. - (BUILD_DLLWRAP, DLLWRAP_PROG): Add. - (bin_PROGRAMS): Add dllwrap. - * Makefile.in: regenerate with automake - - From Mumit Khan : - * dllwrap.c: New file from dllhelpers v0.2.1. - (print_version): New function. - (long_options): Add --version. - (main): Handle. - * dyn-string.h, dyn-string.c: New files from egcs-1.1/gcc. - * configure.in (BUILD_DLLWRAP): Add. - * configure: Regenerate. - -Tue Oct 6 18:20:10 1998 Geoffrey Noer - - * Makefile.am (windres_SOURCES): Add resres.c. - (windres_OBJECTS): Add resres.o. - * Makefile.in: regenerate with automake - - From Anders Norlander . - * resres.c: New file. Implementation of read_res_file and - write_res_file functions for windres. - * rcparse.y: Handle CONTROL's with named classes. - * resbin.c: Bug in res_to_bin_dialog and bin_to_res_dialog - when dialog is extended: The version and signature fields should - be reversed (despite what the docs say). Id is 32 bits long in - extended dialogs. - * resrc.c (write_rc_dialog): properly print controls with named - classes. - * windres.c (read_res_file, write_res_file): Remove stubs. - * resres.c (write_res): Rename RT_ACCELERATORS to RT_ACCELERATOR. - -Sun Oct 4 20:34:42 1998 Ian Lance Taylor - - From Nokubi Hirotaka : - * objcopy.1: Fix typo in --remove-leading-char docs. - * objdump.1: Fix formatting in --stabs docs. - -Sat Sep 19 23:33:56 1998 Ian Lance Taylor - - * rcparse.y (memflags_move): Correct recursion. - -1998-09-10 Ulrich Drepper - - * readelf.c (process_symbol_table): Print in histogram how many - symbols are covered by the current chain length. - -Sun Sep 6 16:15:47 1998 Nick Clifton - - * readelf.c (process_section_contents): Do not try to dump empty - sections. - -Sat Sep 5 19:17:10 1998 Mumit Khan - - * dlltool.c (scan_all_symbols): Don't re-export symbols exported - by other DLLs. - -1998-09-02 14:50 Ulrich Drepper - - * readelf.c (process_dynamic_segment): Print DT_* value only if - do_dynamic. - (do_histogram): New variable. - (options): New long option histogram. Set do_histogram if this - option is used. - (usage): Document --histogram. - (parse_args): Handle 0 return value from getopt_long. Enable - do_histogram for -a. - (process_symbol_table): Read hash table also if only do_histogram. - Add code to print hash table histogram. - -1998-08-25 16:45 Ulrich Drepper - - * readelf.c (process_dynamic_segment): Read syminfo section if - available. - (process_syminfo): New function. Print syminfo information. - (process_file): Call process_syminfo and free syminfo data at the end. - -Wed Aug 19 16:19:51 1998 Ian Lance Taylor - - * dlltool.c (usage): Add file parameter. Change all callers. - (main): Don't treat '?' as a special case in getopt return. - - * binutils.texi (dlltool): Document new options. Add some uses of - @var. - -Wed Aug 19 16:19:07 1998 Mumit Khan - - * dlltool.c (gen_def_file): Plug memory leak. Don't print - demangled name if it is NULL. - - Support for exporting all symbols to an output export def file: - * dlltool.c ({export_all_symbols, no_default_excludes, - no_default_excludes, excludes}): New file static variables. - (struct string_list): Type to hold list of symbols to exclude. - (scan_drectve_symbols): Renamed from scan_open_obj_file. - (scan_filtered_symbols): New static function. - (add_excludes): New static function. - (match_exclude): New static function. - (set_default_excludes): New static function. - (filter_symbols): New static function. - (scan_all_symbols): New static function. - (scan_open_obj_file): New static function. - (usage): Document new options. - (long_options): Add new options. - (main): Handle new options. - -1998-07-31 21:24 Ulrich Drepper - - * readelf.c (process_program_headers): Print p_offset value with - six hex digits. - (dynamic_segment_mips_val): Add support for DT_MIPS_FLAGS, - DT_MIPS_IVERSION, and DT_MIPS_TIME_STAMP. - (process_mips_specific): Also print seconds of time stamp. - -Fri Jul 31 10:04:23 1998 Catherine Moore - - * readelf.c (dump_relocations): EM_ARM uses rela relocs. - -1998-07-30 16:25 Ulrich Drepper - - * readelf.c (get_dynamic_type): Don't used gettext on the names. - Add new DT_* values from Solaris. Don't print nuemric value in - case of an unknown entry. - (process_dynamic_segment): Handle new DT_* entries. Print numeric - values in decimal, not hex. - -Fri Jul 24 16:28:57 1998 Jeff Holcomb - - * readelf.c (get_dynamic_type): Remove empty default from switch - statement. - -Fri Jul 24 16:28:12 1998 Ian Lance Taylor - - * Makefile.am (install-exec-local): Don't remove the file before - checking whether $(bindir) == $(tooldir)/bin. From Maciej - W. Rozycki . - * Makefile.in: Rebuild. - -Fri Jul 24 09:38:59 1998 Nick Clifton - - * objcopy.c: Removed spurious inclusion of elf/internal.h and - elf-bfd.h. - -1998-07-22 Ulrich Drepper - - * readelf.c: Consistantly use elf_ prefix for *_reloc_type - functions. - -Wed Jul 22 16:29:12 1998 Nick Clifton - - * readelf.c (dump_relocations): Add dumps of HPPA and ARC - relocations. - - (process_relocs): Do not abort if no string table can be found. - -1998-07-22 14:58 Ulrich Drepper - - * readelf.c: Remove definition of functions to return relocation - symbol strings. They now get implicitly defined when include the - system specific ELF header. - -1998-07-22 13:51 Ulrich Drepper - - * readelf.c: Before include system specific ELF header define - START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS. For now - used for ppc, mips, and mn10300. - -Wed Jul 22 10:26:32 1998 Nick Clifton - - * readelf.c (dump_relocations): Display number of unrecognised - relocations. - -1998-07-21 13:13 Ulrich Drepper - - * readelf.c: Use symbolic names of relocation entries for the various - architectures. Correct more layout details. - Print names of MIPS specific section types. Print Alpha, ARM, and - MIPS relocation type names. - -1998-07-20 Vladimir N. Makarov - - * objcopy.c (filter_symbols): Add code for strip all symbols case. - (copy_objects): Strip all case is now processed also through - filter_symbols. No marking symbols used in relocations when strip - all symbols case. - (copy_section): When strip all symbols case, remove relocations - which are not in keep strip specific list. - (strip_main): Remove guard `strip_specific_list == NULL' for - setting up strip all symbols by default. - -Mon Jul 20 12:51:16 1998 Andreas Schwab - - * addr2line.c (find_address_in_section): Only consider a section - if the pc value is completely contained within it. - (translate_addresses): Don't crash if functionname or filename are - null. - -1998-07-20 07:45 Ulrich Drepper - - * readelf.c (process_symbol_table): Fix little alignment problem - in printed table header. - -1998-07-20 07:14 Ulrich Drepper - - * readelf.c: Correct reading of .dynamic section. - (dynamic_section): Now a global variable. - (process_mips_fpe_exception, process_mips_specific, - process_arch_specific): New functions. - (get_file_header): Call process_arch_specific. - -1998-07-19 15:15 Ulrich Drepper - - * readelf.c: Fix several versioning related bugs. Produce nicer - output. - Add support for processor specific information on MIPS. - -Fri Jul 10 15:57:58 1998 Nick Clifton - - * readelf.c: Switch prototypes from unsigned short to unsigned - int. - -Fri Jul 10 16:17:50 1998 Ian Lance Taylor - - From Christian Holland : - * ieee.c (parse_ieee): Initialize info.global_vars and - info.global_types. - (parse_ieee_atn): Ignore register lifetime information reportedly - emitted by MRI compiler. - -Thu Jul 9 13:08:01 1998 Ian Lance Taylor - - * Makefile.am (MAINTAINERCLEANFILES): Define. - * Makefile.in: Rebuild. - -Tue Jul 7 21:48:54 1998 Jeffrey A Law (law@cygnus.com) - - * readelf.c (byte_get): Use PARAMS in prototype. - (error): Make it work with non-ANSI compilers. - (warn): Likewise. - (get_ver_flags): Don't use an ANSI prototype in the definition. - -Tue Jul 7 13:26:13 1998 Ian Lance Taylor - - * objcopy.c (filter_bytes): Set size correctly if the size of the - section is not an even multiple of the interleave. Based on patch - from Brion Stone . - -Thu Jul 2 14:01:34 1998 Klaus Kaempf - - * configure.com: Add vax/vms support. - * makefile.vms-in: Renamed from makefile.vms. Add substitutions - now done by configure.com. - -Wed Jul 1 20:43:52 1998 Ian Lance Taylor - - * stabs.c (parse_stab_range_type): Handle 4 and 8 byte signed - integers with real upper bounds. Handle a lower bound one larger - than the upper bound as a signed integer. Handle 8 byte signed - integers. - (stab_demangle_template): Optionally return the demangled name of - the template. - (stab_demangle_qualified): Treat a template name as a tagged - type. - (stab_demangle_fund_type): Likewise. - -Wed Jul 1 16:29:50 1998 Nick Clifton - - * objcopy.c: Minor formatting improvements. - * readelf.c: Minor output formatting improvement. - -Wed Jul 1 14:23:48 1998 Ian Lance Taylor - - * rclex.l: Add casts and change types to avoid warnings. - * rcparse.y: Likewise. - * resbin.c: Likewise. - * rescoff.c: Likewise. - * resrc.c: Likewise. - - * Makefile.am: Rebuild dependencies. - (HFILES): Remove readelf.h. - * Makefile.in: Rebuild. - - Based on patches from Andrew Kozin - : - * winduni.h: New file, from windres.h. - * winduni.c: New file, from windres.c. - * windres.c: Move Unicode functions into winduni.c. - * windres.h: Move Unicode declarations into winduni.h. Include - winduni.h. - (RT_ACCELERATOR): Rename from RT_ACCELERATORS to match Windows - macro. Change all uses. - (RT_PLUGPLAY, RT_VXD): Correct values. - * Makefile.am (HFILES): Add windres.h. - (CFILES): Add winduni.c. - (windres_SOURCES): Add winduni.c. - -Mon Jun 29 17:01:21 1998 Nick Clifton - - * readelf.c: Use BFD Internal and External Elf structures. - * readelf.h: Removed - no longer needed. - * Makefile.in: Remove readelf.c's dependency upon readelf.h. - -1998-06-26 Vladimir N. Makarov - - * objcopy.c (strip_main): keep_specific_list == NULL as additional - condition to set up strip all symbols by default. - (copy_archive): don't change archive when error in object files of - the archive. - -Wed Jun 24 17:53:47 1998 Ian Lance Taylor - - * stabs.c (parse_number): Sign extend negative values correctly if - bfd_vma is larger than unsigned long. - -Tue Jun 23 14:55:05 1998 Mike Stump - - * Makefile.am (install-exec-local): Don't let EXEEXT interfere - with the program transform name. - * Makefile.in: Rebuild. - -Tue Jun 23 11:08:53 1998 Nick Clifton - - * readelf.c: Rewrite to use fopen/fread ratehr than mmap. - - Add --section-headers command line switch, which is an alias for - --sections. - - Incorporate improvemnts made by Andreas Schwab - including output - formatting and version info display. - - * binutils.texi: Document --section-headers switch to readelf. - -Mon Jun 22 18:28:19 1998 Ian Lance Taylor - - * readelf.c: Include bfd.h and bucomm.h before system header - files. - (parse_args): Change type of c from char to int. - -Sun Jun 14 14:26:28 1998 Nick Clifton - - * readelf.c (usage): Write to stdout, not stderr. - -Fri Jun 12 13:33:51 1998 Tom Tromey - - * po/Make-in (all-yes): Depend on .pot file if maintainer mode - enabled. - ($(PACKAGE).pot): Unconditionally depend on POTFILES. - -Fri Jun 12 16:06:15 1998 Michael Meissner - - * readelf.c (get_ppc_rel_type): New PowerPC support. - (dump_relocations): PowerPC uses RELA relocations. - (get_machine_name): Spell PowerPC correctly. - (get_file_type): Change unsigned short parameter to unsigned. - (get_machine_name): Ditto. - (get_machine_data): Return whether big endian or little endian. - (get_machine_flags): Interpret PowerPC, M32R, and MIPS flags. - (process_elf_header): Print endian-ess. Convert all numeric - formats to long or unsigned long. Print out machine specific flag - bits. - (process_section_headers): Increase name by 3 columns and decrease - type by the same so that .gcc_except_table fits in the space. - - * readelf.h: Include elf/ppc.h, elf/mips.h, and elf/m32r.h to get - machine specific flag bits. - -Thu Jun 11 17:54:26 1998 Nick Clifton - - * readelf.c: Remove extraneous #includes. Fix warnings produced - by -Wall when compiling under Linux. - - * Makefile.am (readelf_LDADD): Add $(LIBIBERTY). - -Thu Jun 11 18:30:20 1998 Ian Lance Taylor - - * stabs.c (struct stab_handle): Add self_crossref field. - (parse_stab_string): If a tag is a cross reference to itself, - don't define it in the tags list. - (parse_stab_type): Set info->self_crossref. - - * debug.c (struct debug_type_real_list): Define. - (debug_get_real_type): Add list parameter. Change all callers. - Check for circularity to avoid crashing when it occurs. - -Thu Jun 11 14:48:32 1998 Nick Clifton - - * readelf.c: New file: Display contents of ELF format file. - * readelf.h: New file: Header file for readelf.c - * Makefile.am: Add rules to build readelf. - * Makefile.in: Rebuilt. - * binutils.texi: Document readelf. - * NEWS: Mention inclusion of readelf into binutils. - * po/POTFILES.in; Rebuilt. - -Fri Jun 5 18:43:40 1998 Ian Lance Taylor - - * objcopy.c (setup_section): Adjust the section size if copy_byte - is >= 0. - (copy_section): Do not call bfd_set_section_size. - -Thu Jun 4 09:12:27 1998 Nick Clifton - - * objcopy.c (copy_usage): Add missing \n\ from help description. - -Wed Jun 3 19:31:33 1998 Ian Lance Taylor - - * Makefile.am (YACC): Correct bison -L option. - * Makefile.in: Rebuild. - - * binutils.texi, objdump.1: Document -p/--private-headers. - -Wed Jun 3 12:09:40 1998 Nick Clifton - - * objcopy.c: Add new command line options: --change-section-lma - and --change-section-vma. Rename old command line option - --adjust-section-vma to --change-section-address. Rename - --adjust-vma to --change-addresses and --adjust-start to - --change-start. Provide aliases to support the old versions of - these command line options. - - Change the names of macros and enum elements to upper case to - match the GNU coding standard. - - Replace calls to fprintf (stderr,...) with calls to fatal () or - non_fatal () as appropriate. - - * objcopy.1: Document command line option changes. - * binutils.texi: Document command line option changes. - - * bucomm.h: New exported funtion from bucomm.c: non_fatal(). - * bucomm.c (non_fatal): New exported function. Just like fatal() - except that it returns rather than calling xexit(). - - (bfd_check_format_matches): Call fatal() rather than bfd_fatal(). - - (check_matching_formats): Fix C formating. - - (parse_vma): Call fatal(). - -Mon Jun 1 18:26:40 1998 Ian Lance Taylor - - From Yuli Barcohen : - * debug.c (debug_type_samep): Avoid endless loops comparing - function and method parameter types. - -Fri May 22 14:02:42 1998 Ian Lance Taylor - - * dlltool.c (dump_iat): Comment out; not used. - (display): Rename from tell. Change all callers. - -Thu May 14 14:00:56 1998 Nick Clifton - - * dlltool.c: Add support for Thumb DLLs. Add support for - interworking between ARM and Thumb programs and DLLs. Tidy the - code. - - * binutils.texi: Document dlltool. - - * configure: Build dlltool for thumb-pe targets. - - * version.c (print_version): Include 1998 in copyright strings. - - * stabs.c (parse_stab): Support Win32 style directory separators. - -Sun May 10 22:34:44 1998 Jeffrey A Law (law@cygnus.com) - - * po/Make-in (install-info): New target. - -Fri May 8 10:33:13 1998 Nick Clifton - - * ar.c (usage): Extend information provided about command line - options. - -Wed May 6 15:28:51 1998 Klaus Kaempf - - * makefile.vms: Run dec c with /nodebug. Pass CC value when - calling make. - -Tue May 5 15:19:00 1998 Nick Clifton - - * configure: Build dlltool for thumb-pe target. - * configure.in: Build dlltool for thumb-pe target. - -Sun May 3 22:04:49 1998 Ian Lance Taylor - - * Makefile.am (EXTRA_PROGRAMS): Change $(SRCONV_PROG) to sysconf - sysdump coffdump to avoid extra $(EXEEXT). - * Makefile.in: Rebuild. - -Wed Apr 29 22:22:55 1998 Geoffrey Noer - - * configure.in: Stop appending EXEEXT to the end of - SRCONV_PROG (wrong because that variable may contain multiple - programs) - * Makefile.am: instead, add EXEEXTs to each SRCONV_PROG - program - * Makefile.in: regenerate - * configure: regenerate - -Tue Apr 28 19:14:34 1998 Tom Tromey - - * addr2line.c (main): Conditionally call setlocale. - * windres.c (main): Likewise. - * sysdump.c (main): Likewise. - * strings.c (main): Likewise. - * srconv.c (main): Likewise. - * size.c (main): Likewise. - * objdump.c (main): Likewise. - * objcopy.c (main): Likewise. - * nm.c (main): Likewise. - * nlmconv.c (main): Likewise. - * dlltool.c (main): Likewise. - * coffdump.c (main): Likewise. - * ar.c (main): Likewise. - * bucomm.h: Include if HAVE_LOCALE_H. - (LC_MESSAGES): Now can be defined even when ENABLE_NLS. - -Tue Apr 28 10:33:07 1998 Bill Moyer - - Add support for IMPORTS: - * defparse.y (impline): Add IMPORTS syntaxes. - * dlltool.c (ifunctype, iheadtype): New typedefs. - (import_list): New static variable. - (append_import): New static function. - (def_import): Add an entry to import_list. - (generate_idata_ofile): New static function. - (gen_exp_file): Call generate_idata_ofile. - * dlltool.h (def_import): Update declaration. - -Mon Apr 27 16:39:22 1998 Ian Lance Taylor - - * configure.in: Change version number to 2.9.4 - * configure: Rebuild. - -Wed Apr 22 16:00:35 1998 Tom Tromey - - * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). - -Wed Apr 22 00:33:56 1998 Tom Tromey - - * Makefile.am (INCLUDES): Search intl dirs for headers; define - LOCALEDIR. - * addr2line.c (main): Call setlocale, bindtextdomain, textdomain. - * ar.c (main): Likewise. - * coffdump.c (main): Likewise. - * dlltool.c (main): Likewise. - * nlmconv.c (main): Likewise. - * nm.c (main): Likewise. - * objcopy.c (main): Likewise. - * objdump.c (main): Likewise. - * size.c (main): Likewise. - * srconv.c (main): Likewise. - * strings.c (main): Likewise. - * sysdump.c (main): Likewise. - * windres.c (main): Likewise. - -Tue Apr 21 22:13:08 1998 Tom Tromey - - * Many files: Added gettext invocations around user-visible - strings. - * bucomm.h: Added gettext-related includes and defines. - * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, - HAVE_LC_MESSAGES): Define. - * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and - po/Makefile. Use AM_PROG_LEX. - * Makefile.am (SUBDIRS): New macro. - (POTFILES): Likewise. - (po/POTFILES.in): New target. - (LDADD): Added INTLLIBS. - (objdump_LDADD): Likewise. - (c__filt_LDADD): Likewise. - (ar_LDADD): Likewise. - (ranlib_LDADD): Likewise. - (dlltool_LDADD): Likewise. - (windres_LDADD): Likewise. - * po/Make-in, po/POTFILES.in, po/binutils.pot: New files. - -Tue Apr 21 16:07:18 1998 Stanislav Brabec - - * objcopy.c (preserve_dates): New file static variable. - (smart_rename): If preserve_dates, call set_times when copying. - (strip_main): Remove preserve_dates local variable. - (copy_main): Likewise. - -Tue Apr 7 15:41:15 1998 Ian Lance Taylor - - * Makefile.am (DISTSTUFF): Add defparse.h, defparse.c, rclex.c, - rcparse.h, and rcparse.c - * Makefile.in: Rebuild. - -Mon Apr 6 16:24:35 1998 Ian Lance Taylor - - * Makefile.am (PROGS): Move $(ADDR2LINE_PROG) to end, so that - Makefile.in doesn't have an empty continuation line. - (bin_PROGRAMS): Likewise. - * Makefile.in: Rebuild. - -Fri Apr 3 14:48:42 1998 Ian Lance Taylor - - * Makefile.am (DISTCLEANFILES): Add site.exp and site.bak. - (MOSTLYCLEANFILES): Add binutils.log, binutils.sum, and abcdefgh*. - (mostlyclean-local): New target. - * Makefile.in: Rebuild. - -Wed Apr 1 15:54:16 1998 Ian Lance Taylor - - From Zack Weinberg and H.J. Lu - : - * ar.c (usage): Mention S modifier. - (main): Add S modifier. - * ar.1, binutils.texi: Document S modifier. - -Wed Apr 1 13:11:23 1998 Andreas Schwab - - * binutils.texi: Use @itemx for a secondary item in a table. - -Tue Mar 31 18:44:13 1998 Ian Lance Taylor - - * dep-in.sed: Add rule to remove @OBJDIR@. - * Makefile.am (dep.sed): Substitute for @OBJDIR@. - * Makefile.in: Rebuild. - -Mon Mar 30 12:47:18 1998 Ian Lance Taylor - - * configure.in: Set version to 2.9.1. - * configure: Rebuild. - - * Branched binutils 2.9. - - * Makefile.am (DISTCLEANFILES): Remove defparse.h, arparse.h, - rcparse.h, and nlmheader.h. - * Makefile.in: Rebuild. - -Sat Mar 28 17:39:27 1998 Ian Lance Taylor - - * Makefile.am (MOSTLYCLEANFILES): Define. - * Makefile.in: Rebuild. - - Fix some gcc -Wall warnings: - * nlmconv.c (main): Add casts to avoid warnings. - (alpha_mangle_relocs): Likewise. - * objdump.c (dump_section_stabs): Likewise. - * size.c (print_sysv_format): Likewise. - * srcconv.c (wr_ob): Likewise. - * wrstabs.c (stab_modify_type): Likewise. - (stab_variable): Likewise. - * nlmconv.c (main): Initialize variables to avoid warnings. - * nm.c (sort_symbols_by_size): Likewise. - * objdump.c (disassemble_bytes): Likewise. - * wrstabs.c (stab_end_class_type): Likewise. - * coffgrok.c (do_sections_p2): Change j to unsigned int. - (do_lines): Change l to unsigned int. - * nlmheader.y (yylex): Change i to unsigned int. - * nm.c (print_symbol): Change j to long. - * size.c (lprint_number): Comment out. - * srconv.c (wr_ob): Change i to bfd_size_type. - * sysdump.c (unit_info_list): Comment out. - (object_body_list, program_structure, debug_list): Likewise. - * sysinfo.y (yyerror): Return value. - -Thu Mar 26 17:06:51 1998 Richard Henderson - - * defparse.y (explist): Allow epsilon. - Suggestion from Jonathan-Harris@psion.com. - -Thu Mar 26 16:59:09 1998 Richard Henderson - - * coffgrok.c (do_sections_p1): Use the section's lma instead of vma - for the benefit of prom loaders. - -Wed Mar 25 13:05:39 1998 Ian Lance Taylor - - Based on patch from H.J. Lu : - * Makefile.am (DISTSTUFF): New variable. - (diststuff): New target. - (DISTCLEANFILES): New variable. - * Makefile.in: Rebuild. - -Tue Mar 24 19:33:08 1998 Ian Lance Taylor - - * rclex.l: Accept { and } as synonyms for BEGIN and END. - -Fri Mar 20 19:18:08 1998 Ian Lance Taylor - - * aclocal.m4, configure: Rebuild with libtool 1.2. - -Tue Feb 24 13:07:50 1998 Doug Evans - - * objdump.c (disassemble_data): Delete "++place" after call to - find_symbol_for_address. Set disasm_info.symbols to array of - symbols at the current address. - -Wed Feb 18 23:39:46 1998 Richard Henderson - - * Makefile.am (install-exec-local): Install properly when ln - fails or tooldir == prefix. - -Tue Feb 17 18:40:55 1998 Richard Henderson - - * objcopy.c (compare_section_lma): Rename from _vma. - (copy_object): Gap fill based on LMA not VMA. - * binutils.texi: Update and clarify. - * objcopy.1: Likewise. - -Tue Feb 17 20:34:11 1998 Ian Lance Taylor - - * dlltool.c (gen_exp_file): Generate _imp__%s as well as __imp_%s, - for Microsoft compatibility. - (make_one_lib_file): Likewise. - - * dlltool.c (make_one_lib_file): Don't add 1 to hint. - -Fri Feb 13 16:37:44 1998 Ian Lance Taylor - - * Makefile.am (AUTOMAKE_OPTIONS): Define. - * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. - -Thu Feb 12 14:13:46 1998 Ian Lance Taylor - - * deflex.l: Accept '?' in symbol names, for VC++ mangled names. - From Mikey . - - * addr2line.c (usage): Update bug-gnu-utils address. - * ar.c (usage): Likewise. - * nlmconv.c (show_usage): Likewise. - * nm.c (usage): Likewise. - * objcopy.c (copy_usage): Likewise. - (strip_usage): Likewise. - * objdump.c (usage): Likewise. - * size.c (usage): Likewise. - * strings.c (usage): Likewise. - * windres.c (usage): Likewise. - * binutils.texi (Bug Reporting): Likewise. - -Sat Feb 7 15:36:24 1998 Ian Lance Taylor - - * configure, aclocal.m4: Rebuild with new libtool. - -Thu Feb 5 12:21:13 1998 Ian Lance Taylor - - * configure, Makefile.in, aclocal.m4: Rebuild with new libtool. - -Fri Jan 30 19:16:28 1998 Doug Evans - - * Makefile.am (CC_FOR_TARGET,nlmcomv.o): Change program_transform_name - to transform. - * Makefile.in: Regenerate. - -Thu Jan 29 16:24:04 1998 Mumit Khan - - * dlltool.c: Define exit status macros for _WIN32 but not - __CYGWIN32__. - (gen_lib_file): Check for exit status of unlink. - * resrc.c: Define popen and pclose if _WIN32 but not - __CYGWIN32__. - -Wed Jan 28 17:45:46 1998 Ian Lance Taylor - - * configure.in: Remove vfork check. - * nlmconv.c: Never include vfork.h. - * aclocal.m4, configure, Makefile.in, config.in: Rebuild. - -Wed Jan 28 17:43:02 1998 J.J. van der Heijden - - * objcopy.c (copy_archive): Only pass one argument to mkdir if - _WIN32 but not __CYGWIN32__. - (smart_rename): Add code for _WIN32 (not __CYGWIN32__), to cope - with different rename behaviour and lack of chown. - - * configure.in: Check for mingw32 when deciding whether to build - dlltool. - * dlltool.c: Never include vfork.h. - (run): Use pexecute rather than vfork. - (gen_lib_file): Check for errors from bfd_set_archive_head and - bfd_close. Close all the BFDs in the archive before deleting the - temporary files. - -Thu Jan 22 16:22:55 1998 Fred Fish - - * objdump.c (disassemble_bytes): Add flag INSN_HAS_RELOC to tell - disassembly function there is a reloc on this line. - -Wed Jan 14 15:29:43 1998 Richard Henderson - - * srconv.c (sh, h8300): Delete variables. - (addrsize, toolname, rnames): New variables. - (writeINT): Use addrsize. - (wr_un): Use toolname. - (wr_hd): Set up addrsize et al properly for h8300[hs]. - (walk_tree_symbol): Zero dsy. Use rnames. - (wr_un, wr_hd, wr_ob, wr_du): Use proper bfd access macros. - * sysdump.c (sh, h8300): Delete variables. - (addrsize): New variable. - (getINT): Use it. - (getone): Initialize it. - (getBITS): Range check on MAX. - -Mon Dec 29 16:58:05 1997 Ian Lance Taylor - - From Matthew Bellantoni : - * ar.c (get_pos_bfd): Add default_posname parameter. Change all - callers. - (replace_members): Default to replacing in the same position. - -Mon Dec 22 11:27:22 1997 Ian Lance Taylor - - * rclex.l: Don't permit a comma in a STRING. - * rcparse.y (acc_entry): Warn if an inappropriate modifier is used - with a non VIRTKEY. - (acc_event): For a control character, set VIRTKEY, and force the - character to uppercase. - (acc_options): Don't require a comma separator. - -Tue Dec 9 13:25:42 1997 Michael Meissner - - * size.c (size_number): New function to provide size of field. - ({l,r}print_number): For octal and hex fields, print field using - '0' and '0x' suffixes. Do not include following tab. - (sysv_internal_sizer): Size section name, section size, and vma - address fields. - (sysv_internal_printer): Use calculated sizes for the columns. - (print_sysv_format): Size columns before printing. - (print_berkeley_format): Print tabs between numbers now that - {l,r}print_number doesn't. Print fields right justified. - -Mon Dec 8 11:22:04 1997 Nick Clifton - - * objdump.c (objdump_print_addr_with_sym): Remove call to - disasm_symaddr() as this function no longer exists. - -Tue Dec 2 10:23:50 1997 Nick Clifton - - * objdump.c (objdump_print_addr_with_sym): Call disasm_symaddr() - to allow backend to know which symbol has just been displayed. - -Tue Dec 2 13:06:46 1997 Ian Lance Taylor - - * windres.h (ESCAPE_*): Define standard escape sequences. - * rclex.l (handle_quotes): Handle standard escape sequences. Warn - about an unrecognized escape character. - * windres.c (unicode_print): Print standard escape sequences. - * rcparse.y (acc_event): Initialize $$.next. - * resbin.c (bin_to_res_menuitems): Don't set MENUITEM_POPUP or - MENUITEM_ENDMENU in the menu item flags. - (bin_to_res_accelerators): Allocate a structure (the old code - never worked). - (res_to_bin_accelerator): Correct the test for setting ACC_LAST. - (res_to_bin_dialog): Save the extended style rather than saving - the style twice. Remove useless shadowing length variable. Set - the length of control data correctly. - * resrc.c (write_rc_dialog): Don't print the class or menu if the - string length is zero. - -Mon Nov 24 18:52:43 1997 Andreas Schwab - - * stabs.c (parse_stab_argtypes): Don't try to parse the name of a - destructor as mangled argument types. - -Mon Nov 10 17:51:41 1997 Gavin Koch - - * addr2line.c (translate_addresses): Use bfd_scan_vma rather - than strtol to scan addresses. - -Sun Nov 9 11:01:31 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.am (bin_PROGRAMS): Don't use line continuations here. - -Tue Nov 4 11:56:14 1997 Ian Lance Taylor - - * objcopy.c (copy_section): Don't crash if there is no particular - information for a section. - -Mon Nov 3 12:36:19 1997 Ian Lance Taylor - - * objcopy.c (parse_flags): Make flag check case insensitive. - Check for `contents' flag. Give an error for unrecognized flags. - (copy_section): If the contents flag was set for a section that - had no contents, zero out the new contents. - * binutils.texi (objcopy): Document contents section flag. - -Sun Nov 2 14:49:56 1997 Ian Lance Taylor - - * objcopy.c: Move new struct and variable definitions to top of - file. Remove obsolete add_strip_symbol and is_strip_symbol - declarations. Add prototype declarations for add_specific_symbol - and is_specified_symbol. - -Mon Oct 20 15:31:43 1997 Klaus K"ampf - - * configure.com (HAVE_SBRK): Undefine. - -Tue Oct 14 16:14:35 1997 Nick Clifton - - * objdump.c (objdump_symbol_at_address): New function. Returns - true if a symbol can be found at the address passed in. - (disassemble_data): Set the symbol_at_address_func field to point - to objdump_symbol_at_address. - -Fri Oct 10 14:13:09 1997 Richard Henderson - - * objcopy.c, objcopy.1, binutils.texi: "localize" is a better name - than "privatize". Update all references. - -Thu Oct 9 15:57:29 1997 Ian Lance Taylor - - * binutils.texi (strip): Remove duplicate --target. From Marty - Leisner . - - * nm.c (lineno_cache_bfd): New file static variable. - (lineno_cache_rel_bfd): New file static variable. - (display_archive): Clear lineno_cache_bfd and lineno_cache_rel_bfd - when closing a BFD. - (display_file): Likewise. - (print_symbol): Use lineno_cache_bfd and lineno_cache_rel_bfd - instead of cache_bfd and cache_rel_bfd. Make seccount static, and - only set it when setting relocs. - -Wed Oct 8 21:19:11 1997 Richard Henderson - - * objcopy.c (keep_specific_list, privatize_specific_list, - weaken_specific_list): New variables. - (keep_symbols): Removed. - (add_specific_symbol): New function from the carcas of - add_strip_symbol. Takes a list as an argument. - (is_specified_symbol): Likewise from is_strip_symbol. - (filter_symbols): Honor the new privatize and weaken lists. - Optimize bfd_asymbol_name handling. - (copy_object, copy_options, copy_usage): Add privatize-symbol & - weaken-symbol options. - - * objcopy.1, binutils.texi: Update docs. - -Sun Oct 5 09:05:44 1997 Frank Ch. Eigler - - * objdump.c (disassemble_data): Make "--prefix-addresses" - disassembly adjust to mixed-length instructions. - (objdump_print_addr_with_sym): Add "0x" prefix for hexadecimal - symbol-offsets in disassembly. - -Fri Oct 3 12:04:25 1997 Ian Lance Taylor - - * objcopy.c (set_times): New static function, replacing - make_same_dates. - (strip_main): If preserve_dates, stat the input file before - copying it, and call set_times afterward. - (copy_main): Likewise. - - * wrstabs.c (write_stabs_in_sections_debugging_info): Cast p to - char * when calling strcpy and strlen. - -Wed Sep 24 11:34:05 1997 Ian Lance Taylor - - * binutils.texi (ar cmdline): Document that q now works like r. - From Marty Leisner . - - * binutils.texi (size): The object file argument is optional. - From Marty Leisner . - - * aclocal.m4: Rebuild with new libtool. - * configure: Rebuild. - -Tue Aug 26 17:48:34 1997 Ian Lance Taylor - - * Makefile.am (EXEEXT_FOR_BUILD): New variable. Use it in all - references to the sysinfo program. - * configure.in: Rebuild with new bfd/acinclude.m4. - * Makefile.in: Rebuild. - -Fri Aug 8 15:32:49 1997 Ian Lance Taylor - - * windres.c: Include . - (define_resource): Set a timestamp for the resource. - -Wed Aug 6 13:37:58 1997 Ian Lance Taylor - - * configure.in: Define TARGET in header file. - * acconfig.h (TARGET): Add #undef. - * Makefile.am (version.o, bucomm.o): Remove special targets. - * bucomm.c (target): Remove. - * nm.c (program_name): Don't declare. - (target): Make static. - * size.c (target): Make static. - * configure, config.in, Makefile.in: Rebuild. - -Tue Aug 5 00:01:41 1997 Ian Lance Taylor - - * Makefile.am (check-DEJAGNU): Export r. - (.dep1): Use $(INCLUDES) rather than $(ALL_CFLAGS). - * Makefile.in: Rebuild. - - * nlmheader.y: Use VERSIONK rather than VERSION. - - * Makefile.am (STRIP_PROG): Change from strip.new to strip-new. - (NM_PROG): Change from nm.new to nm-new. - (TOOL_PROGS, install-exec-local): Adjust accordingly. - * Makefile.in: Rebuild. - -Mon Aug 4 11:47:31 1997 Ian Lance Taylor - - * configure.in: Remove AC_ARG_PROGRAM; it's invoked by - AM_INIT_AUTOMAKE. - * configure: Rebuild. - - * Makefile.am (install-exec-local): Create $(tooldir)/bin before - trying to install anything into it. - * Makefile.in: Rebuild. - - * Makefile.am (TOOL_PROGS): Use an explicit $(EXEEXT). - (install-exec-local): When handling $(noinst_PROGRAMS), only use - $(EXEEXT) on the installed file. When handling $(TOOL_PROGS), - handle $(EXEEXT) correctly. - * configure.in: Add an explicit $(EXEEXT) when substituting for - the name of a program to build. - * Makefile.in, configure: Rebuild. - - * aclocal.m4, configure, Makefile.in: Rebuild with new automake - patches. - - * deflex.l, defparse.y: Use VERSIONK rather than VERSION. - * rclex.l, rcparse.y: Likewise. - * Makefile.am (windres_SOURCES): Add $(BULIBS). - * Makefile.in: Rebuild. - -Fri Aug 1 13:08:39 1997 Ian Lance Taylor - - * acinclude.m4: Include bfd/acinclude.m4, not bfd/acmacros.m4. - * aclocal.m4, configure: Rebuild with new libtool. - -Thu Jul 31 11:51:35 1997 Ian Lance Taylor - - * Makefile.am: New file, based on old Makefile.in. - * acinclude.m4: New file, from old aclocal.m4. - * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove - shared library handling; now handled by libtool. Replace - AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC, - AC_PROG_LEX, AC_DECL_YYTEST, AM_MAINTAINER_MODE, AM_CYGWIN32, and - AM_EXEEXT. Replace AC_PROG_INSTALL with AM_PROG_INSTALL. Remove - stamp-h handling in AC_OUTPUT. - * acconfig.h: Mention PACKAGE and VERSION. - * stamp-h.in: New file. - * Makefile.in: Now built with automake. - * aclocal.m4: Now built with aclocal. - * config.in, configure: Rebuild. - - From Ton van Overbeek : - * rcparse.y (dialog): Default menu and class to be named. - (styles): If FONT is seen, set DS_SETFONT in dialog style. - * resbin.c (res_to_bin_dialog): Correct computation of font - information length. - -Wed Jul 30 11:21:06 1997 Ian Lance Taylor - - From Ton van Overbeek : - * resbin.c (res_to_bin_menu): Correct computation of menu - vs. menuex length. - * resrc.c (define_stringtable): Add 1 to resource ID. - -Tue Jul 29 11:06:03 1997 Ian Lance Taylor - - * resbin.c (bin_to_res_string): Correct adjustment of data and - length. From Ton van Overbeek . - -Tue Jul 22 18:01:23 1997 Ian Lance Taylor - - * nlmconv.c (link_inputs): Call libiberty pexecute function. - (pexecute) [multiple versions]: Remove. - -Tue Jul 22 16:19:34 1997 Robert Hoehne - - * bucomm.c (make_tempname): If we might be using a DOS filesystem, - check for a backslash as well as a slash. - -Thu Jun 26 13:53:17 1997 Ian Lance Taylor - - * windres.c (main): Quit if we didn't get any resources. - (usage): Fix --yydebug usage message. - * rescoff.c (write_coff_file): Don't free the relocation array - until after we've closed the BFD. - (read_coff_rsrc): Quit rather than try to read standard input. - (write_coff_file): Quit rather than try to write to standard - output. - * rcparse.y: Add a couple of missing semicolons (accepted by bison - but not byacc). - * binutils.texi: Document windres. - -Wed Jun 25 20:57:06 1997 Ian Lance Taylor - - * resbin.c: New file. - * rclex.l, rcparse.y, rescoff.c, resrc.c, windres.c, windres.h: - Numerous fixes and improvements. - * Makefile.in: Rebuild dependencies. - (CFILES): Add resbin.c. - (WINDRES_OBJS): Add resbin.o. - -Sun Jun 22 17:29:41 1997 Ian Lance Taylor - - First stab at Windows resource compiler: - * windres.h: New file. - * windres.c: New file. - * resrc.c: New file. - * rcparse.y: New file. - * rclex.l: New file. - * rescoff.c: New file. - * configure.in: Define and substitute BUILD_WINDRES. - * configure: Rebuild. - * Makefile.in: Rebuild dependencies. - (WINDRES_PROG): New variable. - (PROGS): Add @BUILD_WINDRES@. - (HFILES): Add dlltool.h and windres.h. - (CFILES): Add windres.c and resrc.c. - (GENERATED_CFILES): Add rcparse.c and rclex.c. - (WINDRES_OBJS): New variable. - $(WINDRES_PROG): New target. - (rcparse.c, rcparse.h, rclex.c): New targets. - -Thu Jun 12 12:27:51 1997 Ian Lance Taylor - - * dlltool.c (export_type): Add data field. - (def_exports): Add data parameter. Change all callers. - (dump_def_info): Print data field. - (gen_def_file): Likewise. - (make_one_lib_file): Handle data field by not emitting simple - label and not emitting anything in SEC_TEXT. - (dtab): Print data field. - (process_duplicates): Merge data field. - * dlltool.h (def_exports): Update declaration. - * defparse.y (expline): Accept opt_DATA. Pass it to def_exports. - (opt_DATA): New non-terminal. - -Wed Jun 11 17:15:47 1997 Ian Lance Taylor - - * dlltool.h: New file. - * deflex.l: Include dlltool.h and libiberty.h. Don't declare - strdup. Use xstrdup rather than strdup. - * defparse.y: Include bfd.h, bucomm.h, and dlltool.h. - * dlltool.c: Include dlltool.h and time.h. Make a lot of - variables and functions static. Make a lot of char * variables - and parameters const. Add declarations for static functions. Do - some reindenting. Hide more PowerPC stuff inside DLLTOOL_PPC. - -Wed Jun 11 12:05:52 1997 H.J. Lu - - * ar.c (bfd_special_undocumented_glue): Add const. - -Mon May 12 22:09:35 1997 Bob Manson - - * Makefile.in (check): Pass CC_FOR_TARGET and CFLAGS_FOR_TARGET - to runtest. - -Mon May 12 13:14:22 1997 Ian Lance Taylor - - * configure.in: Don't clear OPCODES when --enable-commonbfdlib is - used on HP/UX. - * configure: Rebuild. - -Fri Apr 25 14:22:08 1997 H.J. Lu - - * Makefile.in (maintainer-clean realclean): Change *.info* - to binutils.info* to save sysroff.info. - -Tue Apr 15 13:42:22 1997 Ian Lance Taylor - - * Makefile.in (INSTALL): Set to @INSTALL@. - (INSTALL_XFORM, INSTALL_XFORM1): Remove. - (install): Depend upon installdirs. Use $(program_transform_name) - directly, rather than using $(INSTALL_XFORM) and - $(INSTALL_XFORM1). - (installdirs): New target. - (install-info): Run mkinstalldirs. - -Mon Apr 14 11:52:39 1997 Ian Lance Taylor - - * Makefile.in (INSTALL): Change install.sh to install-sh. - - From Thomas Graichen : - * Makefile.in: Always use $(SHELL) when running move-if-change. - * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub. - * configure: Rebuild. - -Fri Apr 4 13:28:02 1997 Ian Lance Taylor - - * configure.in: Add AC_FUNC_ALLOCA. - * configure, config.in: Rebuild. - * bucomm.h: Add alloca handling, copied from gas/as.h. - * dlltool.c: Add #pragma alloca for AIX to start of file. - * nlmconv.c: Likewise. - - * Makefile.in (distclean): Remove site.exp and site.bak. Remove - everything that clean removes. - -Thu Apr 3 13:18:39 1997 Ian Lance Taylor - - * Makefile.in (VERSION): Set to 2.8.1. - - * Branched binutils 2.8. - -Tue Apr 1 16:21:44 1997 Klaus Kaempf - - * configure.com: New file. - * config.h-vms: Remove file. - * makefile.vms: Update for new configure scheme. - -Mon Mar 31 15:30:43 1997 Philippe De Muyter - - * objcopy.c (make_same_dates): Use statbuf, not buf, if not - HAVE_GOOD_UTIME_H. - -Fri Mar 28 17:57:53 1997 Alan Modra - - * Makefile.in ($(OBJDUMP_PROG)): Don't link against BFDLIB twice. - * configure.in: Add AC_ARG_ENABLE for commonbfdlib. If it is set, - set OPCODES to empty. - * configure: Rebuild. - -Thu Mar 27 16:03:02 1997 Ian Lance Taylor - - Based on patch from Marty Leisner : - * objcopy.c: Include or . - (strip_options): Add "preserve-dates". - (copy_options): Likewise. - (copy_usage): Mention -p and --preserve-dates. - (strip_usage): Likewise. - (make_same_dates): New static function. - (strip_main): Handle -p. - (copy_main): Likewise. - * binutils.texi, strip.1, objcopy.1: Document new option. - - addr2line.c contributed by Ulrich Lauther - : - * addr2line.c: New file. - * Makefile.in: Rebuild dependencies. - (ADDR2LINE_PROG): New variable. - (MANPAGES): Add addr2line. - (PROGS): Add $(ADDR2LINE_PROG). - (CFILES): Add addr2line.c. - ($(ADDR2LINE_PROG)): New target. - * binutils.texi: Document addr2line. - * addr2line.1: New file. - - * version.c (print_version): Update copyright date. - -Mon Mar 24 10:52:45 1997 Andreas Schwab - - * objdump.c (disassemble_data): Don't exit if a file cannot be - disassembled, instead just return. - -Thu Mar 20 21:16:51 1997 Jeffrey A Law (law@cygnus.com) - - * size.c (usage): Make definition match its prototype. - (display_bfd, lprint_number, rprint_number): Likewise. - (print_berkeley_format, sysv_internal_printer): Likewise. - (print_sysv_format): Likewise. - * nm.c (set_print_radix, set_output_format): Likewise. - * objcopy.c (filter_bytes): Likewise. - -Tue Mar 18 16:39:55 1997 H.J. Lu - - * Many files: Add function prototypes. - * ar.c (mri_emul, get_pos_bfd): Make static. - * arlex.l: Include "libiberty.h". Don't declare strdup. Use - xstrdup rather than strdup. - * arparse.y (yyerror): Make argument const. Correct typo. - * arsup.c (strdup): Don't declare. - (ar_save): Use xstrdup rather than strdup. - * filemode.c: Include "bucomm.h". - * nm.c (usage): Make static. - (print_symname): Make format and name const. - * objcopy.c (cat): Remove. - (copy_archive): Make output_target const. Use concat, not cat. - (copy_file, simple_copy, smart_rename): Make arguments const. - * objdump.c (read_section_stabs): Likewise. - (print_section_stabs): Likewise. - (display_target_tables): Don't declare getenv. - * strings.c (strings_object_file): Change file to const. - (print_strings): Change filename to const. - * Makefile.in: Rebuild dependencies. - -Tue Mar 18 11:37:24 1997 Ian Lance Taylor - - * configure.in: Add BFD_NEED_DECLARATION(getenv). - * acconfig.h: Add NEED_DECLARATION_GETENV. - * bucomm.h (getenv): Declare if NEED_DECLARATION_GETENV. - * configure, config.in: Rebuild. - * nlmconv.c (getenv): Don't declare. - - * Makefile.in: Rebuild dependencies. - -Sat Mar 15 15:35:56 1997 Ian Lance Taylor - - Based on patches from Jamie Lokier : - * objdump.c: Include "demangle.h". - (do_demangle): New static variable. - (usage): Mention -C/--demangle. - (long_options): Add "demangle". - (objdump_print_symname): New static function. - (objdump_print_addr_with_sym): Use objdump_print_symname. - (disassemble_bytes): Likewise. - (dump_reloc_set): Likewise. - (dump_symbols): Demangle symbol name. - (main): Handle -C. - * binutils.texi, objdump.1: Document -C/--demangle. - - * objdump.c (usage): Mention --no-show-raw-insn. - (long_options): Add "no-show-raw-insn". - (disassemble_bytes): Handle --no-show-raw-insn. - * binutils.texi, objdump.1: Document --no-show-raw-insn. - -Wed Mar 12 11:42:00 1997 Andreas Schwab - - * rddbg.c (free_saved_stabs): Set the strings to NULL after being - freed. - -Fri Feb 28 17:18:45 1997 Ian Lance Taylor - - * bucomm.c (set_default_bfd_target): New function. - * bucomm.h (set_default_bfd_target): Declare. - * ar.c (main): Call set_default_bfd_target. - * nlmconv.c (main): Likewise. - * nm.c (main): Likewise. - * objcopy.c (main): Likewise. - * objdump.c (main): Likewise. - * size.c (main): Likewise. - * strings.c (main): Likewise. - * Makefile.in (bucomm.o): New target, to define TARGET. - -Tue Feb 25 21:28:38 1997 Ian Lance Taylor - - * objdump.c (adjust_section_vma): New static variable. - (usage): Mention --adjust-section-vma. - (OPTION_ADJUST_VMA): Define. - (long_options): Add "addjust-vma". - (display_bfd): If adjust_section_vma is not 0, add it to all the - section addresses. - (main): Handle OPTION_ADJUST_VMA. - * binutils.texi, objdump.1: Document --adjust-vma. - -Fri Feb 14 18:46:47 1997 Ian Lance Taylor - - * nm.c (print_symbol): Cache the BFD as well as the symbols and - relocs, and don't try to use the symbols or relocs with a - different BFD. - -Thu Feb 13 21:34:43 1997 Klaus Kaempf (kkaempf@progis.de) - - * config.h-vms: sbrk() is provided on openVMS/Alpha. - * makefile.vms: allow compiling with current gcc snapshot. - -Thu Feb 13 20:14:40 1997 Ian Lance Taylor - - * arsup.c, coffgrok.c, dlltool.c, nlmconv.c: Use xmalloc rather - than malloc. - -Wed Feb 12 16:12:02 1997 Ian Lance Taylor - - * objdump.c (disassemble_data): Correct VMA argument to - find_symbol_for_address. Improve handling of code with no symbol - followed by code with a symbol. - -Wed Feb 12 12:16:47 1997 Andreas Schwab - - * objdump.c (disassemble_bytes): Make output of raw instructions - work better for non-standard values of bytes_per_chunk and - bytes_per_line. - -Thu Feb 6 14:14:59 1997 Martin M. Hunt - - * objdump.c (disassemble_bytes): Added code to allow some control - over the way raw instructions are displayed. - -Thu Feb 6 12:36:03 1997 Ian Lance Taylor - - * stabs.c (struct bincl_file): Add next_stack field. - (push_bincl): Put the new file on both bincl_list and - bincl_stack. Clear the file_types field. - (pop_bincl): Use the next_stack field when popping the stack. - Don't put the file on bincl_list. - (find_excl): Include the file name when warning about an unfound - N_EXCL. - - * debug.c (debug_type_samep): Don't crash if we are passed NULL. - -Thu Feb 6 11:54:24 1997 Alan Modra - - * objcopy.1: Add missing space after .B. - -Fri Jan 31 10:33:07 1997 Andreas Schwab - - * objdump.c (disassemble_data): Initialize `aux.require_sec'. - -Wed Jan 29 13:21:21 1997 Ian Lance Taylor - - * objdump.c (objdump_print_value): Add skip_zeroes parameter. - Change all callers. - (objdump_print_addr_with_sym): Likewise. Call objdump_print_value - to print address. - (objdump_print_addr): New static function. - (objdump_print_address): Just call objdump_print_addr. - (disassemble_bytes): Print real address, not function offset. - Skip a certain number of leading zeroes. - - * objdump.c (disassemble_zeroes): New static variable. - (usage): Mention --disassemble-zeroes. - (long_options): Add "disassemble-zeroes". - (disassemble_bytes): Check disassemble_zeroes. - -Tue Jan 28 16:47:26 1997 Ian Lance Taylor - - * objdump.c (disassemble_bytes): Don't skip zeroes if the - disassembler has told us that we are in a branch delay slot. - -Mon Jan 20 14:24:04 1997 Ian Lance Taylor - - * size.c (berkeley_sum): Rewrite. Skip sections which are not - SEC_ALLOC. Count SEC_READONLY sections as text. - -Tue Jan 14 15:14:14 1997 Ian Lance Taylor - - * Makefile.in (maintainer-clean realclean): Remove *.info*, not - just *.info. From H.J. Lu . - -Tue Dec 31 15:42:54 1996 Ian Lance Taylor - - * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE. - -Fri Dec 27 11:19:26 1996 Ian Lance Taylor - - * configure.in: Work around bug in AC_FUNC_VFORK in autoconf 2.12. - * configure: Rebuild. - -Thu Dec 19 13:11:20 1996 Ian Lance Taylor - - Based on patch from Andrew J Klossner : - * objcopy.c (OPTION_WEAKEN): Define. - (copy_options): Add "weaken". - (copy_usage): Mention --weaken. - (weaken): New static variable. - (filter_symbols): Handle weaken. - (copy_object): Call filter_symbols if weaken. - (copy_main): Handle OPTION_WEAKEN. - * binutils.texi, objcopy.1: Document --weaken. - -Wed Dec 18 22:49:13 1996 Stan Shebs - - * mpw-make.sed: Use NewFolderRecursive for installation. - -Sat Dec 7 10:17:25 1996 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (install): Add "else true" clause to cater to - broken "make" on some systems. - -Fri Dec 6 17:21:41 1996 Ian Lance Taylor - - * ieee.c (parse_ieee_bb): Always initialize namcopy to avoid gcc - warning about uninitialized variable. - (ieee_read_cxx_class): Likewise, for pf. - (ieee_enum_type): Likewise, for i. - -Tue Nov 26 17:01:25 1996 Ian Lance Taylor - - * wrstabs.c (stab_array_type): Add casts when printing - bfd_signed_vma values. - - * configure: Rebuild with autoconf 2.12. - -Mon Nov 25 16:53:18 1996 Ian Lance Taylor - - * objdump.c (disassemble_data): Don't crash if there is no - symbol. - -Fri Nov 22 17:29:14 1996 Andreas Schwab - - * ar.c (open_inarch): Don't call bfd_openr with a null name. - -Fri Nov 1 12:08:13 1996 Ian Lance Taylor - - * binutils.texi: Add section on reporting bugs. - -Thu Oct 31 18:20:53 1996 Ian Lance Taylor - - * stabs.c (struct stab_handle): Add bincl_list field. - (parse_stab): Pass value to push_bincl. Call find_excl for - N_EXCL. - (struct bincl_file): Add hash, file and file_types fields. - (push_bincl): Add hash parameter. Save it in the new hash field. - Save the file number in the new file field. - (pop_bincl): Put the bincl_file on bincl_list, rather than freeing - it. Save the file types in the new file_types field. - (find_excl): New static function. - - * ieee.c (ieee_lineno): Don't compare line number addresses to - info->highaddr (undo part of October 28 patch). - -Tue Oct 29 16:40:22 1996 Ian Lance Taylor - - * objdump.c (objdump_print_value): Don't print the empty string - for zero. - -Mon Oct 28 16:58:14 1996 Ian Lance Taylor - - * stabs.c (struct stab_handle): Add function_end field. - (start_stab): Initialize function_end. - (finish_stab): Pass info->function_end to debug_end_function. - (parse_stab): If info->function_end is set, use it as the address - which ends a function. - - * ieee.c (ieee_array_type): Remember the correct size. - - * ieee.c (ieee_finish_compilation_unit): Permit coalescing ranges - that are up to 0x1000 bytes apart, not just 64. - (ieee_add_bb11_blocks): Don't bother to emit a BB11 that is less - than 0x100 bytes. - (ieee_lineno): Only emit line numbers that are less than - info->highaddr. - -Fri Oct 25 12:12:17 1996 Ian Lance Taylor - - * ieee.c (struct ieee_defined_enum): Add defined field. - (ieee_enum_type): If the enum tag has been seen before but not - defined, reuse the same type index, and define it. - (ieee_tag_type): If this enum has not been defined, add an - undefined entry to the list of enums. - - * objdump.c (disassemble_bytes): Let the disassembler override the - number of bytes printed on a line. - -Thu Oct 24 16:42:10 1996 Ian Lance Taylor - - * objdump.c (prefix_addresses): New static variable. - (long_options): Add "prefix-addresses". - (compare_symbols): Sort BSF_FUNCTION symbols before other - symbols. - (find_symbol_for_address): New static function, broken out of - objdump_print_address. - (objdump_print_addr_with_sym): New static function, broken out of - objdump_print_address. - (objdump_print_address): Call new functions. - (disassemble_bytes): New static function, broken out of - disassemble_data. Change disassembly format, unless - prefix_addresses is set. - (disassemble_data): Call disassemble_bytes. Unless - prefix_addresses is set, disassemble in chunks headed by a - symbol. - * binutils.texi, objdump.1: Document --prefix-addresses. - - * rddbg.c (read_section_stabs_debugging_info): Preserve the - backslash when concatenating multiple stabs strings. - -Thu Oct 10 11:36:31 1996 Doug Evans - - * dlltool.c (scan_open_obj_file): Fix loop exit test. - Add missing parameter to def_exports. - -Tue Oct 8 12:06:17 1996 Ian Lance Taylor - - * Makefile.in (LEX_OPTIONS): Set to empty string. -I -Cem is the - default for flex, and is not recognized by lex. - -Thu Oct 3 17:41:23 1996 Ian Lance Taylor - - * binutils.texi (Target Selection): Document that you can now - specify targets using configuration triplets. - - * ar.c (usage): Declare. Make sure all callers pass an argument. - -Thu Oct 3 15:39:42 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) - - * Makefile.in (clean): Remove config.log. - -Wed Oct 2 15:49:16 1996 Klaus Kaempf - - * makefile.vms: Bump version date. - -Tue Oct 1 15:00:59 1996 Ian Lance Taylor - - * version.c (print_version): New function. - * bucomm.h (print_version): Declare. - * ar.c (program_version): Don't declare. - (do_show_version): Remove. - (usage): Add help parameter. Print bug report address. - (main): Set is_ranlib at start. Check for --help and --version. - Call print_version, not do_show_version. - * nlmconv.c (program_version): Don't declare. - (main): Call print_version. - (show_usage): Print bug report address. - * nm.c (program_version, print_version): Don't declare. - (usage): Print bug report address. - (main): Call print_version. - * objcopy.c (program_version): Don't declare. - (copy_usage): Print bug report address. - (strip_usage): Likewise. - (strip_main): Call print_version. - (copy_main): Likewise. - * objdump.c (program_version): Don't declare. - (usage): Print bug report address. - (main): Call print_version. - * size.c (program_version): Don't declare. - (usage): Print bug report address. - (main): Call print_version. - * strings.c (program_version): Don't declare. - (main): Call print_version. - (usage): Print bug report address. - * Makefile.in: Update dependencies. - -Thu Sep 19 14:53:15 1996 Ian Lance Taylor - - * ieee.c: Revert Monday's reflocalp patch, and apply this patch - instead: - (write_ieee_debugging_info): Write a dummy type at the end of the - global type block. - -Mon Sep 16 15:30:54 1996 Ian Lance Taylor - - * ieee.c (struct ieee_write_type): Add reflocalp field. - (ieee_pointer_type): Set reflocalp after pushing type. - (ieee_function_type): If reflocalp is set, make this type local. - (ieee_range_type, ieee_array_type, ieee_set_type): Likewise. - (ieee_const_type, ieee_volatile_type): Likewise. - (ieee_struct_field, ieee_class_baseclass): Likewise. - - * ieee.c (struct ieee_info): Add global_types field. - (parse_ieee_bb): When starting a BB1, initialize the types field - to the global_types field. - (parse_ieee_be): When ending a BB2, copy the types field to the - global_types field. - -Fri Sep 13 17:32:21 1996 Ian Lance Taylor - - * objcopy.c (change_leading_char): New static variable. - (OPTION_CHANGE_LEADING_CHAR): Define. - (copy_options): Add "change-leading-char". - (copy_usage): Mention --change-leading-char. - (filter_symbols): Add obfd parameter. Change all callers. - Implement change_leading_char. - (copy_object): Call filter_symbols if change_leading_char. - (copy_main): Handle OPTION_CHANGE_LEADING_CHAR. - * binutils.texi, objcopy.1: Document --change-leading-char. - -Tue Sep 3 14:05:29 1996 Ian Lance Taylor - - * ieee.c (ieee_enum_type): Don't check index into a NULL names - array. - * nm.c (sort_symbols_by_size): Always initialize next. - * rdcoff.c (parse_coff_type): Warn about an incomprehensible - type rather than crashing. - * rddbg.c (read_symbol_stabs_debugging_info): Initialize f. - * stabs.c (parse_stab_members): Set context in all cases. - -Thu Aug 29 16:56:52 1996 Michael Meissner - - * configure.in (i[345]86-*-*): Recognize i686 for pentium pro. - * configure: Regenerate. - -Thu Aug 29 11:29:20 1996 Ian Lance Taylor - - * objdump.c (L_tmpnam): Never define. - (display_target_list): Use choose_temp_base instead of tmpnam. - (display_info_table): Likewise. - -Tue Aug 27 18:15:01 1996 Ian Lance Taylor - - * stabs.c (parse_stab): An N_FUN symbol with an empty string - indicates the end of a function. - -Thu Aug 22 17:08:00 1996 Ian Lance Taylor - - * wrstabs.c (struct string_hash_entry): Add next field. - (struct stab_write_handle): Change strings to a pointer to - string_hash_entry. Add last_strings field. Remove strings_alloc - field. - (string_hash_newfunc): Initialize next field. - (stab_write_symbol): Copy string into hash table rather than into - buffer. Keep a list of hash table entries. - (write_stabs_in_sections_debugging_info): Initialize last_string. - Copy strings from list of hash table entries in memory. - (stab_modify_type): If the entry on the stack is a definition, - make a new definition rather than failing an assert. - (stab_array_type): The size is only zero if high is strictly less - than low. - - * ieee.c (struct ieee_info): Add saw_filename field. - (parse_ieee): Initialize saw_filename. - (parse_ieee_bb): Set saw_filename for a BB1 or BB2. In a BB1, - discard the current variables and types. In a BB10, if no - filename has been seen, call debug_set_filename. - (parse_ieee_ty): In case 'g', the type is optional. - - * prdbg.c (pr_fix_visibility): Don't abort on - DEBUG_VISIBILITY_IGNORE. - - * debug.c (debug_name_type): Correct error message. - - * configure.in: Substitute HLDENV. - * configure: Rebuild. - * Makefile.in (HLDENV): New variable. Use it whenever linking a - program. - -Thu Aug 15 19:30:41 1996 Stan Shebs - - * mpw-make.sed: Add symbolic doublequotes around the version - number. - -Thu Aug 8 12:27:52 1996 Klaus Kaempf - - * makefile.vms: Add better support for DEC C compilation. - Add new macros as in Makefile.in. - -Wed Aug 7 14:27:33 1996 Philippe De Muyter - - * configure.in: Call BFD_NEED_DECLARATION on strstr and sbrk. - * acconfig.h (NEED_DECLARATION_STRSTR): New macro. - (NEED_DECLARATION_SBRK): New macro. - * configure, config.in: Rebuild. - * bucomm.h (strstr): Declare if NEED_DECLARATION_STRSTR. - (sbrk): Declare if HAVE_SBRK and NEED_DECLARATION_SBRK. - - * prdbg.c (pr_end_struct_type): Avoid using a string constant in - assert, for the benefit of broken assert macros. - -Fri Jul 26 14:06:50 1996 Ian Lance Taylor - - * objdump.c (disassemble_data): Set disasm_info.flavour from - abfd. - -Tue Jul 23 13:59:54 1996 Ian Lance Taylor - - * dlltool.c (secdata): In non DLLTOOL_PPC case, change alignment - of .text section to 2. - -Mon Jul 22 08:46:15 1996 Stu Grossman (grossman@lisa.cygnus.com) - - * objdump.c (dump_section_stabs): Fix test for stabs sections - ending with numbers. This fixes a problem with .stab being - confused with .stab.index. - -Wed Jul 10 13:32:28 1996 Ian Lance Taylor - - * stabs.c (stab_demangle_fund_type): Return a void * for a - template, rather than simply aborting. - -Mon Jul 8 15:28:05 1996 Ian Lance Taylor - - * ar.c (open_inarch): Add file parameter. Change all callers. If - this is a newly created archive, set the target based on the - file. - * arsup.h (open_inarch): Update declaration. - -Thu Jul 4 12:00:55 1996 Ian Lance Taylor - - * Makefile.in (VERSION): Set to cygnus-2.7.1. - - * Released binutils 2.7. - - * rdcoff.c (parse_coff): Get address to pass to debug_end_function - from function size, not value of .ef symbol. From Ning - Mosberger-Tang . - -Sat Jun 29 21:18:09 1996 Ian Lance Taylor - - * objcopy.c (strip_main): Add -o option, and handle it. - (strip_usage): Mention -o. - * binutils.texi, strip.1: Mention -o. - -Mon Jun 24 17:19:02 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) - - * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir, - INSTALL_PROGRAM, INSTALL_DATA): Use autoconf set values. - (docdir): Removed. - * configure.in (AC_PREREQ): Autoconf 2.5 or higher. - -Mon Jun 24 11:59:13 1996 Ian Lance Taylor - - * objdump.c (endian): New static variable. - (usage): Mention -EB/-EL/--endian. - (long_options): Add "endian". - (disassemble_data): If endianness was specified, replace - abfd->xvec with a copy of itself with the given endianness. - (main): Handle -EB/-EL/--endian. - * binutils.texi, objdump.1: Mention -EB/-EL/--endian. - - * objdump.c: Make most variables and functions static. - - * configure.in: On alpha*-*-osf*, link against libbfd.a if not - using shared libraries. - * configure: Rebuild with autoconf 2.10. - -Sun Jun 23 14:47:36 1996 Kim Knuttila - - * dlltool.c (secdata): Changed .rdata to .reldata so .reloc will work. - (make_one_lib_file): Removed cruft. (#if 1) - -Wed Jun 19 14:46:38 1996 Ian Lance Taylor - - * objdump.c (stabs): Change from struct internal_nlist * to - bfd_byte *. - (print_section_stabs): Fetch stabs information directly, rather - than assuming that struct internal_nlist is the right size. - - * binutils.texi: Document change to binary format: file position - based on load address, not section VMA. - - * bucomm.h: Define SEEK_SET, SEEK_CUR, and SEEK_END if they are - not already defined. - -Tue Jun 18 18:25:00 1996 Ian Lance Taylor - - * Makefile.in (DISTSTUFF): Add deflex.c. - -Tue Jun 18 15:03:44 1996 Klaus Kaempf - - * config.h-vms, makefile.vms: New files. - -Mon Jun 17 09:47:31 1996 Ian Lance Taylor - - * dlltool.c (make_one_lib_file): Use BFD_RELOC_RVA rather than - BFD_RELOC_32 in IDATA7. - -Wed Jun 12 11:52:06 1996 Ian Lance Taylor - - * nm.c (struct get_relocs_info): Define. - (line_numbers): New static variable. - (long_options): Add "line-numbers". - (usage): Mention -l and --line-numbers. - (main): Handle -l. - (print_symbol): Print line numbers if requested. - (get_relocs): New static function. - * binutils.texi, nm.1: Document -l/--line-numbers. - -Tue Jun 11 20:12:15 1996 Ian Lance Taylor - - * objdump.c (dump_reloc_set): Add sec parameter. Change all - callers. If with_line_numbers is set, display line numbers of - relocation entries. - * binutils.texi, objdump.1: Document -l with -r. - -Mon Jun 10 23:42:59 1996 Ian Lance Taylor - - * ar.c (open_inarch): Report BFD error message if an archive can - not be recognized. List matching formats if the file is - ambiguously recognized. - (ranlib_touch): Likewise. - -Thu Jun 6 13:56:14 1996 Ian Lance Taylor - - * README: Add notes on how to build if you don't have ar. - - * Makefile.in: Remove old incorrect setting of CC. - -Tue Jun 4 10:52:49 1996 Tom Tromey - - * Makefile.in (install): Don't check to see if tooldir exists. - Make $(tooldir) and $(tooldir)/bin. - -Mon Jun 3 17:40:23 1996 Michael Meissner - - * strings.c (main): Make main an int function, not void. - -Fri May 31 13:59:24 1996 Ian Lance Taylor - - * nm.c (filter_symbols): Check for BSF_WEAK as well as - BSF_GLOBAL. - * objcopy.c (filter_symbols): Likewise. - -Wed May 8 16:57:20 1996 Ian Lance Taylor - - * objcopy.c (copy_object): Make clear that it is only a warning - when the output file can not represent the architecture. - -Fri May 3 11:30:17 1996 Ian Lance Taylor - - * objdump.c (disassemble_data): Don't refer to bytes past the end - of data. - -Wed Apr 24 14:10:21 1996 Ian Lance Taylor - - * rddbg.c (read_symbol_stabs_debugging_info): Move call to - free_saved_stabs outside the loop over the symbols. - -Tue Apr 23 12:56:11 1996 Ian Lance Taylor - - * objdump.c (compare_symbols): Sort symbols whose names start with - `.' after other symbols. If no other decision can be made, sort - symbols by name. - -Thu Apr 18 16:02:11 1996 Ian Lance Taylor - - * dep-in.sed: Substitute $(BFDDIR) for @BFDDIR@. - * Makefile.in: Rebuild dependencies. - (dep.sed): Substitute $(BFDDIR) for @BFDDIR@. - -Tue Apr 16 13:50:22 1996 Ian Lance Taylor - - * rdcoff.c: New file. - * rddbg.c (read_debugging_info): Read COFF symbols if COFF flavour - and no stabs were found. - * budbg.h (parse_coff): Declare. - * Makefile.in: Rebuild dependencies. - (CFILES): Add rdcoff.c. - (DEBUG_OBJS): Add rdcoff.o. - -Mon Apr 15 15:55:01 1996 Doug Evans - - * nlmconv.c (choose_temp_base{,_try}): Delete, in libiberty now. - (link_inputs): Update call to choose_temp_base. - -Mon Apr 8 14:40:05 1996 Ian Lance Taylor - - * configure.in: Permit --enable-shared to specify a list of - directories. - * configure: Rebuild. - -Fri Mar 29 16:11:33 1996 Ian Lance Taylor - - * objdump.c (dump_section_header): Print the SEC_LINK_ONCE flag - and the SEC_LINK_DUPLICATES field. - -Fri Mar 29 11:35:55 1996 J.T. Conklin (jtc@lisa.cygnus.com) - - * nlmconv.1: Changed to be recognized by catman -w on Solaris. - -Thu Mar 28 14:17:02 1996 Ian Lance Taylor - - * wrstabs.c (stab_enum_type): Set buf before using it. - -Fri Mar 22 15:49:08 1996 Ian Lance Taylor - - * stabs.c (struct stab_handle): Add field abfd. - (start_stab): Add abfd parameter. - (parse_stab_string): Skip the symbol leading char when searching - for the value of a global symbol. - * budbg.h (start_stab): Update declaration. - * rddbg.c (read_section_stabs_debugging_info): Pass abfd to - start_stab. - (read_symbol_stabs_debugging_info): Likewise. - -Thu Mar 21 12:40:48 1996 Ian Lance Taylor - - * wrstabs.c (stab_function_type): Output an empty typedef for an - unused argument, rather than making up a meaningless name. - (stab_variable): Use N_RSYM for a DEBUG_REGISTER variable. - - * ieee.c (struct ieee_info): Add global_vars field. - (parse_ieee_be): When ending the global typedef block, copy the - variables into info->global_vars. - (parse_ieee_atn): Don't require an NN record for a pmisc ATN. - (ieee_read_reference): Search the global variables after the local - variables. - -Wed Mar 20 18:08:19 1996 Andreas Schwab - - * objdump.c (disassemble_data): Make sure sym_name is always set. - (dump_section_header): Always put a space after the section name. - (dump_bfd_header): Terminate output with newline. - -Wed Mar 20 16:35:20 1996 Ian Lance Taylor - - * wrstabs.c: New file. - * budbg.h (write_stabs_in_sections_debugging_info): Declare. - * objcopy.c (write_debugging_info): For COFF or ELF, output stabs - in sections. - * Makefile.in: Rebuild dependencies. - (CFILES): Add wrstabs.c. - (WRITE_DEBUG_OBJS): New variable. - ($(OBJCOPY_PROG)): Use $(WRITE_DEBUG_OBJS), not $(DEBUG_OBJS). - ($(STRIP_PROG)): Likewise. - - * stabs.c (parse_stab_members): Make type stub detection more like - gdb. - - * ieee.c (struct ieee_handle): Add fields complex_float_index and - complex_double_index. - (ieee_complex_type): Cache type index in complex_float_index and - complex_double_index, depending upon size. Set size on type stack - to size * 2. - - * ieee.c (ieee_empty_type): Use builtin_unknown, not 0. - (ieee_void_type): Use builtin_void, not 1. - - * ieee.c (parse_ieee_ty): Handle 'V' type code. - (parse_ieee_atn): Don't require two numbers for type 10. - - * ieee.c (parse_ieee_be): Add one to offset at end of function or - block. - - * ieee.c (struct ieee_block): Add field skip. - (parse_ieee_bb): Don't call debug_record_function for __XRYCPP - function, and set skip field. - (parse_ieee_be): Don't call debug_end_function if skip is set. - - * debug.c (struct debug_handle): Add fields current_write_lineno - and current_write_lineno_index. - (debug_write): Initialize current_write_lineno and - current_write_lineno_index for each unit. Call - debug_write_linenos rather than writing out the line numbers - directly. - (debug_write_function): Call debug_write_linenos. - (debug_write_block): Likewise. - (debug_write_linenos): New static function. - - * debug.c (debug_write_type): For DEBUG_KIND_FUNCTION, push return - type before arguments. - -Mon Mar 18 18:05:33 1996 Ian Lance Taylor - - * configure.in: Add AC_FUNC_VFORK. - * configure, config.in: Rebuild. - * dlltool.c, nlmconv.c: Include if HAVE_VFORK_H is - defined. - - * stabs.c (parse_stab_range_type): A complex type is defined as a - subrange of itself with the high bound zero. - * ieee.c (ieee_complex_type): Don't crash on sizes of 12 or 16. - -Tue Mar 12 12:09:43 1996 Ian Lance Taylor - - * ieee.c (ieee_write_undefined_tag): Switch to global_types even - if it is not empty. - (ieee_tag_type): For an enum, look through info->enums. - - * configure: Rebuild with autoconf 2.8. - - * debug.c (debug_type_samep): Don't loop endlessly in - DEBUG_KIND_ENUM case. From Eric Baur . - -Mon Mar 11 12:35:03 1996 Ian Lance Taylor - - * rddbg.c (read_section_stabs_debugging_info): Call save_stab for - each stab entry, call stab_context on an error, and call - free_saved_stabs before rturning. - (read_symbol_stabs_debugging_info): Likewise. - (SAVE_STABS_COUNT): Define. - (struct saved_stab): Define. - (saved_stabs, saved_stabs_index): New static variables. - (save_stab, stab_context, free_saved_stabs): New static functios. - - * objdump.c (stab_name): Remove. - (struct stab_print): Remove. - (stab_print): Remove. - (dump_stabs): Don't initialize stab_name. - (print_section_stabs): Call bfd_get_stab_name rather than using - the stab_name array. - -Tue Feb 27 19:52:01 1996 Ian Lance Taylor - - * prdbg.c (pr_int_constant): Initialize info correctly. - (pr_float_constant): Likewise. - -Mon Feb 26 18:11:37 1996 Stan Shebs - - * mpw-make.sed: Update to handle shared library support. - -Sat Feb 24 11:21:49 1996 Alan Modra : - - * Makefile.in ($(OBJDUMP_PROG)): Search $(BFDLIB) before - $(OPCODES). - -Thu Feb 15 12:44:45 1996 Ian Lance Taylor - - * configure.in: Don't tamper with LDFLAGS. Call AC_PROG_CC before - configure.host. - * configure: Rebuild. - - * configure.in: Substitute RPATH_ENVVAR. - * configure: Rebuild. - * Makefile.in (RPATH_ENVVAR): New variable. - (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH. - - * objcopy.c (smart_rename): Rather than doing chmod then chown, do - chmod without setuid, then chown, then chmod with setuid. - -Wed Feb 14 16:46:42 1996 Martin Anantharaman - - * arsup.c (map_over_list): Reindent. Don't assume that the - function does not delete the BFD. - (ar_addlib_doer): Don't set prev->next if prev is NULL. - -Wed Feb 14 15:12:17 1996 Ian Lance Taylor - - * ieee.c (ieee_regno_to_genreg): Convert register numbers for m68k - and i960. - (ieee_genreg_to_regno): Likewise. - -Mon Feb 12 14:19:59 1996 Ian Lance Taylor - - * ieee.c: Extensive changes to write code to put types in the - global type block when possible, to output ranges for all memory - occupied by the module, and to improve efficiency. - - * debug.c (struct debug_handle): Remove class_mark field. Add - id_list and compare_list fields. - (struct debug_class_id): Define. - (struct debug_type_compare_list): Define. - (debug_write): Initialize info->id_list - (debug_write_name): Remove reference to info->class_mark. - (debug_write_type): Get id for all structs and classes. Simplify - test for whether struct has already been written. - (debug_write_class_type): Get id for all classes. Simplify test - for whether class has already been written. - (debug_write_block): Don't write out blocks other than the top - level block if they have no local variables. - (debug_set_class_id): New static function. - (debug_type_samep): New static function. - (debug_class_type_samep): New static function. - * prdbg.c (pr_start_struct_type): Always print id. - (pr_start_class_type): Likewise. - (pr_tag_type): Likewise. - - * stabs.c (struct stab_handle): Add syms and symcount fields. - (start_stab): Add syms and symcount parameters. Change all - callers. - (parse_stab_string): Look up global variables in the symbol table - to get the right value. - * budbg.h (start_stab): Update declaration. - * rddbg.c (read_section_stabs_debugging_info): Add syms and - symcount parameters. Change all callers. - - * stabs.c (parse_stab_array_type): If the index type is 0, use - int. - -Wed Feb 7 14:17:45 1996 Ian Lance Taylor - - * ieee.c (ieee_start_compilation_unit): Clear modified and - modified_alloc fields of info. - - * configure.in: Check for --enable-shared. Substitute new - variables BFDLIB and OPCODES. - * configure: Rebuild. - * Makefile.in (BFDLIB): Set to @BFDLIB@. - (OPCODES): Set to @OPCODES@. - -Mon Feb 5 16:18:42 1996 Ian Lance Taylor - - Support for building bfd and opcodes as shared libraries, based on - patches from Alan Modra : - * configure.in (HLDFLAGS): New substitution. - * configure: Rebuild. - * Makefile.in (HLDFLAGS): New variable. Make all links use - $(HLDFLAGS) before $(CFLAGS) and $(LDFLAGS). - (BFDLIB_DEP): New variable. Replace all occurrences of $(BFD) as - a dependency with $(BFDLIB_DEP). Remove $(BFD) as a dependency if - there is also a dependency on $(ADDL_DEPS). - (BFDLIB): Rename from BFD; change all uses; set to -L../bfd -lbfd. - (OPCODES_DEP): New variable. Replace all occurrends of $(OPCODES) - as a dependency with $(OPCODES_DEP). - (OPCODES): Set to -L../opcodes -lopcodes. - (ADDL_DEPS): New variable. Replace all occurrences of - $(ADDL_LIBS) as a dependency with $(ADDL_DEPS). - (check): Set LD_LIBRARY_PATH in the environment. - (config.status): Depend upon BFD configure.host and config.bfd. - -Fri Feb 2 17:02:59 1996 Doug Evans - - * objdump.c: #include stdarg.h or varargs.h. - (objdump_print_value): Change FILE* arg to struct disassemble_info*. - All callers updated. Use fprintf_func. - (objdump_print_address): Consistently use fprintf_func. - (objdump_sprintf): New function. - (disassemble_data): Print insn into a buffer, print raw insn ourselves, - then print insn mnemonic. - -Fri Feb 2 16:48:55 1996 Ian Lance Taylor - - * configure: Regenerate. - -Thu Feb 1 09:38:18 1996 Steve Chamberlain - - * configure.in (i[3-6]86-*-win32): Becomes i[3-6]86-*-cygwin32. - (powerpc*-*-cygwin32): New. - * configure: Regenerated. - -Wed Jan 31 13:22:03 1996 Richard Henderson - - * Makefile.in (distclean): Remove $(DEMANGLER_PROG).1. - -Mon Jan 29 17:36:29 1996 Ian Lance Taylor - - Based on patches from H J Lu : - * objcopy.c (remove_leading_char): New static variable. - (OPTION_REMOVE_LEADING_CHAR): Define. - (copy_usage): Mention --remove-leading-char. - (filter_symbols): If remove_leading_char, and the first character - of a global symbol matches the symbol leading char of the BFD, - remove the first character. - (copy_object): Filter the symbols if remove_leading_char is set. - (copy_main): Handle --remove-leading-char. - * binutils.texi, objcopy.1: Document --remove-leading-char. - -Sat Jan 27 15:40:13 1996 Michael Meissner - - * objdump.c (fprintf): Add prototype to avoid compiler warning on - SunOS. - -Fri Jan 26 11:53:42 1996 Ian Lance Taylor - - * binutils.texi (nm): Improve documentation on symbol types. - (objdump): Reference the stabs manual from the discussion of the - --stabs option. - -Thu Jan 25 11:21:46 1996 Raymond Jou - - * mpw-make.sed: Add a "stamps" target. - -Thu Jan 25 13:51:44 1996 Ian Lance Taylor - - * objdump.c (dump_headers, dump_section_header): Change objdump -h - output to be simpler and to include section file offsets. - -Wed Jan 24 12:06:05 1996 Ian Lance Taylor - - * stabs.c (parse_stab_members): Don't adjust voffset. - - * ieee.c (ieee_read_cxx_class): Don't multiply voffset by 4. - (struct ieee_write_type): Add name field. - (struct ieee_type_class): Remove name field. Change all uses to - use new name field in type instead. - (struct ieee_name_type): Likewise. - (ieee_start_struct_type): Initialize name field of type. - (ieee_start_class_type): Don't initialize classdef entry of tag. - (ieee_class_method_var): Don't adjust voffset. - (ieee_end_class_type): Likewise. - (ieee_tag_type): Initialize new name field of type. - (ieee_typdef): Set name after copying in type information. - - * debug.c (VOFFSET_STATIC_METHOD): Define as -1, not 1. - - * ieee.c (struct ieee_modified_type): Define. - (struct ieee_handle): Add modified and modified_alloc fields. - (ieee_get_modified_info): New static function. - (ieee_pointer_type): Cache type index. - (ieee_const_type): Likewise. - (ieee_volatile_type): Likewise. - - * ieee.c (ieee_define_named_type): When creating a tag for an - anonymous struct, copy the name into memory. - (ieee_tag_type): Likewise. - * debug.c (debug_write_type): Only check and set id field for an - unnamed object. - (debug_write_class_type): Likewise. - - * ieee.c: Various changes to write out types for functions and - references, and to not write out unnecessary function types. - - * ieee.c (struct ieee_var): Remove variable field. Add kind - field, and define some enum constants for it. - (parse_ieee_ty): Set kind field of variable for 'x' and 'X' types. - (parse_ieee_atn): Make an indirect slot for an external variable, - although we otherwise don't record it. Set kind field rather than - variable field of pvar. - (ieee_read_cxx_class): Try to get the type of a static member. - (ieee_read_reference): Check kind field rather than variable - field. - -Tue Jan 23 15:54:18 1996 Ian Lance Taylor - - * ieee.c: Various changes to handle reading C++ reference type - information. - - * debug.h (enum debug_var_kind): Add DEBUG_VAR_ILLEGAL. - (enum debug_parm_kind): Add DEBUG_PARM_ILLEGAL. - * debug.c (debug_get_parameter_types): Handle DEBUG_KIND_FUNCTION. - - * ieee.c: Various changes to write out definitions of C++ classes. - - * debug.c (debug_append_filename): Remove. - * debug.h (debug_append_filename): Don't declare. - - * stabs.c (struct stab_handle): Remove last_type field. Add - so_string and so_value fields. - (finish_stab): Call stab_emit_pending_vars before calling - debug_end_function. Don't warn about pending variables. - (parse_stab): Accumulate N_SO strings until a non N_SO symbol is - seen, rather than calling debug_append_filename. Call - stab_emit_pending_vars before calling debug_end_function. Don't - set info->last_type. - -Tue Jan 23 09:53:54 1996 Doug Evans - - * objdump.c (disassemble_data): Handle unknown endianness. - Pass fprintf to INIT_DISASSEMBLE_INFO. - -Mon Jan 22 16:46:43 1996 Doug Evans - - Add new option --show-raw-insn. - * objdump.c (show_raw_insn): New global. - (usage): Update. - (long_options): Update. - (disassemble_data): Set disasm_info.flags if --show-raw-insn. - - * objdump.c (disassemble_data): Set new arch,mach,endian fields in - disasm_info. - -Mon Jan 22 19:29:36 1996 Ian Lance Taylor - - * ieee.c: Extensive changes to pass a single info argument around - in the reading routines, rather than several arguments. Add code - to read C++ debugging records. - - * debug.h (debug_get_type_size): Declare. - (debug_get_field_name): Declare. - (debug_get_field_bitpos): Declare. - (debug_get_field_bitsize): Declare. - (debug_get_field_visibility): Declare. - (debug_get_field_physname): Declare. - * debug.c (debug_get_real_type): Handle DEBUG_KIND_TAGGED. - (debug_get_type_size): New function. - (debug_get_field_name): New function. - (debug_get_field_bitpos): New function. - (debug_get_field_bitsize): New function. - (debug_get_field_visibility): New function. - (debug_get_field_physname): New function. - (debug_write_type): Make sure we pass the real kind, not INDIRECT, - to tag_type. Pass the name recursively for INDIRECT. - -Fri Jan 19 12:31:57 1996 Ian Lance Taylor - - * debug.h (struct debug_write_fns): Remove ellipsis_type. Add int - and boolean parameters to function_type. Add boolean parameter to - method_type. - (debug_make_ellipsis_type): Don't declare. - (debug_make_function_type): Add debug_type * and boolean - parameters. Change all callers. - (debug_make_method_type): Add boolean parameter. Change all - callers. - (debug_get_parameter_types): Add boolean * parameter. Change all - callers. - (debug_get_target_type): Declare. - * debug.c (struct debug_function_type): Add fields arg_types and - varargs. - (struct debug_method_type): Add field varargs. - (debug_ellipsis_type, ELLIPSIS_P): Remove. - (debug_make_ellipsis_type): Remove. - (debug_make_function_type): Add arg_types and varargs parameters. - (debug_make_method_type): Add varargs parameter. - (debug_get_parameter_types): Add pvarargs parameter. - (debug_get_target_type): New function. - (debug_write_type): In case DEBUG_KIND_FUNCTION, push argument - types and pass count to function_type. In DEBUG_KIND_METHOD, use - a signed int for the count, don't call ellipsis_type, and pass - varargs to method_type. - * stabs.c (struct stab_demangle_info): Add varargs field. - (stab_demangle_argtypes): Add pvarargs parameter. Change all - callers. - (stab_demangle_args): Likewise. - (stab_demangle_type): In case 'F', pick up argument types. - * prdbg.c (pr_ellipsis_type): Remove. - (pr_function_type): Add argcount and varargs parameters. - (pr_method_type): Add varargs parameter. - * ieee.c (ieee_ellipsis_type): Remove. - (ieee_function_type): Add argcount and varargs parameters. - (ieee_method_type): Add varargs parameter. Remove most of - function body, and just call ieee_function_type. - - * stabs.c: Include "demangle.h". Added several new static - functions not listed below to demangle argument types; they are - all called via stab_demangle_argtypes. - (finish_stab): If the kind of an undefined tag is - DEBUG_KIND_ILLEGAL, use DEBUG_KIND_STRUCT instead. Warn if there - are any pending variable. - (parse_stab): Don't close the function when the block depth goes - to zero. Pass value to debug_end_function. - (parse_stab_string): In case 'T', pass the name to - parse_stab_type. - (parse_stab_type): In case 'x', use stab_find_tagged_type. In - case '#', handle functions with variable numbers of arguments. - (parse_stab_struct_type): Add tagname parameter. Change all - callers. - (parse_stab_members): Add tagname and typenums parameters. Change - all callers. If the type of a method is a stub, call - parse_stab_argtypes to demangle the argument types and get the - physical name of the function. - (parse_stab_argtypes): New static function. - (stab_record_variable): For a DEBUG_GLOBAL or DEBUG_STATIC - variable, call debug_record_variable immediately. - (stab_find_tagged_type): New static function. - - * debug.h (enum debug_type_kind): Add DEBUG_KIND_ILLEGAL. - (struct debug_write_fns): Add field ellipsis_type. Add id - parameter to start_struct_type, start_class_type, and tag_type. - (debug_make_ellipsis_type): Declare. - (debug_find_named_type): Declare. - (debug_get_type_kind): Declare. - (debug_get_return_type): Declare. - (debug_get_parameter_types): Declare. - (debug_get_fields): Declare. - (debug_get_field_type): Declare. - * debug.c (struct debug_handle): Add fields class_id and base_id. - (struct debug_class_type): Add field id. - (struct debug_method_variant): Rename argtypes to physname. - Change all uses. - (debug_ellipsis_type): New static variable. - (ELLIPSIS_P): New macro. - (debug_make_ellipsis_type): New function. - (debug_make_method_variant): Rename argtypes to physname. - (debug_make_static_method_variant): Likewise. - (debug_name_type): Always put types in the global namespace. - (debug_find_named_type): New function. - (debug_find_tagged_type): Treat DEBUG_KIND_ILLEGAL specially, - rather than DEBUG_KIND_VOID. - (debug_get_real_type): New static function. - (debug_get_type_kind): New function. - (debug_get_return_type): New function. - (debug_get_parameter_types): New function. - (debug_get_fields): New function. - (debug_get_field_type): New function. - (debug_write): Initialize base_id. - (debug_write_type): Pass new id argument to tag_type. Handle - DEBUG_KIND_ILLEGAL. Use id for DEBUG_KIND_STRUCT and - DEBUG_KIND_UNION. Handle ellipsis for method arguments. - (debug_write_class_type): Don't dereference kclass if it is NULL. - Use id. - * prdbg.c (pr_fns): Add pr_ellipsis_type. - (pr_ellipsis_type): New static function. - (pr_pointer_type): If this is a pointer to an array, parenthesize - it correctly. - (pr_start_struct_type): Add id parameter. - (pr_start_class_type): Likewise. - (pr_tag_type): Likewise. - (pr_fix_visibility): Add the visibility to the top of the stack, - not the second element on the stack. - (pr_struct_field): Pop the stack before calling pr_fix_visibility. - (pr_class_static_member): Likewise. - (pr_class_start_method): Don't push a type, just set the method - name in the type on the top of the stack. - (pr_class_end_method): Don't pop the stack. - (pr_class_method_variant): Rename argtypes parameter to physname. - Append const and volatile rather than prepending them. Add a - space after the physname. - (pr_class_static_method_variant): Likewise. - * ieee.c (ieee_fns): Add ieee_ellipsis_type. - (ieee_define_named_type): Use DEBUG_KIND_ILLEGAL rather than - DEBUG_KIND_VOID. - (write_ieee_debugging_info): Likewise. - (ieee_typdef): Likewise. - (ieee_ellipsis_type): New static function. - (ieee_start_struct_type): Add id parameter. - (ieee_start_class_type): Likewise. - (ieee_tag_type): Likewise. - (ieee_class_method_variant): Rename name to physname. - (ieee_class_static_method_variant): Likewise. - - * Makefile.in (DEBUG_OBJS): Remove prdbg.o. - ($(OBJDUMP_PROG)): Depend upon, and link against, prdbg.o. - -Thu Jan 18 17:35:06 1996 Kim Knuttila - - * dlltool.c (make_tail): Changed the order of the sections to avoid - an alignment problem. - -Wed Jan 17 14:23:00 1996 J.T. Conklin - - * srconv.c (wr_du): Set du.stackfrmt to 0. - (wr_un, wr_sc): Emit all sections, even those with 0 size. - -Tue Jan 16 16:15:49 1996 J.T. Conklin - - * srconv.c (wr_hd): Space size within segment was being - stored in segment identifier field. - -Tue Jan 16 12:07:25 1996 Stan Shebs - - * mpw-config.in (BUILD_NLMCONV, BUILD_SRCONV, SYSINFO_PROG, - BUILD_DLLTOOL): Put definitions for these into makefile when - configuring, instead of always clearing in mpw-make.sed. - * mpw-make.sed: Edit out any host_alias or target_alias settings, - fix pathname to BFD internal include files, remove dependency - calculation rules. - -Thu Jan 11 17:31:38 1996 Michael Meissner - - * objdump.c (dump_section_header): Add new section flags - SEC_{EXCLUDE,SORT_ENTRIES}. - -Thu Jan 11 11:45:34 1996 Ian Lance Taylor - - * objcopy.c (filter_symbols): NULL terminate the output symbols. - (copy_object): Allocate space for a possible extra NULL pointer. - - * debug.c (debug_make_undefined_tagged_type): Make sure we are - given a kind of type we can handle. - (debug_write_type): Handle undefined enums and structs. - (debug_write_class_type): Handle undefined classes. - * prdbg.c (pr_enum_type): Handle an undefined enum. - * ieee.c (ieee_enum_type): Likewise. - -Wed Jan 10 15:33:18 1996 Ian Lance Taylor - - * Makefile.in: Updated dependencies. - (ALLOCA, MALLOC): Remove variables. - (ADDL_LIBS): Remove $(MALLOC) from definition. - * alloca.c, gmalloc.c: Remove. - -Mon Jan 8 18:02:29 1996 Ian Lance Taylor - - * ieee.c: Add global function write_ieee_debugging_info and a - bunch of static functions and structs used to write out IEEE - debugging information. - * budbg.h (write_ieee_debugging_info): Declare. - - * ieee.c (struct ieee_type): Add pslot field. - (enum builtin_types): Define. - (ieee_builtin_type): For a pointer, return a pointer to the named - type. Use enum values rather than numbers. - (ieee_alloc_type): New static function. - (ieee_read_type_index): Use ieee_alloc_type. - (parse_ieee_bb): Likewise. - (parse_ieee_ty): Likewise. Use ieee_builtin_type for array range, - rather than making a new integer type. Store the new type in the - slot, if there is one. - (parse_ieee_atn): Treat ATN10 as defining a register variable. - (ieee_regno_to_genreg): Rename from ieee_regno_to_gen. Change all - callers. - (ieee_genreg_to_regno): New static function. - - * stabs.c (parse_stab_type): Add new typename parameter. Change - all callers. - (parse_stab_range_type): Add new typename parameter. Change all - callers. - - * debug.h (struct debug_write_fns): Add tag parameter to - enum_type, start_struct_type, and start_class_type. - * debug.c (debug_write_type): Pass any tag name to - start_struct_type, debug_write_class_type, and enum_type. If - DEBUG_KIND_TAGGED, pass the name in the recursive call. - (debug_write_class_type): Accept a new tag parameter, and pass it - to start_class_type. - * prdbg.c (pop_type): Don't remove '+' character. - (pr_enum_type): Accept and use tag parameter. - (pr_start_struct_type): Likewise. - (pr_start_class_type): Likewise. - (pr_class_baseclass): Adjust algorithm used to find where to put - the baseclass name. - (pr_tag): Don't bother to insert the tag name. - - * objcopy.c: Include budbg.h. - (convert_debugging): New static variable. - (OPTION_DEBUGGING): Define. - (copy_options): Add "debugging". - (copy_usage): Mention --debugging. - (is_strip_section): Skip debugging sections if convert_debugging. - (setup_section, copy_section): Likewise. - (filter_symbols): Skip debugging symbols if convert_debugging. - (copy_object): If convert_debugging, read and write debugging - information. - (write_debugging_info): New static function. - (copy_main): Handle --debugging. - * Makefile.in (DEBUG_OBJS): New variable. - ($(OBJCOPY_PROG)): Depend upon and link against $(DEBUG_OBJS). - ($(STRIP_PROG)): Likewise. - (OBJDUMP_OBJS): Remove variable. - ($(OBJDUMP_PROG)): Use objdump.o $(DEBUG_OBJS) rather than - $(OBJDUMP_OBJS). - * binutils.texi, objcopy.1: Document --debugging. - -Thu Jan 4 16:31:21 1996 Ian Lance Taylor - - * ieee.c: New file with code to read IEEE debugging information. - * budbg.h (parse_ieee): Declare. - * rddbg.c (read_debugging_info): Handle IEEE flavour files. - (read_ieee_debugging_info): New static function. - * Makefile.in: Rebuild dependencies. - (CFILES): Add ieee.c. - (OBJDUMP_OBJS): Add ieee.o. - - * bucomm.h (xrealloc): Change type of first parameter from char * - to PTR. - -Tue Jan 2 17:44:07 1996 Ian Lance Taylor - - * Makefile.in: Add targets to automatically rebuild dependencies. - Remove targets which just listed dependencies of .o files. - (DEP): New variable. - (HFILES, GENERATED_HFILES): New variables. - (CFILES, GENERATED_CFILES): New variables. - (underscore.c): Don't do anything, just depend upon stamp-under. - (stamp-under): New target; do what underscore.c used to do. - (nlmconv.o): Depend upon sym.h and ecoff.h. - (.dep, .dep1, dep.sed, dep, dep-in): New targets. - (stage1, stage2, stage3, against, comparison): Remove. - (de-stage1, de-stage2, de-stage3): Remove. - (clean, distclean): Remove stamp-under and dep.sed. - * dep-in.sed: New file. - - Implement generic debugging support. Implement a stabs reader and - a generic printer. - * budbg.h, debug.c, debug.h, prdbg.c, rddbg.c, stabs.c: New files. - * objdump.c: Include "debug.h" and "budbg.h". - (dump_debugging): New global variable. - (usage): Mention --debugging. - (long_options): Add "debugging". - (display_bfd): Handle --debugging. - * Makefile.in (OBJDUMP_OBJS): New variable. - ($(OBJDUMP_PROG)): Use $(OBJDUMP_OBJS). - * binutils.texi, objdump.1: Document --debugging. - -Sat Dec 30 09:59:51 1995 Jeffrey A Law (law@cygnus.com) - - * nm.c ( long_options): Add "--defined-only" option. - (usage): Update for new "--defined-only" option. - (filter_symbols): Handle "--defined-only". - -Fri Dec 29 16:04:56 1995 Ian Lance Taylor - - * arparse.y: Include "bucomm.h", not . - * nlmheader.y: Don't include "sysdep.h". - -Tue Dec 26 18:23:18 1995 Ian Lance Taylor - - * nm.c (print_symdef_entry): Check return value of - bfd_get_elt_at_index. - -Sat Dec 23 11:03:16 1995 Michael Meissner - - * configure.in (DLLTOOL_DEFS): Build dlltool for PowerPC if target - is powerpc*-*-win* in addition to powerpc*-*-*pe*. - -Fri Dec 15 16:30:57 1995 Ian Lance Taylor - - * objdump.c (endian_string): New static function. - (display_target_list): Use it. - * nlmconv.c (main): Use new bfd_big_endian macro. - -Fri Dec 15 07:51:34 1995 steve chamberlain - - * dlltool.c (fill_ordinals): Start from 1 if no other instructions - given. - -Tue Dec 12 12:05:21 1995 Ian Lance Taylor - - * Makefile.in (clean): Remove $(DEMANGLER_PROG).1. From Ronald - F. Guilmette . - -Mon Dec 11 14:33:05 1995 Stan Shebs - - * mac-binutils.r: Fix copyright and version strings. - - * Makefile.in (version): Remove, no longer used. - -Fri Dec 1 14:41:56 1995 Stan Shebs - - * mpw-make.sed (install, install-only): Edit in Mac-specific - install procedure. - -Thu Nov 30 20:26:02 1995 Kim Knuttila - - * dlltool.c (ppc_jtab): The binary glue for PowerPC dll linkage, - including the return instruction. - sinfo: added a preferred alignment field. - (secdata): section data for the PowerPC version. - (make_one_lib_file): More symbols, More sections (pdata, rdata) - (make_tail): Use idata$6 instead of idata$7 for ppc. Also added a - NULL idata$3 descriptor (temporary). - -Tue Nov 28 17:23:44 1995 Doug Evans - - * dlltool.c (fill_ordinals): Don't reference d_export_vec if - there are no exported functions. - -Mon Nov 27 13:05:59 1995 Ian Lance Taylor - - * configure: Regenerate with autoconf 2.7. - -Wed Nov 22 13:17:15 1995 Ian Lance Taylor - - * dlltool.c (fill_ordinals): Start assigning ordinals at 1. - - * Makefile.in (EXPECT): Use $$r, not $${rootme}. - (check): Set r, not rootme. - -Tue Nov 21 18:04:09 1995 Ian Lance Taylor - - * configure.in: Use BFD_NEED_DECLARATION. - * acconfig.h: Put NEED_DECLARATION_FPRINTF in @TOP@ section. - * configure, config.in: Rebuild with autoconf 2.6. - -Fri Nov 17 10:34:37 1995 Ian Lance Taylor - - * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not - $(host_canonical) and $(target_canonical). - -Thu Nov 16 03:39:20 1995 Ken Raeburn - - Version 2.6 released. - * Makefile.in (VERSION): Update to 2.6. - -Wed Nov 15 12:14:17 1995 Ian Lance Taylor - - * Makefile.in (CC_FOR_TARGET): Define. - (check): Pass CC and CFLAGS to runtest. - - * nm.c (display_rel_file): Don't require a DYNAMIC object when - dumping the dynamic symbol table. - - * objdump.c (compare_symbols): Sort global symbols before local - symbols before debugging symbols. - (objdump_print_address): Don't futz around looking for a global - symbol with the same value. - -Tue Nov 14 17:19:11 1995 Ian Lance Taylor - - * dlltool.c: Use FOPEN_* macros rather than "r" or "w". - - * dlltool.c (fill_ordinals): Correct memset call. - -Sun Nov 12 12:56:05 1995 Stan Shebs - - * mpw-make.sed (DEMANGLER_PROG): Edit out attempts to do anything - with the man page. - -Fri Nov 10 11:41:22 1995 Ian Lance Taylor - - * objcopy.c (setup_section): Copy the section lma independently of - the vma. - -Wed Nov 8 11:33:00 1995 Ian Lance Taylor - - * arsup.c (ar_open): Cast malloc return value. - -Tue Nov 7 09:01:26 1995 Kim Knuttila - - * configure.in, configure (DLLTOOL_DEFS): Added ppc target. - * dlltool.c (MPPC): Added basic PPC definitions. - -Tue Nov 7 14:02:57 1995 Ian Lance Taylor - - * configure.in: Don't treat rs6000-*-lynx* specially. - * configure: Rebuild. - * config/rslynx: Remove. - * Makefile.in: Remove @target_makefile_fragment@. - -Mon Nov 6 15:00:50 1995 Ian Lance Taylor - - * bucomm.h: Include . - * ar.c: Don't include or . - * bucomm.c, dlltool.c, nlmconv.c, objcopy.c, objdump.c: Likewise. - -Fri Nov 3 12:38:09 1995 Ian Lance Taylor - - * objdump.c: Include . - - Permit user to override DEMANGLER_PROG from command line. From - Manfred Hollstein . - * Makefile.in ($(DEMANGLER_PROG)): Depend upon - $(DEMANGLER_PROG).1. - (install): Don't depend upon $(DEMANGLER_PROG).1. Only install - $(DEMANGLER_PROG).1 if $(DEMANGLER_PROG) is not empty. - -Wed Nov 1 15:04:57 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 - - * Makefile.in (syslex.o): add -I$(srcdir) if compiling in a - separate directory. - -Mon Oct 30 14:24:18 1995 Ian Lance Taylor - - * objdump.c (objdump_print_value): New static function. - (objdump_print_address): Use it. If we need the right section for - the symbol, and we can't find it, print an offset from the section - rather than using a symbol from some other section. - -Thu Oct 26 10:23:14 1995 steve chamberlain - - * dlltool.c (no_idata4, no_idata5): New. - (arm_jtab): Use correct encoding of jump instruction. - (usage, main, make_head, make_tail): Act on no_idata4, no_idata5. - -Wed Oct 25 12:10:07 1995 Stan Shebs - - * mpw-make.sed: Edit paths to generated y.tab.[ch] files. - -Fri Oct 20 18:40:34 1995 Ian Lance Taylor - - * binutils.texi: Change --with-targets to --enable-targets. - -Thu Oct 19 17:47:41 1995 Fred Fish - - * Makefile.in: Remove extraneous tab on otherwise empty line, - which confuses many non-GNU versions of "make". - -Wed Oct 18 16:31:58 1995 steve chamberlain - - * dlltool.c (i386_jtab, arm_jtab): New - (gen_lib_file): Rewritten to use bfd. - -Fri Oct 13 16:10:07 1995 Michael Meissner - - * Makefile.in (install): Don't give error message if dlltool - wasn't built. - -Fri Oct 13 11:04:37 1995 steve chamberlain - - * deflex.l: Allow quoting of IDs. - * defparse.y (%union): string deleted. - (command): DESCRIPTION takes ID. - * dlltool.c (gen_def_file): Quote outgoing name if - necessary. Preserve NONAME. - (gen_lib_file): Run ranlib. - (workout_prefix): Deleted. - (main, usage, long_options): Add --as, --ranlib, --ar options. - -Wed Oct 11 13:36:13 1995 steve chamberlain - - * dlltool.c (mtable): HOW_ALIGN_LONG, new. - (d_ord): Deleted. - (d_low_ord, d_high_ord, d_named_funcs): New. - (gen_exp_file): Create noname entries correctly. - (gen_lib_file): Dump exports alphabetically. - (process_duplicates): Count nonamed functions. - (fill_ordinals): Keep track of highest ord too. - (mangle_defs): Create alphabetically ordered list of names. - -Tue Oct 10 09:39:09 1995 steve chamberlain - - * Makefile.in (TOOL_PROGS): Include DLLTOOL_PROG. - -Mon Oct 9 13:06:31 1995 steve chamberlain - - * dlltool.c (add_underscore): New. - (xlate): Use new name. - (main, usage): Update. - -Fri Oct 6 14:08:51 1995 Ken Raeburn - - * sysinfo.y: Eliminate unused terminals "[" and "]" and unused - nonterminal "name". One s/r conflict remains. - - Mon Sep 25 22:49:32 1995 Andreas Schwab - - * nm.c (print_symname): Don't try to demangle an empty - name. - * objdump.c (slurp_symtab): Reset symcount if there are - no symbols. - (slurp_dynamic_symtab): Likewise, for dynsymcount. - (disassemble_data): Fix memory leak: free sorted_syms when done. - (display_bfd): Likewise, for syms and dynsyms. - (dump_relocs): Don't print header before possibly generating an - error message. - (dump_dynamic_relocs): Likewise. - - * ar.1, nm.1, objdump.1, size.1, strings.1, strip.1: Fix typos and - formatting bugs. - -Fri Oct 6 12:00:25 1995 Ian Lance Taylor - - * ar.c (do_quick_append): Comment out. - (replace_members): Add quick argument. - (main): Don't call do_quick_append. - (open_inarch): Don't call quick_append to create an empty archive. - Instead call bfd_openw/bfd_set_format/bfd_close. - -Thu Oct 5 20:53:08 1995 Ken Raeburn - - * bucomm.c: Always include time.h. - -Thu Oct 5 17:25:21 1995 Ian Lance Taylor - - * objdump.c (compare_symbols): Sort gnu_compiled and gcc2_compiled - symbols after other symbols with the same value. Likewise for - symbols which look like file names. - (objdump_print_address): Always chose the first reasonable symbol - with a given value. - -Tue Oct 3 22:38:55 1995 Ian Lance Taylor - - * arsup.c (ar_save): Use rename, not unlink/link/unlink. - -Mon Oct 2 12:10:25 1995 Ian Lance Taylor - - * strings.c (main): Exit with zero status if no files are given - and standard input is read. - -Thu Sep 28 20:03:07 1995 Stan Shebs - - * mpw-config.in: Calculate underscore and put into makefile - fragment, generate config.h. - * mpw-make.sed: New file, sed commands to edit Unix makefile - into MPW syntax. - * mpw-make.in: Remove. - * mac-binutils.r: New file, Mac resources. - -Thu Sep 28 15:49:00 1995 steve chamberlain - - * dlltool.c: (gen_exp_file): Always emit a .reloc section if - relocatable. - (imp_name_lab): New. - (gen_def_file): New. - (gen_lib_file): Use imp_name_lab. - (main): Initialize imp_name_lab. - -Mon Sep 25 12:05:34 1995 Ian Lance Taylor - - * configure.in: Call AC_HEADER_SYS_WAIT. - * configure: Rebuild. - * config.in: Rebuild. - * dlltool.c: Include "libiberty.h" and "bucomm.h". Don't include - , , or . Don't include . - Include . Use HAVE_SYS_WAIT_H to control whether to - include or define the wait macros by hand. Don't - declare xmalloc. - (gen_lib_file): Don't assume that sprintf returns the number of - characters; use strlen instead. - -Fri Sep 22 17:16:41 1995 Ian Lance Taylor - - * objdump.c (disassemble_data): Don't use the old BFD based - disassembler interface. Make info a const pointer. - -Wed Sep 13 18:33:44 1995 Ian Lance Taylor - - * objdump.c (start_address): New variable. - (stop_address): New variable. - (usage): Mention --start-address and --stop-address. - (OPTION_START_ADDRESS, OPTION_STOP_ADDRESS): Define. - (long_options): Add "start-address" and "stop-address". - (disassemble_data): Handle start_address and stop_address. - (dump_data, dump_reloc_set): Likewise. - (main): Don't set seenflag for -l. Handle OPTION_START_ADDRESS - and OPTION_STOP_ADDRESS. - * objcopy.c (parse_vma): Move to bucomm.c. - * bucomm.c (parse_vma): New function, moved in from objcopy.c. - * bucomm.h (parse_vma): Declare. - * binutils.texi, objdump.1: Document new objdump options. - -Tue Sep 12 12:37:39 1995 Ian Lance Taylor - - * Makefile.in (maintainer-clean): New target. - - * ar.c (replace_members): Don't call write_archive if nothing - changed. - - * objdump.c (disassemble_data): Add casts to avoid gcc warnings. - -Thu Sep 7 12:12:17 1995 Ian Lance Taylor - - * config.in: Rename from config.h.in. - * configure.in: Call AC_CONFIG_HEADER with config.h:config.in. - Check for config.h:config.in when creating stamp-h. - * configure: Rebuild. - * Makefile.in (stamp-h): Depend upon config.in rather than - config.h.in. Set CONFIG_HEADERS to config.h:config.in when - calling config.status. - - * Makefile.in (distclean): Remove config.h, stamp-h, and - config.log. - - * nm.c (value_format): Initialize based on BFD64 and - BFD_HOST_64BIT_LONG. - (print_radix): New static variable. - (set_print_radix): Set print_radix. Adjust changes to - value_format. - (print_value): New static function, to print 64 bit octal and - decimal values correctly. - (print_symbol_info_bsd): Check BFD64, not BFD_HOST_64_BIT. Use - print_value. - (print_symbol_info_sysv): Use print_value. - (print_symbol_info_posix): Likewise. - -Wed Sep 6 15:02:55 1995 Ian Lance Taylor - - * Makefile.in (*.o): Remove incorrect dependencies on - $(BFDDIR)/hosts/std-host.h. - - * Makefile.in (INSTALL_DATA): Add -m 644. - (INSTALL_XFORM1): Likewise. - (CC_FOR_BUILD): Set to @CC_FOR_BUILD@ rather than $(CC). - (mostlyclean): Remove config.log. - (distclean): Remove config.cache. - - * configure.in: Call BFD_CC_FOR_BUILD and BFD_BINARY_FOPEN. - * configure: Rebuild. - -Tue Sep 5 20:22:42 1995 Ian Lance Taylor - - * configure.in: Rewrite to use autoconf. - * aclocal.m4: New file. - * configure: New file, built by autoconf. - * acconfig.h: New file. - * config.h.in: New file, built by autoheader. - * Makefile.in: Various changes for new configure script. Also: - (PROGS): Remove $(SYSINFO_PROG). - (ALL_CFLAGS): Remove $(TDEFINES). - (version.o): Use $(ALL_CFLAGS). - (cplus-dem.o, dlltool.o, nlmconv.o): Likewise. - (sysdump.o): Depend upon bucomm.h and config.h. - (srconv.o, arsup.o, strings.o): Depend upon config.h. - (filemode.o): Don't depend upon ../bfd/sysdep.h. - (bucomm.o): Depend upon config.h, not ../bfd/sysdep.h. - (size.o, objdump.o, nm.o, ar.o, objcopy.o): Likewise. - (nlmheader.o, nlmconv.o): Likewise. - (distclean): Don't remove sysdep.h. - * bucomm.h: Include "ansidecl.h", , and "config.h". - Include "fopen-same.h" or "fopen-bin.h", based on - USE_BINARY_FOPEN. Include , and declare errno if it is - not a macro. Include , , , - , and if they are present. Declare strchr, - strrchr, and strstr if no string header file exists. Include - if it exists and does not. Define - O_RDONLY and O_RDWR if necessary. - * ar.c: Don't include "sysdep.h". Do include and - . Use HAVE_GOOD_UTIME_H rather than POSIX_UTIME. Use - HAVE_UTIMES rather than !USE_UTIME. Don't include , and - don't declare errno. - * arsup.c: Don't include . - * bucomm.c: Don't include "sysdep.h". Include , - , and . Include if it defines - time_t. Define time_t if necessary. - * coffdump.c: Don't include "sysdep.h". - * coffgrok.c, filemode.c, nlmconv.c, size.c: Likewise. - * srconv.c, strings.c: Likewise. - * nm.c: Don't include "sysdep.h". Don't try to define HAVE_SBRK. - * objcopy.c: Don't include "sysdep.h". Include and - . - (simple_copy): Use creat rather than assuming that O_CREAT is - defined. - * objdump.c: Don't include "sysdep.h". Use - NEED_DECLARATION_PRINTF rather than !FPRINTF_ALREADY_DECLARED. - * sysdump.c: Include "bfd.h" and "bucomm.h". Don't include - "sysdep.h" or . - (dump_symbol_info): Rename from symbol_info. Change all callers. - -Mon Sep 4 14:30:00 1995 Ian Lance Taylor - - * configure.in (host_makefile_frag): Don't set. Substitute for - @CC@, @CFLAGS@, @HDEFINES@ and @LDFLAGS@ in Makefile. - * Makefile.in (AR_FLAGS): Set to rc rather than qv. - (CC): Define as @CC@. - (CFLAGS): Set to @CFLAGS@. - (LDFLAGS): Define as @LDFLAGS@. - (ALL_CFLAGS): Use @HDEFINES@ rather than $(HDEFINES). - - * configure.in: Don't bother to call config.bfd for each target. - Just call it for the default target, and use the shell variable to - decide whether underscores are used. - -Thu Aug 31 19:21:48 1995 Jason Molenda (crash@phydeaux.cygnus.com) - - * configure.in: match i[3-6]86-*-win32, not just i386-*-win32. - -Thu Aug 31 16:30:22 1995 steve chamberlain - - * dlltool.c (add_indirect): New. - (asm_prefix): New - (gen_exp_file): Timestamp should be 0. Insert prefix when - needed. New code for indirection. - (gen_lib_file): Timestamp should be 0. Insert prefix - when needed. - (usage): Document --add-indirect. - (main): Cope with new option. - - * objdump.c (dump_private_headers): New. - (usage): Document new option. - (long_option): Add private-headers. - (dump_bfd_private_header): New. - (main): Cope with new option. - -Thu Aug 31 04:09:16 1995 Doug Evans - - * dlltool.c (run): Add missing 3rd arg to waitpid. - -Wed Aug 30 11:02:11 1995 steve chamberlain - - * Makefile.in (TOOL_PROGS): Include dlltool if needed. - -Tue Aug 29 13:25:21 1995 steve chamberlain - - * dlltool.c (rva): Deleted. - (rvaafter, rva_before): Use new assembler pseudo. - (flush_page, gen_exp_file, gen_lib_file): Use new way of RVAing. - (gen_exp_file): Don't generate .edata if no need. - (gen_lib_file): Don't make timestamp. - Put _iname in idata$7. - (workout_prefix): Fix memory initialization bug. - (usage): Tidy up, delete many single char options. - (main): rva option is gone. - -Mon Aug 21 18:41:28 1995 steve chamberlain - - * dlltool.c (options): image-base is a synonym for rva. - (gen_lib_file): Put dll name into ibase$7. - -Sun Aug 20 09:59:00 1995 steve chamberlain - - Modified to generate archives and objects rather than .s files. - * dlltool.c (run) New function. - (gen_exp_file, gen_lib_file): Use run. - (workout_prefix): New. - (usage): Document new options. - (main): Parse new options. - -Wed Aug 16 16:26:52 1995 steve chamberlain - - * dlltool.c (gen_exp_file): Fix RVA handling. - (rva_s, rva_n): Delete. - -Fri Aug 11 18:27:18 1995 Ian Lance Taylor - - * nm.c (main): Ignore -e. - -Thu Aug 10 17:35:00 1995 Ken Raeburn - - * Makefile.in (config.texi): New target. Write out a setting for - texinfo variable VERSION. - (binutils.dvi, binutils.info): Depend on it. - * binutils.texi: Include it, and reference @value{VERSION} instead - of explicitly specifying 2.2(!). - -Thu Aug 10 16:07:53 1995 Ian Lance Taylor - - * coffgrok.c (do_type): Handle array dimensions the same way gdb - does. - -Tue Aug 8 17:10:42 1995 steve chamberlain - - * dlltool.c (mtable): New fields. - (ASM_RVA_BEFORE, ASM_RVA_AFTER): New. - (flush_page): Use new macros. - -Sat Aug 5 00:16:37 1995 Jeff Law (law@snake.cs.utah.edu) - - * objcopy.c (mark_symbols_used_in_relocations): Handle sections - with no relocations. - * coffgrok.c (do_sections_p1): Likewise. - -Mon Jul 31 12:51:06 1995 Ian Lance Taylor - - * strings.c (print_strings): For compatibility with existing - strings programs, print strings which are not terminated with a - null byte or a newline. - * binutils.texi, strings.1: Update documentation accordingly. - - * ar.c (replace_members): For compatibility with existing ar - programs, permit users to add the same file multiple times. - -Tue Jul 25 11:21:53 1995 Ian Lance Taylor - - * strings.c (DATA_FLAGS): Remove SEC_DATA. - (main): If no file names are given, scan standard input. - * binutils.texi, strings.1: strings now scans non-data sections by - default. - -Mon Jul 24 13:52:28 1995 J.T. Conklin - - * srconv.c (wr_hd): Set afl field to 4 for bfd_arch_sh. - (writeINT): When size == -2, use 2 bytes for the h8300 and 4 bytes - for the sh. - - * sysdump.c (fillup): Return size - 1, the last byte is a checksum - and shouldn't be counted. - * sysroff.info (hd): Changed segment identifier from a byte to a 1 - bit field. The sysroff 2.0-01 specification seems to be in error - here. Reduce width of following "spare" field from 4 to 3 bits. - (rl): Changed order and width of first 4 bitfields to correspond - to sysroff specification. - (dln_head, dln_inside, dln_tail): Removed. - -Tue Jul 18 23:00:03 1995 Fred Fish - - * nm.c (sort_symbols_by_size): Enclose expression being casted - in parens so result is casted, not just first operand. Can't - do pointer arithmetic on void* pointers. - -Fri Jul 14 13:42:42 1995 J.T. Conklin - - * sysdump.c (dh): Changed format of output to be 16 hex digits - followed by 16 ascii characters, similar to Emacs' hexl-mode, - to make it easier to read. - (xcalloc): fix typo. - -Thu Jul 13 15:27:44 1995 J.T. Conklin - - * srconv.c (wr_tr): Write out handcrafted tr block. - (walk_tree_symbol): Use evallen and evalue instead of - vallen & value because of corresponding changes in - sysroff.info. - - * sysdump.c (sysroff_swap_tr_in, sysroff_print_tr_out): New - functions. - - * sysroff.info (tr): the tr block is a special case --- a block - without contents --- which can't be handled by generated code. - (den, dpp): only first byte is present for DENend, DPPend. - (dsy): describe a conditional portion of block, rename some fields. - (dps): describe a conditional portion of block. - (dfl): removed. - - * sysinfo.y (yyerror): write error message to standard error. - -Thu Jul 13 10:43:59 1995 Ian Lance Taylor - - * Makefile.in (DISTSTUFF): Add arparse.h and sysinfo.h. - (mostlyclean): Remove y.output. - (clean): Remove sysroff, sysroff.c, sysroff.h, and sysinfo. - - * nlmconv.c (powerpc_mangle_relocs): Cast memset arg to size_t. - * objcopy.c (copy_object): Likewise. - - * nm.c (HAVE_SBRK): Define execpt on amigados and WINDOWS_NT. - (struct size_sym): Define. - (show_stats): New static variable. - (long_options): Add undocumented option "stats". - (main): Print memory stats if requested. - (sort_bfd, sort_dynamic, sort_x, sort_y): New static variables. - (numeric_forward): Use minisymbols rather than asymbols. - (non_numeric_forward): Likewise. - (size_forward1): Rename from size_forward. Use minisymbols. - (size_forward2): New static function. - (sort_symbols_by_size): Take new arguments dynamic, size, and - symsizep. Use minisymbols. Don't store the size back in the - symbol; store in a newly allocate struct size_sym array. - (display_rel_file): Read minisymbols rather than asymbols. Set - sort_* variables. Call print_size_symbols if sorting by size. - (filter_symbols): Take new arguments dynamic and size. Use - minisymbols. - (print_symbols): Likewise. Call print_symbol for actual printing. - (print_size_symbols): New static function. - (print_symbol): New static function. - -Wed Jul 12 10:43:05 1995 Ian Lance Taylor - - * objdump.c (dump_section_stabs): Only print each stabs section - once. - (compare_relocs): Make it clear to gcc that this always returns a - value. - -Wed Jul 12 10:40:23 1995 H.J. Lu - - * objcopy.c (simple_copy): Preserve errno on failure. - (smart_rename): Print error mesage if simple_copy fails. - -Tue Jul 11 13:10:52 1995 J.T. Conklin - - * sysdump.c: re-indented file. - (module): read blocks sequentially instead of trying to parse - them, as that would require changing the parser recognize the - difference between a DPSstart and DPSend block. - (getone): Add break's between switch blocks as appropriate. - (object_body_list): parse blocks according to sysroff spec. - -Mon Jul 10 12:37:25 1995 J.T. Conklin - - * sysroff.info: re-indented file, prior formatting was confusing - because it was indentation did not reflect nesting of conditional - records. Change "space size within segment" record in hd record - from bit to byte. - - * sysinfo.y (cond_it_field): Use xcalloc instead of calloc. - - * srconv.c (wr_cs): Reformatted cs header array, tag each byte - with a comment describing the field. - (wr_unit_info): Use SEEK_SET macro instead of constant 0. - (main): Use FOPEN_WB macro instead of literal "wb". - * sysroff.info: Remove fdl (dfl) field from cs block. Compare - ptr->type with ED_TYPE_CONST instead of constant 2 in ed block. - -Tue Jul 4 14:48:42 1995 Ian Lance Taylor - - * nm.c (size_forward): Check yf against yn, not xn. - - * objcopy.c (copy_archive): Record all output BFD's, and close - them before unlinking them and removing the temporary directory, - to avoid NFS problems. - - * ar.c (replace_members): In verbose messages, use 'r' when - replacing a member, and 'a' when adding one. - - * ar.c (ar_truncate): New static variable. - (normalize): Change return type to const char *. Add abfd - argument. Change all callers. If ar_truncate, chop the filename - to abfd->ar_max_namelen. - (main): For the 'f' modifier, set ar_truncate to true. Don't - change quick_append to replace if ar_truncate is true. - (do_quick_append): If ar_truncate, set BFD_TRADITIONAL_FORMAT. - (write_archive): Likewise. - * binutils.texi, ar.1: Document 'f' modifier. - - * objcopy.c (enum strip_action): Define strip_unneeded. - (OPTION_STRIP_UNNEEDED): Define. - (strip_options): Add "strip-unneeded". - (copy_options): Likewise. - (copy_usage): Mention --strip-unneeded. - (strip_usage): Likewise. - (is_strip_section): Strip debugging sections if strip_unneeded. - (filter_symbols): If strip_unneeded, only keep BSF_KEEP symbols. - (copy_object): If strip_all, discard symbols without checking - discard_locals. - (copy_object): Call filter_symbols if strip_unneeded. - (setup_section): Strip debugging sections if strip_unneeded. - (copy_section): Likewise. - (strip_main): Handle OPTION_STRIP_UNNEEDED. - (copy_main): Likewise. - * binutils.texi, objcopy.1, strip.1: Document --strip-unneeded. - -Mon Jul 3 14:16:47 1995 Steve Chamberlain - - * configure.in (i386-*-win32): New configuration. - * dlltool.c (killat, xlate, usage, long_options, main): - Understand and cope with -k option. - -Sat Jul 1 12:25:15 1995 Fred Fish - - * ar.c: (extract_file): Change "#if POSIX_UTIME" to - "#ifdef POSIX_UTIME" to match other tests of POSIX_UTIME - and avoid lossage when POSIX_UTIME is not defined at all. - -Wed Jun 28 17:51:24 1995 Steve Chamberlain - - * ar.c: (print_contents.c, extract_file, do_quick_append): - Malloc buffers rather than allocate on stack (so it works - on NT). - * deflex.l: Names can have an @ in them. - * dlltool.c: Loads of stuff. Can now generate .imp files which - work with NT .dlls. - -Thu Jun 22 19:10:50 1995 Stan Shebs - - * mpw-make.in (demangle.c.o): Remove. - (arparse.h): Depend on arparse.c instead of arparse.y. - -Wed Jun 21 17:32:45 1995 Ken Raeburn - - * Makefile.in (DISTSTUFF): Don't include info here. - (diststuff): Include it here. - (realclean): Remove *.info. - - * objdump.c (compare_relocs): If relocation entries have the same - address, keep them in file order. - -Mon Jun 19 09:06:49 1995 Steve Chamberlain - - * dlltool.c: Change names of generated files. .*.s-> -*.s - - * objdump.c (dump_section_stabs): Check for names - which are supersets of selected names. - -Wed Jun 14 19:43:52 1995 Doug Evans - - * dlltool.c (mtable, ARM jump): Must redirect via pc offsetable ptr. - -Wed Jun 14 13:27:22 1995 Steve Chamberlain - - * deflex.l, defparse.y, dlltool.c: New files. - * Makefile.in, configure.in: Support for them. - -Mon Jun 12 11:27:54 1995 Steve Chamberlain - - * sysdump.c: Include sysdep.h - (main): Open input with FOPEN_RB. - -Fri Jun 9 17:26:11 1995 Michael Meissner - - * objdump.c (wide_output): New flag variable. - (usage): Print new -w, --wide options. - (long_options): Add --wide support. - (dump_section_header): If --wide, don't print a newline between - the section's first line and the flags. - (objdump_print_address): Use unsigned comparisons for the binary - search, not signed. - (disassemble_data): If --wide, don't put a \n between the - disassembly output and relocation information. - (main): Support -w option being the same as --wide. - -Thu Jun 1 17:09:27 1995 Ken Raeburn - - Sat May 6 08:52:24 1995 H.J. Lu (hjl@nynexst.com) - - * objcopy.c (smart_rename): make it smarter, clean up - if rename () fails. - -Tue May 30 14:24:15 1995 Ken Raeburn - - * Makefile.in: Delete lines with lots of #### because four or more - indicate a point for makefile fragment substitution. - -Tue May 9 17:17:05 1995 Michael Meissner - - * configure.in: Don't build nlmconv on PowerPC eabi any more, it - is not needed. - -Thu Apr 27 20:21:24 1995 Doug Evans - - * Makefile.in (EXPECT): Define. - (RUNTEST): Use one in source tree if present. - (check): Set `rootme' for $(EXPECT). - -Wed Apr 26 18:26:21 1995 Steve Chamberlain - - * srconv.c (main): Add support for -n option which disables - prescan of common symbols. - (wr_ob): If reading past the end of a section, fill with zeros. - -Tue Apr 25 19:14:37 1995 Ken Raeburn - - * objdump.c (dump_section_header): Display load address after - virtual memory (run-time) address. - -Wed Apr 19 09:44:06 1995 Jason Merrill - - * Makefile.in (cplus-dem.o): Pass -DVERSION='"$(VERSION)"' to the - compile. - (DEMANGLER_PROG): No longer uses version.o. - -Mon Apr 10 13:29:49 1995 Stan Shebs - - Merge in support for Mac MPW as a host. - (Old change descriptions retained for informational value.) - - * mpw-config.in (TDEFINES): Define as empty in makefile frag. - - * mpw-config.in: Create mk.tmp, define ARCHDEFS in it. - - * mpw-config.in: New file, MPW configure fragment for binutils. - * mpw-make.in (install-only): New target. - (install): Also depend on install-only. - - * mpw-make.in (cplusfilt): Renamed from c++filt. - (INCLUDES): Add more paths. - - * mpw-make.in: New file, MPW makefile fragment for binutils. - (Normally automatically generated from Makefile.in.) - -Mon Mar 27 11:52:57 1995 Ian Lance Taylor - - * ar.c (write_archive): Call make_tempname to get output file - name, rather than using a fixed name based on the input file. - - * objcopy.c (make_tempname): Copy from here... - * bucomm.c (make_tempname): ...to here, and make global. - * bucomm.h (make_tempname): Declare. - -Fri Mar 24 11:47:42 1995 Ian Lance Taylor - - * strings.c: Include "bfd.h" before other headers. Include - "sysdep.h". - * bucomm.c (print_arelt_descr): Cast st_uid and st_gid to long, - and print them with %ld. - -Fri Mar 10 13:09:42 1995 Ian Lance Taylor - - * objcopy.c (strip_options): Add --keep-symbol. - (copy_options): Likewise. - (copy_usage): Mention --keep-symbol and -K. - (strip_usage): Likewise. - (keep_symbols): New static variable. - (is_strip_symbol): Adjust the return value according to - keep_symbols. - (strip_main): Handle -K. For -N, check that -K was not given. - (copy_main): Likewise. - * binutils.texi, objcopy.1, strip.1: Document -K. - -Mon Mar 6 13:33:47 1995 Stan Shebs - - * objcopy.c (copy_archive): Check result of mkdir. - (copy_main): Cast an xmalloc result. - - * objdump.c (usage): Break long format string into shorter ones. - -Mon Mar 6 13:46:12 1995 Ian Lance Taylor - - * bucomm.c (list_supported_targets): New function. - * bucomm.h (list_supported_targets): Declare. - * ar.c (usage): Call list_supported_targets. - * nm.c (usage): Likewise. - * objcopy.c (copy_usage, strip_usage): Likewise. - * objdump.c (usage): Likewise. - * size.c (usage): Likewise. - * strings.c (usage): Likewise. - -Tue Feb 28 15:13:58 1995 Ian Lance Taylor - - * bucomm.c (print_arelt_descr): Cast st_size to long before - passing it to fprintf. - -Fri Feb 17 13:36:45 1995 Ian Lance Taylor - - * objcopy.c (struct section_list): Add fields remove, set_flags, - and flags. Change adjust from boolean to enum. - (remove_sections): Remove static variable. - (sections_removed): New static variable. - (copy_options): Add --set-section-flags. - (copy_usage): Mention --set-section-flags. - (parse_flags): New static function. - (find_section_list): New static function. - (is_strip_symbol): Change return type from int to boolean. - (is_strip_section): New static function. - (filter_symbols): Call is_strip_section. - (copy_object): When adding sections, check for specified flags or - VMA. Call filter_symbols if any sections are being removed. - (setup_section): Use find_section_list function rather than - looking through remove_sections and adjust_sections. Handle - --set-section-flags. - (copy_section): Use find_section_list rather than looking through - remove_sections. - (strip_main): Use find_section_list instead of adding items to - sections_removed. - (copy_main): Use find_section_list instead of adding items to - sections_removed and adjust_sections. Handle --set-section-flags. - * binutils.texi, objcopy.1: Document --set-section-flags. - -Tue Feb 14 18:03:03 1995 Ian Lance Taylor - - * objdump.c (with_source_code): New global variable. - (usage): Mention -S/--source. - (long_options): Add --source. - (prev_functionname, prev_line): New static variables. - (struct print_file_list): Define. - (print_files): New static variable. - (skip_to_line, show_line): New static functions. - (disassemble_data): Call show_line to handle -l and -S. - (main): Handle -S. - * binutils.texi, objdump.1: Document -S/--source. - -Thu Feb 9 16:11:53 1995 Ian Lance Taylor - - * objcopy.c (copy_usage): Rename parameter to avoid shadowing. - (strip_usage): Likewise. - - * objcopy.c (struct section_add): Define. - (add_sections): New static variable. - (copy_options): Accept --add-section. - (copy_usage): Mention --add-section. - (copy_object): Add sections from the add_sections list. - (copy_main): Handle --add-section. - * binutils.texi, objcopy.1: Document --add-section. - -Wed Feb 1 15:04:57 1995 Ken Raeburn - - * objdump.c (disassemble_data): Pass section offset, not absolute - address, to bfd_find_nearest_line. - - * nlmconv.c (powerpc_mangle_relocs): Don't use const with - reloc_howto_type. - -Thu Jan 26 18:50:06 1995 Ian Lance Taylor - - * objdump.c (compare_symbols): Use bfd_asymbol_value (VAR) rather - than VAR->value. - (objdump_print_address): Likewise. - (disassemble_data): Don't change the symbol values. It can - confuse bfd_canonicalize_reloc. - -Thu Jan 26 12:03:56 1995 Michael Meissner - - * configure.in: Add support for powerpc-*-ebai. - -Wed Jan 18 10:02:12 1995 Steve Chamberlain - - * coffdump.c: Include sysdep.h. - (dump_coff_type): Handle coff_secdef_type. - * coffgrok.c : Include sysdep.h. - * srconv.c: Include libiberty.h - (absolute_p, dty_start, dty_end, dump_tree_structure): Remove. - -Wed Jan 18 12:24:14 1995 Ian Lance Taylor - - * coffdump.c (dump_coff_scope): Cast pointer to unsigned long for - printf. - * coffgrok.c: Include bucomm.h. Don't declare xmalloc. - (push_scope): Declare type of parameter link. - * size.c: Include libiberty.h. - * srconv.c: Include bucomm.h. - (find_base): Declare at top of file. - (wr_hd): Add default case to architecture switch. - (wr_dps_start): Declare type of parameter nest. - (wr_du): Comment out variables used only in commented out blocks. - (wr_dus): Remove unused variable i. - (wr_sc): Remove unused variables myinfo, low, and high. - * strings.c: Include libiberty.h. - * sysdump.c: Include . - -Tue Dec 20 19:13:44 1994 Ian Lance Taylor - - * ar.c (main): Ignore 'f' modifier used on HP/UX 9. - -Thu Dec 15 17:34:12 1994 Stan Shebs - - * ar.c, nm.c, objcopy.c, objdump.c: Include progress.h. - * ar.c, nm.c, objcopy.c, objdump.c (main): Add START_PROGRESS - and END_PROGRESS. - * ar.c (map_over_members, open_inarch): Call PROGRESS. - * nm.c (main, display_archive, filter_symbols, print_symbols): - Call PROGRESS. - - * objcopy.c (copy_usage): Break up long usage string. - -Wed Dec 14 15:51:56 1994 Ken Raeburn - - * objcopy.c (copy_object): Don't bother setting status after - nonfatal() "call", because it won't return. - -Fri Dec 9 00:22:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (powerpc_mangle_relocs): Don't switch a reloc to use - the section symbol if the symbol is undefined. - -Thu Dec 8 14:45:50 1994 Ken Raeburn - - * objcopy.c (add_strip_symbol): Cast return value of xmalloc. - -Wed Nov 30 11:05:43 1994 Ian Lance Taylor - - * ar.c (replace_members): Pass current->filename to normalize when - checking for duplicates, because the filename of a newly added - file will not have been normalized yet. - -Thu Nov 17 15:00:13 1994 Ian Lance Taylor - - * ar.c (main): Don't call do_quick_append if any of the archive - names are longer than 14 characters. - - * objcopy.c (main): Fix is_strip test. From - pirker@eiunix.tuwien.ac.at (Martin Pirker). - -Thu Nov 17 15:37:19 1994 Mark W. Eichin - - * objcopy.c (add_strip_symbol): New function, adds a name to an - explicit list of symbols to strip. - (is_strip_symbol): New function, reports whether the name argument - is in the explicit list. - (filter_symbols): Check against is_strip_symbol above all. - (strip_main): Recognize -N option. If used, don't default to - strip_all. - (copy_main): Recognize -N option. - (strip_usage): Document -N and --strip-symbol options. - (copy_usage): Ditto. - * objcopy.1, strip.1, binutils.texi: Document -N and - --strip-symbol options. - -Tue Nov 8 13:12:54 1994 Ian Lance Taylor - - * objdump.c (display_target_list, display_info_table): Pass an - array to tmparg, rather than NULL, since some systems can't handle - NULL. - - * objcopy.c (copy_archive): Keep a list of the names of the - temporary files we created. Close each input BFD after we open - its successor. - -Mon Nov 7 15:48:39 1994 Ken Raeburn - - * Makefile.in (VERSION): Bump to 2.5.3. - -Thu Nov 3 19:04:34 1994 Ken Raeburn - - * Makefile.in (install-info): Install info files from whatever - directory they were found in. - - Patch from DJ Delorie: - * configure.bat: do c++filt -> cxxfilt right - - * sysinfo.y: Include system header files early, so any potential - declaration of abort() occurs before its use. - - * strings.c (strings_file): Try opening the file in binary mode - first. - -Wed Nov 2 15:44:13 1994 Ian Lance Taylor - - * ar.c (main): Treat ar qs like ar rs. - -Tue Oct 25 16:19:25 1994 Ian Lance Taylor - - * objcopy.c (gap_fill): Explicitly initialize, for clarity. - (pad_to_set, pad_to): New static variables. - (copy_options): Accept --pad-to. - (copy_usage): Mention --pad-to. - (copy_object): Support --pad-to. - (compare_section_vma): Sort non loadable sections to the front. - Sort sections with the same VMA by size. - (copy_main): Handle --pad-to. - * binutils.texi, objcopy.1: Document --pad-to. - -Thu Oct 20 13:51:31 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objcopy.c (gap_fill_set, gap_fill): New static variables. - (copy_options): Accept --gap-fill. - (copy_usage): Mention --gap-fill. - (copy_object): Support --gap-fill. - (get_sections, compare_section_vma): New static functions. - (copy_main): Handle --gap-fill. - * binutils.texi, objcopy.1: Document --gap-fill. - -Wed Oct 19 14:09:16 1994 Ian Lance Taylor - - * Makefile.in (check): Add a dummy else clause to the if - statement. - - * objcopy.c (copy_object): Revert yesterday's change. - * binutils.texi, objcopy.1: Remove special mention of --set-start - and `binary' output format. - -Tue Oct 18 11:12:01 1994 Ian Lance Taylor - - * objcopy.c (copy_object): If the output file format is `binary', - and the start address was not set using --set-start, default the - start address to zero. This hack is because the `binary' output - file format uses the start address to set the virtual address of - the first byte in the file. - * binutils.texi, objcopy.1: Add some notes on generating S-records - and binary files. - - * nm.c (print_symdef_entry): Call print_symname to print the - symbol name, so that --demangle works. - - * Makefile.in (mostlyclean): Remove tmpdir. - - * objcopy.c (struct section_list): Add fields used, adjust, val. - (adjust_start, set_start_set, set_start): New static variables. - (adjust_section_vma, adjust_sections): New static variables. - (copy_options): Add --adjust-start, --adjust-vma, - --adjust-section-vma, --adjust-warnings, --no-adjust-warnings, - --set-start. - (parse_vma): New static function. - (copy_usage): Mention new options. - (copy_object): Handle --set-start and --adjust-start. - (setup_section): Correct type of last argument to PTR. Set used - field if section is removed. Handle --adjust-vma and - --adjust-section-vma. - (copy_section): Correct type of last argument to PTR. - (mark_symbols_used_in_relocations): Likewise. - (strip_main): Clear used field when handling -R. - (copy_main): Handle new options. - * binutils.texi (objcopy): Document new options. - * objcopy.1: Document new options. - -Fri Oct 14 14:38:13 1994 Ian Lance Taylor - - * configure.in (configdirs): Remove definition--testsuite is no - longer configured. - * Makefile.in (testsuite): Remove target. - (site.exp): New target. - (check): Rewrite. - (clean, distclean): Don't recur into testsuite directory. - -Thu Oct 13 19:24:09 1994 Ken Raeburn - - * Makefile.in (VERSION): Updated to 2.5. - * Version 2.5 released. - -Tue Oct 11 15:26:42 1994 Ian Lance Taylor - - * Makefile.in (sysdump.o): Depends upon sysroff.c. - -Mon Oct 10 13:50:30 1994 J.T. Conklin (jtc@rtl.cygnus.com) - - * nlmconv.c (link_inputs): Pass -Ur flag to ld so that the - ctor/dtor tables needed by C++ programs are built. - -Sun Oct 9 18:04:00 1994 Jim Wilson (wilson@sphagnum.cygnus.com) - - * Makefile.in (srconv.o): Add dependence on sysroff.c. - -Tue Oct 4 12:19:51 1994 Ian Lance Taylor - - * configure.in: Use ${config_shell} when running config.bfd. - - * Makefile.in (sysroff.h): Split target away from sysroff.c. - (srconv.o, sysdump.o): New targets. - (srconv, sysdump): Don't depend upon sysroff.c. - -Wed Sep 28 13:04:34 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * Makefile.in (arparse.c): Don't ignore errors from mv. - (sysinfo.c): Likewise. Also, depend upon arparse.c, to prevent a - parallel make from trying to build both arparse.c and sysinfo.c - simultaneously. - (nlmheader.c): Similar change. - (arparse.h): Separate target from arparse.c, so that a parallel - make does not try to build both at once. Depend upon arparse.c. - (sysinfo.h): Similar change. - - * objdump.c (disassemble_data): Pass the reloc buffer to free, not - the pointer used to loop over the relocs. - -Sat Sep 24 16:16:57 1994 Stan Shebs (shebs@andros.cygnus.com) - - * objdump.c (disassemble_data): Cast result of xmalloc. - -Wed Sep 21 19:30:35 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * objdump.c (sorted_syms, sorted_symcount): New global variables. - (objdump_print_address): Use sorted_syms and sorted_symcount - instead of syms and symcount. - (disassemble_data): Don't bother to get the relocs before looping - over the sections. Before filtering and sorting the symbol table, - copy it into sorted_syms. - -Fri Sep 16 11:27:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * objdump.c (struct objdump_disasm_info): Add field require_sec. - (objdump_print_address): If aux->require_sec, require that the - symbol be in aux->sec even if HAS_RELOC is not set. If we can't - find a smaller symbol in the right section, look for a larger one. - (disassemble_data): Set aux.require_sec around the - objdump_print_address call for the instruction address. - -Thu Sep 15 21:43:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ar.c: Call xexit rather than exit. - (output_filename, output_file, output_bfd): New static variables. - (remove_output): New static function. - (main): Call xatexit (remove_output). Call xexit rather than - returning. - (extract_file): Set output_filename and output_file while output - file is open. - (write_archive): Likewise, but use output_bfd, not output_file. - * arsup.c: Include libiberty.h. Call xexit rather than exit. - * bucomm.c: Likewise. - - * objdump.c (disassemble_all): New global variable. - (usage): Document --disassemble-all. - (long_options): Add disassemble-all as a synonym for -D. - (compare_symbols): Make pointers const. - (compare_relocs): New static function. - (disassemble_data): Rename disassemble to disassemble_fn to avoid - shadowing. If dump_reloc_info, print relocs along with - disassembly. Skip sections which are not SEC_CODE unless - disassemble_all or only is set. - (display_bfd): Don't call dump_relocs if disassemble is set. - (main): Accept and handle -D. - * binutils.texi: Document -D/--disassemble-all. - * objdump.1: Likewise. - -Wed Sep 14 12:19:07 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * objdump.c (disassemble_data): Initialize prevline to 0. Make - prev_function non const. Copy functionname into an malloc buffer - when setting prev_function, instead of assuming that the string - will last forever. - - * nm.c: Include libiberty.h. - (sort_by_size): New static variable. - (long_options): Add --size-sort. - (usage): Mention --size-sort. - (numeric_forward): Make static. Change from void * to PTR. - (numeric_reverse): Likewise. - (non_numeric_forward, non_numeric_reverse): Likewise. - (sorters): Change declaration from void * to PTR. - (size_forward, sort_symbol_by_size): New static functions. - (display_rel_file): Handle sort_by_size. - (filter_symbols): If sort_by_size, discard absolute and undefined - symbols. - * binutils.texi (nm): Document --size-sort. - * nm.1: Document --size-sort. - -Tue Sep 13 21:06:06 1994 Jeff Law (law@snake.cs.utah.edu) - - * objcopy.c (copy_main): Initialize input_filename and - output_filename to NULL. - -Tue Sep 13 14:17:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * Makefile.in (version.o): Depend upon Makefile, so that version.o - gets rebuilt when make variable VERSION is changed. - - * objdump.c (dump_section_header): Print the SEC_NEVER_LOAD flag. - -Wed Aug 24 12:40:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * configure.in: Change i[34]86 to i[345]86. - -Tue Aug 23 11:00:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ar.c (ranlib_touch): Don't update the archive map if there isn't - one. - -Mon Aug 22 16:02:18 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * ar.c: Include libiberty.h. - (inarch): Remove variable. - (map_over_members): Make static. Add arch argument, and use it - instead of inarch. Change all callers. - (main): Treat --version as -v. Accept -t argument. Accept any - number of archive arguments. Catch and use open_inarch return - value, rather than using inarch. - (open_inarch): Return newly opened BFD, rather than using inarch. - (do_quick_append): Make archive_filename const. - (write_archive): Add iarch argument, and use it instead of inarch. - Change all callers. - (delete_members, move_members, replace_members): Likewise. - (ranlib_only): Don't exit on success. Catch and use open_inarch - return value. - (ranlib_touch): New function. - * arsup.h (map_over_members): Don't declare. - (ar_end, ar_extract): Declare. - (open_inarch): Change return value in declaration to bfd *. - * arsup.c (map_over_list): Make static. Always pass two arguments - to function. Add arch argument, and use it instead of inarch. - Change all callers. - (ar_directory_doer): Make static. Add ignored second argument. - Change all callers. - (ar_directory): Use open_inarch return value rather than inarch. - (ar_addlib_doer): Make static. - (ar_addlib): Use open_inarch return value rather than inarch. - (ar_extract): Remove unused local variable abfd. - -Thu Aug 11 14:55:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - Add support for removing named sections to objcopy and strip. - * objcopy.c (struct section_list): Define. - (remove_sections): New static variable. - (strip_options, copy_options): Add remove-section. - (copy_usage, strip_usage): Mention -R and --remove-section. - (setup_section): If section is in remove_sections list, ignore it. - (copy_section): Likewise. - (strip_main, copy_main): Handle -R. - * binutils.texi, objcopy.1, strip.1: Document new options. - -Wed Aug 10 10:19:55 1994 Stan Shebs (shebs@andros.cygnus.com) - - * nlmconv.c (powerpc_mangle_relocs): Rename symvalue to sym_value, - so as not to conflict with the symvalue typedef in bfd.h. - -Mon Aug 1 13:19:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * nlmheader.y: Per current NetWare docs, accept a revision number - of 0 and treat a revision number greater than 26 as 0. - -Mon Jul 25 12:58:36 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * objdump.c (objdump_print_address): Correct handling of end of - symbols when looking for next symbol with a different value. - -Fri Jul 22 16:48:34 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * nm.c (numeric_forward): Treat undefined symbols as "less than" - defined symbols with zero values. If numeric values are equal, or - both symbols are undefined, sort alphabetically. Don't assume - that the difference of two bfd_vma values will truncate to "int" - and still have the same sign. - (numeric_reverse): Call numeric_forward and negate the result. - (print_symbol_info_bsd): For undefined symbols, print leading - spaces equivalent to the width of a printed bfd_vma, rather than - assuming that 8 will look right. - -Fri Jul 22 10:36:50 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * coffgrok.c (doit): Zero all fields of new structure. - * srconv.c (sysroff_swap_*_out): Remove redundant trailing arg. - * sysinfo.y: Generate sysroff_swap_*_out without requiring extra - arg. - -Fri Jul 22 10:09:53 1994 J.T. Conklin (jtc@phishhead.cygnus.com) - - * nlmheader.y: Make "stack" and "stacksize" synonyms in the lexer - rather than the parser. - -Thu Jul 21 10:25:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * config/mh-alphaosf, config/mh-apollo68v, config/mh-delta88: - Remove; obsolete. - -Sat Jul 16 22:34:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * objdump.c (slurp_dynamic_symtab): Try to get the dynamic symbols - even if the bfd is not marked DYNAMIC. ELF executables are not - marked DYNAMIC, but do have dynamic symbols. - -Fri Jul 15 01:41:35 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * coffgrok.c (do_where): Make data with no type 'int'. - (do_define): Keep info on source file of a symbol. - * coffgrok.h (coff_symbol): New field. - * srconv.c (PROGRAM_VERSION): Now 1.3 - (wr_rl): Use external ref number for symbol. - (wr_dus): Only keep one source file per debug unit. - (wr_dln): Always emit line numbers for first source file, - (wr_globals): Emit globals in the du of their owning source file. - -Mon Jul 11 15:59:03 1994 J.T. Conklin (jtc@phishhead.cygnus.com) - - * nlmheader.y: Null terminate var_hdr->threadName. - -Fri Jul 8 17:33:22 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * Makefile.in (syslex.o, sysinfo.o): Permit C source files to be - in $(srcdir), as they will be for FSF releases. - -Wed Jul 6 01:13:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (setup_sections): Preserve existing section flags when - copying in flags from a new section. - -Tue Jul 5 15:56:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * objcopy.c: Include libiberty.h. - (copy_file): If output_target is NULL, set it to the target of the - input file. - -Wed Jun 29 17:17:14 1994 J.T. Conklin (jtc@phishhead.cygnus.com) - - * nlmconv.c (link_inputs): Fixed memory allocation bug. - -Thu Jun 23 12:52:46 1994 David J. Mackenzie (djm@rtl.cygnus.com) - - * configure.in: Change --with-targets to --enable-targets. - -Tue Jun 21 12:53:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * Makefile.in (sysinfo): Does not depend upon $(ADDL_LIBS). - - * nlmconv.c (powerpc_build_stubs): Don't generate the PowerPC - NetWare custom header; no longer needed. - (powerpc_mangle_relocs): Convert relocs against the uninitialized - data section into relocs against the data section. - - * configure.in: Set nlmconv_defs to -DNLMCONV_cputype for all the - netware targets. Write it into Makefile as NLMCONV_DEFS. - * Makefile.in (nlmconv.o): Pass $(NLMCONV_DEFS) to $(CC). - * nlmconv.c: Only compile code for specific CPU types if - NLMCONV_cputype is defined. - - * nlmconv.c (main): Change uses of bfd_abs_section, etc., to use - bfd_abs_section_ptr or bfd_is_abs_section, etc. - (i386_mangle_relocs, alpha_mangle_relocs): Likewise. - (powerpc_build_stubs): Likewise. - * nm.c (filter_symbols, print_symbols): Likewise. - * objcopy.c (filter_symbols): Likewise. - (mark_symbols_used_in_relocations): Likewise. - * objdump.c (remove_useless_symbols, dump_relocs): Likewise. - * size.c (sysv_internal_printer): Likewise. - -Mon Jun 20 16:43:03 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * Makefile.in (MANPAGES): Remove $(DEMANGLER_PROG). - (install): Install it explicitly, from build dir, not srcdir. - -Mon Jun 20 16:29:54 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * objdump.c: Don't include elf/internal.h. - (bfd_elf_find_section): Don't declare. - (read_section_stabs): No special handling for ELF. Always read - using BFD sections. - -Thu Jun 16 17:25:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * configure.in: Set UNDERSCORE in Makefile based on result of - invoking config.bfd with a second argument of ``_''. - * Makefile.in (underscore.c): Depend upon Makefile. Don't try to - run $(CC) and $(NM), just use $(UNDERSCORE). Create via temporary - file. - (demangle.o): Remove target. - ($(NM_PROG)): Don't depend upon demangle.o, and don't link against - demangle.o. It's in libiberty anyhow. - (cplus-dem.o): Don't depend upon demangle.o. - * binutils.texi: Mention -n and --no-strip-underscores arguments - to c++filt. - -Wed Jun 15 12:10:31 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nm.c (long_options): Add --no-demangle to turn off --demangle, - and --no-cplus for Linux compatibility. - (usage): Mention --no-demangle. - * binutils.texi: Document --no-demangle. - -Fri Jun 10 15:41:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nm.c: HOST_64_BIT was renamed to BFD_HOST_64_BIT. - - * objcopy.c (copy_archive): Make the temporary directory in the - same directory as the output BFD, since we may not have write - permission on the current directory. Set the permissions of the - new directory to 0700, not 0777. - -Mon Jun 6 21:36:43 1994 D. V. Henkel-Wallace (gumby@cygnus.com) - - * configure.in: if this is an rs6000 (and we're not building for - any other bfd targets) then build only nm (collect needs it on - rs6000-lynx). - - * Makefile.in: define TOOL_PROGS which the list of programes to - install in $tooldir -- replaces a hard-coded list. - -Fri Jun 3 10:59:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c (display_target_list): Remove unused local ok. - -Thu May 26 18:05:52 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * config/mh-alphaosf (CFLAGS): Don't specify both -g and -O; - they're not compatible under native cc. Use -O1 instead. - - * Makefile.in (VERSION): Updated to cygnus-2.4.1. - - Changes from binutils-2.4 net release: - - * Makefile.in (MANPAGES): Use $(DEMANGLER_PROG). - ($(DEMANGLER_PROG).1): Build from cxxfilt.man, using sed. - * cxxfilt.man: Renamed from c++filt.1, replaced "c++filt" with - magic token to be replaced by sed. - - Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com) - - * configure.bat: update for latest makefile.in - -Fri May 13 23:25:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * bucomm.c: Check ANSI_PROTOTYPES rather than __STDC__. - -Tue May 10 18:22:06 1994 Jason Molenda (crash@sendai.cygnus.com) - - * objcopy.c (copy_section): Set section size correctly if using - interleave. - -Sat May 7 16:49:36 1994 Steve Chamberlain (sac@cygnus.com) - - * Makefile.in: Add rule for sysinfo.h - -Fri May 6 12:18:33 1994 Steve Chamberlain (sac@cygnus.com) - - * Makefile.in (SRCONV_PROG): Define. - (PROGS): Use $(SRCONV_PROG) too. - -Thu May 5 19:41:43 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * Makefile.in (DISTSTUFF): Add sysinfo.c, syslex.c, in case - someone configures with `targets=all'. - (distclean): Remove y.*. - (syslex.o): Depend on sysinfo.h. - (sysinfo.c): Rename y.tab.h to sysinfo.h. - (install-info): Don't try to install into $(infodir)/$(srcdir). - * syslex.l: Include sysinfo.h, not y.tab.h. - -Thu May 5 11:50:55 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) - - * syslex.l (yywrap): Define as function if not defined as a macro. - - * Makefile.in (objdump.o): Deleted special rule. - * configure.in: Don't bother building ARCHDEFS variable for - Makefile. - * objdump.c (ARCH_*): Deleted handling. - (disassemble_data): Call `disassembler' from opcodes library. - -Thu May 5 13:28:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * Makefile.in (install): Correct handling of $(tooldir) and - $(bindir) being on different devices. - -Fri Apr 29 09:50:38 1994 Steve Chamberlain (sac@cygnus.com) - - * sysdump.c (h8300, sh): Add declarations. - -Wed Apr 27 11:25:18 1994 Steve Chamberlain (sac@cygnus.com) - - * Makefile.in (syslex, sysinfo): Use CC_FOR_BUILD. - * coffdump.c, coffgroc.c, coffgrog.h, srconv.c, sysdump.c, - sysroff.info: Major changes. - -Tue Apr 26 18:18:24 1994 Stan Shebs (shebs@andros.cygnus.com) - - * objdump.c (print_section_stabs): Indicate the stab header symbol - more clearly, print numbers of unrecognized stab n_type values. - -Tue Apr 26 16:22:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (copy_sections): Copy arelent pointers, not arelents. - -Mon Apr 25 16:14:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * Makefile.in (distclean): Remove $(PROGS) and underscore.c. - -Fri Apr 22 11:14:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (setup_sections): Remove special handling of .reginfo - section. - (copy_sections): Likewise. - (alpha_mangle_relocs): Use bfd_ecoff_get_gp_value rather than the - special ECOFF .reginfo section. - - * objcopy.c (copy_object): Call bfd_copy_private_bfd_data after - copying everything else, to let it fiddle with the file in its - final state. - - * objdump.c: Include libiberty.h. - (display_target_list): If a format fails, just go on to the next - one. Check return value of bfd_set_format. - (display_info_table): Likewise. Don't increment loop variable in - for loop test, since that skips the first element. - (display_target_tables): Rewrite loop for clarity. Ensure that it - always prints at least one element. - - * nlmconv.c (main): Use CyGnUsEx rather than CyGnUsSeCs for - sections header. Rename from cygnus_sections to cygnus_ext. - -Thu Apr 21 12:12:26 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c (_DUMMY_NAME_): Don't define. - (display_target_list): Use tmpnam to get a file name rather than - using _DUMMY_NAME_. Unlink it when done. - (display_info_table): Likewise. - - * nlmconv.c (secsec): New static variable. - (main): Create .nlmsections section in output BFD. Store - information about it in sections header. - (setup_sections): Allocate space in sections header. - (copy_sections): Copy zero sized sections. Put information about - each section in the sections header. - -Wed Apr 20 14:34:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (powerpc_build_stubs): Take new outbfd argument. - Change caller. Create custom header for new PowerPC NetWare - format. - - * Makefile.in (nlmheader.o, nlmconv.o): Update dependencies. - * nlmconv.c: Include bfd.h and libiberty.h with "", not <>. - * nlmheader.y: Include bfd.h with "", not <>. - -Wed Apr 13 10:52:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c: Do an ifdef on __GO32__, not unix. - -Wed Apr 6 21:54:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - Added -D (--dynamic) option to nm and -T (--dynamic-syms) and -R - (--dynamic-reloc) arguments to objdump. - * nm.c (dynamic): New static variable. - (long_options): Added "dynamic". - (usage): Mention -D and --dynamic. - (main): Add D to getopt string. Handle -D by setting dynamic. - (display_rel_file): If dynamic is non-zero, read dynamic symbols - rather than normal symbols. - * nm.1: Updated for -D (--dynamic) option. - * objdump.c (dump_dynamic_symtab): New global variable. - (dump_dynamic_reloc_info): New global variable. - (dynsyms, dynsymcount): New global variables. - (usage): Mention -R, -T, --dynamic-syms and --dynamic-reloc. - (long_options): Added "dynamic-reloc" and "dynamic-syms". - (slurp_symtab): If no symbols, return rather than exit. - (slurp_dynamic_symtab): New function. - (display_bfd): Handle dump_dynamic_symtab and - dump_dynamic_reloc_info. - (dump_symbols): Take new dynamic argument, indicating whether to - display dynamic symbols. - (dump_relocs): Move most printing into dump_reloc_set. - (dump_dynamic_relocs): New function. - (dump_reloc_set): New function, extracted from dump_relocs. - (main): Add R and T to getopt string. Handle -T by setting - dump_dynamic_symtab and -R by setting dump_dynamic_reloc_info. - * objdump.1: Updated for -R (--dynamic-reloc) and -T - (--dynamic-syms) options. - * binutils.texi: Updated for new nm and objdump options. - -Wed Mar 30 15:52:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - Update for recent BFD changes to symbol and reloc reading. Rename - all uses of get_symtab_upper_bound to bfd_get_symtab_upper_bound. - Also: - * coffgrok.c (symcount): Change to long. - (do_sections_p1): Check for error return from - bfd_get_reloc_upper_bound. Change relcount to long, and check for - error from bfd_canonicalize_reloc. - (coff_grok): Change storage to long. Check for error from - bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. - * nlmconv.c (main): Change symcount, newsymalloc, newsymcount, and - i to long. Check for error from bfd_get_symtab_upper_bound and - bfd_canonicalize_symtab. - (copy_sections): Change reloc_size and reloc_count to long. Check - for error from bfd_get_reloc_upper_bound and - bfd_canonicalize_reloc. - (mangle_relocs, i386_mangle_relocs, alpha_mangle_relocs): Change - reloc_count_ptr argument to long *. Make corresponding changes to - variables loaded from *reloc_count_ptr. - * nm.c (display_rel_file): Change storage and symcount to long. - Check for errors from bfd_get_symtab_upper_bound and - bfd_canonicalize_symtab. - * objcopy.c (filter_symbols): Change symcount, src_count and - dst_count to long. - (copy_object): Change symcount to long. Pass another argument to - fprintf. Check for errors from bfd_get_symtab_upper_bound and - bfd_canonicalize_symtab. - (copy_section): Change relcount to long. Check for errors from - bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. - (mark_symbols_used_in_relocations): Change relcount and i to long. - Check for errors form bfd_get_reloc_upper_bound and - bfd_canonicalize_reloc. - * objdump.c (storage): Remove global variable. - (symcount): Changed to long. - (slurp_symtab): New local variable storage. Check for errors from - bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. - (remove_useless_symbols): Change return value and count to long. - (objdump_print_address): Change min, max, thisplace and i to long. - (disassemble_data): Change i to long. - (dump_symbols): Change count to long. - (dump_relocs): Change relcount to long. Check for errors from - bfd_ret_reloc_upper_bound and bfd_canonicalize_reloc. - (display_info_table): Add casts when passing LONGEST_ARCH for - printf %* argument. - -Tue Mar 29 14:59:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nm.c (display_archive): Close each archive element after it has - been displayed. - * objdump.c (display_file): Likewise. - -Mon Mar 28 13:04:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * configure.in: Change error message to refer to bfd/config.bfd - rather than bfd/configure.in. - -Sun Mar 27 16:23:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * More fixes for object formats which allow multiple sections - with the same name: - * objcopy.c (setup_section): Make a new output section even if - one already exists with the given name. - (copy_section): Use isection->output_section rather than trying - to look the output section up by its (possibly non-unique) name. - - * Makefile.in (install-info): Look for binutils.info in the - current directory, then in $(srcdir). Don't use $<. - -Mon Mar 21 12:55:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c (objdump_print_address): Make static. Declare with - prototype. Change vardiff from int to bfd_signed_vma. Correct - binary search termination condition. When looking for same - section symbol in relocatable file, handle final symbol correctly. - -Sun Mar 20 11:26:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * Makefile.in: Avoid bug in hpux sed. - - * objcopy.c: Changes to keep it from stripping symbols used - in output relocations. - (mark_symbols_used_in_relocations): New function. Mark symbols - used in output relocations with BSF_KEEP. - (filter_symbols): Do not strip symbols marked with BSF_KEEP. - (copy_object): Reorder actions. First setup sections, then - build the output symbol table, then copy the section contents. - -Fri Mar 18 10:53:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ar.c (write_archive): Allocate space for the null byte. From - Robert Lipe . - -Thu Mar 17 16:20:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * Makefile.in: Built nm.new and strip.new to avoid problems with - collect when . is in PATH. - (STRIP_PROG): Change from strip to strip.new. - (NM_PROG): Change from nm to nm.new. - (install): Remove the .new when installing. - -Wed Mar 16 16:27:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (powerpc_build_stubs): Set BSF_DYNAMIC flag for each - symbol for which we build a stub. - (powerpc_mangle_relocs): Only reset TOC pointer for a call to a - symbol with BSF_DYNAMIC flag set. - -Tue Mar 15 23:04:13 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * objcopy.c (filter_symbols): Use bfd_is_local_label to determine - if a symbol represents a compiler-generated local label. - (copy_object): Give the BFD backends a chance to copy any private - bfd data from the input BFD to the output BFD. - (setup_section): Give the BFD backends a chance to copy any private - section data from the input section to the output section. - -Mon Mar 14 11:15:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu) - - * objcopy.c (mangle_section): Delete unused function. - (setup_section): Set osection here instead of calling - mangle section to do it. - -Mon Mar 14 12:11:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * ar.c (write_archive): Close inarch before unlinking it. - -Fri Mar 11 22:20:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (main): For PowerPC, call powerpc_build_stubs and - powerpc_resolve_stubs. Use __GOT0, not __toc_start. Handle it if - the start and end symbols are not in the text section. - (struct powerpc_stub): New struct definition. - (powerpc_stubs, powerpc_stub_insns): New static variables. - (powerpc_initial_got_size): New static variable. - (powerpc_build_stubs): New function. - (powerpc_resolve_stubs): New function. - (powerpc_mangle_relocs): Clear extraneous data in .got section. - Rearrange reloc handling to handle ELF relocs that are not - partial_inplace. Resolve PC relative relocs. - -Wed Mar 9 13:48:11 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * ar.c (move_members): Fix it so that the abi positional modifiers - don't delete all archive members following the insert point. - -Tue Mar 8 13:14:43 1994 Steve Chamberlain (sac@jonny.cygnus.com) - - * coffgrok.[ch]: New files, understand coff objects. - * coffdump.c: Uses coffgrok to dump out the debug info of a coff - file. - * sysroff.info: Description of a SYSROFF object file. - * sysinfo.y, syslex.l: Parse info file, generate a reader, writer, - header files and a printer. - * srconv.c: Uses coffgrok.c and sysroff.info to convert a coff - file to a SYSROFF file. - -Sat Feb 26 13:35:26 1994 Stan Shebs (shebs@andros.cygnus.com) - - * ar.c (do_quick_append): Pad with a genuine character 10, - rather than whatever '\n' might happen to be. - -Tue Feb 22 18:25:52 1994 Ian Lance Taylor (ian@cygnus.com) - - * nlmconv.c (main): Ignore debugging symbols when looking for - special symbols by name. - -Sun Feb 20 18:47:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com) - - * nlmconv.c: Include libiberty.h. - - Support for PowerPC NetWare. - * nlmconv.c (main): For PowerPC NetWare, automatically define the - special symbols __toc_start. - (select_output_format): Handle bfd_arch_powerpc. - (mangle_relocs): Likewise. - (powerpc_mangle_relocs): New function. - -Thu Feb 17 09:28:23 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ar.c, bucomm.c, nlmconv.c, nm.c, objcopy.c, objdump.c, - size.c: Use bfd_get_error and bfd_set_error and new error names. - -Fri Feb 11 15:54:51 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * objcopy.c (strip_main, copy_main): Add missing 'break' in switch. - -Mon Feb 7 19:45:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c (disassemble_data): Handle bfd_arch_powerpc. - -Sun Feb 6 22:08:20 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * strings.c objdump.c nlmconv.c objcopy.c nm.c ar.c size.c (main): - Call xmalloc_set_program_name. - -Fri Feb 4 10:46:01 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * objcopy.c (filter_bytes): Make MEMHUNK a char *, not PTR, so we - can do arithmetic on it. - -Thu Feb 3 14:06:41 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * objdump.c (dump_section_stabs, read_section_stabs, - print_section_stabs): Functions broken out of dump_stabs_1. - Free the stabs and strings when done with them. - -Wed Feb 2 13:42:23 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * nlmconv.c (main): Use bfd_get_flavour instead of struct member. - * ar.c (print_contents, extract_file), size.c - (print_berkeley_format, print_sysv_format): Use bfd_get_filename and - bfd_my_archive instead of dereferencing the structs directly. - - * ar.c: Use bfd_fatal and bfd_nonfatal instead of bfd_perror and exit. - Indent. Remove DEFUNs. - - * nlmconv.c (main), objcopy.c (copy_file): Print matching formats - if ambiguous match. - * nm.c (display_file, display_archive), size.c (display_bfd): - Eliminate gotos. - Print matching formats if there is an ambiguous match. Use - bfd_nonfatal instead of hardcoded error message if nothing matches. - - * arsup.c, ar.c, objdump.c: Use bfd_get_filename instead of - abfd->filename. - - * nm.c (display_archive): New function, from code in display_file. - (display_rel_file): Renamed from do_one_rel_file. - - * size.c: Indent. - (display_archive): New function from code in display_file. - (display_file): Check bfd_close error return. - - * strings.c (strings_object_file): Check bfd_check_format - error return. - - * strings.c, objdump.c, size.c: Use bfd_nonfatal instead of bfd_perror. - - * bucomm.c: Delete references to exit_handler. It wasn't set - anywhere, and now that we're using the libiberty xmalloc, it - wouldn't always get called before exiting. - (list_matching_formats): Function moved from objdump.c. - * bucomm.h: Declare it. - - * objdump.c (disassemble_data): Move some variable decls closer to - their use. Add some comments. Replace a nested block with a - return. - -Mon Jan 31 18:50:41 1994 Stan Shebs (shebs@andros.cygnus.com) - - * objdump.c (display_target_list, display_info_table): Check that - the bfd of the dummy output file is not null. - -Wed Jan 26 13:13:18 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * objcopy.c (filter_bytes): New function. - (copy_section): Call it. - (copy_options, copy_usage, copy_main): Add --byte option to - activate it. Appropriate the -b option (which was an undocumented - synonym for -F) for it, also. Add --interleave, -i option for - additional control. - (setup_section, copy_section, mangle_section): Renamed with no `s' - on the end. - * objcopy.1, binutils.texi: Document the new options. - - * objdump.c (display_target_tables, display_target_list): - New functions broken out of display_info. - Eliminate some magic constants. Use more meaningful variable names. - (dump_bfd_header): New function broken out of display_bfd. - (dump_section_header): New function broken out of dump_headers. - (remove_useless_symbols): Don't shadow global variable name with - parameter. - (objdump_print_address): Fix backward test. - -Tue Jan 25 19:40:54 1994 Stan Shebs (shebs@andros.cygnus.com) - - * bucomm.c (print_arelt_descr): Change decl of `when' to time_t. - * objdump.h: Removed. - -Mon Jan 24 13:29:02 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * objdump.c (display_file): Remove call to list_matching_formats. - It would never be called. - (list_matching_formats): Take an arg giving the list of matching - formats. - (display_bfd): Pass the arg, and get it filled in by calling - bfd_check_format_matches instead of bfd_check_format. - (display_info, display_info_table): target_vector was renamed to - bfd_target_vector. - - * binutils.texi (objdump): Note some limitations of -h section - address printing. - -Sat Jan 22 16:20:46 1994 Stan Shebs (shebs@andros.cygnus.com) - - * Makefile.in (MALLOC): Set to emptiness by default. - (ALL_CFLAGS): Add and use. - (arparse.h): Make it depend on arparse.y. - * ar.c (libbfd.h): Don't require to be in ../bfd. - * objdump.c (comp): Rename to compare_symbols. - -Fri Jan 21 20:22:30 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * objdump.c (list_matching_formats): If the file format is ambiguous, - print the matching names so the user can choose one. - (display_bfd): Call it. - (display_file): Call it. - -Fri Jan 21 19:17:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c (disassemble_data): Support bfd_arch_rs6000. - -Mon Jan 17 13:57:25 1994 Stan Shebs (shebs@andros.cygnus.com) - - * objdump.c (stab_name): Allocate dynamically. - (stab_print): Use pointers to strings instead of char arrays. - (dump_stabs): Change alloc and init of arrays appropriately. - (dump_stabs_1): Always decide whether to print stab_name or - the stab's type number, if unnamed. - -Fri Jan 14 14:42:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objcopy.c (strip_main, copy_main): Don't clobber the input file - if copy_file fails. - - * nlmconv.c (main): Warn about an attempt to use a shared library - with uninitialized data. - - * nlmconv.c (setup_sections): Make sure that we align the - output_offset of each input section appropriately. - -Thu Jan 13 17:32:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c (dump_relocs): Don't crash if section name is NULL. - -Tue Jan 11 19:46:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * filemode.c (filemodestring): Commented out; not used. - (mode_string): Use POSIX definitions. - (ftypelet): Likewise. - (rwx): Removed; no longer used. - * bucomm.c: Include bucomm.h. - (bfd_nonfatal, bfd_fatal): Argument is const. - (fatal): Make __STDC__ version. - * bucomm.h (mode_string): Declare. - * Makefile.in (bucomm.o): Depend upon bucomm.h - -Sun Jan 9 12:03:20 1994 Ken Raeburn (raeburn@rtl.cygnus.com) - - * bucomm.c (xmalloc, xrealloc): Deleted. - * bucomm.h (xmalloc, xrealloc): Fix prototypes, to correspond to - libiberty version of functions. - -Thu Jan 6 06:18:15 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * binutils.texi: Add a chapter summarizing the ways to select - aspects of the target for each program. - - * objdump.c (long_options, usage): Add long equivalents for all - remaining short options that lacked them. - * binutils.texi objdump.1: Document them. - - * size.c (usage): Tweak usage message. - * size.1: Add missing `=' in examples. - - * binutils.texi strip.1 objcopy.1 nlmconv.1 objcopy.c nlmconv.c: - Use "--target=bfdname" as the option to select the BFD target, - like nm and size already do. - Reserve "--format=format" for textual output selection options, but - for now keep old option names as obsolete for backward compatibility. - - * strings.c (main, strings_object_file, usage): Add --target option. - * binutils.texi strings.1: Document it. - -Sat Jan 1 13:58:24 1994 David J. Mackenzie (djm@thepub.cygnus.com) - - * ar.c (main): Add \n in error message. - -Thu Dec 23 12:23:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - gcc -Wall lint: - * ar.c (main): Put parens around assignment used as truth value. - * objcopy.c (strip_main): Remove unused variables. Return 0. - (copy_main): Remove unused variables. Return 0. - * objdump.c (display_bfd): Declare return value as void. - (stab_print): Use "" instead of 0 to initialize array. - (dump_stabs_1): Print vma using printf_vma. - (display_info): Put parens around assignment used as truth value. - * strings.c (print_strings): Cast printf arguments. - - * objcopy.c (copy_main): Use copy_options, not strip_options. - - * nlmheader.y (command): Warn about illegal date values. - -Wed Dec 15 11:18:03 1993 David J. MacKenzie (djm@frosty.eng.umd.edu) - - * bucomm.c bucomm.h: Run through indent. De-ansidecl-ify. - (bfd_nonfatal): New function. - (bfd_fatal): Call it. - - * objcopy.c (smart_rename): Do a copy if the dest file has - multiple hard links. Remove source file on successful copy. - Try to preserve mode and owner on successful rename. - - * objcopy.c: Run through indent. Clean up a bit. - Make global variables static. - Make {input,output}_{target,filename}, show_version local - to various functions. - New global variable `status' for exit status. - (strip_main, copy_main): New functions with code from main. - (nonfatal): New macro. Use it globally instead of bfd_perror and - bfd_fatal. - - (copy_object): Call mangle_sections with bfd_map_over_sections. - (mangle_sections): Adjust for new calling convention. - -Fri Dec 10 11:28:11 1993 Ian Lance Taylor (ian@deneb.cygnus.com) - - * nlmheader.y (command): Accept MAP and FULLMAP without arguments. - * nlmconv.c (main): Change error message for MAP and FULLMAP. - -Thu Dec 9 17:47:19 1993 Ian Lance Taylor (ian@deneb.cygnus.com) - - * nlmconv.c (main): Warn about imported symbols that are not in - the IMPORT list even if the IMPORT keyword is not used. - - * nlmconv.c (debug, unlink_on_exit): New static variables. - (long_options): Add "debug" and "linker". - (main): Handle -d and -l arguments. Make command line input and - output files optional. Parse the command file before opening the - BFD's, which requires storing more information in local variables. - If INPUT names multiple files, link them together. Use OUTPUT for - the output file name if not named on command line. - (show_usage): Changed for new options. - (link_inputs): New function to automatically invoke linker to - handle multiple INPUT files. - (choose_temp_base_try, choose_temp_base, pexecute): New functions, - mostly copied from gcc/gcc.c. - * nlmconv.h (input_files, output_file): Declare. - * nlmheader.y (input_files, output_file): Define. - (command): Support INPUT with a string_list argument. Support - OUTPUT. - (string_list): Renamed from module_list. - * Makefile.in (nlmconv.o): Define LD_NAME based on - program_transform_name. - -Wed Dec 8 10:09:04 1993 Ian Lance Taylor (ian@deneb.cygnus.com) - - * nlmheader.y (nlmheader_identify): New function. Use it to print - the program name just once, instead of with every error message. - -Mon Dec 6 16:11:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (long_options): Changed --header-info to --header-file - to match documentation and usage message. - -Sun Dec 5 01:31:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu) - - * objdump.c (dump_relocs): Avoid dereferencing a NULL sym_ptr_ptr - in a relocation. - -Thu Dec 2 16:00:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (main): Change various types from bfd_size_type to - size_t, since they have to be arguments to fread and fwrite. - Change set from char * to unsigned char *. - (select_output_format): Make mach argument unsigned. Handle - bfd_arch_alpha. - (setup_sections): Don't copy the .reginfo section of an ECOFF - file. Call bfd_set_reloc to initialize the relocation fields. - (copy_sections): Don't copy the .reginfo section of an ECOFF file. - Combine all relocs for a section. - (mangle_relocs): Change type of relocs to permit specific - functions to change it. Call alpha_mangle_relocs for alpha, - default_mangle_relocs for other architectures. - (default_mangle_relocs): New function. Adjust the address of all - relocs by the output_offset. - (i386_mangle_relocs): Change type of relocs argument. Cast length - argument to memmove to size_t. - (alpha_mangle_relocs): New function. - -Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com) - - * nlmconv.c (select_output_format): Use nlm32-sparc for - bfd_arch_sparc. - -Wed Nov 17 14:41:35 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com) - - * nlmconv.1: added man page - * objcopy.1: fixed format errors - -Wed Nov 17 12:03:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * Makefile.in: Use CFLAGS as well as LDFLAGS when linking. - -Wed Nov 17 04:50:55 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * strings.1: Fix typo. - -Mon Nov 15 12:03:20 1993 Ken Raeburn (raeburn@rtl.cygnus.com) - - * Makefile.in (DISTSTUFF): Build "info". - (VERSION): Updated to cygnus-2.3.1; 2.3 has gone out. - -Sun Nov 14 00:27:24 1993 Jeffrey A. Law (law@snake.cs.utah.edu) - - * objdump.c (dump_stabs): Handle stabs-in-som as implemented - by the new BFD SOM assembler. - -Sat Nov 13 07:14:05 1993 David J. Mackenzie (djm@rtl.cygnus.com) - - * ar.1 c++filt.1 nm.1 objcopy.1 objdump.1 ranlib.1 size.1 - strings.1 strip.1: Replace \(em in NAME section with \- so - makewhatis can grok it. - -Tue Nov 9 15:22:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (i386_mangle_relocs): Adjust reloc address by - section output_offset. - -Fri Nov 5 12:11:52 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com) - - * binutils.texi: added nlmconv chapter - -Wed Nov 3 16:10:50 1993 Jeffrey Wheat (cassidy@cygnus.com) - - * Makefile.in: Change RUNTESTFLAGS to RUNTEST_FLAGS - -Wed Nov 3 15:09:23 1993 Ken Raeburn (raeburn@rover.cygnus.com) - - * Makefile.in (distclean): Don't get rid of dvi or info files. - -Tue Nov 2 13:29:59 1993 David J. Mackenzie (djm@rtl.cygnus.com) - - * objcopy.c (S_ISLNK): Define as 0 if there's no S_IFLNK. - -Fri Oct 29 16:02:34 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * binutils.texi: Move objcopy docs into alphabetical order. - - * objdump.c: Use xmalloc instead of malloc. - -Fri Oct 29 11:11:14 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * objdump.c (info): Rename to formats_info. - (dump_stabs_1): Better comments and formatting. - -Thu Oct 28 19:43:16 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * ar.c (main): Always create the archive when quick appending, - even if no input files have been given. - -Wed Oct 27 12:03:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (main): Set sharedDebugRecordOffset and - sharedDebugRecordCount fields in extended header. - - * nlmconv.c (main): Force moduleName field to upper case. - -Mon Oct 25 16:45:42 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objcopy.c (main): Give a usage message if there are too many - arguments. - -Mon Oct 25 10:37:08 1993 Ken Raeburn (raeburn@rover.cygnus.com) - - * Makefile.in (install-info): Rewrite to take advantage of VPATH, - so FSF distributions (with info files in $(srcdir)) install - properly. - (DISTSTUFF): Build nlmheader.c too. - -Fri Oct 22 11:43:23 1993 Ken Raeburn (raeburn@rover.cygnus.com) - - * ar.c (program_name): Don't define here. - * objdump.c: Include "bucomm.h". - (xmalloc): Don't declare here. - (program_name): Don't define here. - (program_version): Fixed type in declaration. - * size.c: Include "bucomm.h". - (program_name): Don't declare here. - -Fri Oct 22 14:10:41 1993 Mark Eichin (eichin@cygnus.com) - - * objdump.c (fprintf): hide declaration in FPRINTF_ALREADY_DECLARED - -Fri Oct 1 12:43:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (i386_mangle_relocs): Resolve and remove PC relative - relocs against defined symbols in the same section. - -Thu Sep 30 16:46:26 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * Makefile.in (binutils.dvi): use TEXIDIR to find texinfo.tex - -Sat Sep 25 18:09:29 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * objcopy.c (simple_copy, smart_rename): New functions. - (main): Use them. - -Fri Sep 24 15:38:29 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * Makefile.in (clean, distclean): Recurse into testsuite. - -Thu Sep 23 01:05:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objcopy.c (setup_sections, copy_sections): If stripping, don't - copy SEC_DEBUGGING sections. - * objdump.c (dump_headers): Print SEC_DEBUGGING flag. - - * objdump.c (usage): Mention --stabs. - - * objcopy.c (copy_object): Copy all applicable file flags. - (copy_file): Don't copy EXEC_P specially here. - -Mon Sep 20 19:28:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (main): Adjust data section size to correspond to bss - alignment adjustment. Clear BSF_SECTION_SYM if symbol is moved to - a different section. Use time_t for time variable. - (setup_sections): Only put sections with contents in output NLM. - (i386_mangle_relocs): No symbols are common at this point. Add - casts to avoid warnings. - -Fri Sep 10 11:00:40 1993 Stan Shebs (shebs@rtl.cygnus.com) - - * objdump.c: Made the --stabs option work for stabs-in-coff. - (ELF_STAB_DISPLAY): Removed. - (dump_elf_stabs): Renamed to dump_stabs, changed to run for - any object file format. - (dump_elf_stabs_1): Renamed to dump_stabs_1, added calls to - generic BFD routines for non-ELF case, changed format of message - for no-section-found case. - (display_bfd): Always call dump_stabs if requested. - (dump_data): Call bfd_section_size to get section size. - -Fri Sep 10 08:12:23 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * Makefile.in (install): Don't put strings in tooldir/bin. - -Mon Sep 6 15:39:04 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (total_bss_size): Removed. - (main): Set the bss vma to always follow the data section. Move - symbols into new sections, and adjust values by output_offset. - (setup_sections): Don't copy all sections, but instead point all - text sections to .text, all data sections to .data, and all bss - sections to .bss. - (copy_sections): Adjust accordingly. - -Thu Sep 2 12:34:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - Only build nlmconv if configured for a NetWare target. - * configure.in: If we have some *-*-netware* target, or are using - all targets, set BUILD_NLMCONV to $(NLMCONV_PROG) in Makefile. - * Makefile.in (PROGS): Use $(BUILD_NLMCONV) rather than - $(NLMCONV_PROG). - -Tue Aug 31 14:13:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * objdump.c (ARCH_all): Define ARCH_hppa too. - (dump_headers): Don't test for SEC_BALIGN if it's not defined by - bfd.h. - -Tue Aug 31 13:29:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * nlmconv.c (main): Force creation of .bss section. Set up the - sections before looking at the symbols. Move all common symbols - into .bss section. Automatically define _edata and _end. Only - export symbols in the export list, with multiple prefixes if - necessary. Warn if no version. Always create extended header. - Set date automatically if not already set. - (setup_sections): Count size of bss sections. - (mangle_relocs, i386_mangle_relocs): Accept section argument, and - take reloc_count as a changeable pointer; changed callers. - (i386_mangle_relocs): Remove PC relative relocs within a section, - as they require no adjustment. - * nlmheader.y: Fixed memory allocation throughout: token STRING is - now allocated on the heap, and freed if not needed. Null - terminated copyright message. Accept version with only two - strings. - (symbol_list_opt): New nonterminal, either symbol_list or empty. - (symbol_list): Use left recursion to avoid overflowing parser - stack. - (yylex): Rearranged beginning of line check. Accept quoted - strings using single quotes. End generic argument at comment - character or parentheses. - (string_list_append): Fixed. - (string_list_append1): New function. - - * bucomm.h: The first argument to xrealloc is PTR, not char *. - * bucomm.c (xrealloc): Use PTR rather than char *. - * Makefile.in (objdump.o): Depend upon config.status to notice - --with-targets changes. - (nlmconv.o): Depend upon bucomm.h. - -Tue Aug 17 09:46:01 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * configure.in: Don't pass cpu to config.bfd. - -Thu Aug 12 16:43:04 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * Makefile.in ($(NM_PROG)): Depend on demangle.o. - (demangle.o): New target. - (cplus-dem.o): Depend on it, to force compilation order when doing - parallel compiles. - - * nm.c (print_symbol_info_{bsd,sysv,posix}): Take a bfd arg. - (struct output_fns print_symbol_info): Ditto. - (long_options, usage, main): Add -C --demangle option. - (print_symname): New function, demangling if requested. - (print_symbols, print_symbol_info_{bsd,sysv,posix}): Use it. - -Wed Aug 11 22:57:23 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * Makefile.in: Put CFLAGS last in compilation rules and omit from - linking rules. Use ARCHDEFS to compile objdump.c. - Update dependencies. - * configure.in: Construct ARCHDEFS based on the BFD target makefile - fragments. - * objdump.c: Conditionalize calls to the print_insn_ARCH functions - according to ARCHDEFS. - -Thu Aug 12 08:06:15 1993 Ian Lance Taylor (ian@cygnus.com) - - * ar.c: Removed obsolete and non-functional GNU960 code. - -Wed Aug 11 13:08:26 1993 Ian Lance Taylor (ian@cygnus.com) - - * size.c (berkeley_sum): New function. - (bsssize, datasize, textsize): New global variables. - (bss_section_name, data_section_name, text_section_name): Removed. - (print_berkeley_format): Map berkeley_sum over all the sections, - rather than only reporting sizes of specifically named sections. - * Makefile.in ($(OBJDUMP_PROG)): Removed dependency on size.o. - -Tue Aug 10 10:46:01 1993 Ian Lance Taylor (ian@cygnus.com) - - * nlmconv.c, nlmconv.h, nlmheader.y: New files for program to - convert object files into NetWare Loadable Modules. - * Makefile.in (NLMCONV_PROG): New macro, define to be nlmconv. - (PROGS): Add NLMCONV_PROG. - (nlmheader.c, nlmheader.o, nlmconv.o, $(NLMCONV_PROG)): New - targets. - -Thu Aug 5 15:48:32 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) - - * Makefile.in: define MAKEOVERRIDES to an empty string - -Wed Aug 4 17:08:08 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * objcopy.c (copy_file): Make failures to process a file nonfatal. - -Mon Aug 2 11:28:23 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * nm.c: Add -B option, like --format=bsd. - -Tue Jul 27 16:29:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objcopy.c (copy_file): If the file is neither an object nor an - archive, give an error rather than returning success. - -Mon Jul 19 16:13:40 1993 Ken Raeburn (raeburn@rtl.cygnus.com) - - * objdump.c (objdump_print_address): Prefer non-local symbols over - local ones, and especially discriminate against debugging symbols. - Also, for relocateable files, try to find a symbol in the current - section, instead of picking one from some random section with a - convenient value (read, section offset). - (disassemble_data): Cast argument to malloc to size_t first. - (dump_data): Likewise. - (dump_relocs): If a single section name is specified, show relocs - only for that section. Otherwise, silently omit sections without - relocs. Format table nicely even if values are printed using 16 - digits instead of 8. - -Fri Jul 16 15:19:59 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * nm.c: Changes for final version of POSIX.2. - (print_symbol_filename_{bsd,sysv,posix}): New functions. - (formats): Add an element for a pointer to them. - (print_symbols): Call it. - (print_object_filename_posix, print_archive_member_posix): Produce - output according to new POSIX.2 spec. - - * strings.c (print_strings): Handle STREAM being NULL. - (strings_a_section): Pass a NULL. - (main): Don't open /dev/null. - -Thu Jul 15 12:44:09 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c (disassemble_data): Handle the m88k. - (display_bfd): Use bfd_errmsg, rather than just claiming that the - bfd is not an object file. - -Mon Jul 12 17:55:34 1993 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in (TAGS): make work again by naming directories - explicitly rather than depending on undefined macros. - (INSTALL_XFORM): correct bad install target. - -Fri Jul 2 16:58:34 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * strings.c: Doc fixes. - -Sun Jun 27 13:35:24 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * Makefile.in: Note dependencies on bucomm.h. - (cplus-dem.o): Link c++filt with version.o. - - * strings.c: Include bucomm.h and add prototypes to other decls. - Remove -h option. - - * bucomm.h: Declare xrealloc. - - * nm.c, objcopy.c, objdump.c, size.c, strings.c (main, usage): Add - --help option. Put "GNU" in the version message. - (usage): Take stream and exit status as args. - (main): Pass new args to usage. - -Fri Jun 25 23:12:12 1993 David J. Mackenzie (djm@thepub.cygnus.com) - - * strings.c, strings.1: New files. - * binutils.texi: Document strings. - * Makefile.in: Add rules for it. - -Fri Jun 25 20:44:43 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) - - * objdump.c: Use size-independent bfd elf section names. - -Sun Jun 20 23:09:06 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) - - * objdump.c (objdump_print_address): Handle wide offsets by - calling sprintf_vma. - -Fri Jun 18 14:29:12 1993 Per Bothner (bothner@deneb.cygnus.com) - - * objdump.c (syms2): Removed unused variable. - * objdump.c (remove_useless_symbols): New function. - * objdump.c (comp): Simplify. - * objdump.c (dis-assemble_data): Make simpler and more - efficient how we filter out useless symbols: Just filter - BEFORE the sort (using remove_useless_symbols). - * objdump.c (objdump_print_address): Simplify. - Change output syntax to match gdb. - -Thu Jun 17 16:53:56 1993 david d `zoo' zuhn (zoo@cygnus.com) - - * Makefile.in: canonicalize install.sh; for use within - this directory (and subdirs) - -Mon Jun 14 12:13:22 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) - - * Makefile.in (install, install-info): remove parentdir support, - use INSTALL_XFORM; define INSTALL_XFORM - -Thu Jun 10 17:29:21 1993 Per Bothner (bothner@cygnus.com) - - * objcopy.c (copy_object): Fix bad size passed to xmalloc(). - -Mon Jun 7 12:41:12 1993 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h. - * configure.in: No longer need to configure to get sysdep.h. - * objcopy.c (copy_object): Fix symbol table handling. - -Fri Jun 4 17:20:03 1993 Per Bothner (bothner@cygnus.com) - - * objcopy.c (filter_symbols): Cannot filter the symbols - in place, because that confuses the relocs, so take separate - parameter for output array. - * objcopy.c (sympp): Make two variables: isympp and osympp. - * objcopy.c (copy_object): Allocate separate array (osympp) - for filtered symbols. - -Fri Jun 4 10:51:44 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: change recursion test to presence of a configured - testsuite directory - -Thu Jun 3 14:05:57 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * Makefile.in (underscore.c): Hack the backquoted command so it - doesn't cause Solaris make to bomb. - -Thu Jun 3 10:40:19 1993 Jeffrey Osier (jeffrey@cygnus.com) - - * Makefile.in: added c++filt and objcopy to MANPAGES variable - -Thu Jun 3 00:32:52 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: rename LOADLIBES to EXTRALIBS - -Wed Jun 2 18:30:24 1993 Jeffrey Osier (jeffrey@cygnus.com) - - * c++filt.1, objcopy.1: new man pages - -Fri May 28 15:01:24 1993 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in (install): Also install ar and ranlib in - $(tooldir)/bin; needed for building libgcc.a. - * objdump.c (objdump_print_address): Fix the check - "coincidental" label matches by dis-allowing undefined - or com symbols. - -Thu May 27 16:58:31 1993 Jeffrey Osier (jeffrey@cygnus.com) - - * biutils.texi: revised c++filt chapter - -Wed May 26 17:24:17 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (FLAGS_TO_PASS): Pass down CC and CFLAGS. - -Tue May 25 00:26:47 1993 Ken Raeburn (raeburn@cygnus.com) - - * objdump.c (slurp_symtab): Print warning for bad symbol table. - (bfd_elf32_find_section, Elf32_Internal_Shdr): Updated - declarations and uses. - - * Makefile.in (DISTSTUFF): Don't build binutils.mm. - -Fri May 21 10:51:19 1993 David J. Mackenzie (djm@rtl.cygnus.com) - - * nm.c: Add -f/--format, -P/--portability, -t/--radix options. - Make global variables static. - (main): Make -v like -n, not -V, and make -A like -o, for POSIX.2. - (set_print_radix, set_output_format, - print_{object_filename,archive_filename,archive_member,symbol_info} - {bsd,sysv,posix}): New functions. - (display_file, print_symbols): Call them. - - * ar.c: Improve error messages. - - * nm.c (main): Handle long options that just set a flag. - - * nm.c (main), ar.c (do_show_version), objcopy.c (main), size.c - (main): Exit after printing the version number, per the GNU coding - standards. - -Mon May 17 13:20:25 1993 Per Bothner (bothner@cygnus.com) - - * README, Makefile.in: Minor updates for 2.2. - -Fri May 14 11:12:26 1993 Per Bothner (bothner@cygnus.com) - - * Makefile.in (underscore.c): Automatically generate - (using nm) a file with the variable prepends_underscore. - * Makefile.in (c++filt): Link underscore.o with cplus-dem.o - so that initial underscores get removed iff appropriate. - * binutils.texi: Preliminary documentation for c++filt. - * Makefile.in, binutils.texi: Set to version 2.2. - - * NEWS: Mention copy->objcopy renaming and new c++filt program. - -Wed May 12 12:05:36 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (cplus-dem.o, $(DEMANGLER_PROG)): Build the - demangler via cplus-dem.o, rather than directly from the .c file. - - * objcopy.c: Renamed from copy.c, updated comments accordingly. - * Makefile.in, binutils.texi: Renamed copy to objcopy. - * is-strip.c, maybe-strip.c, not-strip.c: Updated comments for - rename of copy to objcopy. - -Mon May 10 17:20:18 1993 Per Bothner (bothner@cygnus.com) - - * binutils.texi (strip, -v option): Fix typo. - -Fri May 7 13:57:50 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (RUNTEST): Define. - (FLAGS_TO_PASS): Pass down RUNTEST. - -Tue May 4 10:06:50 1993 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (DEMANGLER_PROG): Name it c++filt. - (PROG): Also build and install COPY_PROG. - -Mon May 3 19:11:48 1993 Per Bothner (bothner@cygnus.com) - - * Makefile.in: Change definition of $(tooldir) to match FSF. - -Wed Apr 28 23:41:32 1993 David J. Mackenzie (djm@rtl.cygnus.com) - - * size.c (usage): Add missing options. - (main): Clean up option parser. - - * objdump.c (usage): Add missing options. - (display_file): Print program name before calling - bdf_perror. - - * nm.c (usage): Add missing options. - (main): Clean up option parser. - (display_file): Print program name before calling - bdf_perror. - - * copy.c (copy_usage, strip_usage): Add missing options. - - * ar.c (usage): New function. - (main): Call it. - (open_inarch, do_quick_append): Print program name before calling - bdf_perror. - -Thu Apr 22 15:01:35 1993 Ian Lance Taylor (ian@cygnus.com) - - * nm.c (main): Accept and ignore -A and -B for MIPS compatibility. - -Mon Apr 19 14:06:59 1993 Rob Savoye (rob@cygnus.com) - - * Makefile.in: Added FLAGS_TO_PASS so tests get run on freshly - built binaries if they exist. (otherwise the path) - -Wed Apr 7 22:22:50 1993 Rob Savoye (rob@cygnus.com) - - * Makefile.in: Changed check target to use DejaGnu. - -Thu Apr 1 12:37:13 1993 Jim Kingdon (kingdon@cygnus.com) - - * Makefile.in: Remove am29k-pinsn.c, i960-pinsn.c. - objdump.c: a29k and i960 are `disassemble' not `print'. - - * objdump.c: Rename print_address to objdump_print_address - and change parameters. - (disassemble_data): Use objdump_print_address. - -Wed Mar 31 10:25:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * objdump.c (disassemble_data): print_insn_sparc is now a - `disassemble' not a `print'. - Makefile.in: Remove sparc-pinsn.c (now in libopcodes.a). - - * objdump.c (disassemble_data): Use new read_memory_func stuff. - -Thu Mar 25 10:38:11 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * objdump.c (fprintf): Declaration of variadic function had better - be a prototype for ANSI C systems. - -Mon Mar 22 23:19:46 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: rename test-install to install-check - -Fri Mar 19 14:40:08 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * objdump.c (disassemble_data): Add H8500. - -Fri Mar 19 10:56:51 1993 Jim Kingdon (kingdon@cygnus.com) - - * objdump.c (usage): Mention long options. - -Thu Mar 18 14:22:17 1993 Per Bothner (bothner@rtl.cygnus.com) - - * nm.c: Modify behavior of -o flag for archives to match - BSD4.4 and Sunos 4: Prefix archive name before each line. - - * m68k-pinsn.c: Removed. Subsumed by ../opcodes/m68k-dis.c. - * i386-pinsn.c: Removed. Subsumed by ../opcodes/i386-dis.c. - * Makefile.in: Adjust accordingly. - * objdump.c: Support new-style disassemblers (ones that use - the interface of ../include/dis-asm.h). - -Thu Feb 25 15:57:00 1993 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in: When making tar file, remove texinfo/*, - except for texinfo/texinfo.tex. - * ardup.c: Add extern declaration of strdup. - * Makefile.in (testsuite): Add 'else true' since otherwise - Ultrix /bin/sh complains. - -Wed Feb 24 19:44:18 1993 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in: Set VERSION to 2.1. - * README, NEWS: Updates. - * nm.c: Add -v as a synonym for -V. - -Tue Feb 23 19:00:50 1993 Mike Werner (mtw@poseidon.cygnus.com) - - * configure.in: added testsuite to configdirs. - * Makefile.in: added support for building testsuite. - -Mon Feb 22 22:52:10 1993 Per Bothner (bothner@rtl.cygnus.com) - - * objdump.c (disassemble_data): Print function names when - given by bfd_find_nearest_line. If not - still print - line numbers. - -Mon Feb 22 07:54:03 1993 Mike Werner (mtw@poseidon.cygnus.com) - - * binutils/testsuite: made modifications to testcases, etc., to allow - them to work properly given the reorganization of deja-gnu and the - relocation of the testcases from deja-gnu to a "tool" subdirectory. - -Mon Feb 22 10:27:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) - - * objdump.c (dump_data): Free up section contents each time - through the loop. Reported by minyard@bnr.ca. - -Sun Feb 21 10:55:55 1993 Mike Werner (mtw@poseidon.cygnus.com) - - * binutils/testsuite: Initial creation of binutils/testsuite. - Migrated dejagnu testcases and support files for testing nm to - binutils/testsuite from deja-gnu. These files were moved "as is" - with no modifications. This migration is part of a major overhaul - of dejagnu. The modifications to these testcases, etc., which - will allow them to work with the new version of dejagnu will be - made in a future update. - -Fri Feb 12 10:05:20 1993 Fred Fish (fnf@cygnus.com) - - * Makefile.in (LIBIBERTY_SRC_DIR, LIBIBERTY_BIN_DIR): New macros. - * Makefile.in (LIBIBERTY): Use LIBIBERTY_BIN_DIR. - * Makefile.in (DEMANGLER_PROG): New program to build. Add macro - and rule. - * Makefile.in (PROGS): Add DEMANGLER_PROG. - -Tue Jan 26 11:56:33 1993 Ian Lance Taylor (ian@cygnus.com) - - * copy.c, nm.c, objdump.c, size.c: Use new bfd_is_com_section - macro rather than checking for equality to bfd_com_section. - -Fri Jan 8 15:50:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c (disassemble_data): Fix code to find first useless - symbol. - -Thu Jan 7 13:13:31 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * objdump.c (disassemble_data): Use mips_print_insn for MIPS. - Don't core dump if bfd_find_nearest_line returns false. - -Wed Jan 6 17:14:01 1993 Steve Chamberlain (sac@thepub.cygnus.com) - - * objdump.c (disassemble_data): know how to disassemble z8000s - too. - -Wed Jan 6 15:16:27 1993 Per Bothner (bothner@cygnus.com) - - * arsup.h (interactive), bucomm.h (program_name): Prefix - with 'extern', to avoid warnings from some compilers. - -Wed Jan 6 15:14:11 1993 Per Bothner (bothner@rtl.cygnus.com) - - * arparse.y: fix unnecessary shift/reduce - -Tue Dec 22 15:46:56 1992 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in: Make check depend on all. - * Makefile.in (distclean): Remove sysdep.h. - * size.c: Use %u format where appropriate. - * objdump.c: Standardize: L_SET -> SEEK_SET. - * objdump.c: Use new macro bfd_asymbol_bfd. - * configure.in: Allow std-host as the default ${mys_host}. - -Thu Dec 17 19:38:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: added dvi target, define and use TEXI2DVI - -Tue Dec 15 18:05:07 1992 Per Bothner (bothner@cygnus.com) - - * Makefile.in (dist): Fix permissions before release. - * size.c: Use bfd_size_type (and long) where appropriate. - * ar.c: Make writing a map the default, to be compatible - with SYSV and Posix.2. Remove some bogus kludges that - handled __.SYMDEF directly. - * NEWS: New file. - -Mon Nov 9 13:36:53 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * Makefile.in: flex no longer needs the -S flag - -Sat Nov 7 15:06:13 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * ar.c (extract_file): utime needs a pointer to a utimbuf - - * Makefile.in: handle -I includes better, adding $(BASEDIR)/bfd to - the list (since some of the bfd/hosts/*.h files include other - files from that directory) - -Fri Nov 6 00:12:51 1992 John Gilmore (gnu@cygnus.com) - - * i960-pinsn.c (MEM_MAX, MEM_SIZ): Set upper bound properly. - -Thu Nov 5 03:37:15 1992 John Gilmore (gnu@cygnus.com) - - Clean up some old BFD ansification macros. - - * arsup.h, bucomm.h, objdump.h: Remove EXFUN from binutils. - It still remains as a local macro in gmalloc.c, which is derived - from some other copy of GNU Malloc somewhere (FIXME). - - * ar.c, objdump.c, size.c: Replace EXFUN with PROTO. Make static - fns really static. - * arsup.h: Declare extract_files. - -Mon Nov 2 12:42:11 1992 Ian Lance Taylor (ian@cygnus.com) - - * ar.c (extract_file): instead of checking USG: if POSIX_UTIME, - use utime and utimbuf structure, otherwise if USE_UTIME use utime - and array of two longs, otherwise use utimes. - -Thu Oct 15 13:57:35 1992 Per Bothner (bothner@cygnus.com) - - * binutils.tex: Document yesterday's changes to strip and copy. - -Wed Oct 14 13:22:14 1992 Per Bothner (bothner@cygnus.com) - - * copy.c: Re-do command-line parsing to use getopt_long(). - Add long option names. Re-think option letters to be more - consistent. - * copy.c: New function filter_symbols() for stripping only - debug-symbols and/or local symbols. Use these to support - the previously-missing options of the old FSF strip. - -Tue Oct 13 01:24:20 1992 John Gilmore (gnu@cygnus.com) - - * configure.in (host): Use ${srcdir}/../bfd/configure.host rather - than repeating a copy of it here. - -Wed Oct 7 12:53:52 1992 Ken Raeburn (raeburn@cygnus.com) - - * copy.c (main): Even if is_strip, accept -d argument indicating - alternate output format. Needed by gdb for Nindy. - - * m68k-pinsn.c (print_insn_arg): Handle new "`" operand type. - -Tue Oct 6 16:33:56 1992 Jeffrey Osier (jeffrey@cygnus.com) - - * binutils.texi: added documentation for "copy" - -Tue Oct 6 14:22:56 1992 Per Bothner (bothner at PersSony) - - * Makefile.in (*clean rules): Some cleaning up. - * Makefile.in (dist): Make diststuff in gprof for a dist. - - * ar.c (do_show_version): New function. - * ar.c (main): Fix so "ar -V" works. - -Thu Oct 1 22:44:45 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * configure.in: now uses the cpu-vendor-os triple instead of - nested cases. - -Fri Sep 25 22:41:08 1992 John Gilmore (gnu@cygnus.com) - - * i960-pinsn.c: Change bzero to memset. - * sparc-pinsn.c: Change index to strchr. - -Mon Sep 21 14:39:56 1992 Ian Lance Taylor (ian@cygnus.com) - - * m68k-pinsn (print_insn_arg, fetch_arg): added support for - operands to memory management instructions, from WRS. - -Tue Sep 15 15:26:38 1992 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in (install): if $(tooldir) exists, install nm and - strip in $(tooldir)/bin. - -Thu Sep 3 11:57:40 1992 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in: Let's call it version 2.0. - -Wed Sep 2 00:25:13 1992 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in: Bump to version 0.98. - * TODO, README: Minor updates. - - * Makefile.in: Added mostlyclean, distclean rules, - and cleaned up clean, realclean. - -Sun Aug 30 21:18:59 1992 Ian Lance Taylor (ian@cygnus.com) - - * Makefile.in: map program names through program_transform_name - when installing. - -Sun Aug 30 18:09:03 1992 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in: Bump to versions 1.97.90. - * cplus-dem.c: Removed. Was nowhere used - and if some - programs are changed to to demangling should now use the - versions in libiberty. - -Thu Aug 27 12:58:09 1992 Brendan Kehoe (brendan@cygnus.com) - - * configure.in: add we32k - -Mon Aug 24 14:53:42 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * ar.c (map_over_members): if the element of the archive has a - null name, fill it in. - - * nm.c (do_one_rel_file): only warn if a bfd's flags say there - will be symbols and there aren't any. - -Wed Aug 19 11:20:25 1992 Ian Lance Taylor (ian@cygnus.com) - - * m68k-pinsn.c: handle new operand type 'r', introduced for cas2. - -Tue Aug 18 20:45:48 1992 Rob Savoye (rob@cygnus.com) - - * nm.c objdump.c: Added support for a +version (-V) - to print the version number. - - * ar.c, copy.c: Added support for a -V option to print - the version number. - -Tue Aug 18 13:28:44 1992 Ian Lance Taylor (ian@cygnus.com) - - * config/mh-apollo68v: removed -g from CC definition. - - * Makefile.in: always create installation directories. - -Mon Aug 17 18:33:41 1992 Per Bothner (bothner@rtl.cygnus.com) - - * m68k-pinsn.c: Minor fix in style of output (don't use - range to indicate floating point control registers). - -Tue Aug 11 23:42:21 1992 Per Bothner (bothner@cygnus.com) - - * ar.c (main): Don't *always* set the verbose flag! - -Wed Aug 5 11:25:27 1992 Per Bothner (bothner@rtl.cygnus.com) - - * copy.c: When is_strip (because it is invoked as the strip - program), follow traditional argv processing: - 'strip file1 file2' now strips file1 and file2, rather - than stripping file1 (as input), leaving output in file2. - -Mon Jul 27 16:28:08 1992 Per Bothner (bothner@rtl.cygnus.com) - - * objdump.c (display_info, display_info_table): Call - bfd_set_format() on dummy bfd before using it (twice). - * ar.c: Make sure archive is created on command 'r' - even when no elements are inserted. (Clean up and - simplify some non-working related code.) - -Mon Jul 20 02:48:38 1992 D. V. Henkel-Wallace (gumby@cygnus.com) - - * configure.in: hppa support doesn't assume hp OS (from sef). - -Sat Jul 18 14:35:22 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * configure.in: recognize hppa hosts (bsd & hpux), error messages - to stderr, not stdout - -Fri Jul 17 18:39:44 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * ar.1, binutils.texi, i960-pinsn.c, nm.1, objdump.1, ranlib.1, - size.1, sparc-pinsn.c, strip.1: removed rcsid's. - -Thu Jul 16 16:55:24 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.dos: removed rcsid. - -Thu Jul 16 08:23:07 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * objdump.c (display_bfd): print state of BFD_IS_RELAXABLE too - -Tue Jun 30 20:26:15 1992 D. V. Henkel-Wallace (gumby@cygnus.com) - - * Makefile.in: Add program_suffix (parallel to program_prefix) - -Thu Jun 25 04:52:45 1992 John Gilmore (gnu at cygnus.com) - - * nm.c (sorters): Lint. Remove excess whitespace. - -Wed Jun 24 13:48:07 1992 Per Bothner (bothner@cygnus.com) - - * nm.c (valueof macro): Add missing parentheses. - (Their lack screwed up numeric_forward().) - -Sun Jun 14 10:33:27 1992 John Gilmore (gnu at cygnus.com) - - * objdump.c (dump_elf_stabs): Also dump .stab.index and - .stab.excl sections. - (dump_elf_stabs_1): Split out main body of old dump_elf_stabs. - * objdump.1, binutils.texi: Document new sections dumped. - -Fri Jun 12 22:23:35 1992 John Gilmore (gnu at cygnus.com) - - * size.c, objdump.c, bucomm.c: Lint. - -Thu Jun 11 01:19:06 1992 John Gilmore (gnu at cygnus.com) - - * objdump.c (dump_elf_stabs): New feature: --stabs prints out a - .stab section from an ELF file. Installed under #ifdef - ELF_STAB_DISPLAY so it can be easily disabled, since it requires - bfd-internals header files and such. - * objdump.1, binutils.texi: Update for --stabs. Also fix - objdump's doc to use -- rather than + for long options. - (FIXME: Not yet fixed everywhere in binutils.texinfo.) - -Wed Jun 10 07:53:24 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * objdump.c(display_info), patches from - mohring@informatik.tu-muenchen.de to print the table much more - nicely. - -Thu May 28 13:36:16 1992 Per Bothner (bothner@rtl.cygnus.com) - - * objdump.c: Add another enum->int cast, for the sake of - old compilers (such as PCC). - -Wed May 27 13:01:44 1992 Per Bothner (bothner@rtl.cygnus.com) - - * arlex.l: Don't include (unneeded conflicts). - Add declaration of strdup(). - -Fri May 22 13:40:37 1992 Per Bothner (bothner@cygnus.com) - - * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex - rules, since these are used when building a distribution. - * Makefile.in (arlex.c): Don't re-direct output, since that - leaves a bogus output files if it fails. - - * arlex.l: Make work with lex, for what it's worth. - * Makefile.in: Better lex support. - * Makefile.in (dist): Generate flex and bison outputs - for distribution. - -Thu May 14 17:17:59 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.in: get BISON definition right. - -Fri May 8 07:47:08 1992 K. Richard Pixley (rich@cygnus.com) - - * sanity.sh: default TMPDIR to ".". - -Thu May 7 12:34:50 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) - - * binutils.texi: add doc for ar command language. - -Wed May 6 18:05:36 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * arparse.y: make END call ar_end - * arsup.c (ar_end): added, deletes temp file if archive session - aborted. - - -Wed May 6 11:08:53 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.in: use bison & flex from ../ if they exist. Also, - FLEX->LEX. - - * sanity.sh: remove temporary directory when finished. - -Tue May 5 12:00:58 1992 Per Bothner (bothner@rtl.cygnus.com) - - * Makefile.in: Bump to version 1.97. - * ar.c: Declare errno for machines that need it. - -Mon May 4 23:29:51 1992 John Gilmore (gnu@cygnus.com) - - * objdump.c (display_info): Handle error cases without coredump. - Close the dummy temporary file we open in the loop. - * Makefile.in (arsup.o): Add kludge to build with Sun Make. - -Fri May 1 16:20:23 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: added test-install target. - - * sanity.sh: new file. - - * Makefile.in: use sanity test on make check. - -Tue Apr 21 13:38:37 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: rework CFLAGS so that they can be passed on the - command line to make. Remove MINUS_G. Default CFLAGS to -g. - -Wed Apr 15 14:33:07 1992 Steve Chamberlain (sac@thepub.cygnus.com) - - * arsup.c, arsup.h, arparse.y, arlex.l: support for archive - scripting language. - -Fri Mar 6 21:54:53 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: added check target. - -Thu Mar 5 21:35:49 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in: added clean-info target. - -Tue Mar 3 15:36:37 1992 K. Richard Pixley (rich@rtl.cygnus.com) - - * Makefile.in: remove $(COPY_PROG) from PROGS. It shouldn't be - installed. added tooldir and program_prefix. - -Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) - - * Makefile.in, configure.in: removed traces of namesubdir, - -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced - copyrights to '92, changed some from Cygnus to FSF. - -Sun Feb 16 12:53:02 1992 Per Bothner (bothner at cygnus.com) - - * Makefile.in: Bump version to 1.96, and remove -beta - suffix from distribution name. - * m68k-pinsn.c: New macro COERCE_SIGNED_CHAR to extract - the signed value of a character (even if chars are unsigned). - * sparc-pinsn.c: Add new operand types. - -Thu Feb 6 12:14:19 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * objdump.c (disassemble_data): don't print a section's contents - if it's not loadable (eg bss) - -Tue Jan 28 11:11:06 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * m68k-pinsn.c (print_insn_arg): fixed so that -ve branch - displacements don't get printed as large +ve ones. - -Fri Jan 24 14:47:53 1992 Steve Chamberlain (sac at rtl.cygnus.com) - - * copy.c, nm.c, objdump.c, size.c : changed to use the - new reloc scheme. - - -Mon Dec 30 18:34:41 1991 Per Bothner (bothner at cygnus.com) - - * bucomm.c (print_arelt_descr): Tweek the output format - so that 'ar tv' output follows Posix 1003.2/D11. - Output is now also identical to Sun's (except __.SYMDEF). - -Mon Dec 30 06:09:53 1991 John Gilmore (gnu at cygnus.com) - - * Makefile.in: Make `make' output more readable. - -Wed Dec 18 15:04:45 1991 Per Bothner (bothner at cygnus.com) - - * Makefile.in: Bump to version 1.94. - -Wed Dec 11 16:48:09 1991 Steve Chamberlain (sac at cygnus.com) - - * ar.c: added "b" to fopens for dos - * configdj.bat, makefile.dos new files from DJ - -Tue Dec 10 04:07:26 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * Makefile.in: infodir belongs in datadir. - -Sat Dec 7 17:09:37 1991 Steve Chamberlain (sac at rtl.cygnus.com) - - * bucomm.h: created to hold prototypes of bucomm.c - * objdump.h: created to hold prototyes of objdump.c - * am29k-pinsn.c: include objdump.h - * ar.c: include bucomm.h, get ar.h from the right place and - include libbfd.h - * bucomm.c: defunize bfd_fatal - * copy.c: include bucomm.h, lint. - * i960-pinsn.h: include bucomm.h - * m68k-pinsn.h: lint - * nm.c: include bucomm.h, lint - * objdump.c: lint - * sparc-pinsn.c: include objdump.h - - - -Fri Dec 6 23:02:14 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * Makefile.in: added standards.text support. install using - INSTALL_PROGRAM and INSTALL_DATA. - - * configure.in: configure now does all of it's work from objdir so - make file existence tests against ${srcdir}. - -Thu Dec 5 22:46:22 1991 K. Richard Pixley (rich at rtl.cygnus.com) - - * Makefile.in: idestdir and ddestdir go away. Added copyrights - and shift gpl to v2. Added ChangeLog if it didn't exist. docdir - and mandir now keyed off datadir by default. - -Wed Dec 4 22:42:03 1991 Per Bothner (bothner at cygnus.com) - - * Makefile.in: Bump to version 1.93. - * Makefile.in: Add make-strip.o:maybe-strip.c dependency - for make versions that provide half-baked VPATH-support (e.g. Sun's). - * size.c: Improvements suggested by - "david d [zoo] zuhn" : - - Don't emit (Berkeley) headers if no files were found. - - Return a non-zero return code on failure. - -Sat Nov 30 21:34:19 1991 Steve Chamberlain (sac at rtl.cygnus.com) - - Changes due to include file renaming: - * am29k-pinsn.c: a29k-opcode.h -> opcode/a29k.h - * sparc-pinsn.c: sparc-opcode.h -> opcode/sparc.h - * m68k-pinsn.c: m68k-opcode.h -> opcode/m68k.h - * nm.c: stab.gnu.h -> aout/stab_gnu.h - -Tue Nov 19 19:20:43 1991 Per Bothner (bothner at cygnus.com) - - * README: Mention MINIMIZE flag for bfd's make. - -Mon Nov 18 12:05:37 1991 Per Bothner (bothner at cygnus.com) - - * README: Various improvements. - -Sun Nov 17 23:40:59 1991 Per Bothner (bothner at cygnus.com) - - * Makefile.in: Bump to version 1.92. - * version.c, Makefile.in: Get version string from Makefile. - * copy.c, is-strip.c, not-strip.c, maybe-strip.c, Makefile.in: - Make the same change that we earlier did for ar/ranlib: - Generate two different binaries for strip and copy and use - a global variable with different values to distinguish - ostrip from copy. (-1 means to use argv[0] to decide, - so you can get the old behavior, but it is no longer the default). - * copy.c (copy_file): Set EXEC_P of output bfd if input is so. - * copy.c (main): If is_strip==-1, compare last 5 chars - of argv[0], not the whole path. - * copy.c (main): Return 0, not 1. - * copy.c (setup_sections): Fix due to change in bfd_make_section - now failing if asked for a duplicate section. - * strip.c, ostrip.c: Removed obsolete files. - * ar.c, not-ranlib.c, maybe-ranlib.c: - Change encoding of is_ranlib variable to be consistent - with is_strip for strip.copy (i.e -1 to means use argv[0]). - -Thu Nov 14 20:11:02 1991 Per Bothner (bothner at cygnus.com) - - * version.c (program_version): Update to version 1.92. - -Tue Nov 12 16:17:53 1991 Per Bothner (bothner at cygnus.com) - - * ar.c (get_pos_bfd): Previous fix was missing a "break". - -Thu Nov 7 08:55:56 1991 Steve Chamberlain (sac at cygnus.com) - - * am29k-pinsn.c: Fixed bug in mtacc, dmac and fmac instruction - encodings. (Thaks to David Wood) - -Sun Nov 3 14:50:23 1991 Per Bothner (bothner at cygnus.com) - - * Makefile.in ($(DIST_NAME).tar.Z), TODO: Various fixes. - * ar.c (get_pos_bfd): Fix to handling of before/after - positioning options. - * bucomm.c (fatal): MISSING_VFPRINTF is no longer an issue, - since libiberty contains vfprintf etc if otherwise missing. - * m68k-pinsn.c (print_insn_arg): Support BB/BW/BL - type operands, as used by branch instructions. - * nm.c: Delegate printing of symbols to BFD, - by using bfd_print_symbol to do the formatting. - -Mon Oct 28 11:20:47 1991 Steve Chamberlain (steve at cygnus.com) - - * ar.c (write_archive.c): added unlink before rename since some - systems can't rename onto an existant file. - -Mon Oct 21 09:47:23 1991 Steve Chamberlain (steve at rtl.cygnus.com) - - * nm.c: now doesn't crash if a symbol with no section and no - SEC_ABS appears. - -Thu Oct 17 15:25:50 1991 Per Bothner (bothner at cygnus.com) - - * Makefile.in, version.c: Bump to version 1.91. - -Wed Oct 16 11:45:36 1991 Per Bothner (bothner at cygnus.com) - - * Makefile.in, ar.c, bucomm.c, copy.c, cplus-dem.c, filemode.c, - i960-pinsn.c, m68k-pinsn.c, nm.c, objdump.c, size.c, sparc-pinsn.c, - * strip.c: Add or update Copyright notice. - * TODO: Add note on 'nm -a'. - * version.c: Update version number to 1.90. - * Makefile.in: Fix making of documentation for dist. - -Tue Oct 15 00:17:17 1991 Per Bothner (bothner at cygnus.com) - - * README: New file. - * Makefile.in: New kludgy rules for making a tarfile. - * Makefile.in: Fix bindir path. - -Mon Oct 14 17:34:29 1991 Roland H. Pesch (pesch at cygnus.com) - - * Makefile.in: add targets binutils.mm, binutils.me - -Fri Oct 11 22:44:21 1991 John Gilmore (gnu at cygnus.com) - - * Makefile.in: Avoid Sun Make VPATH bugs by adding dependencies. - -Fri Oct 11 12:51:33 1991 Roland H. Pesch (pesch at cygnus.com) - - * Makefile.in: add target "binutils.ms" - - * binutils.texinfo: minor restructuring for texi2roff comfort. - -Fri Oct 11 04:12:28 1991 John Gilmore (gnu at cygnus.com) - - Restructure configuration scheme for bfd, binutils, ld. - - * include/sys/h-*.h: Move to bfd/hosts/h-*.h. - * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h. - Change some config names to match other dirs. - * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO() - get defined first. - * Makefile.in: Use -I. to get sysdep.h. - -Wed Oct 9 22:42:56 1991 Per Bothner (bothner at cygnus.com) - - * nm.c (print_symbols): Handle NULL name field of symbol. - * Makefile.in: Removed spurious comment. - -Tue Oct 8 16:55:03 1991 Roland H. Pesch (pesch at cygnus.com) - - * binutils.texinfo: minor typos, phrasing, formatting fixes. - -Tue Oct 8 15:13:20 1991 Per Bothner (bothner at cygnus.com) - - * configure.in: Get host file from ../bfd/config, not config. - * config/*: Remove config directory and its files. - -Tue Oct 8 13:58:59 1991 Roland H. Pesch (pesch at cygnus.com) - - * Makefile.in: new targets binutils.dvi, binutils.info - - * binutils.texinfo: remove most remaining FIXME's, delete - references to __.SYMDEF by name - - -Tue Oct 8 10:23:44 1991 Steve Chamberlain (steve at cygnus.com) - - * objdump.c (print_address) Print addresses nicely. - -Mon Oct 7 11:31:05 1991 Per Bothner (bothner at cygnus.com) - - * ar.c, Makefile.in, new files {is,not,maybe}-ranlib.c: - Make two different binaries for ar and ranlib, instead of - distinguishing them at run time using argv[0]. - (Old behavior is still available if you "make ar_with_ranlib", - but it is not the default.) - * ranlib.sh (new): An alternative one-line - shell implementation of ranlib. - -Fri Oct 4 21:49:44 1991 John Gilmore (gnu at cygnus.com) - - * objdump.c: Cope with renames of a few BFD types & enums. - -Fri Oct 4 19:08:09 1991 Roland H. Pesch (pesch at cygnus.com) - - * binutils.texinfo: add new file (rudimentary docn) - -Mon Sep 30 12:30:39 1991 Per Bothner (bothner at cygnus.com) - - * config/hmake-news: Add new file (for Sony NEWSOS3). - * bucomm.c (fatal): Conditionally compile fatal() depending on - MISSING_VFPRINTF, and don't confuse the issue with NO_VARARGS. - * objdump.c (dump_headers): Trivial output format change. - * objdump.c (display_info): Loop over integers, not enums, - to appease old compilers. - -Mon May 20 16:14:07 1991 Steve Chamberlain (steve at cygint.cygnus.com) - - *objdump.c *nm.c *copy.c: Changed some types to work with 64 bit - object files. - -Thu May 16 16:06:55 1991 Steve Chamberlain (steve at cygint.cygnus.com) - from bother - * objdump.c (print_address): Make disasembled output more - consistent with gdb and as: Add 0x when printing hex. - Don't print extra leading zeros. - Attempt to not print "filename.o". - * objdump.c: Add some enum-to-int casts to accomodate old compilers. - - -Fri May 3 22:21:44 1991 John Gilmore (gnu at cygint.cygnus.com) - - * copy.c: Change =& constructs to = &, since they confuse older - C compilers. + command line switch "-M force-thumb". +For older changes see ChangeLog-9899 Local Variables: mode: change-log diff --git a/contrib/binutils/binutils/ChangeLog-9197 b/contrib/binutils/binutils/ChangeLog-9197 new file mode 100644 index 0000000..d989ae4 --- /dev/null +++ b/contrib/binutils/binutils/ChangeLog-9197 @@ -0,0 +1,5218 @@ +Mon Dec 29 16:58:05 1997 Ian Lance Taylor + + From Matthew Bellantoni : + * ar.c (get_pos_bfd): Add default_posname parameter. Change all + callers. + (replace_members): Default to replacing in the same position. + +Mon Dec 22 11:27:22 1997 Ian Lance Taylor + + * rclex.l: Don't permit a comma in a STRING. + * rcparse.y (acc_entry): Warn if an inappropriate modifier is used + with a non VIRTKEY. + (acc_event): For a control character, set VIRTKEY, and force the + character to uppercase. + (acc_options): Don't require a comma separator. + +Tue Dec 9 13:25:42 1997 Michael Meissner + + * size.c (size_number): New function to provide size of field. + ({l,r}print_number): For octal and hex fields, print field using + '0' and '0x' suffixes. Do not include following tab. + (sysv_internal_sizer): Size section name, section size, and vma + address fields. + (sysv_internal_printer): Use calculated sizes for the columns. + (print_sysv_format): Size columns before printing. + (print_berkeley_format): Print tabs between numbers now that + {l,r}print_number doesn't. Print fields right justified. + +Mon Dec 8 11:22:04 1997 Nick Clifton + + * objdump.c (objdump_print_addr_with_sym): Remove call to + disasm_symaddr() as this function no longer exists. + +Tue Dec 2 10:23:50 1997 Nick Clifton + + * objdump.c (objdump_print_addr_with_sym): Call disasm_symaddr() + to allow backend to know which symbol has just been displayed. + +Tue Dec 2 13:06:46 1997 Ian Lance Taylor + + * windres.h (ESCAPE_*): Define standard escape sequences. + * rclex.l (handle_quotes): Handle standard escape sequences. Warn + about an unrecognized escape character. + * windres.c (unicode_print): Print standard escape sequences. + * rcparse.y (acc_event): Initialize $$.next. + * resbin.c (bin_to_res_menuitems): Don't set MENUITEM_POPUP or + MENUITEM_ENDMENU in the menu item flags. + (bin_to_res_accelerators): Allocate a structure (the old code + never worked). + (res_to_bin_accelerator): Correct the test for setting ACC_LAST. + (res_to_bin_dialog): Save the extended style rather than saving + the style twice. Remove useless shadowing length variable. Set + the length of control data correctly. + * resrc.c (write_rc_dialog): Don't print the class or menu if the + string length is zero. + +Mon Nov 24 18:52:43 1997 Andreas Schwab + + * stabs.c (parse_stab_argtypes): Don't try to parse the name of a + destructor as mangled argument types. + +Mon Nov 10 17:51:41 1997 Gavin Koch + + * addr2line.c (translate_addresses): Use bfd_scan_vma rather + than strtol to scan addresses. + +Sun Nov 9 11:01:31 1997 Jeffrey A Law (law@cygnus.com) + + * Makefile.am (bin_PROGRAMS): Don't use line continuations here. + +Tue Nov 4 11:56:14 1997 Ian Lance Taylor + + * objcopy.c (copy_section): Don't crash if there is no particular + information for a section. + +Mon Nov 3 12:36:19 1997 Ian Lance Taylor + + * objcopy.c (parse_flags): Make flag check case insensitive. + Check for `contents' flag. Give an error for unrecognized flags. + (copy_section): If the contents flag was set for a section that + had no contents, zero out the new contents. + * binutils.texi (objcopy): Document contents section flag. + +Sun Nov 2 14:49:56 1997 Ian Lance Taylor + + * objcopy.c: Move new struct and variable definitions to top of + file. Remove obsolete add_strip_symbol and is_strip_symbol + declarations. Add prototype declarations for add_specific_symbol + and is_specified_symbol. + +Mon Oct 20 15:31:43 1997 Klaus K"ampf + + * configure.com (HAVE_SBRK): Undefine. + +Tue Oct 14 16:14:35 1997 Nick Clifton + + * objdump.c (objdump_symbol_at_address): New function. Returns + true if a symbol can be found at the address passed in. + (disassemble_data): Set the symbol_at_address_func field to point + to objdump_symbol_at_address. + +Fri Oct 10 14:13:09 1997 Richard Henderson + + * objcopy.c, objcopy.1, binutils.texi: "localize" is a better name + than "privatize". Update all references. + +Thu Oct 9 15:57:29 1997 Ian Lance Taylor + + * binutils.texi (strip): Remove duplicate --target. From Marty + Leisner . + + * nm.c (lineno_cache_bfd): New file static variable. + (lineno_cache_rel_bfd): New file static variable. + (display_archive): Clear lineno_cache_bfd and lineno_cache_rel_bfd + when closing a BFD. + (display_file): Likewise. + (print_symbol): Use lineno_cache_bfd and lineno_cache_rel_bfd + instead of cache_bfd and cache_rel_bfd. Make seccount static, and + only set it when setting relocs. + +Wed Oct 8 21:19:11 1997 Richard Henderson + + * objcopy.c (keep_specific_list, privatize_specific_list, + weaken_specific_list): New variables. + (keep_symbols): Removed. + (add_specific_symbol): New function from the carcas of + add_strip_symbol. Takes a list as an argument. + (is_specified_symbol): Likewise from is_strip_symbol. + (filter_symbols): Honor the new privatize and weaken lists. + Optimize bfd_asymbol_name handling. + (copy_object, copy_options, copy_usage): Add privatize-symbol & + weaken-symbol options. + + * objcopy.1, binutils.texi: Update docs. + +Sun Oct 5 09:05:44 1997 Frank Ch. Eigler + + * objdump.c (disassemble_data): Make "--prefix-addresses" + disassembly adjust to mixed-length instructions. + (objdump_print_addr_with_sym): Add "0x" prefix for hexadecimal + symbol-offsets in disassembly. + +Fri Oct 3 12:04:25 1997 Ian Lance Taylor + + * objcopy.c (set_times): New static function, replacing + make_same_dates. + (strip_main): If preserve_dates, stat the input file before + copying it, and call set_times afterward. + (copy_main): Likewise. + + * wrstabs.c (write_stabs_in_sections_debugging_info): Cast p to + char * when calling strcpy and strlen. + +Wed Sep 24 11:34:05 1997 Ian Lance Taylor + + * binutils.texi (ar cmdline): Document that q now works like r. + From Marty Leisner . + + * binutils.texi (size): The object file argument is optional. + From Marty Leisner . + + * aclocal.m4: Rebuild with new libtool. + * configure: Rebuild. + +Tue Aug 26 17:48:34 1997 Ian Lance Taylor + + * Makefile.am (EXEEXT_FOR_BUILD): New variable. Use it in all + references to the sysinfo program. + * configure.in: Rebuild with new bfd/acinclude.m4. + * Makefile.in: Rebuild. + +Fri Aug 8 15:32:49 1997 Ian Lance Taylor + + * windres.c: Include . + (define_resource): Set a timestamp for the resource. + +Wed Aug 6 13:37:58 1997 Ian Lance Taylor + + * configure.in: Define TARGET in header file. + * acconfig.h (TARGET): Add #undef. + * Makefile.am (version.o, bucomm.o): Remove special targets. + * bucomm.c (target): Remove. + * nm.c (program_name): Don't declare. + (target): Make static. + * size.c (target): Make static. + * configure, config.in, Makefile.in: Rebuild. + +Tue Aug 5 00:01:41 1997 Ian Lance Taylor + + * Makefile.am (check-DEJAGNU): Export r. + (.dep1): Use $(INCLUDES) rather than $(ALL_CFLAGS). + * Makefile.in: Rebuild. + + * nlmheader.y: Use VERSIONK rather than VERSION. + + * Makefile.am (STRIP_PROG): Change from strip.new to strip-new. + (NM_PROG): Change from nm.new to nm-new. + (TOOL_PROGS, install-exec-local): Adjust accordingly. + * Makefile.in: Rebuild. + +Mon Aug 4 11:47:31 1997 Ian Lance Taylor + + * configure.in: Remove AC_ARG_PROGRAM; it's invoked by + AM_INIT_AUTOMAKE. + * configure: Rebuild. + + * Makefile.am (install-exec-local): Create $(tooldir)/bin before + trying to install anything into it. + * Makefile.in: Rebuild. + + * Makefile.am (TOOL_PROGS): Use an explicit $(EXEEXT). + (install-exec-local): When handling $(noinst_PROGRAMS), only use + $(EXEEXT) on the installed file. When handling $(TOOL_PROGS), + handle $(EXEEXT) correctly. + * configure.in: Add an explicit $(EXEEXT) when substituting for + the name of a program to build. + * Makefile.in, configure: Rebuild. + + * aclocal.m4, configure, Makefile.in: Rebuild with new automake + patches. + + * deflex.l, defparse.y: Use VERSIONK rather than VERSION. + * rclex.l, rcparse.y: Likewise. + * Makefile.am (windres_SOURCES): Add $(BULIBS). + * Makefile.in: Rebuild. + +Fri Aug 1 13:08:39 1997 Ian Lance Taylor + + * acinclude.m4: Include bfd/acinclude.m4, not bfd/acmacros.m4. + * aclocal.m4, configure: Rebuild with new libtool. + +Thu Jul 31 11:51:35 1997 Ian Lance Taylor + + * Makefile.am: New file, based on old Makefile.in. + * acinclude.m4: New file, from old aclocal.m4. + * configure.in: Call AM_INIT_AUTOMAKE and AM_PROG_LIBTOOL. Remove + shared library handling; now handled by libtool. Replace + AC_CONFIG_HEADER with AM_CONFIG_HEADER. Call AC_PROG_YACC, + AC_PROG_LEX, AC_DECL_YYTEST, AM_MAINTAINER_MODE, AM_CYGWIN32, and + AM_EXEEXT. Replace AC_PROG_INSTALL with AM_PROG_INSTALL. Remove + stamp-h handling in AC_OUTPUT. + * acconfig.h: Mention PACKAGE and VERSION. + * stamp-h.in: New file. + * Makefile.in: Now built with automake. + * aclocal.m4: Now built with aclocal. + * config.in, configure: Rebuild. + + From Ton van Overbeek : + * rcparse.y (dialog): Default menu and class to be named. + (styles): If FONT is seen, set DS_SETFONT in dialog style. + * resbin.c (res_to_bin_dialog): Correct computation of font + information length. + +Wed Jul 30 11:21:06 1997 Ian Lance Taylor + + From Ton van Overbeek : + * resbin.c (res_to_bin_menu): Correct computation of menu + vs. menuex length. + * resrc.c (define_stringtable): Add 1 to resource ID. + +Tue Jul 29 11:06:03 1997 Ian Lance Taylor + + * resbin.c (bin_to_res_string): Correct adjustment of data and + length. From Ton van Overbeek . + +Tue Jul 22 18:01:23 1997 Ian Lance Taylor + + * nlmconv.c (link_inputs): Call libiberty pexecute function. + (pexecute) [multiple versions]: Remove. + +Tue Jul 22 16:19:34 1997 Robert Hoehne + + * bucomm.c (make_tempname): If we might be using a DOS filesystem, + check for a backslash as well as a slash. + +Thu Jun 26 13:53:17 1997 Ian Lance Taylor + + * windres.c (main): Quit if we didn't get any resources. + (usage): Fix --yydebug usage message. + * rescoff.c (write_coff_file): Don't free the relocation array + until after we've closed the BFD. + (read_coff_rsrc): Quit rather than try to read standard input. + (write_coff_file): Quit rather than try to write to standard + output. + * rcparse.y: Add a couple of missing semicolons (accepted by bison + but not byacc). + * binutils.texi: Document windres. + +Wed Jun 25 20:57:06 1997 Ian Lance Taylor + + * resbin.c: New file. + * rclex.l, rcparse.y, rescoff.c, resrc.c, windres.c, windres.h: + Numerous fixes and improvements. + * Makefile.in: Rebuild dependencies. + (CFILES): Add resbin.c. + (WINDRES_OBJS): Add resbin.o. + +Sun Jun 22 17:29:41 1997 Ian Lance Taylor + + First stab at Windows resource compiler: + * windres.h: New file. + * windres.c: New file. + * resrc.c: New file. + * rcparse.y: New file. + * rclex.l: New file. + * rescoff.c: New file. + * configure.in: Define and substitute BUILD_WINDRES. + * configure: Rebuild. + * Makefile.in: Rebuild dependencies. + (WINDRES_PROG): New variable. + (PROGS): Add @BUILD_WINDRES@. + (HFILES): Add dlltool.h and windres.h. + (CFILES): Add windres.c and resrc.c. + (GENERATED_CFILES): Add rcparse.c and rclex.c. + (WINDRES_OBJS): New variable. + $(WINDRES_PROG): New target. + (rcparse.c, rcparse.h, rclex.c): New targets. + +Thu Jun 12 12:27:51 1997 Ian Lance Taylor + + * dlltool.c (export_type): Add data field. + (def_exports): Add data parameter. Change all callers. + (dump_def_info): Print data field. + (gen_def_file): Likewise. + (make_one_lib_file): Handle data field by not emitting simple + label and not emitting anything in SEC_TEXT. + (dtab): Print data field. + (process_duplicates): Merge data field. + * dlltool.h (def_exports): Update declaration. + * defparse.y (expline): Accept opt_DATA. Pass it to def_exports. + (opt_DATA): New non-terminal. + +Wed Jun 11 17:15:47 1997 Ian Lance Taylor + + * dlltool.h: New file. + * deflex.l: Include dlltool.h and libiberty.h. Don't declare + strdup. Use xstrdup rather than strdup. + * defparse.y: Include bfd.h, bucomm.h, and dlltool.h. + * dlltool.c: Include dlltool.h and time.h. Make a lot of + variables and functions static. Make a lot of char * variables + and parameters const. Add declarations for static functions. Do + some reindenting. Hide more PowerPC stuff inside DLLTOOL_PPC. + +Wed Jun 11 12:05:52 1997 H.J. Lu + + * ar.c (bfd_special_undocumented_glue): Add const. + +Mon May 12 22:09:35 1997 Bob Manson + + * Makefile.in (check): Pass CC_FOR_TARGET and CFLAGS_FOR_TARGET + to runtest. + +Mon May 12 13:14:22 1997 Ian Lance Taylor + + * configure.in: Don't clear OPCODES when --enable-commonbfdlib is + used on HP/UX. + * configure: Rebuild. + +Fri Apr 25 14:22:08 1997 H.J. Lu + + * Makefile.in (maintainer-clean realclean): Change *.info* + to binutils.info* to save sysroff.info. + +Tue Apr 15 13:42:22 1997 Ian Lance Taylor + + * Makefile.in (INSTALL): Set to @INSTALL@. + (INSTALL_XFORM, INSTALL_XFORM1): Remove. + (install): Depend upon installdirs. Use $(program_transform_name) + directly, rather than using $(INSTALL_XFORM) and + $(INSTALL_XFORM1). + (installdirs): New target. + (install-info): Run mkinstalldirs. + +Mon Apr 14 11:52:39 1997 Ian Lance Taylor + + * Makefile.in (INSTALL): Change install.sh to install-sh. + + From Thomas Graichen : + * Makefile.in: Always use $(SHELL) when running move-if-change. + * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub. + * configure: Rebuild. + +Fri Apr 4 13:28:02 1997 Ian Lance Taylor + + * configure.in: Add AC_FUNC_ALLOCA. + * configure, config.in: Rebuild. + * bucomm.h: Add alloca handling, copied from gas/as.h. + * dlltool.c: Add #pragma alloca for AIX to start of file. + * nlmconv.c: Likewise. + + * Makefile.in (distclean): Remove site.exp and site.bak. Remove + everything that clean removes. + +Thu Apr 3 13:18:39 1997 Ian Lance Taylor + + * Makefile.in (VERSION): Set to 2.8.1. + + * Branched binutils 2.8. + +Tue Apr 1 16:21:44 1997 Klaus Kaempf + + * configure.com: New file. + * config.h-vms: Remove file. + * makefile.vms: Update for new configure scheme. + +Mon Mar 31 15:30:43 1997 Philippe De Muyter + + * objcopy.c (make_same_dates): Use statbuf, not buf, if not + HAVE_GOOD_UTIME_H. + +Fri Mar 28 17:57:53 1997 Alan Modra + + * Makefile.in ($(OBJDUMP_PROG)): Don't link against BFDLIB twice. + * configure.in: Add AC_ARG_ENABLE for commonbfdlib. If it is set, + set OPCODES to empty. + * configure: Rebuild. + +Thu Mar 27 16:03:02 1997 Ian Lance Taylor + + Based on patch from Marty Leisner : + * objcopy.c: Include or . + (strip_options): Add "preserve-dates". + (copy_options): Likewise. + (copy_usage): Mention -p and --preserve-dates. + (strip_usage): Likewise. + (make_same_dates): New static function. + (strip_main): Handle -p. + (copy_main): Likewise. + * binutils.texi, strip.1, objcopy.1: Document new option. + + addr2line.c contributed by Ulrich Lauther + : + * addr2line.c: New file. + * Makefile.in: Rebuild dependencies. + (ADDR2LINE_PROG): New variable. + (MANPAGES): Add addr2line. + (PROGS): Add $(ADDR2LINE_PROG). + (CFILES): Add addr2line.c. + ($(ADDR2LINE_PROG)): New target. + * binutils.texi: Document addr2line. + * addr2line.1: New file. + + * version.c (print_version): Update copyright date. + +Mon Mar 24 10:52:45 1997 Andreas Schwab + + * objdump.c (disassemble_data): Don't exit if a file cannot be + disassembled, instead just return. + +Thu Mar 20 21:16:51 1997 Jeffrey A Law (law@cygnus.com) + + * size.c (usage): Make definition match its prototype. + (display_bfd, lprint_number, rprint_number): Likewise. + (print_berkeley_format, sysv_internal_printer): Likewise. + (print_sysv_format): Likewise. + * nm.c (set_print_radix, set_output_format): Likewise. + * objcopy.c (filter_bytes): Likewise. + +Tue Mar 18 16:39:55 1997 H.J. Lu + + * Many files: Add function prototypes. + * ar.c (mri_emul, get_pos_bfd): Make static. + * arlex.l: Include "libiberty.h". Don't declare strdup. Use + xstrdup rather than strdup. + * arparse.y (yyerror): Make argument const. Correct typo. + * arsup.c (strdup): Don't declare. + (ar_save): Use xstrdup rather than strdup. + * filemode.c: Include "bucomm.h". + * nm.c (usage): Make static. + (print_symname): Make format and name const. + * objcopy.c (cat): Remove. + (copy_archive): Make output_target const. Use concat, not cat. + (copy_file, simple_copy, smart_rename): Make arguments const. + * objdump.c (read_section_stabs): Likewise. + (print_section_stabs): Likewise. + (display_target_tables): Don't declare getenv. + * strings.c (strings_object_file): Change file to const. + (print_strings): Change filename to const. + * Makefile.in: Rebuild dependencies. + +Tue Mar 18 11:37:24 1997 Ian Lance Taylor + + * configure.in: Add BFD_NEED_DECLARATION(getenv). + * acconfig.h: Add NEED_DECLARATION_GETENV. + * bucomm.h (getenv): Declare if NEED_DECLARATION_GETENV. + * configure, config.in: Rebuild. + * nlmconv.c (getenv): Don't declare. + + * Makefile.in: Rebuild dependencies. + +Sat Mar 15 15:35:56 1997 Ian Lance Taylor + + Based on patches from Jamie Lokier : + * objdump.c: Include "demangle.h". + (do_demangle): New static variable. + (usage): Mention -C/--demangle. + (long_options): Add "demangle". + (objdump_print_symname): New static function. + (objdump_print_addr_with_sym): Use objdump_print_symname. + (disassemble_bytes): Likewise. + (dump_reloc_set): Likewise. + (dump_symbols): Demangle symbol name. + (main): Handle -C. + * binutils.texi, objdump.1: Document -C/--demangle. + + * objdump.c (usage): Mention --no-show-raw-insn. + (long_options): Add "no-show-raw-insn". + (disassemble_bytes): Handle --no-show-raw-insn. + * binutils.texi, objdump.1: Document --no-show-raw-insn. + +Wed Mar 12 11:42:00 1997 Andreas Schwab + + * rddbg.c (free_saved_stabs): Set the strings to NULL after being + freed. + +Fri Feb 28 17:18:45 1997 Ian Lance Taylor + + * bucomm.c (set_default_bfd_target): New function. + * bucomm.h (set_default_bfd_target): Declare. + * ar.c (main): Call set_default_bfd_target. + * nlmconv.c (main): Likewise. + * nm.c (main): Likewise. + * objcopy.c (main): Likewise. + * objdump.c (main): Likewise. + * size.c (main): Likewise. + * strings.c (main): Likewise. + * Makefile.in (bucomm.o): New target, to define TARGET. + +Tue Feb 25 21:28:38 1997 Ian Lance Taylor + + * objdump.c (adjust_section_vma): New static variable. + (usage): Mention --adjust-section-vma. + (OPTION_ADJUST_VMA): Define. + (long_options): Add "addjust-vma". + (display_bfd): If adjust_section_vma is not 0, add it to all the + section addresses. + (main): Handle OPTION_ADJUST_VMA. + * binutils.texi, objdump.1: Document --adjust-vma. + +Fri Feb 14 18:46:47 1997 Ian Lance Taylor + + * nm.c (print_symbol): Cache the BFD as well as the symbols and + relocs, and don't try to use the symbols or relocs with a + different BFD. + +Thu Feb 13 21:34:43 1997 Klaus Kaempf (kkaempf@progis.de) + + * config.h-vms: sbrk() is provided on openVMS/Alpha. + * makefile.vms: allow compiling with current gcc snapshot. + +Thu Feb 13 20:14:40 1997 Ian Lance Taylor + + * arsup.c, coffgrok.c, dlltool.c, nlmconv.c: Use xmalloc rather + than malloc. + +Wed Feb 12 16:12:02 1997 Ian Lance Taylor + + * objdump.c (disassemble_data): Correct VMA argument to + find_symbol_for_address. Improve handling of code with no symbol + followed by code with a symbol. + +Wed Feb 12 12:16:47 1997 Andreas Schwab + + * objdump.c (disassemble_bytes): Make output of raw instructions + work better for non-standard values of bytes_per_chunk and + bytes_per_line. + +Thu Feb 6 14:14:59 1997 Martin M. Hunt + + * objdump.c (disassemble_bytes): Added code to allow some control + over the way raw instructions are displayed. + +Thu Feb 6 12:36:03 1997 Ian Lance Taylor + + * stabs.c (struct bincl_file): Add next_stack field. + (push_bincl): Put the new file on both bincl_list and + bincl_stack. Clear the file_types field. + (pop_bincl): Use the next_stack field when popping the stack. + Don't put the file on bincl_list. + (find_excl): Include the file name when warning about an unfound + N_EXCL. + + * debug.c (debug_type_samep): Don't crash if we are passed NULL. + +Thu Feb 6 11:54:24 1997 Alan Modra + + * objcopy.1: Add missing space after .B. + +Fri Jan 31 10:33:07 1997 Andreas Schwab + + * objdump.c (disassemble_data): Initialize `aux.require_sec'. + +Wed Jan 29 13:21:21 1997 Ian Lance Taylor + + * objdump.c (objdump_print_value): Add skip_zeroes parameter. + Change all callers. + (objdump_print_addr_with_sym): Likewise. Call objdump_print_value + to print address. + (objdump_print_addr): New static function. + (objdump_print_address): Just call objdump_print_addr. + (disassemble_bytes): Print real address, not function offset. + Skip a certain number of leading zeroes. + + * objdump.c (disassemble_zeroes): New static variable. + (usage): Mention --disassemble-zeroes. + (long_options): Add "disassemble-zeroes". + (disassemble_bytes): Check disassemble_zeroes. + +Tue Jan 28 16:47:26 1997 Ian Lance Taylor + + * objdump.c (disassemble_bytes): Don't skip zeroes if the + disassembler has told us that we are in a branch delay slot. + +Mon Jan 20 14:24:04 1997 Ian Lance Taylor + + * size.c (berkeley_sum): Rewrite. Skip sections which are not + SEC_ALLOC. Count SEC_READONLY sections as text. + +Tue Jan 14 15:14:14 1997 Ian Lance Taylor + + * Makefile.in (maintainer-clean realclean): Remove *.info*, not + just *.info. From H.J. Lu . + +Tue Dec 31 15:42:54 1996 Ian Lance Taylor + + * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE. + +Fri Dec 27 11:19:26 1996 Ian Lance Taylor + + * configure.in: Work around bug in AC_FUNC_VFORK in autoconf 2.12. + * configure: Rebuild. + +Thu Dec 19 13:11:20 1996 Ian Lance Taylor + + Based on patch from Andrew J Klossner : + * objcopy.c (OPTION_WEAKEN): Define. + (copy_options): Add "weaken". + (copy_usage): Mention --weaken. + (weaken): New static variable. + (filter_symbols): Handle weaken. + (copy_object): Call filter_symbols if weaken. + (copy_main): Handle OPTION_WEAKEN. + * binutils.texi, objcopy.1: Document --weaken. + +Wed Dec 18 22:49:13 1996 Stan Shebs + + * mpw-make.sed: Use NewFolderRecursive for installation. + +Sat Dec 7 10:17:25 1996 Jeffrey A Law (law@cygnus.com) + + * Makefile.in (install): Add "else true" clause to cater to + broken "make" on some systems. + +Fri Dec 6 17:21:41 1996 Ian Lance Taylor + + * ieee.c (parse_ieee_bb): Always initialize namcopy to avoid gcc + warning about uninitialized variable. + (ieee_read_cxx_class): Likewise, for pf. + (ieee_enum_type): Likewise, for i. + +Tue Nov 26 17:01:25 1996 Ian Lance Taylor + + * wrstabs.c (stab_array_type): Add casts when printing + bfd_signed_vma values. + + * configure: Rebuild with autoconf 2.12. + +Mon Nov 25 16:53:18 1996 Ian Lance Taylor + + * objdump.c (disassemble_data): Don't crash if there is no + symbol. + +Fri Nov 22 17:29:14 1996 Andreas Schwab + + * ar.c (open_inarch): Don't call bfd_openr with a null name. + +Fri Nov 1 12:08:13 1996 Ian Lance Taylor + + * binutils.texi: Add section on reporting bugs. + +Thu Oct 31 18:20:53 1996 Ian Lance Taylor + + * stabs.c (struct stab_handle): Add bincl_list field. + (parse_stab): Pass value to push_bincl. Call find_excl for + N_EXCL. + (struct bincl_file): Add hash, file and file_types fields. + (push_bincl): Add hash parameter. Save it in the new hash field. + Save the file number in the new file field. + (pop_bincl): Put the bincl_file on bincl_list, rather than freeing + it. Save the file types in the new file_types field. + (find_excl): New static function. + + * ieee.c (ieee_lineno): Don't compare line number addresses to + info->highaddr (undo part of October 28 patch). + +Tue Oct 29 16:40:22 1996 Ian Lance Taylor + + * objdump.c (objdump_print_value): Don't print the empty string + for zero. + +Mon Oct 28 16:58:14 1996 Ian Lance Taylor + + * stabs.c (struct stab_handle): Add function_end field. + (start_stab): Initialize function_end. + (finish_stab): Pass info->function_end to debug_end_function. + (parse_stab): If info->function_end is set, use it as the address + which ends a function. + + * ieee.c (ieee_array_type): Remember the correct size. + + * ieee.c (ieee_finish_compilation_unit): Permit coalescing ranges + that are up to 0x1000 bytes apart, not just 64. + (ieee_add_bb11_blocks): Don't bother to emit a BB11 that is less + than 0x100 bytes. + (ieee_lineno): Only emit line numbers that are less than + info->highaddr. + +Fri Oct 25 12:12:17 1996 Ian Lance Taylor + + * ieee.c (struct ieee_defined_enum): Add defined field. + (ieee_enum_type): If the enum tag has been seen before but not + defined, reuse the same type index, and define it. + (ieee_tag_type): If this enum has not been defined, add an + undefined entry to the list of enums. + + * objdump.c (disassemble_bytes): Let the disassembler override the + number of bytes printed on a line. + +Thu Oct 24 16:42:10 1996 Ian Lance Taylor + + * objdump.c (prefix_addresses): New static variable. + (long_options): Add "prefix-addresses". + (compare_symbols): Sort BSF_FUNCTION symbols before other + symbols. + (find_symbol_for_address): New static function, broken out of + objdump_print_address. + (objdump_print_addr_with_sym): New static function, broken out of + objdump_print_address. + (objdump_print_address): Call new functions. + (disassemble_bytes): New static function, broken out of + disassemble_data. Change disassembly format, unless + prefix_addresses is set. + (disassemble_data): Call disassemble_bytes. Unless + prefix_addresses is set, disassemble in chunks headed by a + symbol. + * binutils.texi, objdump.1: Document --prefix-addresses. + + * rddbg.c (read_section_stabs_debugging_info): Preserve the + backslash when concatenating multiple stabs strings. + +Thu Oct 10 11:36:31 1996 Doug Evans + + * dlltool.c (scan_open_obj_file): Fix loop exit test. + Add missing parameter to def_exports. + +Tue Oct 8 12:06:17 1996 Ian Lance Taylor + + * Makefile.in (LEX_OPTIONS): Set to empty string. -I -Cem is the + default for flex, and is not recognized by lex. + +Thu Oct 3 17:41:23 1996 Ian Lance Taylor + + * binutils.texi (Target Selection): Document that you can now + specify targets using configuration triplets. + + * ar.c (usage): Declare. Make sure all callers pass an argument. + +Thu Oct 3 15:39:42 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) + + * Makefile.in (clean): Remove config.log. + +Wed Oct 2 15:49:16 1996 Klaus Kaempf + + * makefile.vms: Bump version date. + +Tue Oct 1 15:00:59 1996 Ian Lance Taylor + + * version.c (print_version): New function. + * bucomm.h (print_version): Declare. + * ar.c (program_version): Don't declare. + (do_show_version): Remove. + (usage): Add help parameter. Print bug report address. + (main): Set is_ranlib at start. Check for --help and --version. + Call print_version, not do_show_version. + * nlmconv.c (program_version): Don't declare. + (main): Call print_version. + (show_usage): Print bug report address. + * nm.c (program_version, print_version): Don't declare. + (usage): Print bug report address. + (main): Call print_version. + * objcopy.c (program_version): Don't declare. + (copy_usage): Print bug report address. + (strip_usage): Likewise. + (strip_main): Call print_version. + (copy_main): Likewise. + * objdump.c (program_version): Don't declare. + (usage): Print bug report address. + (main): Call print_version. + * size.c (program_version): Don't declare. + (usage): Print bug report address. + (main): Call print_version. + * strings.c (program_version): Don't declare. + (main): Call print_version. + (usage): Print bug report address. + * Makefile.in: Update dependencies. + +Thu Sep 19 14:53:15 1996 Ian Lance Taylor + + * ieee.c: Revert Monday's reflocalp patch, and apply this patch + instead: + (write_ieee_debugging_info): Write a dummy type at the end of the + global type block. + +Mon Sep 16 15:30:54 1996 Ian Lance Taylor + + * ieee.c (struct ieee_write_type): Add reflocalp field. + (ieee_pointer_type): Set reflocalp after pushing type. + (ieee_function_type): If reflocalp is set, make this type local. + (ieee_range_type, ieee_array_type, ieee_set_type): Likewise. + (ieee_const_type, ieee_volatile_type): Likewise. + (ieee_struct_field, ieee_class_baseclass): Likewise. + + * ieee.c (struct ieee_info): Add global_types field. + (parse_ieee_bb): When starting a BB1, initialize the types field + to the global_types field. + (parse_ieee_be): When ending a BB2, copy the types field to the + global_types field. + +Fri Sep 13 17:32:21 1996 Ian Lance Taylor + + * objcopy.c (change_leading_char): New static variable. + (OPTION_CHANGE_LEADING_CHAR): Define. + (copy_options): Add "change-leading-char". + (copy_usage): Mention --change-leading-char. + (filter_symbols): Add obfd parameter. Change all callers. + Implement change_leading_char. + (copy_object): Call filter_symbols if change_leading_char. + (copy_main): Handle OPTION_CHANGE_LEADING_CHAR. + * binutils.texi, objcopy.1: Document --change-leading-char. + +Tue Sep 3 14:05:29 1996 Ian Lance Taylor + + * ieee.c (ieee_enum_type): Don't check index into a NULL names + array. + * nm.c (sort_symbols_by_size): Always initialize next. + * rdcoff.c (parse_coff_type): Warn about an incomprehensible + type rather than crashing. + * rddbg.c (read_symbol_stabs_debugging_info): Initialize f. + * stabs.c (parse_stab_members): Set context in all cases. + +Thu Aug 29 16:56:52 1996 Michael Meissner + + * configure.in (i[345]86-*-*): Recognize i686 for pentium pro. + * configure: Regenerate. + +Thu Aug 29 11:29:20 1996 Ian Lance Taylor + + * objdump.c (L_tmpnam): Never define. + (display_target_list): Use choose_temp_base instead of tmpnam. + (display_info_table): Likewise. + +Tue Aug 27 18:15:01 1996 Ian Lance Taylor + + * stabs.c (parse_stab): An N_FUN symbol with an empty string + indicates the end of a function. + +Thu Aug 22 17:08:00 1996 Ian Lance Taylor + + * wrstabs.c (struct string_hash_entry): Add next field. + (struct stab_write_handle): Change strings to a pointer to + string_hash_entry. Add last_strings field. Remove strings_alloc + field. + (string_hash_newfunc): Initialize next field. + (stab_write_symbol): Copy string into hash table rather than into + buffer. Keep a list of hash table entries. + (write_stabs_in_sections_debugging_info): Initialize last_string. + Copy strings from list of hash table entries in memory. + (stab_modify_type): If the entry on the stack is a definition, + make a new definition rather than failing an assert. + (stab_array_type): The size is only zero if high is strictly less + than low. + + * ieee.c (struct ieee_info): Add saw_filename field. + (parse_ieee): Initialize saw_filename. + (parse_ieee_bb): Set saw_filename for a BB1 or BB2. In a BB1, + discard the current variables and types. In a BB10, if no + filename has been seen, call debug_set_filename. + (parse_ieee_ty): In case 'g', the type is optional. + + * prdbg.c (pr_fix_visibility): Don't abort on + DEBUG_VISIBILITY_IGNORE. + + * debug.c (debug_name_type): Correct error message. + + * configure.in: Substitute HLDENV. + * configure: Rebuild. + * Makefile.in (HLDENV): New variable. Use it whenever linking a + program. + +Thu Aug 15 19:30:41 1996 Stan Shebs + + * mpw-make.sed: Add symbolic doublequotes around the version + number. + +Thu Aug 8 12:27:52 1996 Klaus Kaempf + + * makefile.vms: Add better support for DEC C compilation. + Add new macros as in Makefile.in. + +Wed Aug 7 14:27:33 1996 Philippe De Muyter + + * configure.in: Call BFD_NEED_DECLARATION on strstr and sbrk. + * acconfig.h (NEED_DECLARATION_STRSTR): New macro. + (NEED_DECLARATION_SBRK): New macro. + * configure, config.in: Rebuild. + * bucomm.h (strstr): Declare if NEED_DECLARATION_STRSTR. + (sbrk): Declare if HAVE_SBRK and NEED_DECLARATION_SBRK. + + * prdbg.c (pr_end_struct_type): Avoid using a string constant in + assert, for the benefit of broken assert macros. + +Fri Jul 26 14:06:50 1996 Ian Lance Taylor + + * objdump.c (disassemble_data): Set disasm_info.flavour from + abfd. + +Tue Jul 23 13:59:54 1996 Ian Lance Taylor + + * dlltool.c (secdata): In non DLLTOOL_PPC case, change alignment + of .text section to 2. + +Mon Jul 22 08:46:15 1996 Stu Grossman (grossman@lisa.cygnus.com) + + * objdump.c (dump_section_stabs): Fix test for stabs sections + ending with numbers. This fixes a problem with .stab being + confused with .stab.index. + +Wed Jul 10 13:32:28 1996 Ian Lance Taylor + + * stabs.c (stab_demangle_fund_type): Return a void * for a + template, rather than simply aborting. + +Mon Jul 8 15:28:05 1996 Ian Lance Taylor + + * ar.c (open_inarch): Add file parameter. Change all callers. If + this is a newly created archive, set the target based on the + file. + * arsup.h (open_inarch): Update declaration. + +Thu Jul 4 12:00:55 1996 Ian Lance Taylor + + * Makefile.in (VERSION): Set to cygnus-2.7.1. + + * Released binutils 2.7. + + * rdcoff.c (parse_coff): Get address to pass to debug_end_function + from function size, not value of .ef symbol. From Ning + Mosberger-Tang . + +Sat Jun 29 21:18:09 1996 Ian Lance Taylor + + * objcopy.c (strip_main): Add -o option, and handle it. + (strip_usage): Mention -o. + * binutils.texi, strip.1: Mention -o. + +Mon Jun 24 17:19:02 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) + + * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir, + INSTALL_PROGRAM, INSTALL_DATA): Use autoconf set values. + (docdir): Removed. + * configure.in (AC_PREREQ): Autoconf 2.5 or higher. + +Mon Jun 24 11:59:13 1996 Ian Lance Taylor + + * objdump.c (endian): New static variable. + (usage): Mention -EB/-EL/--endian. + (long_options): Add "endian". + (disassemble_data): If endianness was specified, replace + abfd->xvec with a copy of itself with the given endianness. + (main): Handle -EB/-EL/--endian. + * binutils.texi, objdump.1: Mention -EB/-EL/--endian. + + * objdump.c: Make most variables and functions static. + + * configure.in: On alpha*-*-osf*, link against libbfd.a if not + using shared libraries. + * configure: Rebuild with autoconf 2.10. + +Sun Jun 23 14:47:36 1996 Kim Knuttila + + * dlltool.c (secdata): Changed .rdata to .reldata so .reloc will work. + (make_one_lib_file): Removed cruft. (#if 1) + +Wed Jun 19 14:46:38 1996 Ian Lance Taylor + + * objdump.c (stabs): Change from struct internal_nlist * to + bfd_byte *. + (print_section_stabs): Fetch stabs information directly, rather + than assuming that struct internal_nlist is the right size. + + * binutils.texi: Document change to binary format: file position + based on load address, not section VMA. + + * bucomm.h: Define SEEK_SET, SEEK_CUR, and SEEK_END if they are + not already defined. + +Tue Jun 18 18:25:00 1996 Ian Lance Taylor + + * Makefile.in (DISTSTUFF): Add deflex.c. + +Tue Jun 18 15:03:44 1996 Klaus Kaempf + + * config.h-vms, makefile.vms: New files. + +Mon Jun 17 09:47:31 1996 Ian Lance Taylor + + * dlltool.c (make_one_lib_file): Use BFD_RELOC_RVA rather than + BFD_RELOC_32 in IDATA7. + +Wed Jun 12 11:52:06 1996 Ian Lance Taylor + + * nm.c (struct get_relocs_info): Define. + (line_numbers): New static variable. + (long_options): Add "line-numbers". + (usage): Mention -l and --line-numbers. + (main): Handle -l. + (print_symbol): Print line numbers if requested. + (get_relocs): New static function. + * binutils.texi, nm.1: Document -l/--line-numbers. + +Tue Jun 11 20:12:15 1996 Ian Lance Taylor + + * objdump.c (dump_reloc_set): Add sec parameter. Change all + callers. If with_line_numbers is set, display line numbers of + relocation entries. + * binutils.texi, objdump.1: Document -l with -r. + +Mon Jun 10 23:42:59 1996 Ian Lance Taylor + + * ar.c (open_inarch): Report BFD error message if an archive can + not be recognized. List matching formats if the file is + ambiguously recognized. + (ranlib_touch): Likewise. + +Thu Jun 6 13:56:14 1996 Ian Lance Taylor + + * README: Add notes on how to build if you don't have ar. + + * Makefile.in: Remove old incorrect setting of CC. + +Tue Jun 4 10:52:49 1996 Tom Tromey + + * Makefile.in (install): Don't check to see if tooldir exists. + Make $(tooldir) and $(tooldir)/bin. + +Mon Jun 3 17:40:23 1996 Michael Meissner + + * strings.c (main): Make main an int function, not void. + +Fri May 31 13:59:24 1996 Ian Lance Taylor + + * nm.c (filter_symbols): Check for BSF_WEAK as well as + BSF_GLOBAL. + * objcopy.c (filter_symbols): Likewise. + +Wed May 8 16:57:20 1996 Ian Lance Taylor + + * objcopy.c (copy_object): Make clear that it is only a warning + when the output file can not represent the architecture. + +Fri May 3 11:30:17 1996 Ian Lance Taylor + + * objdump.c (disassemble_data): Don't refer to bytes past the end + of data. + +Wed Apr 24 14:10:21 1996 Ian Lance Taylor + + * rddbg.c (read_symbol_stabs_debugging_info): Move call to + free_saved_stabs outside the loop over the symbols. + +Tue Apr 23 12:56:11 1996 Ian Lance Taylor + + * objdump.c (compare_symbols): Sort symbols whose names start with + `.' after other symbols. If no other decision can be made, sort + symbols by name. + +Thu Apr 18 16:02:11 1996 Ian Lance Taylor + + * dep-in.sed: Substitute $(BFDDIR) for @BFDDIR@. + * Makefile.in: Rebuild dependencies. + (dep.sed): Substitute $(BFDDIR) for @BFDDIR@. + +Tue Apr 16 13:50:22 1996 Ian Lance Taylor + + * rdcoff.c: New file. + * rddbg.c (read_debugging_info): Read COFF symbols if COFF flavour + and no stabs were found. + * budbg.h (parse_coff): Declare. + * Makefile.in: Rebuild dependencies. + (CFILES): Add rdcoff.c. + (DEBUG_OBJS): Add rdcoff.o. + +Mon Apr 15 15:55:01 1996 Doug Evans + + * nlmconv.c (choose_temp_base{,_try}): Delete, in libiberty now. + (link_inputs): Update call to choose_temp_base. + +Mon Apr 8 14:40:05 1996 Ian Lance Taylor + + * configure.in: Permit --enable-shared to specify a list of + directories. + * configure: Rebuild. + +Fri Mar 29 16:11:33 1996 Ian Lance Taylor + + * objdump.c (dump_section_header): Print the SEC_LINK_ONCE flag + and the SEC_LINK_DUPLICATES field. + +Fri Mar 29 11:35:55 1996 J.T. Conklin (jtc@lisa.cygnus.com) + + * nlmconv.1: Changed to be recognized by catman -w on Solaris. + +Thu Mar 28 14:17:02 1996 Ian Lance Taylor + + * wrstabs.c (stab_enum_type): Set buf before using it. + +Fri Mar 22 15:49:08 1996 Ian Lance Taylor + + * stabs.c (struct stab_handle): Add field abfd. + (start_stab): Add abfd parameter. + (parse_stab_string): Skip the symbol leading char when searching + for the value of a global symbol. + * budbg.h (start_stab): Update declaration. + * rddbg.c (read_section_stabs_debugging_info): Pass abfd to + start_stab. + (read_symbol_stabs_debugging_info): Likewise. + +Thu Mar 21 12:40:48 1996 Ian Lance Taylor + + * wrstabs.c (stab_function_type): Output an empty typedef for an + unused argument, rather than making up a meaningless name. + (stab_variable): Use N_RSYM for a DEBUG_REGISTER variable. + + * ieee.c (struct ieee_info): Add global_vars field. + (parse_ieee_be): When ending the global typedef block, copy the + variables into info->global_vars. + (parse_ieee_atn): Don't require an NN record for a pmisc ATN. + (ieee_read_reference): Search the global variables after the local + variables. + +Wed Mar 20 18:08:19 1996 Andreas Schwab + + * objdump.c (disassemble_data): Make sure sym_name is always set. + (dump_section_header): Always put a space after the section name. + (dump_bfd_header): Terminate output with newline. + +Wed Mar 20 16:35:20 1996 Ian Lance Taylor + + * wrstabs.c: New file. + * budbg.h (write_stabs_in_sections_debugging_info): Declare. + * objcopy.c (write_debugging_info): For COFF or ELF, output stabs + in sections. + * Makefile.in: Rebuild dependencies. + (CFILES): Add wrstabs.c. + (WRITE_DEBUG_OBJS): New variable. + ($(OBJCOPY_PROG)): Use $(WRITE_DEBUG_OBJS), not $(DEBUG_OBJS). + ($(STRIP_PROG)): Likewise. + + * stabs.c (parse_stab_members): Make type stub detection more like + gdb. + + * ieee.c (struct ieee_handle): Add fields complex_float_index and + complex_double_index. + (ieee_complex_type): Cache type index in complex_float_index and + complex_double_index, depending upon size. Set size on type stack + to size * 2. + + * ieee.c (ieee_empty_type): Use builtin_unknown, not 0. + (ieee_void_type): Use builtin_void, not 1. + + * ieee.c (parse_ieee_ty): Handle 'V' type code. + (parse_ieee_atn): Don't require two numbers for type 10. + + * ieee.c (parse_ieee_be): Add one to offset at end of function or + block. + + * ieee.c (struct ieee_block): Add field skip. + (parse_ieee_bb): Don't call debug_record_function for __XRYCPP + function, and set skip field. + (parse_ieee_be): Don't call debug_end_function if skip is set. + + * debug.c (struct debug_handle): Add fields current_write_lineno + and current_write_lineno_index. + (debug_write): Initialize current_write_lineno and + current_write_lineno_index for each unit. Call + debug_write_linenos rather than writing out the line numbers + directly. + (debug_write_function): Call debug_write_linenos. + (debug_write_block): Likewise. + (debug_write_linenos): New static function. + + * debug.c (debug_write_type): For DEBUG_KIND_FUNCTION, push return + type before arguments. + +Mon Mar 18 18:05:33 1996 Ian Lance Taylor + + * configure.in: Add AC_FUNC_VFORK. + * configure, config.in: Rebuild. + * dlltool.c, nlmconv.c: Include if HAVE_VFORK_H is + defined. + + * stabs.c (parse_stab_range_type): A complex type is defined as a + subrange of itself with the high bound zero. + * ieee.c (ieee_complex_type): Don't crash on sizes of 12 or 16. + +Tue Mar 12 12:09:43 1996 Ian Lance Taylor + + * ieee.c (ieee_write_undefined_tag): Switch to global_types even + if it is not empty. + (ieee_tag_type): For an enum, look through info->enums. + + * configure: Rebuild with autoconf 2.8. + + * debug.c (debug_type_samep): Don't loop endlessly in + DEBUG_KIND_ENUM case. From Eric Baur . + +Mon Mar 11 12:35:03 1996 Ian Lance Taylor + + * rddbg.c (read_section_stabs_debugging_info): Call save_stab for + each stab entry, call stab_context on an error, and call + free_saved_stabs before rturning. + (read_symbol_stabs_debugging_info): Likewise. + (SAVE_STABS_COUNT): Define. + (struct saved_stab): Define. + (saved_stabs, saved_stabs_index): New static variables. + (save_stab, stab_context, free_saved_stabs): New static functios. + + * objdump.c (stab_name): Remove. + (struct stab_print): Remove. + (stab_print): Remove. + (dump_stabs): Don't initialize stab_name. + (print_section_stabs): Call bfd_get_stab_name rather than using + the stab_name array. + +Tue Feb 27 19:52:01 1996 Ian Lance Taylor + + * prdbg.c (pr_int_constant): Initialize info correctly. + (pr_float_constant): Likewise. + +Mon Feb 26 18:11:37 1996 Stan Shebs + + * mpw-make.sed: Update to handle shared library support. + +Sat Feb 24 11:21:49 1996 Alan Modra : + + * Makefile.in ($(OBJDUMP_PROG)): Search $(BFDLIB) before + $(OPCODES). + +Thu Feb 15 12:44:45 1996 Ian Lance Taylor + + * configure.in: Don't tamper with LDFLAGS. Call AC_PROG_CC before + configure.host. + * configure: Rebuild. + + * configure.in: Substitute RPATH_ENVVAR. + * configure: Rebuild. + * Makefile.in (RPATH_ENVVAR): New variable. + (check): Use $(RPATH_ENVVAR) rather than LD_LIBRARY_PATH. + + * objcopy.c (smart_rename): Rather than doing chmod then chown, do + chmod without setuid, then chown, then chmod with setuid. + +Wed Feb 14 16:46:42 1996 Martin Anantharaman + + * arsup.c (map_over_list): Reindent. Don't assume that the + function does not delete the BFD. + (ar_addlib_doer): Don't set prev->next if prev is NULL. + +Wed Feb 14 15:12:17 1996 Ian Lance Taylor + + * ieee.c (ieee_regno_to_genreg): Convert register numbers for m68k + and i960. + (ieee_genreg_to_regno): Likewise. + +Mon Feb 12 14:19:59 1996 Ian Lance Taylor + + * ieee.c: Extensive changes to write code to put types in the + global type block when possible, to output ranges for all memory + occupied by the module, and to improve efficiency. + + * debug.c (struct debug_handle): Remove class_mark field. Add + id_list and compare_list fields. + (struct debug_class_id): Define. + (struct debug_type_compare_list): Define. + (debug_write): Initialize info->id_list + (debug_write_name): Remove reference to info->class_mark. + (debug_write_type): Get id for all structs and classes. Simplify + test for whether struct has already been written. + (debug_write_class_type): Get id for all classes. Simplify test + for whether class has already been written. + (debug_write_block): Don't write out blocks other than the top + level block if they have no local variables. + (debug_set_class_id): New static function. + (debug_type_samep): New static function. + (debug_class_type_samep): New static function. + * prdbg.c (pr_start_struct_type): Always print id. + (pr_start_class_type): Likewise. + (pr_tag_type): Likewise. + + * stabs.c (struct stab_handle): Add syms and symcount fields. + (start_stab): Add syms and symcount parameters. Change all + callers. + (parse_stab_string): Look up global variables in the symbol table + to get the right value. + * budbg.h (start_stab): Update declaration. + * rddbg.c (read_section_stabs_debugging_info): Add syms and + symcount parameters. Change all callers. + + * stabs.c (parse_stab_array_type): If the index type is 0, use + int. + +Wed Feb 7 14:17:45 1996 Ian Lance Taylor + + * ieee.c (ieee_start_compilation_unit): Clear modified and + modified_alloc fields of info. + + * configure.in: Check for --enable-shared. Substitute new + variables BFDLIB and OPCODES. + * configure: Rebuild. + * Makefile.in (BFDLIB): Set to @BFDLIB@. + (OPCODES): Set to @OPCODES@. + +Mon Feb 5 16:18:42 1996 Ian Lance Taylor + + Support for building bfd and opcodes as shared libraries, based on + patches from Alan Modra : + * configure.in (HLDFLAGS): New substitution. + * configure: Rebuild. + * Makefile.in (HLDFLAGS): New variable. Make all links use + $(HLDFLAGS) before $(CFLAGS) and $(LDFLAGS). + (BFDLIB_DEP): New variable. Replace all occurrences of $(BFD) as + a dependency with $(BFDLIB_DEP). Remove $(BFD) as a dependency if + there is also a dependency on $(ADDL_DEPS). + (BFDLIB): Rename from BFD; change all uses; set to -L../bfd -lbfd. + (OPCODES_DEP): New variable. Replace all occurrends of $(OPCODES) + as a dependency with $(OPCODES_DEP). + (OPCODES): Set to -L../opcodes -lopcodes. + (ADDL_DEPS): New variable. Replace all occurrences of + $(ADDL_LIBS) as a dependency with $(ADDL_DEPS). + (check): Set LD_LIBRARY_PATH in the environment. + (config.status): Depend upon BFD configure.host and config.bfd. + +Fri Feb 2 17:02:59 1996 Doug Evans + + * objdump.c: #include stdarg.h or varargs.h. + (objdump_print_value): Change FILE* arg to struct disassemble_info*. + All callers updated. Use fprintf_func. + (objdump_print_address): Consistently use fprintf_func. + (objdump_sprintf): New function. + (disassemble_data): Print insn into a buffer, print raw insn ourselves, + then print insn mnemonic. + +Fri Feb 2 16:48:55 1996 Ian Lance Taylor + + * configure: Regenerate. + +Thu Feb 1 09:38:18 1996 Steve Chamberlain + + * configure.in (i[3-6]86-*-win32): Becomes i[3-6]86-*-cygwin32. + (powerpc*-*-cygwin32): New. + * configure: Regenerated. + +Wed Jan 31 13:22:03 1996 Richard Henderson + + * Makefile.in (distclean): Remove $(DEMANGLER_PROG).1. + +Mon Jan 29 17:36:29 1996 Ian Lance Taylor + + Based on patches from H J Lu : + * objcopy.c (remove_leading_char): New static variable. + (OPTION_REMOVE_LEADING_CHAR): Define. + (copy_usage): Mention --remove-leading-char. + (filter_symbols): If remove_leading_char, and the first character + of a global symbol matches the symbol leading char of the BFD, + remove the first character. + (copy_object): Filter the symbols if remove_leading_char is set. + (copy_main): Handle --remove-leading-char. + * binutils.texi, objcopy.1: Document --remove-leading-char. + +Sat Jan 27 15:40:13 1996 Michael Meissner + + * objdump.c (fprintf): Add prototype to avoid compiler warning on + SunOS. + +Fri Jan 26 11:53:42 1996 Ian Lance Taylor + + * binutils.texi (nm): Improve documentation on symbol types. + (objdump): Reference the stabs manual from the discussion of the + --stabs option. + +Thu Jan 25 11:21:46 1996 Raymond Jou + + * mpw-make.sed: Add a "stamps" target. + +Thu Jan 25 13:51:44 1996 Ian Lance Taylor + + * objdump.c (dump_headers, dump_section_header): Change objdump -h + output to be simpler and to include section file offsets. + +Wed Jan 24 12:06:05 1996 Ian Lance Taylor + + * stabs.c (parse_stab_members): Don't adjust voffset. + + * ieee.c (ieee_read_cxx_class): Don't multiply voffset by 4. + (struct ieee_write_type): Add name field. + (struct ieee_type_class): Remove name field. Change all uses to + use new name field in type instead. + (struct ieee_name_type): Likewise. + (ieee_start_struct_type): Initialize name field of type. + (ieee_start_class_type): Don't initialize classdef entry of tag. + (ieee_class_method_var): Don't adjust voffset. + (ieee_end_class_type): Likewise. + (ieee_tag_type): Initialize new name field of type. + (ieee_typdef): Set name after copying in type information. + + * debug.c (VOFFSET_STATIC_METHOD): Define as -1, not 1. + + * ieee.c (struct ieee_modified_type): Define. + (struct ieee_handle): Add modified and modified_alloc fields. + (ieee_get_modified_info): New static function. + (ieee_pointer_type): Cache type index. + (ieee_const_type): Likewise. + (ieee_volatile_type): Likewise. + + * ieee.c (ieee_define_named_type): When creating a tag for an + anonymous struct, copy the name into memory. + (ieee_tag_type): Likewise. + * debug.c (debug_write_type): Only check and set id field for an + unnamed object. + (debug_write_class_type): Likewise. + + * ieee.c: Various changes to write out types for functions and + references, and to not write out unnecessary function types. + + * ieee.c (struct ieee_var): Remove variable field. Add kind + field, and define some enum constants for it. + (parse_ieee_ty): Set kind field of variable for 'x' and 'X' types. + (parse_ieee_atn): Make an indirect slot for an external variable, + although we otherwise don't record it. Set kind field rather than + variable field of pvar. + (ieee_read_cxx_class): Try to get the type of a static member. + (ieee_read_reference): Check kind field rather than variable + field. + +Tue Jan 23 15:54:18 1996 Ian Lance Taylor + + * ieee.c: Various changes to handle reading C++ reference type + information. + + * debug.h (enum debug_var_kind): Add DEBUG_VAR_ILLEGAL. + (enum debug_parm_kind): Add DEBUG_PARM_ILLEGAL. + * debug.c (debug_get_parameter_types): Handle DEBUG_KIND_FUNCTION. + + * ieee.c: Various changes to write out definitions of C++ classes. + + * debug.c (debug_append_filename): Remove. + * debug.h (debug_append_filename): Don't declare. + + * stabs.c (struct stab_handle): Remove last_type field. Add + so_string and so_value fields. + (finish_stab): Call stab_emit_pending_vars before calling + debug_end_function. Don't warn about pending variables. + (parse_stab): Accumulate N_SO strings until a non N_SO symbol is + seen, rather than calling debug_append_filename. Call + stab_emit_pending_vars before calling debug_end_function. Don't + set info->last_type. + +Tue Jan 23 09:53:54 1996 Doug Evans + + * objdump.c (disassemble_data): Handle unknown endianness. + Pass fprintf to INIT_DISASSEMBLE_INFO. + +Mon Jan 22 16:46:43 1996 Doug Evans + + Add new option --show-raw-insn. + * objdump.c (show_raw_insn): New global. + (usage): Update. + (long_options): Update. + (disassemble_data): Set disasm_info.flags if --show-raw-insn. + + * objdump.c (disassemble_data): Set new arch,mach,endian fields in + disasm_info. + +Mon Jan 22 19:29:36 1996 Ian Lance Taylor + + * ieee.c: Extensive changes to pass a single info argument around + in the reading routines, rather than several arguments. Add code + to read C++ debugging records. + + * debug.h (debug_get_type_size): Declare. + (debug_get_field_name): Declare. + (debug_get_field_bitpos): Declare. + (debug_get_field_bitsize): Declare. + (debug_get_field_visibility): Declare. + (debug_get_field_physname): Declare. + * debug.c (debug_get_real_type): Handle DEBUG_KIND_TAGGED. + (debug_get_type_size): New function. + (debug_get_field_name): New function. + (debug_get_field_bitpos): New function. + (debug_get_field_bitsize): New function. + (debug_get_field_visibility): New function. + (debug_get_field_physname): New function. + (debug_write_type): Make sure we pass the real kind, not INDIRECT, + to tag_type. Pass the name recursively for INDIRECT. + +Fri Jan 19 12:31:57 1996 Ian Lance Taylor + + * debug.h (struct debug_write_fns): Remove ellipsis_type. Add int + and boolean parameters to function_type. Add boolean parameter to + method_type. + (debug_make_ellipsis_type): Don't declare. + (debug_make_function_type): Add debug_type * and boolean + parameters. Change all callers. + (debug_make_method_type): Add boolean parameter. Change all + callers. + (debug_get_parameter_types): Add boolean * parameter. Change all + callers. + (debug_get_target_type): Declare. + * debug.c (struct debug_function_type): Add fields arg_types and + varargs. + (struct debug_method_type): Add field varargs. + (debug_ellipsis_type, ELLIPSIS_P): Remove. + (debug_make_ellipsis_type): Remove. + (debug_make_function_type): Add arg_types and varargs parameters. + (debug_make_method_type): Add varargs parameter. + (debug_get_parameter_types): Add pvarargs parameter. + (debug_get_target_type): New function. + (debug_write_type): In case DEBUG_KIND_FUNCTION, push argument + types and pass count to function_type. In DEBUG_KIND_METHOD, use + a signed int for the count, don't call ellipsis_type, and pass + varargs to method_type. + * stabs.c (struct stab_demangle_info): Add varargs field. + (stab_demangle_argtypes): Add pvarargs parameter. Change all + callers. + (stab_demangle_args): Likewise. + (stab_demangle_type): In case 'F', pick up argument types. + * prdbg.c (pr_ellipsis_type): Remove. + (pr_function_type): Add argcount and varargs parameters. + (pr_method_type): Add varargs parameter. + * ieee.c (ieee_ellipsis_type): Remove. + (ieee_function_type): Add argcount and varargs parameters. + (ieee_method_type): Add varargs parameter. Remove most of + function body, and just call ieee_function_type. + + * stabs.c: Include "demangle.h". Added several new static + functions not listed below to demangle argument types; they are + all called via stab_demangle_argtypes. + (finish_stab): If the kind of an undefined tag is + DEBUG_KIND_ILLEGAL, use DEBUG_KIND_STRUCT instead. Warn if there + are any pending variable. + (parse_stab): Don't close the function when the block depth goes + to zero. Pass value to debug_end_function. + (parse_stab_string): In case 'T', pass the name to + parse_stab_type. + (parse_stab_type): In case 'x', use stab_find_tagged_type. In + case '#', handle functions with variable numbers of arguments. + (parse_stab_struct_type): Add tagname parameter. Change all + callers. + (parse_stab_members): Add tagname and typenums parameters. Change + all callers. If the type of a method is a stub, call + parse_stab_argtypes to demangle the argument types and get the + physical name of the function. + (parse_stab_argtypes): New static function. + (stab_record_variable): For a DEBUG_GLOBAL or DEBUG_STATIC + variable, call debug_record_variable immediately. + (stab_find_tagged_type): New static function. + + * debug.h (enum debug_type_kind): Add DEBUG_KIND_ILLEGAL. + (struct debug_write_fns): Add field ellipsis_type. Add id + parameter to start_struct_type, start_class_type, and tag_type. + (debug_make_ellipsis_type): Declare. + (debug_find_named_type): Declare. + (debug_get_type_kind): Declare. + (debug_get_return_type): Declare. + (debug_get_parameter_types): Declare. + (debug_get_fields): Declare. + (debug_get_field_type): Declare. + * debug.c (struct debug_handle): Add fields class_id and base_id. + (struct debug_class_type): Add field id. + (struct debug_method_variant): Rename argtypes to physname. + Change all uses. + (debug_ellipsis_type): New static variable. + (ELLIPSIS_P): New macro. + (debug_make_ellipsis_type): New function. + (debug_make_method_variant): Rename argtypes to physname. + (debug_make_static_method_variant): Likewise. + (debug_name_type): Always put types in the global namespace. + (debug_find_named_type): New function. + (debug_find_tagged_type): Treat DEBUG_KIND_ILLEGAL specially, + rather than DEBUG_KIND_VOID. + (debug_get_real_type): New static function. + (debug_get_type_kind): New function. + (debug_get_return_type): New function. + (debug_get_parameter_types): New function. + (debug_get_fields): New function. + (debug_get_field_type): New function. + (debug_write): Initialize base_id. + (debug_write_type): Pass new id argument to tag_type. Handle + DEBUG_KIND_ILLEGAL. Use id for DEBUG_KIND_STRUCT and + DEBUG_KIND_UNION. Handle ellipsis for method arguments. + (debug_write_class_type): Don't dereference kclass if it is NULL. + Use id. + * prdbg.c (pr_fns): Add pr_ellipsis_type. + (pr_ellipsis_type): New static function. + (pr_pointer_type): If this is a pointer to an array, parenthesize + it correctly. + (pr_start_struct_type): Add id parameter. + (pr_start_class_type): Likewise. + (pr_tag_type): Likewise. + (pr_fix_visibility): Add the visibility to the top of the stack, + not the second element on the stack. + (pr_struct_field): Pop the stack before calling pr_fix_visibility. + (pr_class_static_member): Likewise. + (pr_class_start_method): Don't push a type, just set the method + name in the type on the top of the stack. + (pr_class_end_method): Don't pop the stack. + (pr_class_method_variant): Rename argtypes parameter to physname. + Append const and volatile rather than prepending them. Add a + space after the physname. + (pr_class_static_method_variant): Likewise. + * ieee.c (ieee_fns): Add ieee_ellipsis_type. + (ieee_define_named_type): Use DEBUG_KIND_ILLEGAL rather than + DEBUG_KIND_VOID. + (write_ieee_debugging_info): Likewise. + (ieee_typdef): Likewise. + (ieee_ellipsis_type): New static function. + (ieee_start_struct_type): Add id parameter. + (ieee_start_class_type): Likewise. + (ieee_tag_type): Likewise. + (ieee_class_method_variant): Rename name to physname. + (ieee_class_static_method_variant): Likewise. + + * Makefile.in (DEBUG_OBJS): Remove prdbg.o. + ($(OBJDUMP_PROG)): Depend upon, and link against, prdbg.o. + +Thu Jan 18 17:35:06 1996 Kim Knuttila + + * dlltool.c (make_tail): Changed the order of the sections to avoid + an alignment problem. + +Wed Jan 17 14:23:00 1996 J.T. Conklin + + * srconv.c (wr_du): Set du.stackfrmt to 0. + (wr_un, wr_sc): Emit all sections, even those with 0 size. + +Tue Jan 16 16:15:49 1996 J.T. Conklin + + * srconv.c (wr_hd): Space size within segment was being + stored in segment identifier field. + +Tue Jan 16 12:07:25 1996 Stan Shebs + + * mpw-config.in (BUILD_NLMCONV, BUILD_SRCONV, SYSINFO_PROG, + BUILD_DLLTOOL): Put definitions for these into makefile when + configuring, instead of always clearing in mpw-make.sed. + * mpw-make.sed: Edit out any host_alias or target_alias settings, + fix pathname to BFD internal include files, remove dependency + calculation rules. + +Thu Jan 11 17:31:38 1996 Michael Meissner + + * objdump.c (dump_section_header): Add new section flags + SEC_{EXCLUDE,SORT_ENTRIES}. + +Thu Jan 11 11:45:34 1996 Ian Lance Taylor + + * objcopy.c (filter_symbols): NULL terminate the output symbols. + (copy_object): Allocate space for a possible extra NULL pointer. + + * debug.c (debug_make_undefined_tagged_type): Make sure we are + given a kind of type we can handle. + (debug_write_type): Handle undefined enums and structs. + (debug_write_class_type): Handle undefined classes. + * prdbg.c (pr_enum_type): Handle an undefined enum. + * ieee.c (ieee_enum_type): Likewise. + +Wed Jan 10 15:33:18 1996 Ian Lance Taylor + + * Makefile.in: Updated dependencies. + (ALLOCA, MALLOC): Remove variables. + (ADDL_LIBS): Remove $(MALLOC) from definition. + * alloca.c, gmalloc.c: Remove. + +Mon Jan 8 18:02:29 1996 Ian Lance Taylor + + * ieee.c: Add global function write_ieee_debugging_info and a + bunch of static functions and structs used to write out IEEE + debugging information. + * budbg.h (write_ieee_debugging_info): Declare. + + * ieee.c (struct ieee_type): Add pslot field. + (enum builtin_types): Define. + (ieee_builtin_type): For a pointer, return a pointer to the named + type. Use enum values rather than numbers. + (ieee_alloc_type): New static function. + (ieee_read_type_index): Use ieee_alloc_type. + (parse_ieee_bb): Likewise. + (parse_ieee_ty): Likewise. Use ieee_builtin_type for array range, + rather than making a new integer type. Store the new type in the + slot, if there is one. + (parse_ieee_atn): Treat ATN10 as defining a register variable. + (ieee_regno_to_genreg): Rename from ieee_regno_to_gen. Change all + callers. + (ieee_genreg_to_regno): New static function. + + * stabs.c (parse_stab_type): Add new typename parameter. Change + all callers. + (parse_stab_range_type): Add new typename parameter. Change all + callers. + + * debug.h (struct debug_write_fns): Add tag parameter to + enum_type, start_struct_type, and start_class_type. + * debug.c (debug_write_type): Pass any tag name to + start_struct_type, debug_write_class_type, and enum_type. If + DEBUG_KIND_TAGGED, pass the name in the recursive call. + (debug_write_class_type): Accept a new tag parameter, and pass it + to start_class_type. + * prdbg.c (pop_type): Don't remove '+' character. + (pr_enum_type): Accept and use tag parameter. + (pr_start_struct_type): Likewise. + (pr_start_class_type): Likewise. + (pr_class_baseclass): Adjust algorithm used to find where to put + the baseclass name. + (pr_tag): Don't bother to insert the tag name. + + * objcopy.c: Include budbg.h. + (convert_debugging): New static variable. + (OPTION_DEBUGGING): Define. + (copy_options): Add "debugging". + (copy_usage): Mention --debugging. + (is_strip_section): Skip debugging sections if convert_debugging. + (setup_section, copy_section): Likewise. + (filter_symbols): Skip debugging symbols if convert_debugging. + (copy_object): If convert_debugging, read and write debugging + information. + (write_debugging_info): New static function. + (copy_main): Handle --debugging. + * Makefile.in (DEBUG_OBJS): New variable. + ($(OBJCOPY_PROG)): Depend upon and link against $(DEBUG_OBJS). + ($(STRIP_PROG)): Likewise. + (OBJDUMP_OBJS): Remove variable. + ($(OBJDUMP_PROG)): Use objdump.o $(DEBUG_OBJS) rather than + $(OBJDUMP_OBJS). + * binutils.texi, objcopy.1: Document --debugging. + +Thu Jan 4 16:31:21 1996 Ian Lance Taylor + + * ieee.c: New file with code to read IEEE debugging information. + * budbg.h (parse_ieee): Declare. + * rddbg.c (read_debugging_info): Handle IEEE flavour files. + (read_ieee_debugging_info): New static function. + * Makefile.in: Rebuild dependencies. + (CFILES): Add ieee.c. + (OBJDUMP_OBJS): Add ieee.o. + + * bucomm.h (xrealloc): Change type of first parameter from char * + to PTR. + +Tue Jan 2 17:44:07 1996 Ian Lance Taylor + + * Makefile.in: Add targets to automatically rebuild dependencies. + Remove targets which just listed dependencies of .o files. + (DEP): New variable. + (HFILES, GENERATED_HFILES): New variables. + (CFILES, GENERATED_CFILES): New variables. + (underscore.c): Don't do anything, just depend upon stamp-under. + (stamp-under): New target; do what underscore.c used to do. + (nlmconv.o): Depend upon sym.h and ecoff.h. + (.dep, .dep1, dep.sed, dep, dep-in): New targets. + (stage1, stage2, stage3, against, comparison): Remove. + (de-stage1, de-stage2, de-stage3): Remove. + (clean, distclean): Remove stamp-under and dep.sed. + * dep-in.sed: New file. + + Implement generic debugging support. Implement a stabs reader and + a generic printer. + * budbg.h, debug.c, debug.h, prdbg.c, rddbg.c, stabs.c: New files. + * objdump.c: Include "debug.h" and "budbg.h". + (dump_debugging): New global variable. + (usage): Mention --debugging. + (long_options): Add "debugging". + (display_bfd): Handle --debugging. + * Makefile.in (OBJDUMP_OBJS): New variable. + ($(OBJDUMP_PROG)): Use $(OBJDUMP_OBJS). + * binutils.texi, objdump.1: Document --debugging. + +Sat Dec 30 09:59:51 1995 Jeffrey A Law (law@cygnus.com) + + * nm.c ( long_options): Add "--defined-only" option. + (usage): Update for new "--defined-only" option. + (filter_symbols): Handle "--defined-only". + +Fri Dec 29 16:04:56 1995 Ian Lance Taylor + + * arparse.y: Include "bucomm.h", not . + * nlmheader.y: Don't include "sysdep.h". + +Tue Dec 26 18:23:18 1995 Ian Lance Taylor + + * nm.c (print_symdef_entry): Check return value of + bfd_get_elt_at_index. + +Sat Dec 23 11:03:16 1995 Michael Meissner + + * configure.in (DLLTOOL_DEFS): Build dlltool for PowerPC if target + is powerpc*-*-win* in addition to powerpc*-*-*pe*. + +Fri Dec 15 16:30:57 1995 Ian Lance Taylor + + * objdump.c (endian_string): New static function. + (display_target_list): Use it. + * nlmconv.c (main): Use new bfd_big_endian macro. + +Fri Dec 15 07:51:34 1995 steve chamberlain + + * dlltool.c (fill_ordinals): Start from 1 if no other instructions + given. + +Tue Dec 12 12:05:21 1995 Ian Lance Taylor + + * Makefile.in (clean): Remove $(DEMANGLER_PROG).1. From Ronald + F. Guilmette . + +Mon Dec 11 14:33:05 1995 Stan Shebs + + * mac-binutils.r: Fix copyright and version strings. + + * Makefile.in (version): Remove, no longer used. + +Fri Dec 1 14:41:56 1995 Stan Shebs + + * mpw-make.sed (install, install-only): Edit in Mac-specific + install procedure. + +Thu Nov 30 20:26:02 1995 Kim Knuttila + + * dlltool.c (ppc_jtab): The binary glue for PowerPC dll linkage, + including the return instruction. + sinfo: added a preferred alignment field. + (secdata): section data for the PowerPC version. + (make_one_lib_file): More symbols, More sections (pdata, rdata) + (make_tail): Use idata$6 instead of idata$7 for ppc. Also added a + NULL idata$3 descriptor (temporary). + +Tue Nov 28 17:23:44 1995 Doug Evans + + * dlltool.c (fill_ordinals): Don't reference d_export_vec if + there are no exported functions. + +Mon Nov 27 13:05:59 1995 Ian Lance Taylor + + * configure: Regenerate with autoconf 2.7. + +Wed Nov 22 13:17:15 1995 Ian Lance Taylor + + * dlltool.c (fill_ordinals): Start assigning ordinals at 1. + + * Makefile.in (EXPECT): Use $$r, not $${rootme}. + (check): Set r, not rootme. + +Tue Nov 21 18:04:09 1995 Ian Lance Taylor + + * configure.in: Use BFD_NEED_DECLARATION. + * acconfig.h: Put NEED_DECLARATION_FPRINTF in @TOP@ section. + * configure, config.in: Rebuild with autoconf 2.6. + +Fri Nov 17 10:34:37 1995 Ian Lance Taylor + + * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not + $(host_canonical) and $(target_canonical). + +Thu Nov 16 03:39:20 1995 Ken Raeburn + + Version 2.6 released. + * Makefile.in (VERSION): Update to 2.6. + +Wed Nov 15 12:14:17 1995 Ian Lance Taylor + + * Makefile.in (CC_FOR_TARGET): Define. + (check): Pass CC and CFLAGS to runtest. + + * nm.c (display_rel_file): Don't require a DYNAMIC object when + dumping the dynamic symbol table. + + * objdump.c (compare_symbols): Sort global symbols before local + symbols before debugging symbols. + (objdump_print_address): Don't futz around looking for a global + symbol with the same value. + +Tue Nov 14 17:19:11 1995 Ian Lance Taylor + + * dlltool.c: Use FOPEN_* macros rather than "r" or "w". + + * dlltool.c (fill_ordinals): Correct memset call. + +Sun Nov 12 12:56:05 1995 Stan Shebs + + * mpw-make.sed (DEMANGLER_PROG): Edit out attempts to do anything + with the man page. + +Fri Nov 10 11:41:22 1995 Ian Lance Taylor + + * objcopy.c (setup_section): Copy the section lma independently of + the vma. + +Wed Nov 8 11:33:00 1995 Ian Lance Taylor + + * arsup.c (ar_open): Cast malloc return value. + +Tue Nov 7 09:01:26 1995 Kim Knuttila + + * configure.in, configure (DLLTOOL_DEFS): Added ppc target. + * dlltool.c (MPPC): Added basic PPC definitions. + +Tue Nov 7 14:02:57 1995 Ian Lance Taylor + + * configure.in: Don't treat rs6000-*-lynx* specially. + * configure: Rebuild. + * config/rslynx: Remove. + * Makefile.in: Remove @target_makefile_fragment@. + +Mon Nov 6 15:00:50 1995 Ian Lance Taylor + + * bucomm.h: Include . + * ar.c: Don't include or . + * bucomm.c, dlltool.c, nlmconv.c, objcopy.c, objdump.c: Likewise. + +Fri Nov 3 12:38:09 1995 Ian Lance Taylor + + * objdump.c: Include . + + Permit user to override DEMANGLER_PROG from command line. From + Manfred Hollstein . + * Makefile.in ($(DEMANGLER_PROG)): Depend upon + $(DEMANGLER_PROG).1. + (install): Don't depend upon $(DEMANGLER_PROG).1. Only install + $(DEMANGLER_PROG).1 if $(DEMANGLER_PROG) is not empty. + +Wed Nov 1 15:04:57 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 + + * Makefile.in (syslex.o): add -I$(srcdir) if compiling in a + separate directory. + +Mon Oct 30 14:24:18 1995 Ian Lance Taylor + + * objdump.c (objdump_print_value): New static function. + (objdump_print_address): Use it. If we need the right section for + the symbol, and we can't find it, print an offset from the section + rather than using a symbol from some other section. + +Thu Oct 26 10:23:14 1995 steve chamberlain + + * dlltool.c (no_idata4, no_idata5): New. + (arm_jtab): Use correct encoding of jump instruction. + (usage, main, make_head, make_tail): Act on no_idata4, no_idata5. + +Wed Oct 25 12:10:07 1995 Stan Shebs + + * mpw-make.sed: Edit paths to generated y.tab.[ch] files. + +Fri Oct 20 18:40:34 1995 Ian Lance Taylor + + * binutils.texi: Change --with-targets to --enable-targets. + +Thu Oct 19 17:47:41 1995 Fred Fish + + * Makefile.in: Remove extraneous tab on otherwise empty line, + which confuses many non-GNU versions of "make". + +Wed Oct 18 16:31:58 1995 steve chamberlain + + * dlltool.c (i386_jtab, arm_jtab): New + (gen_lib_file): Rewritten to use bfd. + +Fri Oct 13 16:10:07 1995 Michael Meissner + + * Makefile.in (install): Don't give error message if dlltool + wasn't built. + +Fri Oct 13 11:04:37 1995 steve chamberlain + + * deflex.l: Allow quoting of IDs. + * defparse.y (%union): string deleted. + (command): DESCRIPTION takes ID. + * dlltool.c (gen_def_file): Quote outgoing name if + necessary. Preserve NONAME. + (gen_lib_file): Run ranlib. + (workout_prefix): Deleted. + (main, usage, long_options): Add --as, --ranlib, --ar options. + +Wed Oct 11 13:36:13 1995 steve chamberlain + + * dlltool.c (mtable): HOW_ALIGN_LONG, new. + (d_ord): Deleted. + (d_low_ord, d_high_ord, d_named_funcs): New. + (gen_exp_file): Create noname entries correctly. + (gen_lib_file): Dump exports alphabetically. + (process_duplicates): Count nonamed functions. + (fill_ordinals): Keep track of highest ord too. + (mangle_defs): Create alphabetically ordered list of names. + +Tue Oct 10 09:39:09 1995 steve chamberlain + + * Makefile.in (TOOL_PROGS): Include DLLTOOL_PROG. + +Mon Oct 9 13:06:31 1995 steve chamberlain + + * dlltool.c (add_underscore): New. + (xlate): Use new name. + (main, usage): Update. + +Fri Oct 6 14:08:51 1995 Ken Raeburn + + * sysinfo.y: Eliminate unused terminals "[" and "]" and unused + nonterminal "name". One s/r conflict remains. + + Mon Sep 25 22:49:32 1995 Andreas Schwab + + * nm.c (print_symname): Don't try to demangle an empty + name. + * objdump.c (slurp_symtab): Reset symcount if there are + no symbols. + (slurp_dynamic_symtab): Likewise, for dynsymcount. + (disassemble_data): Fix memory leak: free sorted_syms when done. + (display_bfd): Likewise, for syms and dynsyms. + (dump_relocs): Don't print header before possibly generating an + error message. + (dump_dynamic_relocs): Likewise. + + * ar.1, nm.1, objdump.1, size.1, strings.1, strip.1: Fix typos and + formatting bugs. + +Fri Oct 6 12:00:25 1995 Ian Lance Taylor + + * ar.c (do_quick_append): Comment out. + (replace_members): Add quick argument. + (main): Don't call do_quick_append. + (open_inarch): Don't call quick_append to create an empty archive. + Instead call bfd_openw/bfd_set_format/bfd_close. + +Thu Oct 5 20:53:08 1995 Ken Raeburn + + * bucomm.c: Always include time.h. + +Thu Oct 5 17:25:21 1995 Ian Lance Taylor + + * objdump.c (compare_symbols): Sort gnu_compiled and gcc2_compiled + symbols after other symbols with the same value. Likewise for + symbols which look like file names. + (objdump_print_address): Always chose the first reasonable symbol + with a given value. + +Tue Oct 3 22:38:55 1995 Ian Lance Taylor + + * arsup.c (ar_save): Use rename, not unlink/link/unlink. + +Mon Oct 2 12:10:25 1995 Ian Lance Taylor + + * strings.c (main): Exit with zero status if no files are given + and standard input is read. + +Thu Sep 28 20:03:07 1995 Stan Shebs + + * mpw-config.in: Calculate underscore and put into makefile + fragment, generate config.h. + * mpw-make.sed: New file, sed commands to edit Unix makefile + into MPW syntax. + * mpw-make.in: Remove. + * mac-binutils.r: New file, Mac resources. + +Thu Sep 28 15:49:00 1995 steve chamberlain + + * dlltool.c: (gen_exp_file): Always emit a .reloc section if + relocatable. + (imp_name_lab): New. + (gen_def_file): New. + (gen_lib_file): Use imp_name_lab. + (main): Initialize imp_name_lab. + +Mon Sep 25 12:05:34 1995 Ian Lance Taylor + + * configure.in: Call AC_HEADER_SYS_WAIT. + * configure: Rebuild. + * config.in: Rebuild. + * dlltool.c: Include "libiberty.h" and "bucomm.h". Don't include + , , or . Don't include . + Include . Use HAVE_SYS_WAIT_H to control whether to + include or define the wait macros by hand. Don't + declare xmalloc. + (gen_lib_file): Don't assume that sprintf returns the number of + characters; use strlen instead. + +Fri Sep 22 17:16:41 1995 Ian Lance Taylor + + * objdump.c (disassemble_data): Don't use the old BFD based + disassembler interface. Make info a const pointer. + +Wed Sep 13 18:33:44 1995 Ian Lance Taylor + + * objdump.c (start_address): New variable. + (stop_address): New variable. + (usage): Mention --start-address and --stop-address. + (OPTION_START_ADDRESS, OPTION_STOP_ADDRESS): Define. + (long_options): Add "start-address" and "stop-address". + (disassemble_data): Handle start_address and stop_address. + (dump_data, dump_reloc_set): Likewise. + (main): Don't set seenflag for -l. Handle OPTION_START_ADDRESS + and OPTION_STOP_ADDRESS. + * objcopy.c (parse_vma): Move to bucomm.c. + * bucomm.c (parse_vma): New function, moved in from objcopy.c. + * bucomm.h (parse_vma): Declare. + * binutils.texi, objdump.1: Document new objdump options. + +Tue Sep 12 12:37:39 1995 Ian Lance Taylor + + * Makefile.in (maintainer-clean): New target. + + * ar.c (replace_members): Don't call write_archive if nothing + changed. + + * objdump.c (disassemble_data): Add casts to avoid gcc warnings. + +Thu Sep 7 12:12:17 1995 Ian Lance Taylor + + * config.in: Rename from config.h.in. + * configure.in: Call AC_CONFIG_HEADER with config.h:config.in. + Check for config.h:config.in when creating stamp-h. + * configure: Rebuild. + * Makefile.in (stamp-h): Depend upon config.in rather than + config.h.in. Set CONFIG_HEADERS to config.h:config.in when + calling config.status. + + * Makefile.in (distclean): Remove config.h, stamp-h, and + config.log. + + * nm.c (value_format): Initialize based on BFD64 and + BFD_HOST_64BIT_LONG. + (print_radix): New static variable. + (set_print_radix): Set print_radix. Adjust changes to + value_format. + (print_value): New static function, to print 64 bit octal and + decimal values correctly. + (print_symbol_info_bsd): Check BFD64, not BFD_HOST_64_BIT. Use + print_value. + (print_symbol_info_sysv): Use print_value. + (print_symbol_info_posix): Likewise. + +Wed Sep 6 15:02:55 1995 Ian Lance Taylor + + * Makefile.in (*.o): Remove incorrect dependencies on + $(BFDDIR)/hosts/std-host.h. + + * Makefile.in (INSTALL_DATA): Add -m 644. + (INSTALL_XFORM1): Likewise. + (CC_FOR_BUILD): Set to @CC_FOR_BUILD@ rather than $(CC). + (mostlyclean): Remove config.log. + (distclean): Remove config.cache. + + * configure.in: Call BFD_CC_FOR_BUILD and BFD_BINARY_FOPEN. + * configure: Rebuild. + +Tue Sep 5 20:22:42 1995 Ian Lance Taylor + + * configure.in: Rewrite to use autoconf. + * aclocal.m4: New file. + * configure: New file, built by autoconf. + * acconfig.h: New file. + * config.h.in: New file, built by autoheader. + * Makefile.in: Various changes for new configure script. Also: + (PROGS): Remove $(SYSINFO_PROG). + (ALL_CFLAGS): Remove $(TDEFINES). + (version.o): Use $(ALL_CFLAGS). + (cplus-dem.o, dlltool.o, nlmconv.o): Likewise. + (sysdump.o): Depend upon bucomm.h and config.h. + (srconv.o, arsup.o, strings.o): Depend upon config.h. + (filemode.o): Don't depend upon ../bfd/sysdep.h. + (bucomm.o): Depend upon config.h, not ../bfd/sysdep.h. + (size.o, objdump.o, nm.o, ar.o, objcopy.o): Likewise. + (nlmheader.o, nlmconv.o): Likewise. + (distclean): Don't remove sysdep.h. + * bucomm.h: Include "ansidecl.h", , and "config.h". + Include "fopen-same.h" or "fopen-bin.h", based on + USE_BINARY_FOPEN. Include , and declare errno if it is + not a macro. Include , , , + , and if they are present. Declare strchr, + strrchr, and strstr if no string header file exists. Include + if it exists and does not. Define + O_RDONLY and O_RDWR if necessary. + * ar.c: Don't include "sysdep.h". Do include and + . Use HAVE_GOOD_UTIME_H rather than POSIX_UTIME. Use + HAVE_UTIMES rather than !USE_UTIME. Don't include , and + don't declare errno. + * arsup.c: Don't include . + * bucomm.c: Don't include "sysdep.h". Include , + , and . Include if it defines + time_t. Define time_t if necessary. + * coffdump.c: Don't include "sysdep.h". + * coffgrok.c, filemode.c, nlmconv.c, size.c: Likewise. + * srconv.c, strings.c: Likewise. + * nm.c: Don't include "sysdep.h". Don't try to define HAVE_SBRK. + * objcopy.c: Don't include "sysdep.h". Include and + . + (simple_copy): Use creat rather than assuming that O_CREAT is + defined. + * objdump.c: Don't include "sysdep.h". Use + NEED_DECLARATION_PRINTF rather than !FPRINTF_ALREADY_DECLARED. + * sysdump.c: Include "bfd.h" and "bucomm.h". Don't include + "sysdep.h" or . + (dump_symbol_info): Rename from symbol_info. Change all callers. + +Mon Sep 4 14:30:00 1995 Ian Lance Taylor + + * configure.in (host_makefile_frag): Don't set. Substitute for + @CC@, @CFLAGS@, @HDEFINES@ and @LDFLAGS@ in Makefile. + * Makefile.in (AR_FLAGS): Set to rc rather than qv. + (CC): Define as @CC@. + (CFLAGS): Set to @CFLAGS@. + (LDFLAGS): Define as @LDFLAGS@. + (ALL_CFLAGS): Use @HDEFINES@ rather than $(HDEFINES). + + * configure.in: Don't bother to call config.bfd for each target. + Just call it for the default target, and use the shell variable to + decide whether underscores are used. + +Thu Aug 31 19:21:48 1995 Jason Molenda (crash@phydeaux.cygnus.com) + + * configure.in: match i[3-6]86-*-win32, not just i386-*-win32. + +Thu Aug 31 16:30:22 1995 steve chamberlain + + * dlltool.c (add_indirect): New. + (asm_prefix): New + (gen_exp_file): Timestamp should be 0. Insert prefix when + needed. New code for indirection. + (gen_lib_file): Timestamp should be 0. Insert prefix + when needed. + (usage): Document --add-indirect. + (main): Cope with new option. + + * objdump.c (dump_private_headers): New. + (usage): Document new option. + (long_option): Add private-headers. + (dump_bfd_private_header): New. + (main): Cope with new option. + +Thu Aug 31 04:09:16 1995 Doug Evans + + * dlltool.c (run): Add missing 3rd arg to waitpid. + +Wed Aug 30 11:02:11 1995 steve chamberlain + + * Makefile.in (TOOL_PROGS): Include dlltool if needed. + +Tue Aug 29 13:25:21 1995 steve chamberlain + + * dlltool.c (rva): Deleted. + (rvaafter, rva_before): Use new assembler pseudo. + (flush_page, gen_exp_file, gen_lib_file): Use new way of RVAing. + (gen_exp_file): Don't generate .edata if no need. + (gen_lib_file): Don't make timestamp. + Put _iname in idata$7. + (workout_prefix): Fix memory initialization bug. + (usage): Tidy up, delete many single char options. + (main): rva option is gone. + +Mon Aug 21 18:41:28 1995 steve chamberlain + + * dlltool.c (options): image-base is a synonym for rva. + (gen_lib_file): Put dll name into ibase$7. + +Sun Aug 20 09:59:00 1995 steve chamberlain + + Modified to generate archives and objects rather than .s files. + * dlltool.c (run) New function. + (gen_exp_file, gen_lib_file): Use run. + (workout_prefix): New. + (usage): Document new options. + (main): Parse new options. + +Wed Aug 16 16:26:52 1995 steve chamberlain + + * dlltool.c (gen_exp_file): Fix RVA handling. + (rva_s, rva_n): Delete. + +Fri Aug 11 18:27:18 1995 Ian Lance Taylor + + * nm.c (main): Ignore -e. + +Thu Aug 10 17:35:00 1995 Ken Raeburn + + * Makefile.in (config.texi): New target. Write out a setting for + texinfo variable VERSION. + (binutils.dvi, binutils.info): Depend on it. + * binutils.texi: Include it, and reference @value{VERSION} instead + of explicitly specifying 2.2(!). + +Thu Aug 10 16:07:53 1995 Ian Lance Taylor + + * coffgrok.c (do_type): Handle array dimensions the same way gdb + does. + +Tue Aug 8 17:10:42 1995 steve chamberlain + + * dlltool.c (mtable): New fields. + (ASM_RVA_BEFORE, ASM_RVA_AFTER): New. + (flush_page): Use new macros. + +Sat Aug 5 00:16:37 1995 Jeff Law (law@snake.cs.utah.edu) + + * objcopy.c (mark_symbols_used_in_relocations): Handle sections + with no relocations. + * coffgrok.c (do_sections_p1): Likewise. + +Mon Jul 31 12:51:06 1995 Ian Lance Taylor + + * strings.c (print_strings): For compatibility with existing + strings programs, print strings which are not terminated with a + null byte or a newline. + * binutils.texi, strings.1: Update documentation accordingly. + + * ar.c (replace_members): For compatibility with existing ar + programs, permit users to add the same file multiple times. + +Tue Jul 25 11:21:53 1995 Ian Lance Taylor + + * strings.c (DATA_FLAGS): Remove SEC_DATA. + (main): If no file names are given, scan standard input. + * binutils.texi, strings.1: strings now scans non-data sections by + default. + +Mon Jul 24 13:52:28 1995 J.T. Conklin + + * srconv.c (wr_hd): Set afl field to 4 for bfd_arch_sh. + (writeINT): When size == -2, use 2 bytes for the h8300 and 4 bytes + for the sh. + + * sysdump.c (fillup): Return size - 1, the last byte is a checksum + and shouldn't be counted. + * sysroff.info (hd): Changed segment identifier from a byte to a 1 + bit field. The sysroff 2.0-01 specification seems to be in error + here. Reduce width of following "spare" field from 4 to 3 bits. + (rl): Changed order and width of first 4 bitfields to correspond + to sysroff specification. + (dln_head, dln_inside, dln_tail): Removed. + +Tue Jul 18 23:00:03 1995 Fred Fish + + * nm.c (sort_symbols_by_size): Enclose expression being casted + in parens so result is casted, not just first operand. Can't + do pointer arithmetic on void* pointers. + +Fri Jul 14 13:42:42 1995 J.T. Conklin + + * sysdump.c (dh): Changed format of output to be 16 hex digits + followed by 16 ascii characters, similar to Emacs' hexl-mode, + to make it easier to read. + (xcalloc): fix typo. + +Thu Jul 13 15:27:44 1995 J.T. Conklin + + * srconv.c (wr_tr): Write out handcrafted tr block. + (walk_tree_symbol): Use evallen and evalue instead of + vallen & value because of corresponding changes in + sysroff.info. + + * sysdump.c (sysroff_swap_tr_in, sysroff_print_tr_out): New + functions. + + * sysroff.info (tr): the tr block is a special case --- a block + without contents --- which can't be handled by generated code. + (den, dpp): only first byte is present for DENend, DPPend. + (dsy): describe a conditional portion of block, rename some fields. + (dps): describe a conditional portion of block. + (dfl): removed. + + * sysinfo.y (yyerror): write error message to standard error. + +Thu Jul 13 10:43:59 1995 Ian Lance Taylor + + * Makefile.in (DISTSTUFF): Add arparse.h and sysinfo.h. + (mostlyclean): Remove y.output. + (clean): Remove sysroff, sysroff.c, sysroff.h, and sysinfo. + + * nlmconv.c (powerpc_mangle_relocs): Cast memset arg to size_t. + * objcopy.c (copy_object): Likewise. + + * nm.c (HAVE_SBRK): Define execpt on amigados and WINDOWS_NT. + (struct size_sym): Define. + (show_stats): New static variable. + (long_options): Add undocumented option "stats". + (main): Print memory stats if requested. + (sort_bfd, sort_dynamic, sort_x, sort_y): New static variables. + (numeric_forward): Use minisymbols rather than asymbols. + (non_numeric_forward): Likewise. + (size_forward1): Rename from size_forward. Use minisymbols. + (size_forward2): New static function. + (sort_symbols_by_size): Take new arguments dynamic, size, and + symsizep. Use minisymbols. Don't store the size back in the + symbol; store in a newly allocate struct size_sym array. + (display_rel_file): Read minisymbols rather than asymbols. Set + sort_* variables. Call print_size_symbols if sorting by size. + (filter_symbols): Take new arguments dynamic and size. Use + minisymbols. + (print_symbols): Likewise. Call print_symbol for actual printing. + (print_size_symbols): New static function. + (print_symbol): New static function. + +Wed Jul 12 10:43:05 1995 Ian Lance Taylor + + * objdump.c (dump_section_stabs): Only print each stabs section + once. + (compare_relocs): Make it clear to gcc that this always returns a + value. + +Wed Jul 12 10:40:23 1995 H.J. Lu + + * objcopy.c (simple_copy): Preserve errno on failure. + (smart_rename): Print error mesage if simple_copy fails. + +Tue Jul 11 13:10:52 1995 J.T. Conklin + + * sysdump.c: re-indented file. + (module): read blocks sequentially instead of trying to parse + them, as that would require changing the parser recognize the + difference between a DPSstart and DPSend block. + (getone): Add break's between switch blocks as appropriate. + (object_body_list): parse blocks according to sysroff spec. + +Mon Jul 10 12:37:25 1995 J.T. Conklin + + * sysroff.info: re-indented file, prior formatting was confusing + because it was indentation did not reflect nesting of conditional + records. Change "space size within segment" record in hd record + from bit to byte. + + * sysinfo.y (cond_it_field): Use xcalloc instead of calloc. + + * srconv.c (wr_cs): Reformatted cs header array, tag each byte + with a comment describing the field. + (wr_unit_info): Use SEEK_SET macro instead of constant 0. + (main): Use FOPEN_WB macro instead of literal "wb". + * sysroff.info: Remove fdl (dfl) field from cs block. Compare + ptr->type with ED_TYPE_CONST instead of constant 2 in ed block. + +Tue Jul 4 14:48:42 1995 Ian Lance Taylor + + * nm.c (size_forward): Check yf against yn, not xn. + + * objcopy.c (copy_archive): Record all output BFD's, and close + them before unlinking them and removing the temporary directory, + to avoid NFS problems. + + * ar.c (replace_members): In verbose messages, use 'r' when + replacing a member, and 'a' when adding one. + + * ar.c (ar_truncate): New static variable. + (normalize): Change return type to const char *. Add abfd + argument. Change all callers. If ar_truncate, chop the filename + to abfd->ar_max_namelen. + (main): For the 'f' modifier, set ar_truncate to true. Don't + change quick_append to replace if ar_truncate is true. + (do_quick_append): If ar_truncate, set BFD_TRADITIONAL_FORMAT. + (write_archive): Likewise. + * binutils.texi, ar.1: Document 'f' modifier. + + * objcopy.c (enum strip_action): Define strip_unneeded. + (OPTION_STRIP_UNNEEDED): Define. + (strip_options): Add "strip-unneeded". + (copy_options): Likewise. + (copy_usage): Mention --strip-unneeded. + (strip_usage): Likewise. + (is_strip_section): Strip debugging sections if strip_unneeded. + (filter_symbols): If strip_unneeded, only keep BSF_KEEP symbols. + (copy_object): If strip_all, discard symbols without checking + discard_locals. + (copy_object): Call filter_symbols if strip_unneeded. + (setup_section): Strip debugging sections if strip_unneeded. + (copy_section): Likewise. + (strip_main): Handle OPTION_STRIP_UNNEEDED. + (copy_main): Likewise. + * binutils.texi, objcopy.1, strip.1: Document --strip-unneeded. + +Mon Jul 3 14:16:47 1995 Steve Chamberlain + + * configure.in (i386-*-win32): New configuration. + * dlltool.c (killat, xlate, usage, long_options, main): + Understand and cope with -k option. + +Sat Jul 1 12:25:15 1995 Fred Fish + + * ar.c: (extract_file): Change "#if POSIX_UTIME" to + "#ifdef POSIX_UTIME" to match other tests of POSIX_UTIME + and avoid lossage when POSIX_UTIME is not defined at all. + +Wed Jun 28 17:51:24 1995 Steve Chamberlain + + * ar.c: (print_contents.c, extract_file, do_quick_append): + Malloc buffers rather than allocate on stack (so it works + on NT). + * deflex.l: Names can have an @ in them. + * dlltool.c: Loads of stuff. Can now generate .imp files which + work with NT .dlls. + +Thu Jun 22 19:10:50 1995 Stan Shebs + + * mpw-make.in (demangle.c.o): Remove. + (arparse.h): Depend on arparse.c instead of arparse.y. + +Wed Jun 21 17:32:45 1995 Ken Raeburn + + * Makefile.in (DISTSTUFF): Don't include info here. + (diststuff): Include it here. + (realclean): Remove *.info. + + * objdump.c (compare_relocs): If relocation entries have the same + address, keep them in file order. + +Mon Jun 19 09:06:49 1995 Steve Chamberlain + + * dlltool.c: Change names of generated files. .*.s-> -*.s + + * objdump.c (dump_section_stabs): Check for names + which are supersets of selected names. + +Wed Jun 14 19:43:52 1995 Doug Evans + + * dlltool.c (mtable, ARM jump): Must redirect via pc offsetable ptr. + +Wed Jun 14 13:27:22 1995 Steve Chamberlain + + * deflex.l, defparse.y, dlltool.c: New files. + * Makefile.in, configure.in: Support for them. + +Mon Jun 12 11:27:54 1995 Steve Chamberlain + + * sysdump.c: Include sysdep.h + (main): Open input with FOPEN_RB. + +Fri Jun 9 17:26:11 1995 Michael Meissner + + * objdump.c (wide_output): New flag variable. + (usage): Print new -w, --wide options. + (long_options): Add --wide support. + (dump_section_header): If --wide, don't print a newline between + the section's first line and the flags. + (objdump_print_address): Use unsigned comparisons for the binary + search, not signed. + (disassemble_data): If --wide, don't put a \n between the + disassembly output and relocation information. + (main): Support -w option being the same as --wide. + +Thu Jun 1 17:09:27 1995 Ken Raeburn + + Sat May 6 08:52:24 1995 H.J. Lu (hjl@nynexst.com) + + * objcopy.c (smart_rename): make it smarter, clean up + if rename () fails. + +Tue May 30 14:24:15 1995 Ken Raeburn + + * Makefile.in: Delete lines with lots of #### because four or more + indicate a point for makefile fragment substitution. + +Tue May 9 17:17:05 1995 Michael Meissner + + * configure.in: Don't build nlmconv on PowerPC eabi any more, it + is not needed. + +Thu Apr 27 20:21:24 1995 Doug Evans + + * Makefile.in (EXPECT): Define. + (RUNTEST): Use one in source tree if present. + (check): Set `rootme' for $(EXPECT). + +Wed Apr 26 18:26:21 1995 Steve Chamberlain + + * srconv.c (main): Add support for -n option which disables + prescan of common symbols. + (wr_ob): If reading past the end of a section, fill with zeros. + +Tue Apr 25 19:14:37 1995 Ken Raeburn + + * objdump.c (dump_section_header): Display load address after + virtual memory (run-time) address. + +Wed Apr 19 09:44:06 1995 Jason Merrill + + * Makefile.in (cplus-dem.o): Pass -DVERSION='"$(VERSION)"' to the + compile. + (DEMANGLER_PROG): No longer uses version.o. + +Mon Apr 10 13:29:49 1995 Stan Shebs + + Merge in support for Mac MPW as a host. + (Old change descriptions retained for informational value.) + + * mpw-config.in (TDEFINES): Define as empty in makefile frag. + + * mpw-config.in: Create mk.tmp, define ARCHDEFS in it. + + * mpw-config.in: New file, MPW configure fragment for binutils. + * mpw-make.in (install-only): New target. + (install): Also depend on install-only. + + * mpw-make.in (cplusfilt): Renamed from c++filt. + (INCLUDES): Add more paths. + + * mpw-make.in: New file, MPW makefile fragment for binutils. + (Normally automatically generated from Makefile.in.) + +Mon Mar 27 11:52:57 1995 Ian Lance Taylor + + * ar.c (write_archive): Call make_tempname to get output file + name, rather than using a fixed name based on the input file. + + * objcopy.c (make_tempname): Copy from here... + * bucomm.c (make_tempname): ...to here, and make global. + * bucomm.h (make_tempname): Declare. + +Fri Mar 24 11:47:42 1995 Ian Lance Taylor + + * strings.c: Include "bfd.h" before other headers. Include + "sysdep.h". + * bucomm.c (print_arelt_descr): Cast st_uid and st_gid to long, + and print them with %ld. + +Fri Mar 10 13:09:42 1995 Ian Lance Taylor + + * objcopy.c (strip_options): Add --keep-symbol. + (copy_options): Likewise. + (copy_usage): Mention --keep-symbol and -K. + (strip_usage): Likewise. + (keep_symbols): New static variable. + (is_strip_symbol): Adjust the return value according to + keep_symbols. + (strip_main): Handle -K. For -N, check that -K was not given. + (copy_main): Likewise. + * binutils.texi, objcopy.1, strip.1: Document -K. + +Mon Mar 6 13:33:47 1995 Stan Shebs + + * objcopy.c (copy_archive): Check result of mkdir. + (copy_main): Cast an xmalloc result. + + * objdump.c (usage): Break long format string into shorter ones. + +Mon Mar 6 13:46:12 1995 Ian Lance Taylor + + * bucomm.c (list_supported_targets): New function. + * bucomm.h (list_supported_targets): Declare. + * ar.c (usage): Call list_supported_targets. + * nm.c (usage): Likewise. + * objcopy.c (copy_usage, strip_usage): Likewise. + * objdump.c (usage): Likewise. + * size.c (usage): Likewise. + * strings.c (usage): Likewise. + +Tue Feb 28 15:13:58 1995 Ian Lance Taylor + + * bucomm.c (print_arelt_descr): Cast st_size to long before + passing it to fprintf. + +Fri Feb 17 13:36:45 1995 Ian Lance Taylor + + * objcopy.c (struct section_list): Add fields remove, set_flags, + and flags. Change adjust from boolean to enum. + (remove_sections): Remove static variable. + (sections_removed): New static variable. + (copy_options): Add --set-section-flags. + (copy_usage): Mention --set-section-flags. + (parse_flags): New static function. + (find_section_list): New static function. + (is_strip_symbol): Change return type from int to boolean. + (is_strip_section): New static function. + (filter_symbols): Call is_strip_section. + (copy_object): When adding sections, check for specified flags or + VMA. Call filter_symbols if any sections are being removed. + (setup_section): Use find_section_list function rather than + looking through remove_sections and adjust_sections. Handle + --set-section-flags. + (copy_section): Use find_section_list rather than looking through + remove_sections. + (strip_main): Use find_section_list instead of adding items to + sections_removed. + (copy_main): Use find_section_list instead of adding items to + sections_removed and adjust_sections. Handle --set-section-flags. + * binutils.texi, objcopy.1: Document --set-section-flags. + +Tue Feb 14 18:03:03 1995 Ian Lance Taylor + + * objdump.c (with_source_code): New global variable. + (usage): Mention -S/--source. + (long_options): Add --source. + (prev_functionname, prev_line): New static variables. + (struct print_file_list): Define. + (print_files): New static variable. + (skip_to_line, show_line): New static functions. + (disassemble_data): Call show_line to handle -l and -S. + (main): Handle -S. + * binutils.texi, objdump.1: Document -S/--source. + +Thu Feb 9 16:11:53 1995 Ian Lance Taylor + + * objcopy.c (copy_usage): Rename parameter to avoid shadowing. + (strip_usage): Likewise. + + * objcopy.c (struct section_add): Define. + (add_sections): New static variable. + (copy_options): Accept --add-section. + (copy_usage): Mention --add-section. + (copy_object): Add sections from the add_sections list. + (copy_main): Handle --add-section. + * binutils.texi, objcopy.1: Document --add-section. + +Wed Feb 1 15:04:57 1995 Ken Raeburn + + * objdump.c (disassemble_data): Pass section offset, not absolute + address, to bfd_find_nearest_line. + + * nlmconv.c (powerpc_mangle_relocs): Don't use const with + reloc_howto_type. + +Thu Jan 26 18:50:06 1995 Ian Lance Taylor + + * objdump.c (compare_symbols): Use bfd_asymbol_value (VAR) rather + than VAR->value. + (objdump_print_address): Likewise. + (disassemble_data): Don't change the symbol values. It can + confuse bfd_canonicalize_reloc. + +Thu Jan 26 12:03:56 1995 Michael Meissner + + * configure.in: Add support for powerpc-*-ebai. + +Wed Jan 18 10:02:12 1995 Steve Chamberlain + + * coffdump.c: Include sysdep.h. + (dump_coff_type): Handle coff_secdef_type. + * coffgrok.c : Include sysdep.h. + * srconv.c: Include libiberty.h + (absolute_p, dty_start, dty_end, dump_tree_structure): Remove. + +Wed Jan 18 12:24:14 1995 Ian Lance Taylor + + * coffdump.c (dump_coff_scope): Cast pointer to unsigned long for + printf. + * coffgrok.c: Include bucomm.h. Don't declare xmalloc. + (push_scope): Declare type of parameter link. + * size.c: Include libiberty.h. + * srconv.c: Include bucomm.h. + (find_base): Declare at top of file. + (wr_hd): Add default case to architecture switch. + (wr_dps_start): Declare type of parameter nest. + (wr_du): Comment out variables used only in commented out blocks. + (wr_dus): Remove unused variable i. + (wr_sc): Remove unused variables myinfo, low, and high. + * strings.c: Include libiberty.h. + * sysdump.c: Include . + +Tue Dec 20 19:13:44 1994 Ian Lance Taylor + + * ar.c (main): Ignore 'f' modifier used on HP/UX 9. + +Thu Dec 15 17:34:12 1994 Stan Shebs + + * ar.c, nm.c, objcopy.c, objdump.c: Include progress.h. + * ar.c, nm.c, objcopy.c, objdump.c (main): Add START_PROGRESS + and END_PROGRESS. + * ar.c (map_over_members, open_inarch): Call PROGRESS. + * nm.c (main, display_archive, filter_symbols, print_symbols): + Call PROGRESS. + + * objcopy.c (copy_usage): Break up long usage string. + +Wed Dec 14 15:51:56 1994 Ken Raeburn + + * objcopy.c (copy_object): Don't bother setting status after + nonfatal() "call", because it won't return. + +Fri Dec 9 00:22:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (powerpc_mangle_relocs): Don't switch a reloc to use + the section symbol if the symbol is undefined. + +Thu Dec 8 14:45:50 1994 Ken Raeburn + + * objcopy.c (add_strip_symbol): Cast return value of xmalloc. + +Wed Nov 30 11:05:43 1994 Ian Lance Taylor + + * ar.c (replace_members): Pass current->filename to normalize when + checking for duplicates, because the filename of a newly added + file will not have been normalized yet. + +Thu Nov 17 15:00:13 1994 Ian Lance Taylor + + * ar.c (main): Don't call do_quick_append if any of the archive + names are longer than 14 characters. + + * objcopy.c (main): Fix is_strip test. From + pirker@eiunix.tuwien.ac.at (Martin Pirker). + +Thu Nov 17 15:37:19 1994 Mark W. Eichin + + * objcopy.c (add_strip_symbol): New function, adds a name to an + explicit list of symbols to strip. + (is_strip_symbol): New function, reports whether the name argument + is in the explicit list. + (filter_symbols): Check against is_strip_symbol above all. + (strip_main): Recognize -N option. If used, don't default to + strip_all. + (copy_main): Recognize -N option. + (strip_usage): Document -N and --strip-symbol options. + (copy_usage): Ditto. + * objcopy.1, strip.1, binutils.texi: Document -N and + --strip-symbol options. + +Tue Nov 8 13:12:54 1994 Ian Lance Taylor + + * objdump.c (display_target_list, display_info_table): Pass an + array to tmparg, rather than NULL, since some systems can't handle + NULL. + + * objcopy.c (copy_archive): Keep a list of the names of the + temporary files we created. Close each input BFD after we open + its successor. + +Mon Nov 7 15:48:39 1994 Ken Raeburn + + * Makefile.in (VERSION): Bump to 2.5.3. + +Thu Nov 3 19:04:34 1994 Ken Raeburn + + * Makefile.in (install-info): Install info files from whatever + directory they were found in. + + Patch from DJ Delorie: + * configure.bat: do c++filt -> cxxfilt right + + * sysinfo.y: Include system header files early, so any potential + declaration of abort() occurs before its use. + + * strings.c (strings_file): Try opening the file in binary mode + first. + +Wed Nov 2 15:44:13 1994 Ian Lance Taylor + + * ar.c (main): Treat ar qs like ar rs. + +Tue Oct 25 16:19:25 1994 Ian Lance Taylor + + * objcopy.c (gap_fill): Explicitly initialize, for clarity. + (pad_to_set, pad_to): New static variables. + (copy_options): Accept --pad-to. + (copy_usage): Mention --pad-to. + (copy_object): Support --pad-to. + (compare_section_vma): Sort non loadable sections to the front. + Sort sections with the same VMA by size. + (copy_main): Handle --pad-to. + * binutils.texi, objcopy.1: Document --pad-to. + +Thu Oct 20 13:51:31 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objcopy.c (gap_fill_set, gap_fill): New static variables. + (copy_options): Accept --gap-fill. + (copy_usage): Mention --gap-fill. + (copy_object): Support --gap-fill. + (get_sections, compare_section_vma): New static functions. + (copy_main): Handle --gap-fill. + * binutils.texi, objcopy.1: Document --gap-fill. + +Wed Oct 19 14:09:16 1994 Ian Lance Taylor + + * Makefile.in (check): Add a dummy else clause to the if + statement. + + * objcopy.c (copy_object): Revert yesterday's change. + * binutils.texi, objcopy.1: Remove special mention of --set-start + and `binary' output format. + +Tue Oct 18 11:12:01 1994 Ian Lance Taylor + + * objcopy.c (copy_object): If the output file format is `binary', + and the start address was not set using --set-start, default the + start address to zero. This hack is because the `binary' output + file format uses the start address to set the virtual address of + the first byte in the file. + * binutils.texi, objcopy.1: Add some notes on generating S-records + and binary files. + + * nm.c (print_symdef_entry): Call print_symname to print the + symbol name, so that --demangle works. + + * Makefile.in (mostlyclean): Remove tmpdir. + + * objcopy.c (struct section_list): Add fields used, adjust, val. + (adjust_start, set_start_set, set_start): New static variables. + (adjust_section_vma, adjust_sections): New static variables. + (copy_options): Add --adjust-start, --adjust-vma, + --adjust-section-vma, --adjust-warnings, --no-adjust-warnings, + --set-start. + (parse_vma): New static function. + (copy_usage): Mention new options. + (copy_object): Handle --set-start and --adjust-start. + (setup_section): Correct type of last argument to PTR. Set used + field if section is removed. Handle --adjust-vma and + --adjust-section-vma. + (copy_section): Correct type of last argument to PTR. + (mark_symbols_used_in_relocations): Likewise. + (strip_main): Clear used field when handling -R. + (copy_main): Handle new options. + * binutils.texi (objcopy): Document new options. + * objcopy.1: Document new options. + +Fri Oct 14 14:38:13 1994 Ian Lance Taylor + + * configure.in (configdirs): Remove definition--testsuite is no + longer configured. + * Makefile.in (testsuite): Remove target. + (site.exp): New target. + (check): Rewrite. + (clean, distclean): Don't recur into testsuite directory. + +Thu Oct 13 19:24:09 1994 Ken Raeburn + + * Makefile.in (VERSION): Updated to 2.5. + * Version 2.5 released. + +Tue Oct 11 15:26:42 1994 Ian Lance Taylor + + * Makefile.in (sysdump.o): Depends upon sysroff.c. + +Mon Oct 10 13:50:30 1994 J.T. Conklin (jtc@rtl.cygnus.com) + + * nlmconv.c (link_inputs): Pass -Ur flag to ld so that the + ctor/dtor tables needed by C++ programs are built. + +Sun Oct 9 18:04:00 1994 Jim Wilson (wilson@sphagnum.cygnus.com) + + * Makefile.in (srconv.o): Add dependence on sysroff.c. + +Tue Oct 4 12:19:51 1994 Ian Lance Taylor + + * configure.in: Use ${config_shell} when running config.bfd. + + * Makefile.in (sysroff.h): Split target away from sysroff.c. + (srconv.o, sysdump.o): New targets. + (srconv, sysdump): Don't depend upon sysroff.c. + +Wed Sep 28 13:04:34 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * Makefile.in (arparse.c): Don't ignore errors from mv. + (sysinfo.c): Likewise. Also, depend upon arparse.c, to prevent a + parallel make from trying to build both arparse.c and sysinfo.c + simultaneously. + (nlmheader.c): Similar change. + (arparse.h): Separate target from arparse.c, so that a parallel + make does not try to build both at once. Depend upon arparse.c. + (sysinfo.h): Similar change. + + * objdump.c (disassemble_data): Pass the reloc buffer to free, not + the pointer used to loop over the relocs. + +Sat Sep 24 16:16:57 1994 Stan Shebs (shebs@andros.cygnus.com) + + * objdump.c (disassemble_data): Cast result of xmalloc. + +Wed Sep 21 19:30:35 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * objdump.c (sorted_syms, sorted_symcount): New global variables. + (objdump_print_address): Use sorted_syms and sorted_symcount + instead of syms and symcount. + (disassemble_data): Don't bother to get the relocs before looping + over the sections. Before filtering and sorting the symbol table, + copy it into sorted_syms. + +Fri Sep 16 11:27:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * objdump.c (struct objdump_disasm_info): Add field require_sec. + (objdump_print_address): If aux->require_sec, require that the + symbol be in aux->sec even if HAS_RELOC is not set. If we can't + find a smaller symbol in the right section, look for a larger one. + (disassemble_data): Set aux.require_sec around the + objdump_print_address call for the instruction address. + +Thu Sep 15 21:43:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ar.c: Call xexit rather than exit. + (output_filename, output_file, output_bfd): New static variables. + (remove_output): New static function. + (main): Call xatexit (remove_output). Call xexit rather than + returning. + (extract_file): Set output_filename and output_file while output + file is open. + (write_archive): Likewise, but use output_bfd, not output_file. + * arsup.c: Include libiberty.h. Call xexit rather than exit. + * bucomm.c: Likewise. + + * objdump.c (disassemble_all): New global variable. + (usage): Document --disassemble-all. + (long_options): Add disassemble-all as a synonym for -D. + (compare_symbols): Make pointers const. + (compare_relocs): New static function. + (disassemble_data): Rename disassemble to disassemble_fn to avoid + shadowing. If dump_reloc_info, print relocs along with + disassembly. Skip sections which are not SEC_CODE unless + disassemble_all or only is set. + (display_bfd): Don't call dump_relocs if disassemble is set. + (main): Accept and handle -D. + * binutils.texi: Document -D/--disassemble-all. + * objdump.1: Likewise. + +Wed Sep 14 12:19:07 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * objdump.c (disassemble_data): Initialize prevline to 0. Make + prev_function non const. Copy functionname into an malloc buffer + when setting prev_function, instead of assuming that the string + will last forever. + + * nm.c: Include libiberty.h. + (sort_by_size): New static variable. + (long_options): Add --size-sort. + (usage): Mention --size-sort. + (numeric_forward): Make static. Change from void * to PTR. + (numeric_reverse): Likewise. + (non_numeric_forward, non_numeric_reverse): Likewise. + (sorters): Change declaration from void * to PTR. + (size_forward, sort_symbol_by_size): New static functions. + (display_rel_file): Handle sort_by_size. + (filter_symbols): If sort_by_size, discard absolute and undefined + symbols. + * binutils.texi (nm): Document --size-sort. + * nm.1: Document --size-sort. + +Tue Sep 13 21:06:06 1994 Jeff Law (law@snake.cs.utah.edu) + + * objcopy.c (copy_main): Initialize input_filename and + output_filename to NULL. + +Tue Sep 13 14:17:24 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * Makefile.in (version.o): Depend upon Makefile, so that version.o + gets rebuilt when make variable VERSION is changed. + + * objdump.c (dump_section_header): Print the SEC_NEVER_LOAD flag. + +Wed Aug 24 12:40:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * configure.in: Change i[34]86 to i[345]86. + +Tue Aug 23 11:00:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ar.c (ranlib_touch): Don't update the archive map if there isn't + one. + +Mon Aug 22 16:02:18 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * ar.c: Include libiberty.h. + (inarch): Remove variable. + (map_over_members): Make static. Add arch argument, and use it + instead of inarch. Change all callers. + (main): Treat --version as -v. Accept -t argument. Accept any + number of archive arguments. Catch and use open_inarch return + value, rather than using inarch. + (open_inarch): Return newly opened BFD, rather than using inarch. + (do_quick_append): Make archive_filename const. + (write_archive): Add iarch argument, and use it instead of inarch. + Change all callers. + (delete_members, move_members, replace_members): Likewise. + (ranlib_only): Don't exit on success. Catch and use open_inarch + return value. + (ranlib_touch): New function. + * arsup.h (map_over_members): Don't declare. + (ar_end, ar_extract): Declare. + (open_inarch): Change return value in declaration to bfd *. + * arsup.c (map_over_list): Make static. Always pass two arguments + to function. Add arch argument, and use it instead of inarch. + Change all callers. + (ar_directory_doer): Make static. Add ignored second argument. + Change all callers. + (ar_directory): Use open_inarch return value rather than inarch. + (ar_addlib_doer): Make static. + (ar_addlib): Use open_inarch return value rather than inarch. + (ar_extract): Remove unused local variable abfd. + +Thu Aug 11 14:55:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + Add support for removing named sections to objcopy and strip. + * objcopy.c (struct section_list): Define. + (remove_sections): New static variable. + (strip_options, copy_options): Add remove-section. + (copy_usage, strip_usage): Mention -R and --remove-section. + (setup_section): If section is in remove_sections list, ignore it. + (copy_section): Likewise. + (strip_main, copy_main): Handle -R. + * binutils.texi, objcopy.1, strip.1: Document new options. + +Wed Aug 10 10:19:55 1994 Stan Shebs (shebs@andros.cygnus.com) + + * nlmconv.c (powerpc_mangle_relocs): Rename symvalue to sym_value, + so as not to conflict with the symvalue typedef in bfd.h. + +Mon Aug 1 13:19:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * nlmheader.y: Per current NetWare docs, accept a revision number + of 0 and treat a revision number greater than 26 as 0. + +Mon Jul 25 12:58:36 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * objdump.c (objdump_print_address): Correct handling of end of + symbols when looking for next symbol with a different value. + +Fri Jul 22 16:48:34 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * nm.c (numeric_forward): Treat undefined symbols as "less than" + defined symbols with zero values. If numeric values are equal, or + both symbols are undefined, sort alphabetically. Don't assume + that the difference of two bfd_vma values will truncate to "int" + and still have the same sign. + (numeric_reverse): Call numeric_forward and negate the result. + (print_symbol_info_bsd): For undefined symbols, print leading + spaces equivalent to the width of a printed bfd_vma, rather than + assuming that 8 will look right. + +Fri Jul 22 10:36:50 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * coffgrok.c (doit): Zero all fields of new structure. + * srconv.c (sysroff_swap_*_out): Remove redundant trailing arg. + * sysinfo.y: Generate sysroff_swap_*_out without requiring extra + arg. + +Fri Jul 22 10:09:53 1994 J.T. Conklin (jtc@phishhead.cygnus.com) + + * nlmheader.y: Make "stack" and "stacksize" synonyms in the lexer + rather than the parser. + +Thu Jul 21 10:25:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * config/mh-alphaosf, config/mh-apollo68v, config/mh-delta88: + Remove; obsolete. + +Sat Jul 16 22:34:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * objdump.c (slurp_dynamic_symtab): Try to get the dynamic symbols + even if the bfd is not marked DYNAMIC. ELF executables are not + marked DYNAMIC, but do have dynamic symbols. + +Fri Jul 15 01:41:35 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * coffgrok.c (do_where): Make data with no type 'int'. + (do_define): Keep info on source file of a symbol. + * coffgrok.h (coff_symbol): New field. + * srconv.c (PROGRAM_VERSION): Now 1.3 + (wr_rl): Use external ref number for symbol. + (wr_dus): Only keep one source file per debug unit. + (wr_dln): Always emit line numbers for first source file, + (wr_globals): Emit globals in the du of their owning source file. + +Mon Jul 11 15:59:03 1994 J.T. Conklin (jtc@phishhead.cygnus.com) + + * nlmheader.y: Null terminate var_hdr->threadName. + +Fri Jul 8 17:33:22 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * Makefile.in (syslex.o, sysinfo.o): Permit C source files to be + in $(srcdir), as they will be for FSF releases. + +Wed Jul 6 01:13:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (setup_sections): Preserve existing section flags when + copying in flags from a new section. + +Tue Jul 5 15:56:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * objcopy.c: Include libiberty.h. + (copy_file): If output_target is NULL, set it to the target of the + input file. + +Wed Jun 29 17:17:14 1994 J.T. Conklin (jtc@phishhead.cygnus.com) + + * nlmconv.c (link_inputs): Fixed memory allocation bug. + +Thu Jun 23 12:52:46 1994 David J. Mackenzie (djm@rtl.cygnus.com) + + * configure.in: Change --with-targets to --enable-targets. + +Tue Jun 21 12:53:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * Makefile.in (sysinfo): Does not depend upon $(ADDL_LIBS). + + * nlmconv.c (powerpc_build_stubs): Don't generate the PowerPC + NetWare custom header; no longer needed. + (powerpc_mangle_relocs): Convert relocs against the uninitialized + data section into relocs against the data section. + + * configure.in: Set nlmconv_defs to -DNLMCONV_cputype for all the + netware targets. Write it into Makefile as NLMCONV_DEFS. + * Makefile.in (nlmconv.o): Pass $(NLMCONV_DEFS) to $(CC). + * nlmconv.c: Only compile code for specific CPU types if + NLMCONV_cputype is defined. + + * nlmconv.c (main): Change uses of bfd_abs_section, etc., to use + bfd_abs_section_ptr or bfd_is_abs_section, etc. + (i386_mangle_relocs, alpha_mangle_relocs): Likewise. + (powerpc_build_stubs): Likewise. + * nm.c (filter_symbols, print_symbols): Likewise. + * objcopy.c (filter_symbols): Likewise. + (mark_symbols_used_in_relocations): Likewise. + * objdump.c (remove_useless_symbols, dump_relocs): Likewise. + * size.c (sysv_internal_printer): Likewise. + +Mon Jun 20 16:43:03 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * Makefile.in (MANPAGES): Remove $(DEMANGLER_PROG). + (install): Install it explicitly, from build dir, not srcdir. + +Mon Jun 20 16:29:54 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * objdump.c: Don't include elf/internal.h. + (bfd_elf_find_section): Don't declare. + (read_section_stabs): No special handling for ELF. Always read + using BFD sections. + +Thu Jun 16 17:25:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * configure.in: Set UNDERSCORE in Makefile based on result of + invoking config.bfd with a second argument of ``_''. + * Makefile.in (underscore.c): Depend upon Makefile. Don't try to + run $(CC) and $(NM), just use $(UNDERSCORE). Create via temporary + file. + (demangle.o): Remove target. + ($(NM_PROG)): Don't depend upon demangle.o, and don't link against + demangle.o. It's in libiberty anyhow. + (cplus-dem.o): Don't depend upon demangle.o. + * binutils.texi: Mention -n and --no-strip-underscores arguments + to c++filt. + +Wed Jun 15 12:10:31 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nm.c (long_options): Add --no-demangle to turn off --demangle, + and --no-cplus for Linux compatibility. + (usage): Mention --no-demangle. + * binutils.texi: Document --no-demangle. + +Fri Jun 10 15:41:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nm.c: HOST_64_BIT was renamed to BFD_HOST_64_BIT. + + * objcopy.c (copy_archive): Make the temporary directory in the + same directory as the output BFD, since we may not have write + permission on the current directory. Set the permissions of the + new directory to 0700, not 0777. + +Mon Jun 6 21:36:43 1994 D. V. Henkel-Wallace (gumby@cygnus.com) + + * configure.in: if this is an rs6000 (and we're not building for + any other bfd targets) then build only nm (collect needs it on + rs6000-lynx). + + * Makefile.in: define TOOL_PROGS which the list of programes to + install in $tooldir -- replaces a hard-coded list. + +Fri Jun 3 10:59:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c (display_target_list): Remove unused local ok. + +Thu May 26 18:05:52 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * config/mh-alphaosf (CFLAGS): Don't specify both -g and -O; + they're not compatible under native cc. Use -O1 instead. + + * Makefile.in (VERSION): Updated to cygnus-2.4.1. + + Changes from binutils-2.4 net release: + + * Makefile.in (MANPAGES): Use $(DEMANGLER_PROG). + ($(DEMANGLER_PROG).1): Build from cxxfilt.man, using sed. + * cxxfilt.man: Renamed from c++filt.1, replaced "c++filt" with + magic token to be replaced by sed. + + Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com) + + * configure.bat: update for latest makefile.in + +Fri May 13 23:25:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * bucomm.c: Check ANSI_PROTOTYPES rather than __STDC__. + +Tue May 10 18:22:06 1994 Jason Molenda (crash@sendai.cygnus.com) + + * objcopy.c (copy_section): Set section size correctly if using + interleave. + +Sat May 7 16:49:36 1994 Steve Chamberlain (sac@cygnus.com) + + * Makefile.in: Add rule for sysinfo.h + +Fri May 6 12:18:33 1994 Steve Chamberlain (sac@cygnus.com) + + * Makefile.in (SRCONV_PROG): Define. + (PROGS): Use $(SRCONV_PROG) too. + +Thu May 5 19:41:43 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * Makefile.in (DISTSTUFF): Add sysinfo.c, syslex.c, in case + someone configures with `targets=all'. + (distclean): Remove y.*. + (syslex.o): Depend on sysinfo.h. + (sysinfo.c): Rename y.tab.h to sysinfo.h. + (install-info): Don't try to install into $(infodir)/$(srcdir). + * syslex.l: Include sysinfo.h, not y.tab.h. + +Thu May 5 11:50:55 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) + + * syslex.l (yywrap): Define as function if not defined as a macro. + + * Makefile.in (objdump.o): Deleted special rule. + * configure.in: Don't bother building ARCHDEFS variable for + Makefile. + * objdump.c (ARCH_*): Deleted handling. + (disassemble_data): Call `disassembler' from opcodes library. + +Thu May 5 13:28:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * Makefile.in (install): Correct handling of $(tooldir) and + $(bindir) being on different devices. + +Fri Apr 29 09:50:38 1994 Steve Chamberlain (sac@cygnus.com) + + * sysdump.c (h8300, sh): Add declarations. + +Wed Apr 27 11:25:18 1994 Steve Chamberlain (sac@cygnus.com) + + * Makefile.in (syslex, sysinfo): Use CC_FOR_BUILD. + * coffdump.c, coffgroc.c, coffgrog.h, srconv.c, sysdump.c, + sysroff.info: Major changes. + +Tue Apr 26 18:18:24 1994 Stan Shebs (shebs@andros.cygnus.com) + + * objdump.c (print_section_stabs): Indicate the stab header symbol + more clearly, print numbers of unrecognized stab n_type values. + +Tue Apr 26 16:22:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (copy_sections): Copy arelent pointers, not arelents. + +Mon Apr 25 16:14:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * Makefile.in (distclean): Remove $(PROGS) and underscore.c. + +Fri Apr 22 11:14:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (setup_sections): Remove special handling of .reginfo + section. + (copy_sections): Likewise. + (alpha_mangle_relocs): Use bfd_ecoff_get_gp_value rather than the + special ECOFF .reginfo section. + + * objcopy.c (copy_object): Call bfd_copy_private_bfd_data after + copying everything else, to let it fiddle with the file in its + final state. + + * objdump.c: Include libiberty.h. + (display_target_list): If a format fails, just go on to the next + one. Check return value of bfd_set_format. + (display_info_table): Likewise. Don't increment loop variable in + for loop test, since that skips the first element. + (display_target_tables): Rewrite loop for clarity. Ensure that it + always prints at least one element. + + * nlmconv.c (main): Use CyGnUsEx rather than CyGnUsSeCs for + sections header. Rename from cygnus_sections to cygnus_ext. + +Thu Apr 21 12:12:26 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c (_DUMMY_NAME_): Don't define. + (display_target_list): Use tmpnam to get a file name rather than + using _DUMMY_NAME_. Unlink it when done. + (display_info_table): Likewise. + + * nlmconv.c (secsec): New static variable. + (main): Create .nlmsections section in output BFD. Store + information about it in sections header. + (setup_sections): Allocate space in sections header. + (copy_sections): Copy zero sized sections. Put information about + each section in the sections header. + +Wed Apr 20 14:34:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (powerpc_build_stubs): Take new outbfd argument. + Change caller. Create custom header for new PowerPC NetWare + format. + + * Makefile.in (nlmheader.o, nlmconv.o): Update dependencies. + * nlmconv.c: Include bfd.h and libiberty.h with "", not <>. + * nlmheader.y: Include bfd.h with "", not <>. + +Wed Apr 13 10:52:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c: Do an ifdef on __GO32__, not unix. + +Wed Apr 6 21:54:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Added -D (--dynamic) option to nm and -T (--dynamic-syms) and -R + (--dynamic-reloc) arguments to objdump. + * nm.c (dynamic): New static variable. + (long_options): Added "dynamic". + (usage): Mention -D and --dynamic. + (main): Add D to getopt string. Handle -D by setting dynamic. + (display_rel_file): If dynamic is non-zero, read dynamic symbols + rather than normal symbols. + * nm.1: Updated for -D (--dynamic) option. + * objdump.c (dump_dynamic_symtab): New global variable. + (dump_dynamic_reloc_info): New global variable. + (dynsyms, dynsymcount): New global variables. + (usage): Mention -R, -T, --dynamic-syms and --dynamic-reloc. + (long_options): Added "dynamic-reloc" and "dynamic-syms". + (slurp_symtab): If no symbols, return rather than exit. + (slurp_dynamic_symtab): New function. + (display_bfd): Handle dump_dynamic_symtab and + dump_dynamic_reloc_info. + (dump_symbols): Take new dynamic argument, indicating whether to + display dynamic symbols. + (dump_relocs): Move most printing into dump_reloc_set. + (dump_dynamic_relocs): New function. + (dump_reloc_set): New function, extracted from dump_relocs. + (main): Add R and T to getopt string. Handle -T by setting + dump_dynamic_symtab and -R by setting dump_dynamic_reloc_info. + * objdump.1: Updated for -R (--dynamic-reloc) and -T + (--dynamic-syms) options. + * binutils.texi: Updated for new nm and objdump options. + +Wed Mar 30 15:52:40 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Update for recent BFD changes to symbol and reloc reading. Rename + all uses of get_symtab_upper_bound to bfd_get_symtab_upper_bound. + Also: + * coffgrok.c (symcount): Change to long. + (do_sections_p1): Check for error return from + bfd_get_reloc_upper_bound. Change relcount to long, and check for + error from bfd_canonicalize_reloc. + (coff_grok): Change storage to long. Check for error from + bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. + * nlmconv.c (main): Change symcount, newsymalloc, newsymcount, and + i to long. Check for error from bfd_get_symtab_upper_bound and + bfd_canonicalize_symtab. + (copy_sections): Change reloc_size and reloc_count to long. Check + for error from bfd_get_reloc_upper_bound and + bfd_canonicalize_reloc. + (mangle_relocs, i386_mangle_relocs, alpha_mangle_relocs): Change + reloc_count_ptr argument to long *. Make corresponding changes to + variables loaded from *reloc_count_ptr. + * nm.c (display_rel_file): Change storage and symcount to long. + Check for errors from bfd_get_symtab_upper_bound and + bfd_canonicalize_symtab. + * objcopy.c (filter_symbols): Change symcount, src_count and + dst_count to long. + (copy_object): Change symcount to long. Pass another argument to + fprintf. Check for errors from bfd_get_symtab_upper_bound and + bfd_canonicalize_symtab. + (copy_section): Change relcount to long. Check for errors from + bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. + (mark_symbols_used_in_relocations): Change relcount and i to long. + Check for errors form bfd_get_reloc_upper_bound and + bfd_canonicalize_reloc. + * objdump.c (storage): Remove global variable. + (symcount): Changed to long. + (slurp_symtab): New local variable storage. Check for errors from + bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. + (remove_useless_symbols): Change return value and count to long. + (objdump_print_address): Change min, max, thisplace and i to long. + (disassemble_data): Change i to long. + (dump_symbols): Change count to long. + (dump_relocs): Change relcount to long. Check for errors from + bfd_ret_reloc_upper_bound and bfd_canonicalize_reloc. + (display_info_table): Add casts when passing LONGEST_ARCH for + printf %* argument. + +Tue Mar 29 14:59:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nm.c (display_archive): Close each archive element after it has + been displayed. + * objdump.c (display_file): Likewise. + +Mon Mar 28 13:04:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * configure.in: Change error message to refer to bfd/config.bfd + rather than bfd/configure.in. + +Sun Mar 27 16:23:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * More fixes for object formats which allow multiple sections + with the same name: + * objcopy.c (setup_section): Make a new output section even if + one already exists with the given name. + (copy_section): Use isection->output_section rather than trying + to look the output section up by its (possibly non-unique) name. + + * Makefile.in (install-info): Look for binutils.info in the + current directory, then in $(srcdir). Don't use $<. + +Mon Mar 21 12:55:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c (objdump_print_address): Make static. Declare with + prototype. Change vardiff from int to bfd_signed_vma. Correct + binary search termination condition. When looking for same + section symbol in relocatable file, handle final symbol correctly. + +Sun Mar 20 11:26:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * Makefile.in: Avoid bug in hpux sed. + + * objcopy.c: Changes to keep it from stripping symbols used + in output relocations. + (mark_symbols_used_in_relocations): New function. Mark symbols + used in output relocations with BSF_KEEP. + (filter_symbols): Do not strip symbols marked with BSF_KEEP. + (copy_object): Reorder actions. First setup sections, then + build the output symbol table, then copy the section contents. + +Fri Mar 18 10:53:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ar.c (write_archive): Allocate space for the null byte. From + Robert Lipe . + +Thu Mar 17 16:20:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * Makefile.in: Built nm.new and strip.new to avoid problems with + collect when . is in PATH. + (STRIP_PROG): Change from strip to strip.new. + (NM_PROG): Change from nm to nm.new. + (install): Remove the .new when installing. + +Wed Mar 16 16:27:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (powerpc_build_stubs): Set BSF_DYNAMIC flag for each + symbol for which we build a stub. + (powerpc_mangle_relocs): Only reset TOC pointer for a call to a + symbol with BSF_DYNAMIC flag set. + +Tue Mar 15 23:04:13 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * objcopy.c (filter_symbols): Use bfd_is_local_label to determine + if a symbol represents a compiler-generated local label. + (copy_object): Give the BFD backends a chance to copy any private + bfd data from the input BFD to the output BFD. + (setup_section): Give the BFD backends a chance to copy any private + section data from the input section to the output section. + +Mon Mar 14 11:15:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu) + + * objcopy.c (mangle_section): Delete unused function. + (setup_section): Set osection here instead of calling + mangle section to do it. + +Mon Mar 14 12:11:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * ar.c (write_archive): Close inarch before unlinking it. + +Fri Mar 11 22:20:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (main): For PowerPC, call powerpc_build_stubs and + powerpc_resolve_stubs. Use __GOT0, not __toc_start. Handle it if + the start and end symbols are not in the text section. + (struct powerpc_stub): New struct definition. + (powerpc_stubs, powerpc_stub_insns): New static variables. + (powerpc_initial_got_size): New static variable. + (powerpc_build_stubs): New function. + (powerpc_resolve_stubs): New function. + (powerpc_mangle_relocs): Clear extraneous data in .got section. + Rearrange reloc handling to handle ELF relocs that are not + partial_inplace. Resolve PC relative relocs. + +Wed Mar 9 13:48:11 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * ar.c (move_members): Fix it so that the abi positional modifiers + don't delete all archive members following the insert point. + +Tue Mar 8 13:14:43 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * coffgrok.[ch]: New files, understand coff objects. + * coffdump.c: Uses coffgrok to dump out the debug info of a coff + file. + * sysroff.info: Description of a SYSROFF object file. + * sysinfo.y, syslex.l: Parse info file, generate a reader, writer, + header files and a printer. + * srconv.c: Uses coffgrok.c and sysroff.info to convert a coff + file to a SYSROFF file. + +Sat Feb 26 13:35:26 1994 Stan Shebs (shebs@andros.cygnus.com) + + * ar.c (do_quick_append): Pad with a genuine character 10, + rather than whatever '\n' might happen to be. + +Tue Feb 22 18:25:52 1994 Ian Lance Taylor (ian@cygnus.com) + + * nlmconv.c (main): Ignore debugging symbols when looking for + special symbols by name. + +Sun Feb 20 18:47:42 1994 Ian Lance Taylor (ian@lisa.cygnus.com) + + * nlmconv.c: Include libiberty.h. + + Support for PowerPC NetWare. + * nlmconv.c (main): For PowerPC NetWare, automatically define the + special symbols __toc_start. + (select_output_format): Handle bfd_arch_powerpc. + (mangle_relocs): Likewise. + (powerpc_mangle_relocs): New function. + +Thu Feb 17 09:28:23 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ar.c, bucomm.c, nlmconv.c, nm.c, objcopy.c, objdump.c, + size.c: Use bfd_get_error and bfd_set_error and new error names. + +Fri Feb 11 15:54:51 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * objcopy.c (strip_main, copy_main): Add missing 'break' in switch. + +Mon Feb 7 19:45:52 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c (disassemble_data): Handle bfd_arch_powerpc. + +Sun Feb 6 22:08:20 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * strings.c objdump.c nlmconv.c objcopy.c nm.c ar.c size.c (main): + Call xmalloc_set_program_name. + +Fri Feb 4 10:46:01 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * objcopy.c (filter_bytes): Make MEMHUNK a char *, not PTR, so we + can do arithmetic on it. + +Thu Feb 3 14:06:41 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * objdump.c (dump_section_stabs, read_section_stabs, + print_section_stabs): Functions broken out of dump_stabs_1. + Free the stabs and strings when done with them. + +Wed Feb 2 13:42:23 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * nlmconv.c (main): Use bfd_get_flavour instead of struct member. + * ar.c (print_contents, extract_file), size.c + (print_berkeley_format, print_sysv_format): Use bfd_get_filename and + bfd_my_archive instead of dereferencing the structs directly. + + * ar.c: Use bfd_fatal and bfd_nonfatal instead of bfd_perror and exit. + Indent. Remove DEFUNs. + + * nlmconv.c (main), objcopy.c (copy_file): Print matching formats + if ambiguous match. + * nm.c (display_file, display_archive), size.c (display_bfd): + Eliminate gotos. + Print matching formats if there is an ambiguous match. Use + bfd_nonfatal instead of hardcoded error message if nothing matches. + + * arsup.c, ar.c, objdump.c: Use bfd_get_filename instead of + abfd->filename. + + * nm.c (display_archive): New function, from code in display_file. + (display_rel_file): Renamed from do_one_rel_file. + + * size.c: Indent. + (display_archive): New function from code in display_file. + (display_file): Check bfd_close error return. + + * strings.c (strings_object_file): Check bfd_check_format + error return. + + * strings.c, objdump.c, size.c: Use bfd_nonfatal instead of bfd_perror. + + * bucomm.c: Delete references to exit_handler. It wasn't set + anywhere, and now that we're using the libiberty xmalloc, it + wouldn't always get called before exiting. + (list_matching_formats): Function moved from objdump.c. + * bucomm.h: Declare it. + + * objdump.c (disassemble_data): Move some variable decls closer to + their use. Add some comments. Replace a nested block with a + return. + +Mon Jan 31 18:50:41 1994 Stan Shebs (shebs@andros.cygnus.com) + + * objdump.c (display_target_list, display_info_table): Check that + the bfd of the dummy output file is not null. + +Wed Jan 26 13:13:18 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * objcopy.c (filter_bytes): New function. + (copy_section): Call it. + (copy_options, copy_usage, copy_main): Add --byte option to + activate it. Appropriate the -b option (which was an undocumented + synonym for -F) for it, also. Add --interleave, -i option for + additional control. + (setup_section, copy_section, mangle_section): Renamed with no `s' + on the end. + * objcopy.1, binutils.texi: Document the new options. + + * objdump.c (display_target_tables, display_target_list): + New functions broken out of display_info. + Eliminate some magic constants. Use more meaningful variable names. + (dump_bfd_header): New function broken out of display_bfd. + (dump_section_header): New function broken out of dump_headers. + (remove_useless_symbols): Don't shadow global variable name with + parameter. + (objdump_print_address): Fix backward test. + +Tue Jan 25 19:40:54 1994 Stan Shebs (shebs@andros.cygnus.com) + + * bucomm.c (print_arelt_descr): Change decl of `when' to time_t. + * objdump.h: Removed. + +Mon Jan 24 13:29:02 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * objdump.c (display_file): Remove call to list_matching_formats. + It would never be called. + (list_matching_formats): Take an arg giving the list of matching + formats. + (display_bfd): Pass the arg, and get it filled in by calling + bfd_check_format_matches instead of bfd_check_format. + (display_info, display_info_table): target_vector was renamed to + bfd_target_vector. + + * binutils.texi (objdump): Note some limitations of -h section + address printing. + +Sat Jan 22 16:20:46 1994 Stan Shebs (shebs@andros.cygnus.com) + + * Makefile.in (MALLOC): Set to emptiness by default. + (ALL_CFLAGS): Add and use. + (arparse.h): Make it depend on arparse.y. + * ar.c (libbfd.h): Don't require to be in ../bfd. + * objdump.c (comp): Rename to compare_symbols. + +Fri Jan 21 20:22:30 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * objdump.c (list_matching_formats): If the file format is ambiguous, + print the matching names so the user can choose one. + (display_bfd): Call it. + (display_file): Call it. + +Fri Jan 21 19:17:25 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c (disassemble_data): Support bfd_arch_rs6000. + +Mon Jan 17 13:57:25 1994 Stan Shebs (shebs@andros.cygnus.com) + + * objdump.c (stab_name): Allocate dynamically. + (stab_print): Use pointers to strings instead of char arrays. + (dump_stabs): Change alloc and init of arrays appropriately. + (dump_stabs_1): Always decide whether to print stab_name or + the stab's type number, if unnamed. + +Fri Jan 14 14:42:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objcopy.c (strip_main, copy_main): Don't clobber the input file + if copy_file fails. + + * nlmconv.c (main): Warn about an attempt to use a shared library + with uninitialized data. + + * nlmconv.c (setup_sections): Make sure that we align the + output_offset of each input section appropriately. + +Thu Jan 13 17:32:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c (dump_relocs): Don't crash if section name is NULL. + +Tue Jan 11 19:46:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * filemode.c (filemodestring): Commented out; not used. + (mode_string): Use POSIX definitions. + (ftypelet): Likewise. + (rwx): Removed; no longer used. + * bucomm.c: Include bucomm.h. + (bfd_nonfatal, bfd_fatal): Argument is const. + (fatal): Make __STDC__ version. + * bucomm.h (mode_string): Declare. + * Makefile.in (bucomm.o): Depend upon bucomm.h + +Sun Jan 9 12:03:20 1994 Ken Raeburn (raeburn@rtl.cygnus.com) + + * bucomm.c (xmalloc, xrealloc): Deleted. + * bucomm.h (xmalloc, xrealloc): Fix prototypes, to correspond to + libiberty version of functions. + +Thu Jan 6 06:18:15 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * binutils.texi: Add a chapter summarizing the ways to select + aspects of the target for each program. + + * objdump.c (long_options, usage): Add long equivalents for all + remaining short options that lacked them. + * binutils.texi objdump.1: Document them. + + * size.c (usage): Tweak usage message. + * size.1: Add missing `=' in examples. + + * binutils.texi strip.1 objcopy.1 nlmconv.1 objcopy.c nlmconv.c: + Use "--target=bfdname" as the option to select the BFD target, + like nm and size already do. + Reserve "--format=format" for textual output selection options, but + for now keep old option names as obsolete for backward compatibility. + + * strings.c (main, strings_object_file, usage): Add --target option. + * binutils.texi strings.1: Document it. + +Sat Jan 1 13:58:24 1994 David J. Mackenzie (djm@thepub.cygnus.com) + + * ar.c (main): Add \n in error message. + +Thu Dec 23 12:23:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + gcc -Wall lint: + * ar.c (main): Put parens around assignment used as truth value. + * objcopy.c (strip_main): Remove unused variables. Return 0. + (copy_main): Remove unused variables. Return 0. + * objdump.c (display_bfd): Declare return value as void. + (stab_print): Use "" instead of 0 to initialize array. + (dump_stabs_1): Print vma using printf_vma. + (display_info): Put parens around assignment used as truth value. + * strings.c (print_strings): Cast printf arguments. + + * objcopy.c (copy_main): Use copy_options, not strip_options. + + * nlmheader.y (command): Warn about illegal date values. + +Wed Dec 15 11:18:03 1993 David J. MacKenzie (djm@frosty.eng.umd.edu) + + * bucomm.c bucomm.h: Run through indent. De-ansidecl-ify. + (bfd_nonfatal): New function. + (bfd_fatal): Call it. + + * objcopy.c (smart_rename): Do a copy if the dest file has + multiple hard links. Remove source file on successful copy. + Try to preserve mode and owner on successful rename. + + * objcopy.c: Run through indent. Clean up a bit. + Make global variables static. + Make {input,output}_{target,filename}, show_version local + to various functions. + New global variable `status' for exit status. + (strip_main, copy_main): New functions with code from main. + (nonfatal): New macro. Use it globally instead of bfd_perror and + bfd_fatal. + + (copy_object): Call mangle_sections with bfd_map_over_sections. + (mangle_sections): Adjust for new calling convention. + +Fri Dec 10 11:28:11 1993 Ian Lance Taylor (ian@deneb.cygnus.com) + + * nlmheader.y (command): Accept MAP and FULLMAP without arguments. + * nlmconv.c (main): Change error message for MAP and FULLMAP. + +Thu Dec 9 17:47:19 1993 Ian Lance Taylor (ian@deneb.cygnus.com) + + * nlmconv.c (main): Warn about imported symbols that are not in + the IMPORT list even if the IMPORT keyword is not used. + + * nlmconv.c (debug, unlink_on_exit): New static variables. + (long_options): Add "debug" and "linker". + (main): Handle -d and -l arguments. Make command line input and + output files optional. Parse the command file before opening the + BFD's, which requires storing more information in local variables. + If INPUT names multiple files, link them together. Use OUTPUT for + the output file name if not named on command line. + (show_usage): Changed for new options. + (link_inputs): New function to automatically invoke linker to + handle multiple INPUT files. + (choose_temp_base_try, choose_temp_base, pexecute): New functions, + mostly copied from gcc/gcc.c. + * nlmconv.h (input_files, output_file): Declare. + * nlmheader.y (input_files, output_file): Define. + (command): Support INPUT with a string_list argument. Support + OUTPUT. + (string_list): Renamed from module_list. + * Makefile.in (nlmconv.o): Define LD_NAME based on + program_transform_name. + +Wed Dec 8 10:09:04 1993 Ian Lance Taylor (ian@deneb.cygnus.com) + + * nlmheader.y (nlmheader_identify): New function. Use it to print + the program name just once, instead of with every error message. + +Mon Dec 6 16:11:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (long_options): Changed --header-info to --header-file + to match documentation and usage message. + +Sun Dec 5 01:31:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu) + + * objdump.c (dump_relocs): Avoid dereferencing a NULL sym_ptr_ptr + in a relocation. + +Thu Dec 2 16:00:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (main): Change various types from bfd_size_type to + size_t, since they have to be arguments to fread and fwrite. + Change set from char * to unsigned char *. + (select_output_format): Make mach argument unsigned. Handle + bfd_arch_alpha. + (setup_sections): Don't copy the .reginfo section of an ECOFF + file. Call bfd_set_reloc to initialize the relocation fields. + (copy_sections): Don't copy the .reginfo section of an ECOFF file. + Combine all relocs for a section. + (mangle_relocs): Change type of relocs to permit specific + functions to change it. Call alpha_mangle_relocs for alpha, + default_mangle_relocs for other architectures. + (default_mangle_relocs): New function. Adjust the address of all + relocs by the output_offset. + (i386_mangle_relocs): Change type of relocs argument. Cast length + argument to memmove to size_t. + (alpha_mangle_relocs): New function. + +Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com) + + * nlmconv.c (select_output_format): Use nlm32-sparc for + bfd_arch_sparc. + +Wed Nov 17 14:41:35 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com) + + * nlmconv.1: added man page + * objcopy.1: fixed format errors + +Wed Nov 17 12:03:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * Makefile.in: Use CFLAGS as well as LDFLAGS when linking. + +Wed Nov 17 04:50:55 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * strings.1: Fix typo. + +Mon Nov 15 12:03:20 1993 Ken Raeburn (raeburn@rtl.cygnus.com) + + * Makefile.in (DISTSTUFF): Build "info". + (VERSION): Updated to cygnus-2.3.1; 2.3 has gone out. + +Sun Nov 14 00:27:24 1993 Jeffrey A. Law (law@snake.cs.utah.edu) + + * objdump.c (dump_stabs): Handle stabs-in-som as implemented + by the new BFD SOM assembler. + +Sat Nov 13 07:14:05 1993 David J. Mackenzie (djm@rtl.cygnus.com) + + * ar.1 c++filt.1 nm.1 objcopy.1 objdump.1 ranlib.1 size.1 + strings.1 strip.1: Replace \(em in NAME section with \- so + makewhatis can grok it. + +Tue Nov 9 15:22:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (i386_mangle_relocs): Adjust reloc address by + section output_offset. + +Fri Nov 5 12:11:52 1993 Jeffrey Osier (jeffrey@thepub.cygnus.com) + + * binutils.texi: added nlmconv chapter + +Wed Nov 3 16:10:50 1993 Jeffrey Wheat (cassidy@cygnus.com) + + * Makefile.in: Change RUNTESTFLAGS to RUNTEST_FLAGS + +Wed Nov 3 15:09:23 1993 Ken Raeburn (raeburn@rover.cygnus.com) + + * Makefile.in (distclean): Don't get rid of dvi or info files. + +Tue Nov 2 13:29:59 1993 David J. Mackenzie (djm@rtl.cygnus.com) + + * objcopy.c (S_ISLNK): Define as 0 if there's no S_IFLNK. + +Fri Oct 29 16:02:34 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * binutils.texi: Move objcopy docs into alphabetical order. + + * objdump.c: Use xmalloc instead of malloc. + +Fri Oct 29 11:11:14 1993 Stan Shebs (shebs@rtl.cygnus.com) + + * objdump.c (info): Rename to formats_info. + (dump_stabs_1): Better comments and formatting. + +Thu Oct 28 19:43:16 1993 Stan Shebs (shebs@rtl.cygnus.com) + + * ar.c (main): Always create the archive when quick appending, + even if no input files have been given. + +Wed Oct 27 12:03:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (main): Set sharedDebugRecordOffset and + sharedDebugRecordCount fields in extended header. + + * nlmconv.c (main): Force moduleName field to upper case. + +Mon Oct 25 16:45:42 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objcopy.c (main): Give a usage message if there are too many + arguments. + +Mon Oct 25 10:37:08 1993 Ken Raeburn (raeburn@rover.cygnus.com) + + * Makefile.in (install-info): Rewrite to take advantage of VPATH, + so FSF distributions (with info files in $(srcdir)) install + properly. + (DISTSTUFF): Build nlmheader.c too. + +Fri Oct 22 11:43:23 1993 Ken Raeburn (raeburn@rover.cygnus.com) + + * ar.c (program_name): Don't define here. + * objdump.c: Include "bucomm.h". + (xmalloc): Don't declare here. + (program_name): Don't define here. + (program_version): Fixed type in declaration. + * size.c: Include "bucomm.h". + (program_name): Don't declare here. + +Fri Oct 22 14:10:41 1993 Mark Eichin (eichin@cygnus.com) + + * objdump.c (fprintf): hide declaration in FPRINTF_ALREADY_DECLARED + +Fri Oct 1 12:43:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (i386_mangle_relocs): Resolve and remove PC relative + relocs against defined symbols in the same section. + +Thu Sep 30 16:46:26 1993 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * Makefile.in (binutils.dvi): use TEXIDIR to find texinfo.tex + +Sat Sep 25 18:09:29 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * objcopy.c (simple_copy, smart_rename): New functions. + (main): Use them. + +Fri Sep 24 15:38:29 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * Makefile.in (clean, distclean): Recurse into testsuite. + +Thu Sep 23 01:05:06 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objcopy.c (setup_sections, copy_sections): If stripping, don't + copy SEC_DEBUGGING sections. + * objdump.c (dump_headers): Print SEC_DEBUGGING flag. + + * objdump.c (usage): Mention --stabs. + + * objcopy.c (copy_object): Copy all applicable file flags. + (copy_file): Don't copy EXEC_P specially here. + +Mon Sep 20 19:28:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (main): Adjust data section size to correspond to bss + alignment adjustment. Clear BSF_SECTION_SYM if symbol is moved to + a different section. Use time_t for time variable. + (setup_sections): Only put sections with contents in output NLM. + (i386_mangle_relocs): No symbols are common at this point. Add + casts to avoid warnings. + +Fri Sep 10 11:00:40 1993 Stan Shebs (shebs@rtl.cygnus.com) + + * objdump.c: Made the --stabs option work for stabs-in-coff. + (ELF_STAB_DISPLAY): Removed. + (dump_elf_stabs): Renamed to dump_stabs, changed to run for + any object file format. + (dump_elf_stabs_1): Renamed to dump_stabs_1, added calls to + generic BFD routines for non-ELF case, changed format of message + for no-section-found case. + (display_bfd): Always call dump_stabs if requested. + (dump_data): Call bfd_section_size to get section size. + +Fri Sep 10 08:12:23 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * Makefile.in (install): Don't put strings in tooldir/bin. + +Mon Sep 6 15:39:04 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (total_bss_size): Removed. + (main): Set the bss vma to always follow the data section. Move + symbols into new sections, and adjust values by output_offset. + (setup_sections): Don't copy all sections, but instead point all + text sections to .text, all data sections to .data, and all bss + sections to .bss. + (copy_sections): Adjust accordingly. + +Thu Sep 2 12:34:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + Only build nlmconv if configured for a NetWare target. + * configure.in: If we have some *-*-netware* target, or are using + all targets, set BUILD_NLMCONV to $(NLMCONV_PROG) in Makefile. + * Makefile.in (PROGS): Use $(BUILD_NLMCONV) rather than + $(NLMCONV_PROG). + +Tue Aug 31 14:13:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * objdump.c (ARCH_all): Define ARCH_hppa too. + (dump_headers): Don't test for SEC_BALIGN if it's not defined by + bfd.h. + +Tue Aug 31 13:29:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * nlmconv.c (main): Force creation of .bss section. Set up the + sections before looking at the symbols. Move all common symbols + into .bss section. Automatically define _edata and _end. Only + export symbols in the export list, with multiple prefixes if + necessary. Warn if no version. Always create extended header. + Set date automatically if not already set. + (setup_sections): Count size of bss sections. + (mangle_relocs, i386_mangle_relocs): Accept section argument, and + take reloc_count as a changeable pointer; changed callers. + (i386_mangle_relocs): Remove PC relative relocs within a section, + as they require no adjustment. + * nlmheader.y: Fixed memory allocation throughout: token STRING is + now allocated on the heap, and freed if not needed. Null + terminated copyright message. Accept version with only two + strings. + (symbol_list_opt): New nonterminal, either symbol_list or empty. + (symbol_list): Use left recursion to avoid overflowing parser + stack. + (yylex): Rearranged beginning of line check. Accept quoted + strings using single quotes. End generic argument at comment + character or parentheses. + (string_list_append): Fixed. + (string_list_append1): New function. + + * bucomm.h: The first argument to xrealloc is PTR, not char *. + * bucomm.c (xrealloc): Use PTR rather than char *. + * Makefile.in (objdump.o): Depend upon config.status to notice + --with-targets changes. + (nlmconv.o): Depend upon bucomm.h. + +Tue Aug 17 09:46:01 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * configure.in: Don't pass cpu to config.bfd. + +Thu Aug 12 16:43:04 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * Makefile.in ($(NM_PROG)): Depend on demangle.o. + (demangle.o): New target. + (cplus-dem.o): Depend on it, to force compilation order when doing + parallel compiles. + + * nm.c (print_symbol_info_{bsd,sysv,posix}): Take a bfd arg. + (struct output_fns print_symbol_info): Ditto. + (long_options, usage, main): Add -C --demangle option. + (print_symname): New function, demangling if requested. + (print_symbols, print_symbol_info_{bsd,sysv,posix}): Use it. + +Wed Aug 11 22:57:23 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * Makefile.in: Put CFLAGS last in compilation rules and omit from + linking rules. Use ARCHDEFS to compile objdump.c. + Update dependencies. + * configure.in: Construct ARCHDEFS based on the BFD target makefile + fragments. + * objdump.c: Conditionalize calls to the print_insn_ARCH functions + according to ARCHDEFS. + +Thu Aug 12 08:06:15 1993 Ian Lance Taylor (ian@cygnus.com) + + * ar.c: Removed obsolete and non-functional GNU960 code. + +Wed Aug 11 13:08:26 1993 Ian Lance Taylor (ian@cygnus.com) + + * size.c (berkeley_sum): New function. + (bsssize, datasize, textsize): New global variables. + (bss_section_name, data_section_name, text_section_name): Removed. + (print_berkeley_format): Map berkeley_sum over all the sections, + rather than only reporting sizes of specifically named sections. + * Makefile.in ($(OBJDUMP_PROG)): Removed dependency on size.o. + +Tue Aug 10 10:46:01 1993 Ian Lance Taylor (ian@cygnus.com) + + * nlmconv.c, nlmconv.h, nlmheader.y: New files for program to + convert object files into NetWare Loadable Modules. + * Makefile.in (NLMCONV_PROG): New macro, define to be nlmconv. + (PROGS): Add NLMCONV_PROG. + (nlmheader.c, nlmheader.o, nlmconv.o, $(NLMCONV_PROG)): New + targets. + +Thu Aug 5 15:48:32 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) + + * Makefile.in: define MAKEOVERRIDES to an empty string + +Wed Aug 4 17:08:08 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * objcopy.c (copy_file): Make failures to process a file nonfatal. + +Mon Aug 2 11:28:23 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * nm.c: Add -B option, like --format=bsd. + +Tue Jul 27 16:29:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objcopy.c (copy_file): If the file is neither an object nor an + archive, give an error rather than returning success. + +Mon Jul 19 16:13:40 1993 Ken Raeburn (raeburn@rtl.cygnus.com) + + * objdump.c (objdump_print_address): Prefer non-local symbols over + local ones, and especially discriminate against debugging symbols. + Also, for relocateable files, try to find a symbol in the current + section, instead of picking one from some random section with a + convenient value (read, section offset). + (disassemble_data): Cast argument to malloc to size_t first. + (dump_data): Likewise. + (dump_relocs): If a single section name is specified, show relocs + only for that section. Otherwise, silently omit sections without + relocs. Format table nicely even if values are printed using 16 + digits instead of 8. + +Fri Jul 16 15:19:59 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * nm.c: Changes for final version of POSIX.2. + (print_symbol_filename_{bsd,sysv,posix}): New functions. + (formats): Add an element for a pointer to them. + (print_symbols): Call it. + (print_object_filename_posix, print_archive_member_posix): Produce + output according to new POSIX.2 spec. + + * strings.c (print_strings): Handle STREAM being NULL. + (strings_a_section): Pass a NULL. + (main): Don't open /dev/null. + +Thu Jul 15 12:44:09 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c (disassemble_data): Handle the m88k. + (display_bfd): Use bfd_errmsg, rather than just claiming that the + bfd is not an object file. + +Mon Jul 12 17:55:34 1993 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in (TAGS): make work again by naming directories + explicitly rather than depending on undefined macros. + (INSTALL_XFORM): correct bad install target. + +Fri Jul 2 16:58:34 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * strings.c: Doc fixes. + +Sun Jun 27 13:35:24 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * Makefile.in: Note dependencies on bucomm.h. + (cplus-dem.o): Link c++filt with version.o. + + * strings.c: Include bucomm.h and add prototypes to other decls. + Remove -h option. + + * bucomm.h: Declare xrealloc. + + * nm.c, objcopy.c, objdump.c, size.c, strings.c (main, usage): Add + --help option. Put "GNU" in the version message. + (usage): Take stream and exit status as args. + (main): Pass new args to usage. + +Fri Jun 25 23:12:12 1993 David J. Mackenzie (djm@thepub.cygnus.com) + + * strings.c, strings.1: New files. + * binutils.texi: Document strings. + * Makefile.in: Add rules for it. + +Fri Jun 25 20:44:43 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) + + * objdump.c: Use size-independent bfd elf section names. + +Sun Jun 20 23:09:06 1993 Ken Raeburn (raeburn@poseidon.cygnus.com) + + * objdump.c (objdump_print_address): Handle wide offsets by + calling sprintf_vma. + +Fri Jun 18 14:29:12 1993 Per Bothner (bothner@deneb.cygnus.com) + + * objdump.c (syms2): Removed unused variable. + * objdump.c (remove_useless_symbols): New function. + * objdump.c (comp): Simplify. + * objdump.c (dis-assemble_data): Make simpler and more + efficient how we filter out useless symbols: Just filter + BEFORE the sort (using remove_useless_symbols). + * objdump.c (objdump_print_address): Simplify. + Change output syntax to match gdb. + +Thu Jun 17 16:53:56 1993 david d `zoo' zuhn (zoo@cygnus.com) + + * Makefile.in: canonicalize install.sh; for use within + this directory (and subdirs) + +Mon Jun 14 12:13:22 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) + + * Makefile.in (install, install-info): remove parentdir support, + use INSTALL_XFORM; define INSTALL_XFORM + +Thu Jun 10 17:29:21 1993 Per Bothner (bothner@cygnus.com) + + * objcopy.c (copy_object): Fix bad size passed to xmalloc(). + +Mon Jun 7 12:41:12 1993 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h. + * configure.in: No longer need to configure to get sysdep.h. + * objcopy.c (copy_object): Fix symbol table handling. + +Fri Jun 4 17:20:03 1993 Per Bothner (bothner@cygnus.com) + + * objcopy.c (filter_symbols): Cannot filter the symbols + in place, because that confuses the relocs, so take separate + parameter for output array. + * objcopy.c (sympp): Make two variables: isympp and osympp. + * objcopy.c (copy_object): Allocate separate array (osympp) + for filtered symbols. + +Fri Jun 4 10:51:44 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: change recursion test to presence of a configured + testsuite directory + +Thu Jun 3 14:05:57 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * Makefile.in (underscore.c): Hack the backquoted command so it + doesn't cause Solaris make to bomb. + +Thu Jun 3 10:40:19 1993 Jeffrey Osier (jeffrey@cygnus.com) + + * Makefile.in: added c++filt and objcopy to MANPAGES variable + +Thu Jun 3 00:32:52 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: rename LOADLIBES to EXTRALIBS + +Wed Jun 2 18:30:24 1993 Jeffrey Osier (jeffrey@cygnus.com) + + * c++filt.1, objcopy.1: new man pages + +Fri May 28 15:01:24 1993 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in (install): Also install ar and ranlib in + $(tooldir)/bin; needed for building libgcc.a. + * objdump.c (objdump_print_address): Fix the check + "coincidental" label matches by dis-allowing undefined + or com symbols. + +Thu May 27 16:58:31 1993 Jeffrey Osier (jeffrey@cygnus.com) + + * biutils.texi: revised c++filt chapter + +Wed May 26 17:24:17 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (FLAGS_TO_PASS): Pass down CC and CFLAGS. + +Tue May 25 00:26:47 1993 Ken Raeburn (raeburn@cygnus.com) + + * objdump.c (slurp_symtab): Print warning for bad symbol table. + (bfd_elf32_find_section, Elf32_Internal_Shdr): Updated + declarations and uses. + + * Makefile.in (DISTSTUFF): Don't build binutils.mm. + +Fri May 21 10:51:19 1993 David J. Mackenzie (djm@rtl.cygnus.com) + + * nm.c: Add -f/--format, -P/--portability, -t/--radix options. + Make global variables static. + (main): Make -v like -n, not -V, and make -A like -o, for POSIX.2. + (set_print_radix, set_output_format, + print_{object_filename,archive_filename,archive_member,symbol_info} + {bsd,sysv,posix}): New functions. + (display_file, print_symbols): Call them. + + * ar.c: Improve error messages. + + * nm.c (main): Handle long options that just set a flag. + + * nm.c (main), ar.c (do_show_version), objcopy.c (main), size.c + (main): Exit after printing the version number, per the GNU coding + standards. + +Mon May 17 13:20:25 1993 Per Bothner (bothner@cygnus.com) + + * README, Makefile.in: Minor updates for 2.2. + +Fri May 14 11:12:26 1993 Per Bothner (bothner@cygnus.com) + + * Makefile.in (underscore.c): Automatically generate + (using nm) a file with the variable prepends_underscore. + * Makefile.in (c++filt): Link underscore.o with cplus-dem.o + so that initial underscores get removed iff appropriate. + * binutils.texi: Preliminary documentation for c++filt. + * Makefile.in, binutils.texi: Set to version 2.2. + + * NEWS: Mention copy->objcopy renaming and new c++filt program. + +Wed May 12 12:05:36 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (cplus-dem.o, $(DEMANGLER_PROG)): Build the + demangler via cplus-dem.o, rather than directly from the .c file. + + * objcopy.c: Renamed from copy.c, updated comments accordingly. + * Makefile.in, binutils.texi: Renamed copy to objcopy. + * is-strip.c, maybe-strip.c, not-strip.c: Updated comments for + rename of copy to objcopy. + +Mon May 10 17:20:18 1993 Per Bothner (bothner@cygnus.com) + + * binutils.texi (strip, -v option): Fix typo. + +Fri May 7 13:57:50 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (RUNTEST): Define. + (FLAGS_TO_PASS): Pass down RUNTEST. + +Tue May 4 10:06:50 1993 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (DEMANGLER_PROG): Name it c++filt. + (PROG): Also build and install COPY_PROG. + +Mon May 3 19:11:48 1993 Per Bothner (bothner@cygnus.com) + + * Makefile.in: Change definition of $(tooldir) to match FSF. + +Wed Apr 28 23:41:32 1993 David J. Mackenzie (djm@rtl.cygnus.com) + + * size.c (usage): Add missing options. + (main): Clean up option parser. + + * objdump.c (usage): Add missing options. + (display_file): Print program name before calling + bdf_perror. + + * nm.c (usage): Add missing options. + (main): Clean up option parser. + (display_file): Print program name before calling + bdf_perror. + + * copy.c (copy_usage, strip_usage): Add missing options. + + * ar.c (usage): New function. + (main): Call it. + (open_inarch, do_quick_append): Print program name before calling + bdf_perror. + +Thu Apr 22 15:01:35 1993 Ian Lance Taylor (ian@cygnus.com) + + * nm.c (main): Accept and ignore -A and -B for MIPS compatibility. + +Mon Apr 19 14:06:59 1993 Rob Savoye (rob@cygnus.com) + + * Makefile.in: Added FLAGS_TO_PASS so tests get run on freshly + built binaries if they exist. (otherwise the path) + +Wed Apr 7 22:22:50 1993 Rob Savoye (rob@cygnus.com) + + * Makefile.in: Changed check target to use DejaGnu. + +Thu Apr 1 12:37:13 1993 Jim Kingdon (kingdon@cygnus.com) + + * Makefile.in: Remove am29k-pinsn.c, i960-pinsn.c. + objdump.c: a29k and i960 are `disassemble' not `print'. + + * objdump.c: Rename print_address to objdump_print_address + and change parameters. + (disassemble_data): Use objdump_print_address. + +Wed Mar 31 10:25:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * objdump.c (disassemble_data): print_insn_sparc is now a + `disassemble' not a `print'. + Makefile.in: Remove sparc-pinsn.c (now in libopcodes.a). + + * objdump.c (disassemble_data): Use new read_memory_func stuff. + +Thu Mar 25 10:38:11 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * objdump.c (fprintf): Declaration of variadic function had better + be a prototype for ANSI C systems. + +Mon Mar 22 23:19:46 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: rename test-install to install-check + +Fri Mar 19 14:40:08 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * objdump.c (disassemble_data): Add H8500. + +Fri Mar 19 10:56:51 1993 Jim Kingdon (kingdon@cygnus.com) + + * objdump.c (usage): Mention long options. + +Thu Mar 18 14:22:17 1993 Per Bothner (bothner@rtl.cygnus.com) + + * nm.c: Modify behavior of -o flag for archives to match + BSD4.4 and Sunos 4: Prefix archive name before each line. + + * m68k-pinsn.c: Removed. Subsumed by ../opcodes/m68k-dis.c. + * i386-pinsn.c: Removed. Subsumed by ../opcodes/i386-dis.c. + * Makefile.in: Adjust accordingly. + * objdump.c: Support new-style disassemblers (ones that use + the interface of ../include/dis-asm.h). + +Thu Feb 25 15:57:00 1993 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in: When making tar file, remove texinfo/*, + except for texinfo/texinfo.tex. + * ardup.c: Add extern declaration of strdup. + * Makefile.in (testsuite): Add 'else true' since otherwise + Ultrix /bin/sh complains. + +Wed Feb 24 19:44:18 1993 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in: Set VERSION to 2.1. + * README, NEWS: Updates. + * nm.c: Add -v as a synonym for -V. + +Tue Feb 23 19:00:50 1993 Mike Werner (mtw@poseidon.cygnus.com) + + * configure.in: added testsuite to configdirs. + * Makefile.in: added support for building testsuite. + +Mon Feb 22 22:52:10 1993 Per Bothner (bothner@rtl.cygnus.com) + + * objdump.c (disassemble_data): Print function names when + given by bfd_find_nearest_line. If not - still print + line numbers. + +Mon Feb 22 07:54:03 1993 Mike Werner (mtw@poseidon.cygnus.com) + + * binutils/testsuite: made modifications to testcases, etc., to allow + them to work properly given the reorganization of deja-gnu and the + relocation of the testcases from deja-gnu to a "tool" subdirectory. + +Mon Feb 22 10:27:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com) + + * objdump.c (dump_data): Free up section contents each time + through the loop. Reported by minyard@bnr.ca. + +Sun Feb 21 10:55:55 1993 Mike Werner (mtw@poseidon.cygnus.com) + + * binutils/testsuite: Initial creation of binutils/testsuite. + Migrated dejagnu testcases and support files for testing nm to + binutils/testsuite from deja-gnu. These files were moved "as is" + with no modifications. This migration is part of a major overhaul + of dejagnu. The modifications to these testcases, etc., which + will allow them to work with the new version of dejagnu will be + made in a future update. + +Fri Feb 12 10:05:20 1993 Fred Fish (fnf@cygnus.com) + + * Makefile.in (LIBIBERTY_SRC_DIR, LIBIBERTY_BIN_DIR): New macros. + * Makefile.in (LIBIBERTY): Use LIBIBERTY_BIN_DIR. + * Makefile.in (DEMANGLER_PROG): New program to build. Add macro + and rule. + * Makefile.in (PROGS): Add DEMANGLER_PROG. + +Tue Jan 26 11:56:33 1993 Ian Lance Taylor (ian@cygnus.com) + + * copy.c, nm.c, objdump.c, size.c: Use new bfd_is_com_section + macro rather than checking for equality to bfd_com_section. + +Fri Jan 8 15:50:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c (disassemble_data): Fix code to find first useless + symbol. + +Thu Jan 7 13:13:31 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * objdump.c (disassemble_data): Use mips_print_insn for MIPS. + Don't core dump if bfd_find_nearest_line returns false. + +Wed Jan 6 17:14:01 1993 Steve Chamberlain (sac@thepub.cygnus.com) + + * objdump.c (disassemble_data): know how to disassemble z8000s + too. + +Wed Jan 6 15:16:27 1993 Per Bothner (bothner@cygnus.com) + + * arsup.h (interactive), bucomm.h (program_name): Prefix + with 'extern', to avoid warnings from some compilers. + +Wed Jan 6 15:14:11 1993 Per Bothner (bothner@rtl.cygnus.com) + + * arparse.y: fix unnecessary shift/reduce + +Tue Dec 22 15:46:56 1992 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in: Make check depend on all. + * Makefile.in (distclean): Remove sysdep.h. + * size.c: Use %u format where appropriate. + * objdump.c: Standardize: L_SET -> SEEK_SET. + * objdump.c: Use new macro bfd_asymbol_bfd. + * configure.in: Allow std-host as the default ${mys_host}. + +Thu Dec 17 19:38:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: added dvi target, define and use TEXI2DVI + +Tue Dec 15 18:05:07 1992 Per Bothner (bothner@cygnus.com) + + * Makefile.in (dist): Fix permissions before release. + * size.c: Use bfd_size_type (and long) where appropriate. + * ar.c: Make writing a map the default, to be compatible + with SYSV and Posix.2. Remove some bogus kludges that + handled __.SYMDEF directly. + * NEWS: New file. + +Mon Nov 9 13:36:53 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: flex no longer needs the -S flag + +Sat Nov 7 15:06:13 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * ar.c (extract_file): utime needs a pointer to a utimbuf + + * Makefile.in: handle -I includes better, adding $(BASEDIR)/bfd to + the list (since some of the bfd/hosts/*.h files include other + files from that directory) + +Fri Nov 6 00:12:51 1992 John Gilmore (gnu@cygnus.com) + + * i960-pinsn.c (MEM_MAX, MEM_SIZ): Set upper bound properly. + +Thu Nov 5 03:37:15 1992 John Gilmore (gnu@cygnus.com) + + Clean up some old BFD ansification macros. + + * arsup.h, bucomm.h, objdump.h: Remove EXFUN from binutils. + It still remains as a local macro in gmalloc.c, which is derived + from some other copy of GNU Malloc somewhere (FIXME). + + * ar.c, objdump.c, size.c: Replace EXFUN with PROTO. Make static + fns really static. + * arsup.h: Declare extract_files. + +Mon Nov 2 12:42:11 1992 Ian Lance Taylor (ian@cygnus.com) + + * ar.c (extract_file): instead of checking USG: if POSIX_UTIME, + use utime and utimbuf structure, otherwise if USE_UTIME use utime + and array of two longs, otherwise use utimes. + +Thu Oct 15 13:57:35 1992 Per Bothner (bothner@cygnus.com) + + * binutils.tex: Document yesterday's changes to strip and copy. + +Wed Oct 14 13:22:14 1992 Per Bothner (bothner@cygnus.com) + + * copy.c: Re-do command-line parsing to use getopt_long(). + Add long option names. Re-think option letters to be more + consistent. + * copy.c: New function filter_symbols() for stripping only + debug-symbols and/or local symbols. Use these to support + the previously-missing options of the old FSF strip. + +Tue Oct 13 01:24:20 1992 John Gilmore (gnu@cygnus.com) + + * configure.in (host): Use ${srcdir}/../bfd/configure.host rather + than repeating a copy of it here. + +Wed Oct 7 12:53:52 1992 Ken Raeburn (raeburn@cygnus.com) + + * copy.c (main): Even if is_strip, accept -d argument indicating + alternate output format. Needed by gdb for Nindy. + + * m68k-pinsn.c (print_insn_arg): Handle new "`" operand type. + +Tue Oct 6 16:33:56 1992 Jeffrey Osier (jeffrey@cygnus.com) + + * binutils.texi: added documentation for "copy" + +Tue Oct 6 14:22:56 1992 Per Bothner (bothner at PersSony) + + * Makefile.in (*clean rules): Some cleaning up. + * Makefile.in (dist): Make diststuff in gprof for a dist. + + * ar.c (do_show_version): New function. + * ar.c (main): Fix so "ar -V" works. + +Thu Oct 1 22:44:45 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * configure.in: now uses the cpu-vendor-os triple instead of + nested cases. + +Fri Sep 25 22:41:08 1992 John Gilmore (gnu@cygnus.com) + + * i960-pinsn.c: Change bzero to memset. + * sparc-pinsn.c: Change index to strchr. + +Mon Sep 21 14:39:56 1992 Ian Lance Taylor (ian@cygnus.com) + + * m68k-pinsn (print_insn_arg, fetch_arg): added support for + operands to memory management instructions, from WRS. + +Tue Sep 15 15:26:38 1992 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in (install): if $(tooldir) exists, install nm and + strip in $(tooldir)/bin. + +Thu Sep 3 11:57:40 1992 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in: Let's call it version 2.0. + +Wed Sep 2 00:25:13 1992 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in: Bump to version 0.98. + * TODO, README: Minor updates. + + * Makefile.in: Added mostlyclean, distclean rules, + and cleaned up clean, realclean. + +Sun Aug 30 21:18:59 1992 Ian Lance Taylor (ian@cygnus.com) + + * Makefile.in: map program names through program_transform_name + when installing. + +Sun Aug 30 18:09:03 1992 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in: Bump to versions 1.97.90. + * cplus-dem.c: Removed. Was nowhere used - and if some + programs are changed to to demangling should now use the + versions in libiberty. + +Thu Aug 27 12:58:09 1992 Brendan Kehoe (brendan@cygnus.com) + + * configure.in: add we32k + +Mon Aug 24 14:53:42 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * ar.c (map_over_members): if the element of the archive has a + null name, fill it in. + + * nm.c (do_one_rel_file): only warn if a bfd's flags say there + will be symbols and there aren't any. + +Wed Aug 19 11:20:25 1992 Ian Lance Taylor (ian@cygnus.com) + + * m68k-pinsn.c: handle new operand type 'r', introduced for cas2. + +Tue Aug 18 20:45:48 1992 Rob Savoye (rob@cygnus.com) + + * nm.c objdump.c: Added support for a +version (-V) + to print the version number. + + * ar.c, copy.c: Added support for a -V option to print + the version number. + +Tue Aug 18 13:28:44 1992 Ian Lance Taylor (ian@cygnus.com) + + * config/mh-apollo68v: removed -g from CC definition. + + * Makefile.in: always create installation directories. + +Mon Aug 17 18:33:41 1992 Per Bothner (bothner@rtl.cygnus.com) + + * m68k-pinsn.c: Minor fix in style of output (don't use + range to indicate floating point control registers). + +Tue Aug 11 23:42:21 1992 Per Bothner (bothner@cygnus.com) + + * ar.c (main): Don't *always* set the verbose flag! + +Wed Aug 5 11:25:27 1992 Per Bothner (bothner@rtl.cygnus.com) + + * copy.c: When is_strip (because it is invoked as the strip + program), follow traditional argv processing: + 'strip file1 file2' now strips file1 and file2, rather + than stripping file1 (as input), leaving output in file2. + +Mon Jul 27 16:28:08 1992 Per Bothner (bothner@rtl.cygnus.com) + + * objdump.c (display_info, display_info_table): Call + bfd_set_format() on dummy bfd before using it (twice). + * ar.c: Make sure archive is created on command 'r' + even when no elements are inserted. (Clean up and + simplify some non-working related code.) + +Mon Jul 20 02:48:38 1992 D. V. Henkel-Wallace (gumby@cygnus.com) + + * configure.in: hppa support doesn't assume hp OS (from sef). + +Sat Jul 18 14:35:22 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * configure.in: recognize hppa hosts (bsd & hpux), error messages + to stderr, not stdout + +Fri Jul 17 18:39:44 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * ar.1, binutils.texi, i960-pinsn.c, nm.1, objdump.1, ranlib.1, + size.1, sparc-pinsn.c, strip.1: removed rcsid's. + +Thu Jul 16 16:55:24 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.dos: removed rcsid. + +Thu Jul 16 08:23:07 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * objdump.c (display_bfd): print state of BFD_IS_RELAXABLE too + +Tue Jun 30 20:26:15 1992 D. V. Henkel-Wallace (gumby@cygnus.com) + + * Makefile.in: Add program_suffix (parallel to program_prefix) + +Thu Jun 25 04:52:45 1992 John Gilmore (gnu at cygnus.com) + + * nm.c (sorters): Lint. Remove excess whitespace. + +Wed Jun 24 13:48:07 1992 Per Bothner (bothner@cygnus.com) + + * nm.c (valueof macro): Add missing parentheses. + (Their lack screwed up numeric_forward().) + +Sun Jun 14 10:33:27 1992 John Gilmore (gnu at cygnus.com) + + * objdump.c (dump_elf_stabs): Also dump .stab.index and + .stab.excl sections. + (dump_elf_stabs_1): Split out main body of old dump_elf_stabs. + * objdump.1, binutils.texi: Document new sections dumped. + +Fri Jun 12 22:23:35 1992 John Gilmore (gnu at cygnus.com) + + * size.c, objdump.c, bucomm.c: Lint. + +Thu Jun 11 01:19:06 1992 John Gilmore (gnu at cygnus.com) + + * objdump.c (dump_elf_stabs): New feature: --stabs prints out a + .stab section from an ELF file. Installed under #ifdef + ELF_STAB_DISPLAY so it can be easily disabled, since it requires + bfd-internals header files and such. + * objdump.1, binutils.texi: Update for --stabs. Also fix + objdump's doc to use -- rather than + for long options. + (FIXME: Not yet fixed everywhere in binutils.texinfo.) + +Wed Jun 10 07:53:24 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * objdump.c(display_info), patches from + mohring@informatik.tu-muenchen.de to print the table much more + nicely. + +Thu May 28 13:36:16 1992 Per Bothner (bothner@rtl.cygnus.com) + + * objdump.c: Add another enum->int cast, for the sake of + old compilers (such as PCC). + +Wed May 27 13:01:44 1992 Per Bothner (bothner@rtl.cygnus.com) + + * arlex.l: Don't include (unneeded conflicts). + Add declaration of strdup(). + +Fri May 22 13:40:37 1992 Per Bothner (bothner@cygnus.com) + + * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex + rules, since these are used when building a distribution. + * Makefile.in (arlex.c): Don't re-direct output, since that + leaves a bogus output files if it fails. + + * arlex.l: Make work with lex, for what it's worth. + * Makefile.in: Better lex support. + * Makefile.in (dist): Generate flex and bison outputs + for distribution. + +Thu May 14 17:17:59 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.in: get BISON definition right. + +Fri May 8 07:47:08 1992 K. Richard Pixley (rich@cygnus.com) + + * sanity.sh: default TMPDIR to ".". + +Thu May 7 12:34:50 1992 Roland H. Pesch (pesch@fowanton.cygnus.com) + + * binutils.texi: add doc for ar command language. + +Wed May 6 18:05:36 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * arparse.y: make END call ar_end + * arsup.c (ar_end): added, deletes temp file if archive session + aborted. + + +Wed May 6 11:08:53 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.in: use bison & flex from ../ if they exist. Also, + FLEX->LEX. + + * sanity.sh: remove temporary directory when finished. + +Tue May 5 12:00:58 1992 Per Bothner (bothner@rtl.cygnus.com) + + * Makefile.in: Bump to version 1.97. + * ar.c: Declare errno for machines that need it. + +Mon May 4 23:29:51 1992 John Gilmore (gnu@cygnus.com) + + * objdump.c (display_info): Handle error cases without coredump. + Close the dummy temporary file we open in the loop. + * Makefile.in (arsup.o): Add kludge to build with Sun Make. + +Fri May 1 16:20:23 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in: added test-install target. + + * sanity.sh: new file. + + * Makefile.in: use sanity test on make check. + +Tue Apr 21 13:38:37 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in: rework CFLAGS so that they can be passed on the + command line to make. Remove MINUS_G. Default CFLAGS to -g. + +Wed Apr 15 14:33:07 1992 Steve Chamberlain (sac@thepub.cygnus.com) + + * arsup.c, arsup.h, arparse.y, arlex.l: support for archive + scripting language. + +Fri Mar 6 21:54:53 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in: added check target. + +Thu Mar 5 21:35:49 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in: added clean-info target. + +Tue Mar 3 15:36:37 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.in: remove $(COPY_PROG) from PROGS. It shouldn't be + installed. added tooldir and program_prefix. + +Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in, configure.in: removed traces of namesubdir, + -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced + copyrights to '92, changed some from Cygnus to FSF. + +Sun Feb 16 12:53:02 1992 Per Bothner (bothner at cygnus.com) + + * Makefile.in: Bump version to 1.96, and remove -beta + suffix from distribution name. + * m68k-pinsn.c: New macro COERCE_SIGNED_CHAR to extract + the signed value of a character (even if chars are unsigned). + * sparc-pinsn.c: Add new operand types. + +Thu Feb 6 12:14:19 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * objdump.c (disassemble_data): don't print a section's contents + if it's not loadable (eg bss) + +Tue Jan 28 11:11:06 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * m68k-pinsn.c (print_insn_arg): fixed so that -ve branch + displacements don't get printed as large +ve ones. + +Fri Jan 24 14:47:53 1992 Steve Chamberlain (sac at rtl.cygnus.com) + + * copy.c, nm.c, objdump.c, size.c : changed to use the + new reloc scheme. + + +Mon Dec 30 18:34:41 1991 Per Bothner (bothner at cygnus.com) + + * bucomm.c (print_arelt_descr): Tweek the output format + so that 'ar tv' output follows Posix 1003.2/D11. + Output is now also identical to Sun's (except __.SYMDEF). + +Mon Dec 30 06:09:53 1991 John Gilmore (gnu at cygnus.com) + + * Makefile.in: Make `make' output more readable. + +Wed Dec 18 15:04:45 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in: Bump to version 1.94. + +Wed Dec 11 16:48:09 1991 Steve Chamberlain (sac at cygnus.com) + + * ar.c: added "b" to fopens for dos + * configdj.bat, makefile.dos new files from DJ + +Tue Dec 10 04:07:26 1991 K. Richard Pixley (rich at rtl.cygnus.com) + + * Makefile.in: infodir belongs in datadir. + +Sat Dec 7 17:09:37 1991 Steve Chamberlain (sac at rtl.cygnus.com) + + * bucomm.h: created to hold prototypes of bucomm.c + * objdump.h: created to hold prototyes of objdump.c + * am29k-pinsn.c: include objdump.h + * ar.c: include bucomm.h, get ar.h from the right place and + include libbfd.h + * bucomm.c: defunize bfd_fatal + * copy.c: include bucomm.h, lint. + * i960-pinsn.h: include bucomm.h + * m68k-pinsn.h: lint + * nm.c: include bucomm.h, lint + * objdump.c: lint + * sparc-pinsn.c: include objdump.h + + + +Fri Dec 6 23:02:14 1991 K. Richard Pixley (rich at rtl.cygnus.com) + + * Makefile.in: added standards.text support. install using + INSTALL_PROGRAM and INSTALL_DATA. + + * configure.in: configure now does all of it's work from objdir so + make file existence tests against ${srcdir}. + +Thu Dec 5 22:46:22 1991 K. Richard Pixley (rich at rtl.cygnus.com) + + * Makefile.in: idestdir and ddestdir go away. Added copyrights + and shift gpl to v2. Added ChangeLog if it didn't exist. docdir + and mandir now keyed off datadir by default. + +Wed Dec 4 22:42:03 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in: Bump to version 1.93. + * Makefile.in: Add make-strip.o:maybe-strip.c dependency + for make versions that provide half-baked VPATH-support (e.g. Sun's). + * size.c: Improvements suggested by + "david d [zoo] zuhn" : + - Don't emit (Berkeley) headers if no files were found. + - Return a non-zero return code on failure. + +Sat Nov 30 21:34:19 1991 Steve Chamberlain (sac at rtl.cygnus.com) + + Changes due to include file renaming: + * am29k-pinsn.c: a29k-opcode.h -> opcode/a29k.h + * sparc-pinsn.c: sparc-opcode.h -> opcode/sparc.h + * m68k-pinsn.c: m68k-opcode.h -> opcode/m68k.h + * nm.c: stab.gnu.h -> aout/stab_gnu.h + +Tue Nov 19 19:20:43 1991 Per Bothner (bothner at cygnus.com) + + * README: Mention MINIMIZE flag for bfd's make. + +Mon Nov 18 12:05:37 1991 Per Bothner (bothner at cygnus.com) + + * README: Various improvements. + +Sun Nov 17 23:40:59 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in: Bump to version 1.92. + * version.c, Makefile.in: Get version string from Makefile. + * copy.c, is-strip.c, not-strip.c, maybe-strip.c, Makefile.in: + Make the same change that we earlier did for ar/ranlib: + Generate two different binaries for strip and copy and use + a global variable with different values to distinguish + ostrip from copy. (-1 means to use argv[0] to decide, + so you can get the old behavior, but it is no longer the default). + * copy.c (copy_file): Set EXEC_P of output bfd if input is so. + * copy.c (main): If is_strip==-1, compare last 5 chars + of argv[0], not the whole path. + * copy.c (main): Return 0, not 1. + * copy.c (setup_sections): Fix due to change in bfd_make_section + now failing if asked for a duplicate section. + * strip.c, ostrip.c: Removed obsolete files. + * ar.c, not-ranlib.c, maybe-ranlib.c: + Change encoding of is_ranlib variable to be consistent + with is_strip for strip.copy (i.e -1 to means use argv[0]). + +Thu Nov 14 20:11:02 1991 Per Bothner (bothner at cygnus.com) + + * version.c (program_version): Update to version 1.92. + +Tue Nov 12 16:17:53 1991 Per Bothner (bothner at cygnus.com) + + * ar.c (get_pos_bfd): Previous fix was missing a "break". + +Thu Nov 7 08:55:56 1991 Steve Chamberlain (sac at cygnus.com) + + * am29k-pinsn.c: Fixed bug in mtacc, dmac and fmac instruction + encodings. (Thaks to David Wood) + +Sun Nov 3 14:50:23 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in ($(DIST_NAME).tar.Z), TODO: Various fixes. + * ar.c (get_pos_bfd): Fix to handling of before/after + positioning options. + * bucomm.c (fatal): MISSING_VFPRINTF is no longer an issue, + since libiberty contains vfprintf etc if otherwise missing. + * m68k-pinsn.c (print_insn_arg): Support BB/BW/BL + type operands, as used by branch instructions. + * nm.c: Delegate printing of symbols to BFD, + by using bfd_print_symbol to do the formatting. + +Mon Oct 28 11:20:47 1991 Steve Chamberlain (steve at cygnus.com) + + * ar.c (write_archive.c): added unlink before rename since some + systems can't rename onto an existant file. + +Mon Oct 21 09:47:23 1991 Steve Chamberlain (steve at rtl.cygnus.com) + + * nm.c: now doesn't crash if a symbol with no section and no + SEC_ABS appears. + +Thu Oct 17 15:25:50 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in, version.c: Bump to version 1.91. + +Wed Oct 16 11:45:36 1991 Per Bothner (bothner at cygnus.com) + + * Makefile.in, ar.c, bucomm.c, copy.c, cplus-dem.c, filemode.c, + i960-pinsn.c, m68k-pinsn.c, nm.c, objdump.c, size.c, sparc-pinsn.c, + * strip.c: Add or update Copyright notice. + * TODO: Add note on 'nm -a'. + * version.c: Update version number to 1.90. + * Makefile.in: Fix making of documentation for dist. + +Tue Oct 15 00:17:17 1991 Per Bothner (bothner at cygnus.com) + + * README: New file. + * Makefile.in: New kludgy rules for making a tarfile. + * Makefile.in: Fix bindir path. + +Mon Oct 14 17:34:29 1991 Roland H. Pesch (pesch at cygnus.com) + + * Makefile.in: add targets binutils.mm, binutils.me + +Fri Oct 11 22:44:21 1991 John Gilmore (gnu at cygnus.com) + + * Makefile.in: Avoid Sun Make VPATH bugs by adding dependencies. + +Fri Oct 11 12:51:33 1991 Roland H. Pesch (pesch at cygnus.com) + + * Makefile.in: add target "binutils.ms" + + * binutils.texinfo: minor restructuring for texi2roff comfort. + +Fri Oct 11 04:12:28 1991 John Gilmore (gnu at cygnus.com) + + Restructure configuration scheme for bfd, binutils, ld. + + * include/sys/h-*.h: Move to bfd/hosts/h-*.h. + * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h. + Change some config names to match other dirs. + * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO() + get defined first. + * Makefile.in: Use -I. to get sysdep.h. + +Wed Oct 9 22:42:56 1991 Per Bothner (bothner at cygnus.com) + + * nm.c (print_symbols): Handle NULL name field of symbol. + * Makefile.in: Removed spurious comment. + +Tue Oct 8 16:55:03 1991 Roland H. Pesch (pesch at cygnus.com) + + * binutils.texinfo: minor typos, phrasing, formatting fixes. + +Tue Oct 8 15:13:20 1991 Per Bothner (bothner at cygnus.com) + + * configure.in: Get host file from ../bfd/config, not config. + * config/*: Remove config directory and its files. + +Tue Oct 8 13:58:59 1991 Roland H. Pesch (pesch at cygnus.com) + + * Makefile.in: new targets binutils.dvi, binutils.info + + * binutils.texinfo: remove most remaining FIXME's, delete + references to __.SYMDEF by name + + +Tue Oct 8 10:23:44 1991 Steve Chamberlain (steve at cygnus.com) + + * objdump.c (print_address) Print addresses nicely. + +Mon Oct 7 11:31:05 1991 Per Bothner (bothner at cygnus.com) + + * ar.c, Makefile.in, new files {is,not,maybe}-ranlib.c: + Make two different binaries for ar and ranlib, instead of + distinguishing them at run time using argv[0]. + (Old behavior is still available if you "make ar_with_ranlib", + but it is not the default.) + * ranlib.sh (new): An alternative one-line + shell implementation of ranlib. + +Fri Oct 4 21:49:44 1991 John Gilmore (gnu at cygnus.com) + + * objdump.c: Cope with renames of a few BFD types & enums. + +Fri Oct 4 19:08:09 1991 Roland H. Pesch (pesch at cygnus.com) + + * binutils.texinfo: add new file (rudimentary docn) + +Mon Sep 30 12:30:39 1991 Per Bothner (bothner at cygnus.com) + + * config/hmake-news: Add new file (for Sony NEWSOS3). + * bucomm.c (fatal): Conditionally compile fatal() depending on + MISSING_VFPRINTF, and don't confuse the issue with NO_VARARGS. + * objdump.c (dump_headers): Trivial output format change. + * objdump.c (display_info): Loop over integers, not enums, + to appease old compilers. + +Mon May 20 16:14:07 1991 Steve Chamberlain (steve at cygint.cygnus.com) + + *objdump.c *nm.c *copy.c: Changed some types to work with 64 bit + object files. + +Thu May 16 16:06:55 1991 Steve Chamberlain (steve at cygint.cygnus.com) + from bother + * objdump.c (print_address): Make disasembled output more + consistent with gdb and as: Add 0x when printing hex. + Don't print extra leading zeros. + Attempt to not print "filename.o". + * objdump.c: Add some enum-to-int casts to accomodate old compilers. + + +Fri May 3 22:21:44 1991 John Gilmore (gnu at cygint.cygnus.com) + + * copy.c: Change =& constructs to = &, since they confuse older + C compilers. + + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/contrib/binutils/binutils/ChangeLog-9899 b/contrib/binutils/binutils/ChangeLog-9899 new file mode 100644 index 0000000..22f21e2 --- /dev/null +++ b/contrib/binutils/binutils/ChangeLog-9899 @@ -0,0 +1,1908 @@ +1999-12-28 Nick Clifton + + * readelf.c: Update with new constants added by Oct 4, 1999 + ELF ABI draft. + (guess_is_rela): Add new machine codes, but leave + rel type undetermined. + (get_machine_name): Add new machine codes. + (get_section_type_name): Add new section types. + (get_elf_section_flags): New function: Decode section flags. + (process_section_headers): Call get_elf_section_flags() in + order to decode flags in section header. + (get_dynamic_flags): New function: Decode dynamic section + flags. + (process_dynamic_section): Display flags (if present). + (get_symbol_type): Add STT_COMMON. + (get_symbol_visibility): New function: Decode a symbol's + visibility. + (process_symbol_table): Call get_symbol_visibility(). + (get_note_type): Add NT_PRXFPREGS. + +1999-12-26 Ian Lance Taylor + + * strings.c (main): Correct handling of numeric argument. + +1999-12-23 Andrew Haley + + * dlltool.c (mtable): mcore how_jtab_roff is 4 bytes into the + jtab; was 8. + +1999-12-17 Nick Clifton + + * dlltool.c (mtable): Stop compile time warnings about missing + initialisers. + (yyerror): Stop compile time warnings about unused paramater. + (INIT_SEC_DATA): New macro: initialise an entry in the secdata + array. + (secdata): Stop ccompile time warnings about uninitialised + fields. + (dtab): Stop compile time warnings about unused parameter. + (long_options): Stop compile time warning about missing + initialiser. + +1999-12-10 Nick Clifton + + * readelf.c (print_vma): Support native 64bit ELF systems. + +1999-12-09 Nick Clifton + + * dlltool.c (mtable): Add epoc-arm specific entry. + Make default arm entry pass -mpacs-26 to assembler. + (flush_page): Do not mangle null entries. + +1999-12-07 H . J . Lu hjl@valinux.com + + * readelf.c: Fix compile time warnings. Support more than 999 + symbols. + +1999-12-03 Nick Clifton + + * readelf.c (enum print_mode): New type. + (print_vma): New function. + (dump_relocations): Use print_vma to display bfd_vma values. + (process_file_header): Use print_vma to display bfd_vma values. + (process_program_headers): Use print_vma to display bfd_vma values. + (process_section_headers): Use print_vma to display bfd_vma values. + (dynamic_segment_parisc_val): Use print_vma to display bfd_vma values. + (process_dynamic_segment): Use print_vma to display bfd_vma values. + (process_symbol_table): Use print_vma to display bfd_vma values. + (process_mips_specific): Use print_vma to display bfd_vma values. + +1999-11-25 Fred Fish + + * readelf.c (process_note): Change arg from Elf_External_Note + to Elf32_Internal_Note, which also turns the function body + into little more than a call to printf. + (process_corefile_note_segment): Substantially rewritten + to properly handle case where target and host are different + endianness, handle note sections with padding, and add some + cruft to handle notes with unterminated name data. + +1999-11-22 Nick Clifton + + * objcopy.c (copy_usage): Reformat. + (strip_usage): Reformat. + +1999-11-21 Nick Clifton + + * objdump.c (usage): Overhaul output: One line per switch. + Textual description of each switch. Distinguish between + optional switches and required switches. + (long_options): Add 'g', 'G' and 'z' short options. + (main): Distinguish between optional switches and required + switches. + + * binutils.texi: Add -g -G and -z short options for + --debugging, --stabs and --disassemble-zeroes. + +1999-11-03 Nick Clifton + + * dlltool.c (flush_page): Clip short values to prevent warnings + from the assembler. + Change default mcore machine name to 'mcore-le' and rename + big-endian version to 'mcore-be'. + +1999-10-27 Fred Fish + + * objdump.c (display_bfd): Break into two functions. The + actual dumping code moves to dump_bfd. If bfd is not + unambiguously recognized as a bfd_object, attempt to dump + it as a bfd_core. + (dump_bfd): New function. + +1999-10-26 Nick Clifton + + * dlltool.c (assemble_file): Remove spurious test of exp_name. + +1999-10-22 Nick Clifton + + * dlltool.c (struct mac): Add new field 'how_default_as_switches'. + (mtable): Initialise new field. Some machines have a non empty + string for this field. + (HOW_BFD_TARGET): Undefine and replace with... + (HOW_BFD_READ_TARGET): New macro: bfd target to use when opening a + file for reading. This is set to 0 so that any recognisable bfd + format can be read. + (HOW_BFD_WRITE_TARGET): New macro: bfd target to use when opening + a file for writing. This is set to the target machine type. + (ASM_SWITCHES): New macro: default switches to use when assembling + a file. + (assemble_file): New function: Assemble a source file into a + destination object file. + (gen_exp_file): Use assemble_file to create the exp file. + (make_one_lib_file): Use assemble_file to create the lib file. + Open output file use HOW_BFD_WRITE_TARGET and input files using + HOW_BFD_READ_TARGET. + (make_head): Use assemble_file to create the head file. + (make_tail): Use assemble_file to create the tail file. + (gen_lib_file): Open output file use HOW_BFD_WRITE_TARGET. + +1999-10-15 Ian Lance Taylor + + * ar.c (normalize): Fix full_pathname code. + +1999-10-08 Ben Elliston + + * binutils.texi: Some rewording and clarifications. + +1999-09-15 Ulrich Drepper + + * readelf.c (dynamic_segment_parisc_val): Print 0 for DLD_FLAGS if + the value is zero. + (process_symbol_table): Don't print histogram if hash table is empty. + +1999-09-15 Ulrich Drepper + + * readelf.c (get_parisc_dynamic_type): Handle DT_HP_GST_* values. + +1999-09-02 Ulrich Drepper + + * readelf.c (get_symbol_type): Add support for HPUX and PARISC + specific symbol types. + + * readelf.c: Add HPUX and PARISC extensions to dynamic and program + header table printing. + + * readelf.c (get_machine_flags): Add handling of PARISC. + +1999-09-29 Mumit Khan + + * dlltool.c (scan_drectve_symbols): Handle type tags in exported + symbols. + (scan_filtered_symbols): Likewise. + +1999-09-19 Ian Lance Taylor + + * resrc.c (write_rc_rcdata): Fix local variable shadowing + problem. If RCDATA_BUFFER data can be read as strings, modify + code to print the strings as comments. + * resres.c: Add casts to avoid warnings. + (write_res_data, read_res_data): Don't put the program name in the + error message; fatal already puts it there. + +1999-09-14 Michael Meissner + + * configure.in (Canonicalization of target names): Remove adding + ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 + generates $ac_config_sub with a ${CONFIG_SHELL} already. + * configure: Regenerate. + +1999-09-12 Ian Lance Taylor + + * ar.c (main): Clear output_file if we don't change the archive. + (delete_members, replace_members): Likewise. + +1999-09-12 Donn Terry + + * objdump.c (dump_headers): If wide_output, print Flags header. + + * objdump.c (dump_section_header): Print any comdat information. + + * objcopy.c (parse_flags): Handle "noload", "debug", and "share". + * binutils.texi, objcopy.1: Document new flags. + + * ar.c (counted_name_mode): New static variable. + (counted_name_counter): New static variable. + (map_over_members): Handle counted mode. + (usage): Mention N modifier. + (main): Handle N modifier. + (delete_members): Handle counted mode. + * binutils.texi, ar.1: Document N modifier. + + * ar.c (print_contents): Change printing of member name for + POSIX.2 conformance. + + * ar.c (output_filename): Make const. + (open_inarch): If creating a new empty archive, set + output_filename. + +1999-09-12 Ian Lance Taylor + + * ar.c (full_pathname): New static variable. + (map_over_members): Call normalize on command line parameter. + (usage): Mention P modifier. + (normalize): If full_pathname is true, don't do anything. + (main): Accept P modifier. + (delete_members): Call normalize on command line parameter. + * binutils.texi, ar.1: Document P modifier. + +1999-09-09 Andreas Schwab + + * binutils.texi: Add info dir entries for all programs described + here. Fix arguments of @var to not contain punctuation. + +1999-09-06 Donn Terry + + * nm.c (print_symbol_info_bsd): Check for 'w' as well as 'U'. + (print_symbol_info_sysv): Likewise. + (print_symbol_info_posix): Likewise. + +1999-09-04 Steve Chamberlain + + * readelf.c: Include "elf/pj.h". + (dump_relocations): Handle EM_PJ. + (get_machine_name): Likewise. + (get_machine_flags): Likewise. + +1999-08-31 Scott Bambrough + + * readelf.c (get_note_type): New function: Decode the e_type + value of a note. + (process_note): New function: Display the contents of a core note. + (process_corefile_note_segment): New function. + (process_corefile_note_segments): New function. + (process_corefile_contents): New function. + (process_file): Add call to process_corefile_contents. + (parse_args): Add parsing of -n/--notes command line switch. + (usage): Document new command line switch. + + * binutils.texi: Documemnt new command line switch to readelf. + +1999-08-31 Ian Lance Taylor + + * binutils.texi (Bug Reporting): Clarify that large files should + not be sent to bug-gnu-utils. + +1999-08-28 Stephane Carrez + + * readelf.c (process_extended_line_op): New parameter pointer_size, + read the address according to pointer_size. + (debug_line_pointer_size): New global to indicate the + size of address in .debug_line section. + (debug_displays, prescan_debug_info): Prescan the .debug_info section + to record the size of address in `debug_line_pointer_size'. + (process_section_contents): Before dumping any section, execute + the pre-scan operation defined for some debug sections. + +1999-08-27 Jim Wilson + + * readelf.c (display_debug_lines): Use i-1 not i in standard_opcodes + access. + (display_debug_aranges): New local excess. Use for calculating padding + and add that into ranges. Break from loop only if length is also 0. + +1999-08-27 Jim Wilson + + * readelf.c (display_debug_lines, case DW_LNS_const_add_pc): Multiply + adv by info.li_min_insn_length. + +1999-08-26 Jakub Jelinek + + * readelf.c (get_sparc64_dynamic_type): New function. + (get_dynamic_type): Use it. + +1999-08-26 Jim Wilson + + * readelf.c (display_debug_lines, case default): Change second line + setting adv to use = not +=. + +1999-08-19 Nick Clifton + + * dlltool.c: Added more examples to the comment at the start. + +1999-08-18 Nick Clifton + + * dlltool.c (make_head): Only emit interworking directive if + necessary. + +Thu Jul 15 22:44:21 1999 Hans-Peter Nilsson + + * readelf.c (process_abbrev_section): Handle standard-conforming + single zero at the end of the section. + +1999-08-09 Ian Lance Taylor + + * objdump.c (exit_status): New static variable. + (nonfatal): New static function. + (disassemble_data): Set exit_status on error. + (read_section_stabs): Likewise. + (display_bfd): Likewise. Call nonfatal rather than bfd_nonfatal. + (display_file): Call nonfatal rather than bfd_nonfatal. + (display_target_list, display_info_table): Likewise. + (main): Return exit_status rather than 0. + +1999-08-08 Ian Lance Taylor + + * objdump.c (dump_section_header): Update for renaming of + SEC_SHORT to SEC_SMALL_DATA. Print SEC_SHARED flag. + + From Eli Zaretskii : + * binutils.texi: Document cxxfilt as MS-DOS name for c++filt. + + * configure.in: Define and substitute DEMANGLER_NAME. + * Makefile.am (DEMANGLER_PROG): Set to cxxfilt. + (man_MANS): Use DEMANGLER_NAME rather than DEMANGLER_PROG. + (bin_PROGRAMS): Remove $(DEMANGLER_PROG). + (noinst_PROGRAMS): Add $(DEMANGLER_PROG). + (cxxfilt_SOURCES): Rename from c__filt_SOURCES. + (cxxfilt_LDADD): Rename from c__filt_LDADD. + ($(DEMANGLER_NAME).1): Rename from $(DEMANGLER_PROG).1. Use + DEMANGLER_NAME rather than DEMANGLER_PROG in substitution. + (MOSTLYCLEANFILES): Use DEMANGLER_NAME rather than + DEMANGLER_PROG. + (install-exec-local): When installing noinst_PROGRAMS, change + cxxfilt to $(DEMANGLER_NAME). + * configure, Makefile.in: Rebuild. + + * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to + MKDEP. + * Makefile.in: Rebuild. + +1999-08-05 Donn Terry + + * Makefile.am (YACC): If bison is not in the source tree, use + @YACC@ rather than bison -y. + (LEX): If flex is not in the source tree, use @LEX@ rather than + flex. + * configure.in: Build dlltool for i[3-6]86-*-interix. + * Makefile.in, configure: Rebuild. + +1999-07-21 Ian Lance Taylor + + From Mark Elbrecht: + * configure.bat: Remove; obsolete. + +1999-07-16 Jakub Jelinek + + * readelf.c (get_machine_flags): Print EF_SPARC_SUN_US3. + +1999-07-15 Ian Lance Taylor + + * configure.in: Bump version number to 2.9.5. + * configure: Rebuild. + +1999-07-14 Richard Henderson + + * objdump.c (dump_section_header): Print SEC_SHORT. + +1999-07-11 Ian Lance Taylor + + * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED + as appropriate. Add variable initializations. Add casts. + * objdump.c (disassemble_bytes): Change j to bfd_vma. + * readelf.c (process_syminfo): Change i to unsigned int. + (display_debug_info): Change abbrev_number to unsigned long. + (process_mips_specific): Change fcnt to size_t. + +1999-07-09 Nick Clifton + + * readelf.c: Only support decoding 64bit ELF files if the compiler + supports a 64 bit data type. + Add -I equivalent for --histogram. + Add -A command-line option to display architecture specific information. + +1999-07-08 Jakub Jelinek + + * readelf.c (guess_is_rela): Sparcv9 and v8plus use rela. + (dump_relocations): Use ELF64_R_TYPE_ID for Sparc, for R_SPARC_OLO10 + print the secondary addend. + (get_machine_flags): Print Sparc machine flags. + (get_symbol_type): Print STT_REGISTER. + +1999-07-08 Ian Lance Taylor + + * stabs.c (parse_stab_type): Fix handling of template names with + template parameters containing `::'. + (stab_demangle_type): Handle a qualified name in a pointer to + member. + +1999-06-23 Ian Lance Taylor + + * Makefile.am (dlltool_SOURCES): Add dyn-string.c. + * Makefile.in: Rebuild. + +1999-06-23 Mumit Khan + + * configure.in (HAVE_EXECUTABLE_SUFFIX): Define. + * dlltool.c (look_for_prog): Use HAVE_EXECUTABLE_SUFFIX. + * dllwrap.c (look_for_prog): Likewise. + * resrc.c (look_for_default): Likewise. + * configure, config.in: Rebuild. + +1999-06-22 Ian Lance Taylor + + Based on patches from Mumit Khan : + * configure.in: Define EXECUTABLE_SUFFIX. + * dlltool.c: Include "dyn-string.h". Include based on + ANSI_PROTOTYPES, not __STDC__. + (outfile): Remove. + (gen_exp_file): Change uses of outfile to use alloca. + (make_one_lib_file, make_head, make_tail): Likewise. + (gen_lib_file): Likewise. + (look_for_prog): New static function. + (deduce_name): Rewrite to use look_for_prog. + (mcore_elf_gen_out_file): Use dyn_string_t rather than outfile. + * dllwrap.c: Don't include , , , + , or . Include and either + or . + (driver_name): Initialize to NULL, not "gcc". + (dlltool_name): Initialize to NULL, not "dlltool". + (display, inform, look_for_prog, deduce_name): New static + functions. + (usage): Mention -mno-cygwin. + (OPTION_MNO_CYGWIN): Define. + (main): Handle -mno-cygwin. Deduce driver_name and dlltool_name. + * resrc.c (look_for_default): Make static. Remove unused local + path. Check using EXECUTABLE_SUFFIX. + (read_rc_file): Allocate enough space to hold EXECUTABLE_SUFFIX. + * Makefile.am: Rebuild dependencies. + (dllwrap_LDADD): Add $(INTLLIBS). + * configure, Makefile.in, config.in: Rebuild. + +Mon Jun 21 16:49:11 1999 Jeffrey A Law (law@cygnus.com) + + * readelf.c (dump_relocations): Use elf_hppa_reloc_type instead of + elf32_hppa_reloc_type. + +1999-06-17 Nick Clifton + + * dlltool.c (mcore_elf_gen_out_file): Link object files with the + .exp file, not the .lib file. + +Fri Jun 18 20:17:51 1999 Mumit Khan + + * deflex.l: Accept single-character symbol names. + +1999-06-16 Nick Clifton + + * readelf.c (get_symbol_type): Detect ARM symbols typed as Thumb + functions. + +1999-06-14 Nick Clifton + + * objdump.c (disassembler_options): New variable. + (usage): Document new -M/--disassembler-options option. + (long_options): Add --disassembler-options. + (disassemble_data): Initialise disassembler_options field of + disassembler_info structure. + (main): Add parsing of -M option. + + * binutils.texi: Document new command line switch to objdump. + + * NEWS: Describe new command line switch to objdump. + + +Mon Jun 14 10:27:54 1999 Andreas Schwab + + * binutils.texi: Fix typos. + +1999-06-13 Ian Lance Taylor + + * objdump.c (disassemble_bytes): If the disassembler returns an + error, print out anything it may have printed to the buffer. From + H.J. Lu . + + * defparse.y (explist): Remove separate expline to eliminate + shift/reduce conflict. + + From Kai-Uwe Rommel : + * defparse.y: Add tokens NONSHARED, SINGLE, MULTIPLE, + INITINSTANCE, INITGLOBAL, TERMINSTANCE, and TERMGLOBAL. + (command): Add option_list after LIBRARY. + (attr): Accept and ignore NONSHARED, SINGLE, and MULTIPLE. + (option_list, option): New nonterminals. + * deflex.l: Recognize NONSHARED, SINGLE, MULTIPLE, INITINSTANCE, + INITGLOBAL, TERMINSTANCE, and TERMGLOBAL. + +1999-06-12 Ian Lance Taylor + + * ar.c (O_BINARY): Define as 0 if not defined. + (ranlib_touch): Open file with O_BINARY. + + * rename.c (O_BINARY): Define as 0 if not defined. + (simple_copy): Open files with O_BINARY. + + Based on patch from H. Peter Anvin : + * objcopy.c (struct section_list): Add copy field. + (sections_copied): New static variable. + (copy_options): Add "only-section". + (copy_usage): Mention -j and --only-section. + (find_section_list): Initialize copy field. + (is_strip_section): Check for copying sections. + (copy_object): Check sections_copied when calling filter_symbols. + (setup_section): Check for copying sections. + (copy_section): Likewise. + (copy_main): Handle -j/--only-section. + * binutils.texi, objcopy.1: Document -j/--only-section. + + * configure.in: If frexp is not available, check in -lm. + * configure: Rebuild. + + * readelf.c (get_elf_class): Use correct printf format for type. + (get_data_encoding): Likewise. + (get_osabi_name): Likewise. + (process_file_header): Don't pass an extra argument to printf. + (process_dynamic_segment): Cast dynamic_size to long before + printing. + (decode_location_expression): Cast byte_get to long before + printing. + +Wed Jun 9 11:40:16 1999 Andreas Schwab + + * readelf.c (dump_section): Cast values from byte_get to + [unsigned] long for printing, in case it is wider than long. + (display_block): Likewise. + (read_and_display_attr): Likewise. + (decode_location_expression): Likewise. Don't depend on + evaluation order. + +Mon Jun 7 12:14:57 1999 Andreas Schwab + + * windres.c (usage): Fix typo. + +1999-06-04 Nick Clifton + + * readelf.c: Use 64bit wide fields in internal strcutures even if + targetting a 32bit architecture. + (dump_relocations): Take a new parameter - the number of symbols + in the symbol table. + +1999-06-04 Nick Clifton + + * readelf.c: Add support for 64bit ELF files. + +1999-06-03 Nick Clifton + + * dlltool.c (mcore_elf_gen_out_file): Use constants for temporary + file names. + +Wed Jun 2 12:34:36 1999 Richard Henderson + + * dlltool.c (gen_exp_file): Revert 19990411 change. + +Mon May 31 09:56:22 1999 Andreas Schwab + + * readelf.c (process_relocs): Determine type of reloc from + DT_PLTREL and from section type. + +1999-05-29 Nick Clifton + + * readelf.c (get_elf_class): Display unknown class number. + (get_data_encoding): Display unknown encoding number. + (get_osabi_name): Display unknown ABI number. + (process_file_header): Display unknown version number. + +1999-05-29 Nick Clifton + + * readelf.c (dump_relocations): Fix typo. + +1999-05-28 Nick Clifton + + * readelf.c (dump_relocations): Add extra parameter: is_rela to + specify the kind of relocations to be dumped. Call guess_is_rela + if this parameter has a value of UNKNOWN. + (guess_is_rela): New function: Guess the kind of reloc being used + baced on the machine number. + (process_relocs): Determine type of reloc before calling + dump_relocations. + +1999-05-28 Ian Lance Taylor + + * readelf.c: Include "elf/i960.h". + (dump_relocations): Handle EM_960. + +Thu May 27 11:58:33 1999 Andreas Schwab + + * objcopy.c (copy_archive): Preserve dates of archive members if + requested. + + * readelf.c (dump_relocations): Always print the addend on RELA + systems even if there is no symbol. + (process_program_headers): Reset dynamic_size before looping + through the program headers. + (process_version_sections): Cast sh_offset to unsigned long for + printing in case bfd_vma is wider. + (process_symbol_table): Use get_symbol_index_type when printing + st_shndx. + +1999-05-17 DJ Delorie + + * windres.c: add verbose option + (main): process verbose option + * resrc.c (look_for_default): new. Look for the default + preprocessor in a given location. + (read_rc_file): for foo/bar-windres, look for foo/bar-gcc, + foo/gcc (in case of foo/windres), and then gcc (the old default). + +1999-05-16 Nick Clifton + + * dlltool.c (deduce_name): New function: Deduce name of program to + run. + (mcore_elf_out_file): New variable: Name of mcore-elf output file. + (mcore_elf_linker): New variable: Name of linker to use. + (mcore_elf_linker_flags): New variable: Linker flags to pass. + (scan_obj_file): Cache filenames if necessary. + (usage): Document new command line options. + (main): Support new command line options: -M (generate an + mcore-elf output file) -L (name of linker to use) -F (flags to + pass to linker). + (mcore_elf_cache_filename): Store a filename in a cache. + (mcore_elf_gen_out_file): New function: Generate an output file + per the mcore-elf spec. + +1999-05-15 Nick Clifton + + * configure.in (BUILD_MISC): Build dlltool for mcore + * configure: Regenerate. + * dlltool.c: Update example in comment. + (DLLTOOL_MCORE): Define. + (DLLTOOL_MCORE_ELF): Define. + (DRECTVE_SECTION_NAME): Define. + (mcore_be_jtab, mcore_le_jtab): Binary for performing an mcore + jump to address. + (mtable): Add entries for mcore variants. + (rvaafter, rvabefore, asm_prefix): Add mcore suppport. + (scan_drectve_symbols): Use DRECTVE_SECTION_NAME. + (make_head, make_tail): Cope if file cannot be created. + (usage): Improve layout. + +1999-05-13 DJ Delorie + + * rclex.l: add code to suppress certain output from cpp, replace + all returns with MAYBE_RETURN + (MAYBE_RETURN): new, implement the suppression by returning + IGNORED_TOKEN as needed. + (cpp_line): remember which file we're in, mark data from included + *.h files for suppression. + * rcparse.y (input): allow IGNORED_TOKEN outside of known constructs + +1999-05-10 DJ Delorie + + * windres.c (quot): Quote shell metacharacters in a string + (main): quote parameters to cpp that might have metacharacters in + them. Allow -D as an alias for --define to allow for sharing make + macros with gcc. + + * objdump.c (dump_reloc_set): don't core if howto->name is NULL + + * Makefile.am: Give rescoff.c a cpu-specific -D so it can set + the correct BFD. + * Makefile.in: ditto + * rescoff.c (write_coff_file): Set the correct BFD + +1999-05-06 Ian Lance Taylor + + * rename.c (smart_rename): Fix test of whether file exists. + +1999-05-06 Nick Clifton + + * objdump.c (disassemble_data): Set display_endian based on target + endianism. + +1999-05-05 Catherine Moore + + * dlltool.c (interwork): Remove. + (arm_interwork_jtab): Use bx insn. + (thumb_jtab): Likewise. + (MARM_INTERWORK): New machine type. + (rvaafter): Handle it. + (rvabefore) Likewise. + (asm_prefix): Likewise. + (gen_exp_type): Check machine type instead of + interwork flag. + (make_one_lib_file): Likewise. + (make_head): Likewise. + (make_tail): Likewise. + (usage): Update machine types. + (main): Remove -interwork support. + +1999-05-05 Catherine Moore + + * readelf.c (get_machine_flags): Check for EF_CPU32. + (get_data_encoding): Fix typo. + +1999-04-26 Tom Tromey + + * aclocal.m4, configure: Updated for new version of libtool. + +1999-04-18 Ian Lance Taylor + + * stabs.c (parse_stab_range_type): Correct parenthesization in + BFD64 case. + + * readelf.c (get_section_type_name): Use correct types in printf + formats. + (process_relocs): Likewise. + (process_dynamic_segment): Likewise. + (process_symbol_table): Likewise. + (process_mips_specific): Likewise. + +Tue Apr 13 21:22:00 1999 Catherine Moore + + * dlltool.c (make_one_lib_file): Mark thumb functions as + C_THUMBEXTFUNC. + +1999-04-11 Richard Henderson + + * bucomm.h (environ): Declare it, if needed. + (alloca) [C_ALLOCA]: Don't use gcc's builtin or . + * configure.in (environ): Detect declaration. + * nm.c (main): Don't declare environ. + * configure, config.in: Rebuild. + + * dlltool.c (gen_exp_file): Pad out the .reloc section to a + 32-byte boundary with dummy relocations, to make the BeOS loader + happy. Patch from Bob Manson . + +1999-04-08 Tom Tromey + + * binutils.texi (c++filt): Updated for -j/--java, and hp/edg + formats. + +1999-04-08 Nick Clifton + + * readelf.c: Add ability to decode new constants found in April 25 + 1998 Draft of System V ABI spec. + +1999-04-06 Ian Lance Taylor + + * bucomm.h (LC_MESSAGES): Never define. + * addr2line.c (main): Don't pass LC_MESSAGES to setlocale if the + system does not define it. + * ar.c (main): Likewise. + * coffdump.c (main): Likewise. + * dlltool.c (main): Likewise. + * nlmconv.c (main): Likewise. + * nm.c (main): Likewise. + * objcopy.c (main): Likewise. + * objdump.c (main): Likewise. + * size.c (main): Likewise. + * srconv.c (main): Likewise. + * strings.c (main): Likewise. + * sysdump.c (main): Likewise. + * windres.c (main): Likewise. + * readelf.c (main): Call locale setting functions. + +1999-04-05 Nick Clifton + + * readelf.c (decode_location_expression): Fix DW_OP_const8{s|u} + decodes. + +1999-04-04 Ian Lance Taylor + + * rename.c: New file, copied out of objcopy.c with a few changes. + * bucomm.h (set_times, smart_rename): Declare. + * ar.c: Don't include . + (extract_file): Call set_times rather than utime. + (write_archive): Call smart_rename rather than unlink and rename. + * objcopy.c: Don't include . + (simple_copy, smart_rename, set_times): Move to rename.c. + (strip_main): Update smart_rename call for new parameter. + (copy_main): Likewise. + * Makefile.am: Rebuild dependencies. + (CFILES): Add rename.c. + (objcopy_SOURCES, strip_new_SOURCES): Add rename.c. + (ar_SOURCES, ranlib_SOURCES): Add rename.c. + * Makefile.in: Rebuild. + + * Makefile.am: Rebuild dependencies. + (EXTRA_PROGRAMS): Remove backslash which troubles current version + of automake. + * Makefile.in: Rebuild. + + * dllwrap.c (main): Expect correct type in format string. + * resres.c: Include "bfd.h", "bucomm.h", "libiberty.h", and + . Don't include and . + (write_res_file): Remove unused locals e and i. + (read_resource_entry): Remove unused locals rtype and n. + (read_unistring): Remove unused local n. + +1999-04-03 Ian Lance Taylor + + * arparse.y: Declare yylex. + * objdump.c (disassemble_bytes): Initialize bytes. Add comment + for incorrect use of bytes. + * readelf.c: Change many formats to avoid warnings. + +1999-04-01 Nick Clifton + + * readelf.c (reset_state_machine): New function. Resets the + registers of the source line number state machine. + (process_extended_line_op): Use state machine. + (display_debug_lines): Use state machine. Handle multiple line + number blocks within the same section. + +1999-03-29 Jason Merrill + + * readelf.c (process_extended_line_op): end_sequence also resets + the line number. + (display_debug_lines): advance_line takes a signed operand. + (read_and_display_attr): Print refs as <%x>, addresses as %#x, + others as %d. Handle other location expression attributes. + (display_debug_info): Handle nesting. Always print the offset. + +1999-03-23 Ian Lance Taylor + + * objcopy.c (filter_symbols): When checking whether to keep a + symbol, check the BFD section symbol for a symbol with + BSF_SECTION_SYM set. + +1999-03-10 Ulrich Drepper + + * readelf.c (process_dynamic_segment): Print new Solaris dynamic + section entries. Correct printing of DT_POSFLAG_1 and DT_FLAGS_1. + +1999-03-10 Nick Clifton + + * readelf.c (request_dump): New function. + Removed arbitary limit on the number of sections that can be + dumped. + +Wed Mar 10 15:10:14 1999 Stan Cox + + * dlltool.c (make_one_lib_file): Use %05d to output the stub name so + order in the import library is preserved. + +1999-02-19 Nick Clifton + + * readelf.c: Fix compile time warings. + +1999-02-17 DJ Delorie + + * resbin.c (res_to_bin_versioninfo): Instead of entering a value + length of zero in a version info string, enter the appropriate + length. + +Tue Feb 16 16:00:33 1999 Ian Lance Taylor + + * configure.in: Require autoconf 2.13. Change AM_PROG_INSTALL to + AC_PROG_INSTALL. Add comments for AC_DEFINE calls. + * acconfig.h: Remove. + * aclocal.m4: Rebuild. + * configure: Rebuild. + * Makefile.in: Rebuild. + * config.in: Rebuild. + +1999-02-02 Nick Clifton + + * readelf.c (read_and_display_attr): Add display of basic type + encodings. + (display_debug_aranges): New function: Display the contents of a + .debug_aranges section. + (display_debug_info): Dump tags found after compunit entry. + + * binutils.texi: Fixed bug in readelf documentation. + +Mon Feb 1 12:38:01 1999 Catherine Moore + + * readelf.c (dump_relocations): Handle EM_ARM as REL. + +1999-01-29 Nick Clifton + + * readelf.c (process_symbol_table): Do not produce a histogram of + bucket chains if none were found. + +1999-01-27 Nick Clifton + + * version.c: Add 1999 copyright. + + * binutils.texi (readelf): Document new command line options + --debug-dump and --histogram. + + * readelf.c: Add ability to display contents of some or all of the + Dwarf2 debug sections. {Work only partially completed}. + (display_debug_section): New function. + (display_debug_info): New function. + (display_debug_not_supported): New function. + (display_debug_line): New function. + (display_debug_abbrev): New function. + (process_abbrev_section): New function. + (read_leb128): New function. + (process_extended_line_op): New function. + (get_TAG_name): New function. + (get_AT_name): New function. + (get_FORM_name): New function. + (free_abbrevs): New function. + (add_abbrev): New function. + (add_abbrev_attr): New function. + (read_and_display_attr): New function. + (display_block): New function. + +Thu Jan 14 23:36:11 1999 Jeffrey A Law (law@cygnus.com) + + * coffdump.c (xcalloc): Remove, in libiberty now. + * srconv.c (xcalloc): Likewise. + * sysdump.c (xcalloc): Likewise. + +1999-01-14 Nick Clifton + + * readelf.c (process_section_headers): Omit trailing space at end + of section header contents line. + +Wed Dec 16 17:20:05 1998 Doug Evans + + * aclocal.m4: Regenerate. + +Mon Dec 14 12:55:36 1998 Jim Wilson + + * dllwrap.c: Include bfd.h and bucomm.h. Move getopt.h include + after libiberty.h include. + +Tue Dec 8 16:29:43 1998 Ian Lance Taylor + + * objdump.1: Fix typo (-d to -D). From Nokubi Hirotaka + . + +Sun Dec 6 13:28:09 1998 Ian Lance Taylor + + * objdump.c (SFILE): Add size field. + (objdump_sprintf): Merge both versions into one. Increase buffer + size as needed to avoid overflow. + (disassemble_bytes): Change buf from 1000 bytes to 50. Change + initialization and use of sfile to match changes to + objdump_sprintf. + + * strip.1: Fix typo (-V to -v). From Issei Hirayama + . + +1998-12-03 Ulrich Drepper + + * readelf.c (process_dynamic_segment): Improve output format for + various DT_* values. + +1998-12-02 Ulrich Drepper + + * readelf.c (process_mips_specific): Print .conflict section + content. + + * readelf.c (process_mips_specific): Print l_flags in liblist in + textual form. + +1998-11-30 Nick Clifton + + * ar.c (extract_file): Add some paranoia checks for negatively + sized files. + +Tue Nov 24 09:39:24 1998 Nick Clifton + + * stabs.c (DIR_SEPARATOR): Define as '\\' if WIN32 is defined. + +Tue Nov 17 10:25:26 1998 Nick Clifton + + * Makefile.in: Regenerate. + +Mon Nov 16 19:17:23 1998 Dave Brolley + + * po/binutils.pot: Regenerate. + +Mon Nov 16 10:18:53 1998 Nick Clifton + + * Makefile.am: Regernated dependencies. + * aclocal.m4: Regenerated. + * configure: Regenerated. + +Sat Nov 14 14:50:56 1998 Ian Lance Taylor + + * debug.c (debug_name_type): Correct return type from false to + DEBUG_TYPE_NULL. + +Sat Nov 14 14:48:21 1998 Andreas Schwab + + * objdump.c (disassemble_data): Skip over relocs below start + address. + +Tue Nov 10 15:31:52 1998 Nick Clifton + + * Makefile.am: Add dependency of readelf.c on elf/fr30.h + * Makefile.in: Regenerate. + +Wed Nov 4 16:25:55 1998 Nick Clifton + + * readelf.c: Add support for the FR30. + +Mon Nov 2 14:59:33 1998 Geoffrey Noer + + * configure.in: detect cygwin* instead of cygwin32* + * configure: regenerate + +Fri Oct 30 15:14:49 1998 Geoffrey Noer + + * dllwrap.c: change all references to cygwin32_ to cygwin_, + change Cygwin target def to CYGWIN. + +Wed Oct 28 10:31:19 1998 Nick Clifton + + * objdump.c (disassemble_data): Replace 'unsigned long' with + 'bfd_vma'. + +Tue Oct 27 14:39:00 1998 Nick Clifton + + * objdump.c (disassemble_bytes): Applied this patch from Philip + Blundell : Make address variables unsigned to + avoid problems when disassembling code at high-bit-set addresses. + +Mon Oct 26 14:07:59 1998 Mumit Khan + + * dllwrap.c (strhash): New function. + (main): Use it to supply image base if not supplied by user. + (program_version): Up to 0.2.4. + +Mon Oct 26 14:07:59 1998 Mumit Khan + + * dlltool.c (add_stdcall_alias): New global. + (long_options): Add --add-stdcall-alias option. + (main): Handle it. + (scan_drectve_symbols): Add alias if --add-stdcall-alias is + specified. + (scan_filtered_symbols): Likewise. + (gen_def_file): Output alias for stdcall syms if appropriate. + + * binutils.texi (dlltool): Document --add-stdcall-alias option. + + * dllwrap.c (long_options): Add --add-stdcall-alias option. + (main): Handle it. + + * defparse.y (opt_name): Allow "." in name. + * dlltool.c (def_name): Set dll_name from NAME entry in def file. + (def_library): Set dll_name from LIBRARY entry in def file. + +Mon Oct 26 14:07:59 1998 Mumit Khan + + * dllwrap.c (long_options): --implib synonym for --output-lib. + (main): Pass --export-all to dlltool only if specified. + (program_version): Up to 0.2.3. + +Mon Oct 26 14:07:59 1998 Mumit Khan + + * dllwrap.c (mybasename): New function. + (main): Run dlltool to create export definition file and import + library file if necessary. + Change exp_file_name so that it's based on the dll name. + +Sun Oct 25 10:37:45 1998 Mumit Khan + + * dlltool.c (scan_all_symbols): Fix patch error. + +Fri Oct 16 22:56:20 1998 Felix Lee + + * nm.c (display_rel_file): fix "no symbols" messages. + * objdump.c (slurp_symtab): ditto. + * po/POTFILES.in, po/binutils.pot: rebuilt + +Mon Oct 12 14:28:03 1998 Nick Clifton + + * readelf.c (dump_relocations): Rename field from Value to Info to + match name of field in ELF structures. + +Thu Oct 8 15:33:08 1998 Geoffrey Noer + + * configure.in: call AC_EXEEXT instead of AM_EXEEXT and + AM_CYGWIN32. + * aclocal.m4: remove local AM_EXEEXT/AM_CYGWIN32 macros. + * configure: regenerate + +Thu Oct 8 15:33:08 1998 Geoffrey Noer + + From Mumit Khan : + * dlltool.c (scan_all_symbols): Don't re-export symbols exported + by other DLLs. + +Thu Oct 8 15:33:08 1998 Geoffrey Noer + + * Makefile.am (BUILD_DLLWRAP): Add. + (BUILD_DLLWRAP, DLLWRAP_PROG): Add. + (bin_PROGRAMS): Add dllwrap. + * Makefile.in: regenerate with automake + + From Mumit Khan : + * dllwrap.c: New file from dllhelpers v0.2.1. + (print_version): New function. + (long_options): Add --version. + (main): Handle. + * dyn-string.h, dyn-string.c: New files from egcs-1.1/gcc. + * configure.in (BUILD_DLLWRAP): Add. + * configure: Regenerate. + +Tue Oct 6 18:20:10 1998 Geoffrey Noer + + * Makefile.am (windres_SOURCES): Add resres.c. + (windres_OBJECTS): Add resres.o. + * Makefile.in: regenerate with automake + + From Anders Norlander . + * resres.c: New file. Implementation of read_res_file and + write_res_file functions for windres. + * rcparse.y: Handle CONTROL's with named classes. + * resbin.c: Bug in res_to_bin_dialog and bin_to_res_dialog + when dialog is extended: The version and signature fields should + be reversed (despite what the docs say). Id is 32 bits long in + extended dialogs. + * resrc.c (write_rc_dialog): properly print controls with named + classes. + * windres.c (read_res_file, write_res_file): Remove stubs. + * resres.c (write_res): Rename RT_ACCELERATORS to RT_ACCELERATOR. + +Sun Oct 4 20:34:42 1998 Ian Lance Taylor + + From Nokubi Hirotaka : + * objcopy.1: Fix typo in --remove-leading-char docs. + * objdump.1: Fix formatting in --stabs docs. + +Sat Sep 19 23:33:56 1998 Ian Lance Taylor + + * rcparse.y (memflags_move): Correct recursion. + +1998-09-10 Ulrich Drepper + + * readelf.c (process_symbol_table): Print in histogram how many + symbols are covered by the current chain length. + +Sun Sep 6 16:15:47 1998 Nick Clifton + + * readelf.c (process_section_contents): Do not try to dump empty + sections. + +Sat Sep 5 19:17:10 1998 Mumit Khan + + * dlltool.c (scan_all_symbols): Don't re-export symbols exported + by other DLLs. + +1998-09-02 14:50 Ulrich Drepper + + * readelf.c (process_dynamic_segment): Print DT_* value only if + do_dynamic. + (do_histogram): New variable. + (options): New long option histogram. Set do_histogram if this + option is used. + (usage): Document --histogram. + (parse_args): Handle 0 return value from getopt_long. Enable + do_histogram for -a. + (process_symbol_table): Read hash table also if only do_histogram. + Add code to print hash table histogram. + +1998-08-25 16:45 Ulrich Drepper + + * readelf.c (process_dynamic_segment): Read syminfo section if + available. + (process_syminfo): New function. Print syminfo information. + (process_file): Call process_syminfo and free syminfo data at the end. + +Wed Aug 19 16:19:51 1998 Ian Lance Taylor + + * dlltool.c (usage): Add file parameter. Change all callers. + (main): Don't treat '?' as a special case in getopt return. + + * binutils.texi (dlltool): Document new options. Add some uses of + @var. + +Wed Aug 19 16:19:07 1998 Mumit Khan + + * dlltool.c (gen_def_file): Plug memory leak. Don't print + demangled name if it is NULL. + + Support for exporting all symbols to an output export def file: + * dlltool.c ({export_all_symbols, no_default_excludes, + no_default_excludes, excludes}): New file static variables. + (struct string_list): Type to hold list of symbols to exclude. + (scan_drectve_symbols): Renamed from scan_open_obj_file. + (scan_filtered_symbols): New static function. + (add_excludes): New static function. + (match_exclude): New static function. + (set_default_excludes): New static function. + (filter_symbols): New static function. + (scan_all_symbols): New static function. + (scan_open_obj_file): New static function. + (usage): Document new options. + (long_options): Add new options. + (main): Handle new options. + +1998-07-31 21:24 Ulrich Drepper + + * readelf.c (process_program_headers): Print p_offset value with + six hex digits. + (dynamic_segment_mips_val): Add support for DT_MIPS_FLAGS, + DT_MIPS_IVERSION, and DT_MIPS_TIME_STAMP. + (process_mips_specific): Also print seconds of time stamp. + +Fri Jul 31 10:04:23 1998 Catherine Moore + + * readelf.c (dump_relocations): EM_ARM uses rela relocs. + +1998-07-30 16:25 Ulrich Drepper + + * readelf.c (get_dynamic_type): Don't used gettext on the names. + Add new DT_* values from Solaris. Don't print nuemric value in + case of an unknown entry. + (process_dynamic_segment): Handle new DT_* entries. Print numeric + values in decimal, not hex. + +Fri Jul 24 16:28:57 1998 Jeff Holcomb + + * readelf.c (get_dynamic_type): Remove empty default from switch + statement. + +Fri Jul 24 16:28:12 1998 Ian Lance Taylor + + * Makefile.am (install-exec-local): Don't remove the file before + checking whether $(bindir) == $(tooldir)/bin. From Maciej + W. Rozycki . + * Makefile.in: Rebuild. + +Fri Jul 24 09:38:59 1998 Nick Clifton + + * objcopy.c: Removed spurious inclusion of elf/internal.h and + elf-bfd.h. + +1998-07-22 Ulrich Drepper + + * readelf.c: Consistantly use elf_ prefix for *_reloc_type + functions. + +Wed Jul 22 16:29:12 1998 Nick Clifton + + * readelf.c (dump_relocations): Add dumps of HPPA and ARC + relocations. + + (process_relocs): Do not abort if no string table can be found. + +1998-07-22 14:58 Ulrich Drepper + + * readelf.c: Remove definition of functions to return relocation + symbol strings. They now get implicitly defined when include the + system specific ELF header. + +1998-07-22 13:51 Ulrich Drepper + + * readelf.c: Before include system specific ELF header define + START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS. For now + used for ppc, mips, and mn10300. + +Wed Jul 22 10:26:32 1998 Nick Clifton + + * readelf.c (dump_relocations): Display number of unrecognised + relocations. + +1998-07-21 13:13 Ulrich Drepper + + * readelf.c: Use symbolic names of relocation entries for the various + architectures. Correct more layout details. + Print names of MIPS specific section types. Print Alpha, ARM, and + MIPS relocation type names. + +1998-07-20 Vladimir N. Makarov + + * objcopy.c (filter_symbols): Add code for strip all symbols case. + (copy_objects): Strip all case is now processed also through + filter_symbols. No marking symbols used in relocations when strip + all symbols case. + (copy_section): When strip all symbols case, remove relocations + which are not in keep strip specific list. + (strip_main): Remove guard `strip_specific_list == NULL' for + setting up strip all symbols by default. + +Mon Jul 20 12:51:16 1998 Andreas Schwab + + * addr2line.c (find_address_in_section): Only consider a section + if the pc value is completely contained within it. + (translate_addresses): Don't crash if functionname or filename are + null. + +1998-07-20 07:45 Ulrich Drepper + + * readelf.c (process_symbol_table): Fix little alignment problem + in printed table header. + +1998-07-20 07:14 Ulrich Drepper + + * readelf.c: Correct reading of .dynamic section. + (dynamic_section): Now a global variable. + (process_mips_fpe_exception, process_mips_specific, + process_arch_specific): New functions. + (get_file_header): Call process_arch_specific. + +1998-07-19 15:15 Ulrich Drepper + + * readelf.c: Fix several versioning related bugs. Produce nicer + output. + Add support for processor specific information on MIPS. + +Fri Jul 10 15:57:58 1998 Nick Clifton + + * readelf.c: Switch prototypes from unsigned short to unsigned + int. + +Fri Jul 10 16:17:50 1998 Ian Lance Taylor + + From Christian Holland : + * ieee.c (parse_ieee): Initialize info.global_vars and + info.global_types. + (parse_ieee_atn): Ignore register lifetime information reportedly + emitted by MRI compiler. + +Thu Jul 9 13:08:01 1998 Ian Lance Taylor + + * Makefile.am (MAINTAINERCLEANFILES): Define. + * Makefile.in: Rebuild. + +Tue Jul 7 21:48:54 1998 Jeffrey A Law (law@cygnus.com) + + * readelf.c (byte_get): Use PARAMS in prototype. + (error): Make it work with non-ANSI compilers. + (warn): Likewise. + (get_ver_flags): Don't use an ANSI prototype in the definition. + +Tue Jul 7 13:26:13 1998 Ian Lance Taylor + + * objcopy.c (filter_bytes): Set size correctly if the size of the + section is not an even multiple of the interleave. Based on patch + from Brion Stone . + +Thu Jul 2 14:01:34 1998 Klaus Kaempf + + * configure.com: Add vax/vms support. + * makefile.vms-in: Renamed from makefile.vms. Add substitutions + now done by configure.com. + +Wed Jul 1 20:43:52 1998 Ian Lance Taylor + + * stabs.c (parse_stab_range_type): Handle 4 and 8 byte signed + integers with real upper bounds. Handle a lower bound one larger + than the upper bound as a signed integer. Handle 8 byte signed + integers. + (stab_demangle_template): Optionally return the demangled name of + the template. + (stab_demangle_qualified): Treat a template name as a tagged + type. + (stab_demangle_fund_type): Likewise. + +Wed Jul 1 16:29:50 1998 Nick Clifton + + * objcopy.c: Minor formatting improvements. + * readelf.c: Minor output formatting improvement. + +Wed Jul 1 14:23:48 1998 Ian Lance Taylor + + * rclex.l: Add casts and change types to avoid warnings. + * rcparse.y: Likewise. + * resbin.c: Likewise. + * rescoff.c: Likewise. + * resrc.c: Likewise. + + * Makefile.am: Rebuild dependencies. + (HFILES): Remove readelf.h. + * Makefile.in: Rebuild. + + Based on patches from Andrew Kozin + : + * winduni.h: New file, from windres.h. + * winduni.c: New file, from windres.c. + * windres.c: Move Unicode functions into winduni.c. + * windres.h: Move Unicode declarations into winduni.h. Include + winduni.h. + (RT_ACCELERATOR): Rename from RT_ACCELERATORS to match Windows + macro. Change all uses. + (RT_PLUGPLAY, RT_VXD): Correct values. + * Makefile.am (HFILES): Add windres.h. + (CFILES): Add winduni.c. + (windres_SOURCES): Add winduni.c. + +Mon Jun 29 17:01:21 1998 Nick Clifton + + * readelf.c: Use BFD Internal and External Elf structures. + * readelf.h: Removed - no longer needed. + * Makefile.in: Remove readelf.c's dependency upon readelf.h. + +1998-06-26 Vladimir N. Makarov + + * objcopy.c (strip_main): keep_specific_list == NULL as additional + condition to set up strip all symbols by default. + (copy_archive): don't change archive when error in object files of + the archive. + +Wed Jun 24 17:53:47 1998 Ian Lance Taylor + + * stabs.c (parse_number): Sign extend negative values correctly if + bfd_vma is larger than unsigned long. + +Tue Jun 23 14:55:05 1998 Mike Stump + + * Makefile.am (install-exec-local): Don't let EXEEXT interfere + with the program transform name. + * Makefile.in: Rebuild. + +Tue Jun 23 11:08:53 1998 Nick Clifton + + * readelf.c: Rewrite to use fopen/fread ratehr than mmap. + + Add --section-headers command line switch, which is an alias for + --sections. + + Incorporate improvemnts made by Andreas Schwab + including output + formatting and version info display. + + * binutils.texi: Document --section-headers switch to readelf. + +Mon Jun 22 18:28:19 1998 Ian Lance Taylor + + * readelf.c: Include bfd.h and bucomm.h before system header + files. + (parse_args): Change type of c from char to int. + +Sun Jun 14 14:26:28 1998 Nick Clifton + + * readelf.c (usage): Write to stdout, not stderr. + +Fri Jun 12 13:33:51 1998 Tom Tromey + + * po/Make-in (all-yes): Depend on .pot file if maintainer mode + enabled. + ($(PACKAGE).pot): Unconditionally depend on POTFILES. + +Fri Jun 12 16:06:15 1998 Michael Meissner + + * readelf.c (get_ppc_rel_type): New PowerPC support. + (dump_relocations): PowerPC uses RELA relocations. + (get_machine_name): Spell PowerPC correctly. + (get_file_type): Change unsigned short parameter to unsigned. + (get_machine_name): Ditto. + (get_machine_data): Return whether big endian or little endian. + (get_machine_flags): Interpret PowerPC, M32R, and MIPS flags. + (process_elf_header): Print endian-ess. Convert all numeric + formats to long or unsigned long. Print out machine specific flag + bits. + (process_section_headers): Increase name by 3 columns and decrease + type by the same so that .gcc_except_table fits in the space. + + * readelf.h: Include elf/ppc.h, elf/mips.h, and elf/m32r.h to get + machine specific flag bits. + +Thu Jun 11 17:54:26 1998 Nick Clifton + + * readelf.c: Remove extraneous #includes. Fix warnings produced + by -Wall when compiling under Linux. + + * Makefile.am (readelf_LDADD): Add $(LIBIBERTY). + +Thu Jun 11 18:30:20 1998 Ian Lance Taylor + + * stabs.c (struct stab_handle): Add self_crossref field. + (parse_stab_string): If a tag is a cross reference to itself, + don't define it in the tags list. + (parse_stab_type): Set info->self_crossref. + + * debug.c (struct debug_type_real_list): Define. + (debug_get_real_type): Add list parameter. Change all callers. + Check for circularity to avoid crashing when it occurs. + +Thu Jun 11 14:48:32 1998 Nick Clifton + + * readelf.c: New file: Display contents of ELF format file. + * readelf.h: New file: Header file for readelf.c + * Makefile.am: Add rules to build readelf. + * Makefile.in: Rebuilt. + * binutils.texi: Document readelf. + * NEWS: Mention inclusion of readelf into binutils. + * po/POTFILES.in; Rebuilt. + +Fri Jun 5 18:43:40 1998 Ian Lance Taylor + + * objcopy.c (setup_section): Adjust the section size if copy_byte + is >= 0. + (copy_section): Do not call bfd_set_section_size. + +Thu Jun 4 09:12:27 1998 Nick Clifton + + * objcopy.c (copy_usage): Add missing \n\ from help description. + +Wed Jun 3 19:31:33 1998 Ian Lance Taylor + + * Makefile.am (YACC): Correct bison -L option. + * Makefile.in: Rebuild. + + * binutils.texi, objdump.1: Document -p/--private-headers. + +Wed Jun 3 12:09:40 1998 Nick Clifton + + * objcopy.c: Add new command line options: --change-section-lma + and --change-section-vma. Rename old command line option + --adjust-section-vma to --change-section-address. Rename + --adjust-vma to --change-addresses and --adjust-start to + --change-start. Provide aliases to support the old versions of + these command line options. + + Change the names of macros and enum elements to upper case to + match the GNU coding standard. + + Replace calls to fprintf (stderr,...) with calls to fatal () or + non_fatal () as appropriate. + + * objcopy.1: Document command line option changes. + * binutils.texi: Document command line option changes. + + * bucomm.h: New exported funtion from bucomm.c: non_fatal(). + * bucomm.c (non_fatal): New exported function. Just like fatal() + except that it returns rather than calling xexit(). + + (bfd_check_format_matches): Call fatal() rather than bfd_fatal(). + + (check_matching_formats): Fix C formating. + + (parse_vma): Call fatal(). + +Mon Jun 1 18:26:40 1998 Ian Lance Taylor + + From Yuli Barcohen : + * debug.c (debug_type_samep): Avoid endless loops comparing + function and method parameter types. + +Fri May 22 14:02:42 1998 Ian Lance Taylor + + * dlltool.c (dump_iat): Comment out; not used. + (display): Rename from tell. Change all callers. + +Thu May 14 14:00:56 1998 Nick Clifton + + * dlltool.c: Add support for Thumb DLLs. Add support for + interworking between ARM and Thumb programs and DLLs. Tidy the + code. + + * binutils.texi: Document dlltool. + + * configure: Build dlltool for thumb-pe targets. + + * version.c (print_version): Include 1998 in copyright strings. + + * stabs.c (parse_stab): Support Win32 style directory separators. + +Sun May 10 22:34:44 1998 Jeffrey A Law (law@cygnus.com) + + * po/Make-in (install-info): New target. + +Fri May 8 10:33:13 1998 Nick Clifton + + * ar.c (usage): Extend information provided about command line + options. + +Wed May 6 15:28:51 1998 Klaus Kaempf + + * makefile.vms: Run dec c with /nodebug. Pass CC value when + calling make. + +Tue May 5 15:19:00 1998 Nick Clifton + + * configure: Build dlltool for thumb-pe target. + * configure.in: Build dlltool for thumb-pe target. + +Sun May 3 22:04:49 1998 Ian Lance Taylor + + * Makefile.am (EXTRA_PROGRAMS): Change $(SRCONV_PROG) to sysconf + sysdump coffdump to avoid extra $(EXEEXT). + * Makefile.in: Rebuild. + +Wed Apr 29 22:22:55 1998 Geoffrey Noer + + * configure.in: Stop appending EXEEXT to the end of + SRCONV_PROG (wrong because that variable may contain multiple + programs) + * Makefile.am: instead, add EXEEXTs to each SRCONV_PROG + program + * Makefile.in: regenerate + * configure: regenerate + +Tue Apr 28 19:14:34 1998 Tom Tromey + + * addr2line.c (main): Conditionally call setlocale. + * windres.c (main): Likewise. + * sysdump.c (main): Likewise. + * strings.c (main): Likewise. + * srconv.c (main): Likewise. + * size.c (main): Likewise. + * objdump.c (main): Likewise. + * objcopy.c (main): Likewise. + * nm.c (main): Likewise. + * nlmconv.c (main): Likewise. + * dlltool.c (main): Likewise. + * coffdump.c (main): Likewise. + * ar.c (main): Likewise. + * bucomm.h: Include if HAVE_LOCALE_H. + (LC_MESSAGES): Now can be defined even when ENABLE_NLS. + +Tue Apr 28 10:33:07 1998 Bill Moyer + + Add support for IMPORTS: + * defparse.y (impline): Add IMPORTS syntaxes. + * dlltool.c (ifunctype, iheadtype): New typedefs. + (import_list): New static variable. + (append_import): New static function. + (def_import): Add an entry to import_list. + (generate_idata_ofile): New static function. + (gen_exp_file): Call generate_idata_ofile. + * dlltool.h (def_import): Update declaration. + +Mon Apr 27 16:39:22 1998 Ian Lance Taylor + + * configure.in: Change version number to 2.9.4 + * configure: Rebuild. + +Wed Apr 22 16:00:35 1998 Tom Tromey + + * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). + +Wed Apr 22 00:33:56 1998 Tom Tromey + + * Makefile.am (INCLUDES): Search intl dirs for headers; define + LOCALEDIR. + * addr2line.c (main): Call setlocale, bindtextdomain, textdomain. + * ar.c (main): Likewise. + * coffdump.c (main): Likewise. + * dlltool.c (main): Likewise. + * nlmconv.c (main): Likewise. + * nm.c (main): Likewise. + * objcopy.c (main): Likewise. + * objdump.c (main): Likewise. + * size.c (main): Likewise. + * srconv.c (main): Likewise. + * strings.c (main): Likewise. + * sysdump.c (main): Likewise. + * windres.c (main): Likewise. + +Tue Apr 21 22:13:08 1998 Tom Tromey + + * Many files: Added gettext invocations around user-visible + strings. + * bucomm.h: Added gettext-related includes and defines. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, + HAVE_LC_MESSAGES): Define. + * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and + po/Makefile. Use AM_PROG_LEX. + * Makefile.am (SUBDIRS): New macro. + (POTFILES): Likewise. + (po/POTFILES.in): New target. + (LDADD): Added INTLLIBS. + (objdump_LDADD): Likewise. + (c__filt_LDADD): Likewise. + (ar_LDADD): Likewise. + (ranlib_LDADD): Likewise. + (dlltool_LDADD): Likewise. + (windres_LDADD): Likewise. + * po/Make-in, po/POTFILES.in, po/binutils.pot: New files. + +Tue Apr 21 16:07:18 1998 Stanislav Brabec + + * objcopy.c (preserve_dates): New file static variable. + (smart_rename): If preserve_dates, call set_times when copying. + (strip_main): Remove preserve_dates local variable. + (copy_main): Likewise. + +Tue Apr 7 15:41:15 1998 Ian Lance Taylor + + * Makefile.am (DISTSTUFF): Add defparse.h, defparse.c, rclex.c, + rcparse.h, and rcparse.c + * Makefile.in: Rebuild. + +Mon Apr 6 16:24:35 1998 Ian Lance Taylor + + * Makefile.am (PROGS): Move $(ADDR2LINE_PROG) to end, so that + Makefile.in doesn't have an empty continuation line. + (bin_PROGRAMS): Likewise. + * Makefile.in: Rebuild. + +Fri Apr 3 14:48:42 1998 Ian Lance Taylor + + * Makefile.am (DISTCLEANFILES): Add site.exp and site.bak. + (MOSTLYCLEANFILES): Add binutils.log, binutils.sum, and abcdefgh*. + (mostlyclean-local): New target. + * Makefile.in: Rebuild. + +Wed Apr 1 15:54:16 1998 Ian Lance Taylor + + From Zack Weinberg and H.J. Lu + : + * ar.c (usage): Mention S modifier. + (main): Add S modifier. + * ar.1, binutils.texi: Document S modifier. + +Wed Apr 1 13:11:23 1998 Andreas Schwab + + * binutils.texi: Use @itemx for a secondary item in a table. + +Tue Mar 31 18:44:13 1998 Ian Lance Taylor + + * dep-in.sed: Add rule to remove @OBJDIR@. + * Makefile.am (dep.sed): Substitute for @OBJDIR@. + * Makefile.in: Rebuild. + +Mon Mar 30 12:47:18 1998 Ian Lance Taylor + + * configure.in: Set version to 2.9.1. + * configure: Rebuild. + + * Branched binutils 2.9. + + * Makefile.am (DISTCLEANFILES): Remove defparse.h, arparse.h, + rcparse.h, and nlmheader.h. + * Makefile.in: Rebuild. + +Sat Mar 28 17:39:27 1998 Ian Lance Taylor + + * Makefile.am (MOSTLYCLEANFILES): Define. + * Makefile.in: Rebuild. + + Fix some gcc -Wall warnings: + * nlmconv.c (main): Add casts to avoid warnings. + (alpha_mangle_relocs): Likewise. + * objdump.c (dump_section_stabs): Likewise. + * size.c (print_sysv_format): Likewise. + * srcconv.c (wr_ob): Likewise. + * wrstabs.c (stab_modify_type): Likewise. + (stab_variable): Likewise. + * nlmconv.c (main): Initialize variables to avoid warnings. + * nm.c (sort_symbols_by_size): Likewise. + * objdump.c (disassemble_bytes): Likewise. + * wrstabs.c (stab_end_class_type): Likewise. + * coffgrok.c (do_sections_p2): Change j to unsigned int. + (do_lines): Change l to unsigned int. + * nlmheader.y (yylex): Change i to unsigned int. + * nm.c (print_symbol): Change j to long. + * size.c (lprint_number): Comment out. + * srconv.c (wr_ob): Change i to bfd_size_type. + * sysdump.c (unit_info_list): Comment out. + (object_body_list, program_structure, debug_list): Likewise. + * sysinfo.y (yyerror): Return value. + +Thu Mar 26 17:06:51 1998 Richard Henderson + + * defparse.y (explist): Allow epsilon. + Suggestion from Jonathan-Harris@psion.com. + +Thu Mar 26 16:59:09 1998 Richard Henderson + + * coffgrok.c (do_sections_p1): Use the section's lma instead of vma + for the benefit of prom loaders. + +Wed Mar 25 13:05:39 1998 Ian Lance Taylor + + Based on patch from H.J. Lu : + * Makefile.am (DISTSTUFF): New variable. + (diststuff): New target. + (DISTCLEANFILES): New variable. + * Makefile.in: Rebuild. + +Tue Mar 24 19:33:08 1998 Ian Lance Taylor + + * rclex.l: Accept { and } as synonyms for BEGIN and END. + +Fri Mar 20 19:18:08 1998 Ian Lance Taylor + + * aclocal.m4, configure: Rebuild with libtool 1.2. + +Tue Feb 24 13:07:50 1998 Doug Evans + + * objdump.c (disassemble_data): Delete "++place" after call to + find_symbol_for_address. Set disasm_info.symbols to array of + symbols at the current address. + +Wed Feb 18 23:39:46 1998 Richard Henderson + + * Makefile.am (install-exec-local): Install properly when ln + fails or tooldir == prefix. + +Tue Feb 17 18:40:55 1998 Richard Henderson + + * objcopy.c (compare_section_lma): Rename from _vma. + (copy_object): Gap fill based on LMA not VMA. + * binutils.texi: Update and clarify. + * objcopy.1: Likewise. + +Tue Feb 17 20:34:11 1998 Ian Lance Taylor + + * dlltool.c (gen_exp_file): Generate _imp__%s as well as __imp_%s, + for Microsoft compatibility. + (make_one_lib_file): Likewise. + + * dlltool.c (make_one_lib_file): Don't add 1 to hint. + +Fri Feb 13 16:37:44 1998 Ian Lance Taylor + + * Makefile.am (AUTOMAKE_OPTIONS): Define. + * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. + +Thu Feb 12 14:13:46 1998 Ian Lance Taylor + + * deflex.l: Accept '?' in symbol names, for VC++ mangled names. + From Mikey . + + * addr2line.c (usage): Update bug-gnu-utils address. + * ar.c (usage): Likewise. + * nlmconv.c (show_usage): Likewise. + * nm.c (usage): Likewise. + * objcopy.c (copy_usage): Likewise. + (strip_usage): Likewise. + * objdump.c (usage): Likewise. + * size.c (usage): Likewise. + * strings.c (usage): Likewise. + * windres.c (usage): Likewise. + * binutils.texi (Bug Reporting): Likewise. + +Sat Feb 7 15:36:24 1998 Ian Lance Taylor + + * configure, aclocal.m4: Rebuild with new libtool. + +Thu Feb 5 12:21:13 1998 Ian Lance Taylor + + * configure, Makefile.in, aclocal.m4: Rebuild with new libtool. + +Fri Jan 30 19:16:28 1998 Doug Evans + + * Makefile.am (CC_FOR_TARGET,nlmcomv.o): Change program_transform_name + to transform. + * Makefile.in: Regenerate. + +Thu Jan 29 16:24:04 1998 Mumit Khan + + * dlltool.c: Define exit status macros for _WIN32 but not + __CYGWIN32__. + (gen_lib_file): Check for exit status of unlink. + * resrc.c: Define popen and pclose if _WIN32 but not + __CYGWIN32__. + +Wed Jan 28 17:45:46 1998 Ian Lance Taylor + + * configure.in: Remove vfork check. + * nlmconv.c: Never include vfork.h. + * aclocal.m4, configure, Makefile.in, config.in: Rebuild. + +Wed Jan 28 17:43:02 1998 J.J. van der Heijden + + * objcopy.c (copy_archive): Only pass one argument to mkdir if + _WIN32 but not __CYGWIN32__. + (smart_rename): Add code for _WIN32 (not __CYGWIN32__), to cope + with different rename behaviour and lack of chown. + + * configure.in: Check for mingw32 when deciding whether to build + dlltool. + * dlltool.c: Never include vfork.h. + (run): Use pexecute rather than vfork. + (gen_lib_file): Check for errors from bfd_set_archive_head and + bfd_close. Close all the BFDs in the archive before deleting the + temporary files. + +Thu Jan 22 16:22:55 1998 Fred Fish + + * objdump.c (disassemble_bytes): Add flag INSN_HAS_RELOC to tell + disassembly function there is a reloc on this line. + +Wed Jan 14 15:29:43 1998 Richard Henderson + + * srconv.c (sh, h8300): Delete variables. + (addrsize, toolname, rnames): New variables. + (writeINT): Use addrsize. + (wr_un): Use toolname. + (wr_hd): Set up addrsize et al properly for h8300[hs]. + (walk_tree_symbol): Zero dsy. Use rnames. + (wr_un, wr_hd, wr_ob, wr_du): Use proper bfd access macros. + * sysdump.c (sh, h8300): Delete variables. + (addrsize): New variable. + (getINT): Use it. + (getone): Initialize it. + (getBITS): Range check on MAX. + +For older changes see ChangeLog-9197 + +Local Variables: +mode: change-log +left-margin: 8 +fill-column: 74 +version-control: never +End: diff --git a/contrib/binutils/binutils/MAINTAINERS b/contrib/binutils/binutils/MAINTAINERS new file mode 100644 index 0000000..427dd3a --- /dev/null +++ b/contrib/binutils/binutils/MAINTAINERS @@ -0,0 +1,78 @@ + ========= Binutils Maintainers ========= + +This is the list of individuals responsible for maintenance and update +of the "binutils" module, which includes the bfd, binutils, include, +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. + + --------- Blanket Write Privs --------- + +Nick Clifton (head maintainer) +Richard Henderson +Ian Taylor +Jeff Law +Jim Wilson +DJ Delorie +Alan Modra +Michael Meissner + + --------- Maintainers --------- + +Maintainers are individuals who are responsible for, and have permission +to check in changes in, certain subsets of the code. Note that +maintainers still need approval to check in changes outside of the +immediate domain that they maintain. + +If there is no maintainer for a given domain then the responsibility +falls to the head maintainer (above). If there are several maintainers +for a given domain then responsibility falls to the first maintainer. +The first maintainer is free to devolve that responsibility among the +other maintainers. + +ARM Nick Clifton +AVR Denis Chertykov +CRIS Hans-Peter Nilsson +HPPA elf32 Alan Modra +IA64 Jim Wilson +i860 Jason Eckhardt +ix86 Alan Modra +ix86 COFF,PE DJ Delorie +ix86 H.J.Lu +ix86 INTEL MODE Diego Novillo +MN10300 Eric Christopher +MIPS Ulf Carlsson +PPC Geoff Keating +SH Jörn Rennecke +SH Hans-Peter Nilsson +SPARC Jakub Jelinek +68HC11 68HC12 Stephane Carrez +DWARF2 Jason Merrill +x86_64 Jan Hubicka +x86_64 Andreas Jaeger + + --------- CGEN Maintainers ------------- + +CGEN is a tool for building, amongst other things, assemblers, +disassemblers and simulators from a single description of a CPU. It +creates files in several of the binutils directories, but it is +mentioned here since there is a single group that maintains CGEN and +the files that it creates. + +If you have CGEN related problems you can send email to; + + cgen@sources.redhat.com + +The current CGEN maintainers are: + + Doug Evans, Ben Elliston, Frank Eigler + + --------- Write After Approval --------- + +Individuals with "write after approval" have the ability to check in +changes, but they must get approval for each change from someone in +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.] diff --git a/contrib/binutils/binutils/Makefile.am b/contrib/binutils/binutils/Makefile.am index a6eb22a..1ddf2f7 100644 --- a/contrib/binutils/binutils/Makefile.am +++ b/contrib/binutils/binutils/Makefile.am @@ -19,6 +19,9 @@ YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bis YFLAGS = -d LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + # these two are almost the same program AR_PROG=ar RANLIB_PROG=ranlib @@ -168,6 +171,9 @@ nm_new_SOURCES = nm.c $(BULIBS) objdump_SOURCES = objdump.c prdbg.c $(DEBUG_SRCS) $(BULIBS) objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS) +objdump.o:objdump.c + $(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c + underscore.c: stamp-under ; @true stamp-under: Makefile @@ -284,8 +290,13 @@ DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \ DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h rm -f DEP1 $(MAKE) MKDEP="$(MKDEP)" DEP1 - sed -f dep.sed < DEP1 > $@ - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@ + sed -f dep.sed < DEP1 > DEPA + echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) $(GENERATED_CFILES) echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 @@ -339,7 +350,7 @@ MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum \ mostlyclean-local: -rm -rf tmpdir -CLEANFILES = dep.sed DEP DEP1 DEP2 +CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 .PHONY: install-exec-local @@ -374,13 +385,13 @@ addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h \ - arsup.h + arsup.h $(INCDIR)/filenames.h arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h + $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h + $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/bin-bugs.h \ @@ -391,13 +402,13 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h debug.h dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h $(INCDIR)/dyn-string.h \ - dlltool.h + $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/demangle.h \ + $(INCDIR)/dyn-string.h dlltool.h filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/ieee.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - $(INCDIR)/libiberty.h debug.h budbg.h + $(INCDIR)/libiberty.h debug.h budbg.h $(INCDIR)/filenames.h is-ranlib.o: is-ranlib.c is-strip.o: is-strip.c maybe-ranlib.o: maybe-ranlib.c @@ -408,13 +419,14 @@ nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmconv.h nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/progress.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ranlib.h \ - $(INCDIR)/demangle.h $(INCDIR)/libiberty.h + $(INCDIR)/getopt.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h not-ranlib.o: not-ranlib.c not-strip.o: not-strip.c objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h budbg.h + $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \ + budbg.h $(INCDIR)/filenames.h objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/getopt.h $(INCDIR)/progress.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h \ @@ -479,14 +491,15 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/elf/d30v.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/mn10200.h \ $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/arc.h \ $(INCDIR)/elf/fr30.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/i960.h \ - $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h bucomm.h config.h \ - $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h + $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \ + $(INCDIR)/elf/cris.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h windres.h winduni.h dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h + $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/dyn-string.h rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h underscore.o: underscore.c diff --git a/contrib/binutils/binutils/Makefile.in b/contrib/binutils/binutils/Makefile.in index f4178de..1b2a296 100644 --- a/contrib/binutils/binutils/Makefile.in +++ b/contrib/binutils/binutils/Makefile.in @@ -74,11 +74,15 @@ BUILD_WINDRES = @BUILD_WINDRES@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DEMANGLER_NAME = @DEMANGLER_NAME@ DLLTOOL = @DLLTOOL@ DLLTOOL_DEFS = @DLLTOOL_DEFS@ EXEEXT = @EXEEXT@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GT_NO = @GT_NO@ @@ -96,10 +100,13 @@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ NLMCONV_DEFS = @NLMCONV_DEFS@ OBJDUMP = @OBJDUMP@ +OBJDUMP_DEFS = @OBJDUMP_DEFS@ +OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ +STRIP = @STRIP@ UNDERSCORE = @UNDERSCORE@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ @@ -121,6 +128,9 @@ YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bis YFLAGS = -d LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi` +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + # these two are almost the same program AR_PROG = ar RANLIB_PROG = ranlib @@ -151,7 +161,8 @@ DLLWRAP_PROG = dllwrap SRCONV_PROG = srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT) -man_MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1 +man_MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 \ + addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1 PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@ @@ -173,15 +184,24 @@ MKDEP = gcc -MM INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\"" -HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h windres.h winduni.h +HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \ + windres.h winduni.h GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h -CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c stabs.c strings.c sysdump.c version.c wrstabs.c windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c resres.c dllwrap.c rename.c +CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \ + dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c \ + maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \ + objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \ + stabs.c strings.c sysdump.c version.c wrstabs.c \ + windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \ + resres.c dllwrap.c rename.c -GENERATED_CFILES = underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c defparse.c deflex.c nlmheader.c rcparse.c rclex.c +GENERATED_CFILES = \ + underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \ + defparse.c deflex.c nlmheader.c rcparse.c rclex.c DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c @@ -198,12 +218,29 @@ LIBIBERTY = ../libiberty/libiberty.a POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES) -EXPECT = `if [ -f $$r/../expect/expect ] ; then echo $$r/../expect/expect ; else echo expect ; fi` +EXPECT = `if [ -f $$r/../expect/expect ] ; then \ + echo $$r/../expect/expect ; \ + else echo expect ; fi` -RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest ; fi` +RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \ + echo ${srcdir}/../dejagnu/runtest ; \ + else echo runtest ; fi` -CC_FOR_TARGET = ` if [ -f $$r/../gcc/xgcc ] ; then if [ -f $$r/../newlib/Makefile ] ; then echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; else echo $$r/../gcc/xgcc -B$$r/../gcc/; fi; else if [ "@host@" = "@target@" ] ; then echo $(CC); else echo gcc | sed '$(transform)'; fi; fi` +CC_FOR_TARGET = ` \ + if [ -f $$r/../gcc/xgcc ] ; then \ + if [ -f $$r/../newlib/Makefile ] ; then \ + echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \ + else \ + echo $$r/../gcc/xgcc -B$$r/../gcc/; \ + fi; \ + else \ + if [ "@host@" = "@target@" ] ; then \ + echo $(CC); \ + else \ + echo gcc | sed '$(transform)'; \ + fi; \ + fi` info_TEXINFOS = binutils.texi @@ -248,25 +285,29 @@ sysdump_SOURCES = sysdump.c $(BULIBS) nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS) -windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l winduni.c resres.c $(BULIBS) +windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \ + winduni.c resres.c $(BULIBS) windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS) dllwrap_SOURCES = dllwrap.c version.c dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS) -DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c +DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \ + syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c -DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h site.exp site.bak +DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \ + site.exp site.bak MAINTAINERCLEANFILES = config.texi -MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum abcdefgh* +MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum \ + abcdefgh* -CLEANFILES = dep.sed DEP DEP1 DEP2 +CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = config.h @@ -283,72 +324,88 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ -nlmconv_OBJECTS = nlmconv.o nlmheader.o bucomm.o version.o filemode.o +nlmconv_OBJECTS = nlmconv.$(OBJEXT) nlmheader.$(OBJEXT) \ +bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT) nlmconv_LDADD = $(LDADD) nlmconv_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a nlmconv_LDFLAGS = -srconv_OBJECTS = srconv.o coffgrok.o bucomm.o version.o filemode.o +srconv_OBJECTS = srconv.$(OBJEXT) coffgrok.$(OBJEXT) bucomm.$(OBJEXT) \ +version.$(OBJEXT) filemode.$(OBJEXT) srconv_LDADD = $(LDADD) srconv_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a srconv_LDFLAGS = -sysdump_OBJECTS = sysdump.o bucomm.o version.o filemode.o +sysdump_OBJECTS = sysdump.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \ +filemode.$(OBJEXT) sysdump_LDADD = $(LDADD) sysdump_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a sysdump_LDFLAGS = -coffdump_OBJECTS = coffdump.o coffgrok.o bucomm.o version.o filemode.o +coffdump_OBJECTS = coffdump.$(OBJEXT) coffgrok.$(OBJEXT) \ +bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT) coffdump_LDADD = $(LDADD) coffdump_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a coffdump_LDFLAGS = -dlltool_OBJECTS = dlltool.o defparse.o deflex.o bucomm.o version.o \ -filemode.o +dlltool_OBJECTS = dlltool.$(OBJEXT) defparse.$(OBJEXT) deflex.$(OBJEXT) \ +bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT) dlltool_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a dlltool_LDFLAGS = -windres_OBJECTS = windres.o resrc.o rescoff.o resbin.o rcparse.o \ -rclex.o winduni.o resres.o bucomm.o version.o filemode.o +windres_OBJECTS = windres.$(OBJEXT) resrc.$(OBJEXT) rescoff.$(OBJEXT) \ +resbin.$(OBJEXT) rcparse.$(OBJEXT) rclex.$(OBJEXT) winduni.$(OBJEXT) \ +resres.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT) windres_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a windres_LDFLAGS = -dllwrap_OBJECTS = dllwrap.o version.o +dllwrap_OBJECTS = dllwrap.$(OBJEXT) version.$(OBJEXT) dllwrap_DEPENDENCIES = ../libiberty/libiberty.a dllwrap_LDFLAGS = -size_OBJECTS = size.o bucomm.o version.o filemode.o +size_OBJECTS = size.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \ +filemode.$(OBJEXT) size_LDADD = $(LDADD) size_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a size_LDFLAGS = -objdump_OBJECTS = objdump.o prdbg.o rddbg.o debug.o stabs.o ieee.o \ -rdcoff.o bucomm.o version.o filemode.o +objdump_OBJECTS = objdump.$(OBJEXT) prdbg.$(OBJEXT) rddbg.$(OBJEXT) \ +debug.$(OBJEXT) stabs.$(OBJEXT) ieee.$(OBJEXT) rdcoff.$(OBJEXT) \ +bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT) objdump_DEPENDENCIES = ../opcodes/libopcodes.la ../bfd/libbfd.la \ ../libiberty/libiberty.a objdump_LDFLAGS = -ar_OBJECTS = arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o \ -bucomm.o version.o filemode.o +ar_OBJECTS = arparse.$(OBJEXT) arlex.$(OBJEXT) ar.$(OBJEXT) \ +not-ranlib.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) bucomm.$(OBJEXT) \ +version.$(OBJEXT) filemode.$(OBJEXT) ar_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a ar_LDFLAGS = -strings_OBJECTS = strings.o bucomm.o version.o filemode.o +strings_OBJECTS = strings.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \ +filemode.$(OBJEXT) strings_LDADD = $(LDADD) strings_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a strings_LDFLAGS = -ranlib_OBJECTS = ar.o is-ranlib.o arparse.o arlex.o arsup.o rename.o \ -bucomm.o version.o filemode.o +ranlib_OBJECTS = ar.$(OBJEXT) is-ranlib.$(OBJEXT) arparse.$(OBJEXT) \ +arlex.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) bucomm.$(OBJEXT) \ +version.$(OBJEXT) filemode.$(OBJEXT) ranlib_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a ranlib_LDFLAGS = -objcopy_OBJECTS = objcopy.o not-strip.o rename.o rddbg.o debug.o \ -stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +objcopy_OBJECTS = objcopy.$(OBJEXT) not-strip.$(OBJEXT) \ +rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \ +ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrstabs.$(OBJEXT) bucomm.$(OBJEXT) \ +version.$(OBJEXT) filemode.$(OBJEXT) objcopy_LDADD = $(LDADD) objcopy_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a objcopy_LDFLAGS = -addr2line_OBJECTS = addr2line.o bucomm.o version.o filemode.o +addr2line_OBJECTS = addr2line.$(OBJEXT) bucomm.$(OBJEXT) \ +version.$(OBJEXT) filemode.$(OBJEXT) addr2line_LDADD = $(LDADD) addr2line_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a addr2line_LDFLAGS = -readelf_OBJECTS = readelf.o version.o +readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) readelf_DEPENDENCIES = ../libiberty/libiberty.a readelf_LDFLAGS = -nm_new_OBJECTS = nm.o bucomm.o version.o filemode.o +nm_new_OBJECTS = nm.$(OBJEXT) bucomm.$(OBJEXT) version.$(OBJEXT) \ +filemode.$(OBJEXT) nm_new_LDADD = $(LDADD) nm_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a nm_new_LDFLAGS = -strip_new_OBJECTS = objcopy.o is-strip.o rename.o rddbg.o debug.o \ -stabs.o ieee.o rdcoff.o wrstabs.o bucomm.o version.o filemode.o +strip_new_OBJECTS = objcopy.$(OBJEXT) is-strip.$(OBJEXT) \ +rename.$(OBJEXT) rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \ +ieee.$(OBJEXT) rdcoff.$(OBJEXT) wrstabs.$(OBJEXT) bucomm.$(OBJEXT) \ +version.$(OBJEXT) filemode.$(OBJEXT) strip_new_LDADD = $(LDADD) strip_new_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a strip_new_LDFLAGS = @@ -380,14 +437,14 @@ configure.in deflex.c defparse.c nlmheader.c rclex.c rcparse.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar 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) all: all-redirect .SUFFIXES: -.SUFFIXES: .S .c .dvi .info .l .lo .o .ps .s .texi .texinfo .txi .y +.SUFFIXES: .S .c .dvi .info .l .lo .o .obj .ps .s .texi .texinfo .txi .y $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile @@ -468,6 +525,11 @@ maintainer-clean-noinstPROGRAMS: .c.o: $(COMPILE) -c $< +# FIXME: We should only use cygpath when building on Windows, +# and only if it is available. +.c.obj: + $(COMPILE) -c `cygpath -w $<` + .s.o: $(COMPILE) -c $< @@ -476,6 +538,7 @@ maintainer-clean-noinstPROGRAMS: mostlyclean-compile: -rm -f *.o core *.core + -rm -f *.$(OBJEXT) clean-compile: @@ -1036,6 +1099,9 @@ check-DEJAGNU: site.exp installcheck: /bin/sh $(srcdir)/sanity.sh $(bindir) +objdump.o:objdump.c + $(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c + underscore.c: stamp-under ; @true stamp-under: Makefile @@ -1116,8 +1182,13 @@ diststuff: $(DISTSTUFF) info DEP: dep.sed $(CFILES) $(HFILES) $(GENERATED_CFILES) $(GENERATED_HFILES) config.h rm -f DEP1 $(MAKE) MKDEP="$(MKDEP)" DEP1 - sed -f dep.sed < DEP1 > $@ - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> $@ + sed -f dep.sed < DEP1 > DEPA + echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) $(GENERATED_CFILES) echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP2 @@ -1199,13 +1270,13 @@ addr2line.o: addr2line.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ $(INCDIR)/fopen-same.h $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h \ - arsup.h + arsup.h $(INCDIR)/filenames.h arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h + $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h + $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/bin-bugs.h \ @@ -1216,13 +1287,13 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h debug.h dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h $(INCDIR)/dyn-string.h \ - dlltool.h + $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/demangle.h \ + $(INCDIR)/dyn-string.h dlltool.h filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/ieee.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - $(INCDIR)/libiberty.h debug.h budbg.h + $(INCDIR)/libiberty.h debug.h budbg.h $(INCDIR)/filenames.h is-ranlib.o: is-ranlib.c is-strip.o: is-strip.c maybe-ranlib.o: maybe-ranlib.c @@ -1233,13 +1304,14 @@ nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmconv.h nm.o: nm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/progress.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ - $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ranlib.h \ - $(INCDIR)/demangle.h $(INCDIR)/libiberty.h + $(INCDIR)/getopt.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \ + $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h not-ranlib.o: not-ranlib.c not-strip.o: not-strip.c objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h budbg.h + $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \ + budbg.h $(INCDIR)/filenames.h objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/getopt.h $(INCDIR)/progress.h bucomm.h config.h \ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h \ @@ -1304,14 +1376,15 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/elf/d30v.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/mn10200.h \ $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/arc.h \ $(INCDIR)/elf/fr30.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/i960.h \ - $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h bucomm.h config.h \ - $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h + $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \ + $(INCDIR)/elf/cris.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ + $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h windres.h winduni.h dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ - $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h + $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/dyn-string.h rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h underscore.o: underscore.c diff --git a/contrib/binutils/binutils/NEWS b/contrib/binutils/binutils/NEWS index 746c2cc..62f858f 100644 --- a/contrib/binutils/binutils/NEWS +++ b/contrib/binutils/binutils/NEWS @@ -1,5 +1,17 @@ -*- text -*- +* Add support for ARM v5t and v5te architectures and Intel's XScale ARM + extenstions. + +* Add --srec-len and --srec-forceS3 command line switch to objcopy. + By Luciano Gemme. + +* Support for the MIPS32, by Anders Norlander. + +* Support for the i860, by Jason Eckhardt. + +* Support for CRIS (Axis Communications ETRAX series). + Changes in binutils 2.10: * New command line switch to objdump --file-start-context which shows the diff --git a/contrib/binutils/binutils/README b/contrib/binutils/binutils/README index 4b2d277..9157a14 100644 --- a/contrib/binutils/binutils/README +++ b/contrib/binutils/binutils/README @@ -111,7 +111,7 @@ with gdb-4.x) may also be of help. Reporting bugs ============== -Send bug reports and patches to bug-gnu-utils@gnu.org. Always mention +Send bug reports and patches to bug-binutils@gnu.org. Always mention the version number you are running; this is printed by running any of the binutils with the --version option. We appreciate reports about bugs, but we do not promise to fix them. diff --git a/contrib/binutils/binutils/acinclude.m4 b/contrib/binutils/binutils/acinclude.m4 index 71b09b9..7ffc031 100644 --- a/contrib/binutils/binutils/acinclude.m4 +++ b/contrib/binutils/binutils/acinclude.m4 @@ -1 +1,32 @@ sinclude(../bfd/acinclude.m4) + +dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4 +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_SUBST(LIBTOOL) +]) + +dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4 +ifelse(yes,no,[ +AC_DEFUN([CY_WITH_NLS],) +AC_SUBST(INTLLIBS) +]) + +## Replacement for AC_PROG_LEX and AC_DECL_YYTEXT +## by Alexandre Oliva + +## We need to override the installed aclocal/lex.m4 because of a bug in +## this definition in the recommended automake snapshot of 000227: +## There were double-quotes around ``$missing_dir/missing flex'' which was +## bad since aclocal wraps it in double-quotes. + +dnl AM_PROG_LEX +dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT +AC_DEFUN(AM_PROG_LEX, +[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) +AC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex]) +AC_PROG_LEX +AC_DECL_YYTEXT]) diff --git a/contrib/binutils/binutils/aclocal.m4 b/contrib/binutils/binutils/aclocal.m4 index 2d62d71..37c162a 100644 --- a/contrib/binutils/binutils/aclocal.m4 +++ b/contrib/binutils/binutils/aclocal.m4 @@ -12,6 +12,48 @@ dnl PARTICULAR PURPOSE. sinclude(../bfd/acinclude.m4) +dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4 +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_SUBST(LIBTOOL) +]) + +dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4 +ifelse(yes,no,[ +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 +dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT +AC_DEFUN(AM_PROG_LEX, +[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) +AC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex]) +AC_PROG_LEX +AC_DECL_YYTEXT]) + # 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. @@ -104,415 +146,6 @@ else fi AC_SUBST($1)]) - -# serial 40 AC_PROG_LIBTOOL -AC_DEFUN(AC_PROG_LIBTOOL, -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN(AC_LIBTOOL_SETUP, -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_RANLIB])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -dnl - -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$lt_target" in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_SHARED, [dnl -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_STATIC, [dnl -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN(AC_PROG_LD, -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -]) - -AC_DEFUN(AC_PROG_LD_GNU, -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -]) - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(AC_PROG_NM, -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(ac_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi]) -NM="$ac_cv_path_NM" -AC_MSG_RESULT([$NM]) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN(AC_CHECK_LIBM, -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case "$lt_target" in -*-*-beos* | *-*-cygwin*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library, adds --enable-ltdl-convenience to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case "$enable_ltdl_convenience" in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library, and adds --enable-ltdl-install to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -dnl old names -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl - # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, @@ -536,360 +169,6 @@ for am_file in <<$1>>; do done<<>>dnl>>) changequote([,]))]) - -dnl AM_PROG_LEX -dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT -AC_DEFUN(AM_PROG_LEX, -[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) -AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") -AC_PROG_LEX -AC_DECL_YYTEXT]) - -# This file is derived from `gettext.m4'. The difference is that the -# included macros assume Cygnus-style source and build trees. - -# Macro to add for using GNU gettext. -# Ulrich Drepper , 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 3 - -AC_DEFUN(CY_WITH_NLS, - [AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) - - USE_INCLUDED_LIBINTL=no - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested]) - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH(included-gettext, - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If gettext or catgets are available (in this order) we - dnl use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include ], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) - - if test "$gt_cv_func_gettext_libc" != "yes"; then - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_TRY_LINK([], [return (int) gettext ("")], - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)])]) - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT, 1, - [Define as 1 if you have gettext and don't want to use GNU gettext.]) - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - fi - ]) - - dnl In the standard gettext, we would now check for catgets. - dnl However, we never want to use catgets for our releases. - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. - dnl Fall back on GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - INTLOBJS="\$(GETTOBJS)" - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_SUBST(MSGFMT) - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.gmo - INSTOBJEXT=.mo - DATADIRNAME=share - INTLDEPS='$(top_builddir)/../intl/libintl.a' - INTLLIBS=$INTLDEPS - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext programs is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - else - DATADIRNAME=share - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - # If this is used in GNU gettext we have to set USE_NLS to `yes' - # because some of the sources are only built for this goal. - if test "$PACKAGE" = gettext; then - USE_NLS=yes - USE_INCLUDED_LIBINTL=yes - fi - - dnl These rules are solely for the distribution goal. While doing this - dnl we only have to keep exactly one list of the available catalogs - dnl in configure.in. - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done - - dnl Make all variables we use known to autoconf. - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) - AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) - AC_SUBST(INTLDEPS) - AC_SUBST(INTLLIBS) - AC_SUBST(INTLOBJS) - AC_SUBST(POFILES) - AC_SUBST(POSUB) - ]) - -AC_DEFUN(CY_GNU_GETTEXT, - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_OFF_T])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ -unistd.h values.h sys/param.h]) - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ -__argz_count __argz_stringify __argz_next]) - - if test "${ac_cv_func_stpcpy+set}" != "set"; then - AC_CHECK_FUNCS(stpcpy) - fi - if test "${ac_cv_func_stpcpy}" = "yes"; then - AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function]) - fi - - AM_LC_MESSAGES - CY_WITH_NLS - - if test "x$CATOBJEXT" != "x"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - AC_MSG_CHECKING(for catalogs to be installed) - NEW_LINGUAS= - for lang in ${LINGUAS=$ALL_LINGUAS}; do - case "$ALL_LINGUAS" in - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac - done - LINGUAS=$NEW_LINGUAS - AC_MSG_RESULT($LINGUAS) - fi - - dnl Construct list of names of catalog files to be constructed. - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - dnl The reference to in the installed file - dnl must be resolved because we cannot expect the users of this - dnl to define HAVE_LOCALE_H. - if test $ac_cv_header_locale_h = yes; then - INCLUDE_LOCALE_H="#include " - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header . Take care yourself. */" - fi - AC_SUBST(INCLUDE_LOCALE_H) - - dnl Determine which catalog format we have (if any is needed) - dnl For now we know about two different formats: - dnl Linux libc-5 and the normal X/Open format - if test -f $srcdir/po2tbl.sed.in; then - if test "$CATOBJEXT" = ".cat"; then - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) - - dnl Transform the SED scripts while copying because some dumb SEDs - dnl cannot handle comments. - sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed - fi - dnl po2tbl.sed is always needed. - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ - $srcdir/po2tbl.sed.in > po2tbl.sed - fi - - dnl In the intl/Makefile.in we have a special dependency which makes - dnl only sense for gettext. We comment this out for non-gettext - dnl packages. - if test "$PACKAGE" = "gettext"; then - GT_NO="#NO#" - GT_YES= - else - GT_NO= - GT_YES="#YES#" - fi - AC_SUBST(GT_NO) - AC_SUBST(GT_YES) - - MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" - AC_SUBST(MKINSTALLDIRS) - - dnl *** For now the libtool support in intl/Makefile is not for real. - l= - AC_SUBST(l) - - dnl Generate list of files to be processed by xgettext which will - dnl be included in po/Makefile. But only do this if the po directory - dnl exists in srcdir. - if test -d $srcdir/po; then - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - fi - ]) - -# Search path for a program which passes the given test. -# Ulrich Drepper , 1996. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AM_PATH_PROG_WITH_TEST, -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - /*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in ifelse([$5], , $PATH, [$5]); do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test -n "[$]$1"; then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -# Check whether LC_MESSAGES is available in . -# Ulrich Drepper , 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -AC_DEFUN(AM_LC_MESSAGES, - [if test $ac_cv_header_locale_h = yes; then - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [return LC_MESSAGES], - am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) - if test $am_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your locale.h file contains LC_MESSAGES.]) - fi - fi]) - # Add --enable-maintainer-mode option to configure. # From Jim Meyering diff --git a/contrib/binutils/binutils/addr2line.1 b/contrib/binutils/binutils/addr2line.1 index 87ce103..f8dde89 100644 --- a/contrib/binutils/binutils/addr2line.1 +++ b/contrib/binutils/binutils/addr2line.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1997 Free Software Foundation +.\" Copyright (c) 1997, 2000 Free Software Foundation .\" See COPYING for conditions for redistribution -.TH addr2line 1 "27 March 1997" "Cygnus Solutions" "GNU Development Tools" +.TH addr2line 1 "27 March 1997" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -125,3 +125,379 @@ info\c .I The GNU Binary Utilities\c \&, Roland H. Pesch (October 1991). + +.SH COPYING +Copyright (c) 1993, 94, 95, 96, 97, 98, 1999, 2000 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. diff --git a/contrib/binutils/binutils/addr2line.c b/contrib/binutils/binutils/addr2line.c index 20c7eef..ef01f47 100644 --- a/contrib/binutils/binutils/addr2line.c +++ b/contrib/binutils/binutils/addr2line.c @@ -1,6 +1,6 @@ /* addr2line.c -- convert addresses to line number and function name Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc. - Contributed by Ulrich Lauther + Contributed by Ulrich Lauther This file is part of GNU Binutils. @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Derived from objdump.c and nm.c by Ulrich.Lauther@zfe.siemens.de +/* Derived from objdump.c and nm.c by Ulrich.Lauther@mchp.siemens.de Usage: addr2line [options] addr addr ... @@ -51,7 +51,7 @@ static asymbol **syms; /* Symbol table. */ static struct option long_options[] = { {"basenames", no_argument, NULL, 's'}, - {"demangle", no_argument, NULL, 'C'}, + {"demangle", optional_argument, NULL, 'C'}, {"exe", required_argument, NULL, 'e'}, {"functions", no_argument, NULL, 'f'}, {"target", required_argument, NULL, 'b'}, @@ -75,7 +75,7 @@ usage (stream, status) { fprintf (stream, _("\ Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n\ - [-e executable] [--exe=executable] [--demangle]\n\ + [-e executable] [--exe=executable] [--demangle[=style]]\n\ [--basenames] [--functions] [addr addr ...]\n"), program_name); list_supported_targets (program_name, stream); @@ -271,7 +271,7 @@ main (argc, argv) int argc; char **argv; { - char *filename; + const char *filename; char *target; int c; @@ -301,6 +301,17 @@ main (argc, argv) break; case 'C': do_demangle = true; + if (optarg != NULL) + { + enum demangling_styles style; + + style = cplus_demangle_name_to_style (optarg); + if (style == unknown_demangling) + fatal (_("unknown demangling style `%s'"), + optarg); + + cplus_demangle_set_style (style); + } break; case 'e': filename = optarg; diff --git a/contrib/binutils/binutils/ar.1 b/contrib/binutils/binutils/ar.1 index cd71a40..d7b2caf 100644 --- a/contrib/binutils/binutils/ar.1 +++ b/contrib/binutils/binutils/ar.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999 Free Software Foundation +.\" Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH ar 1 "1999" "Cygnus Solutions" "GNU Development Tools" +.TH ar 1 "1999" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -515,19 +515,377 @@ The GNU Binary Utilities\c \&. .SH COPYING -Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999 Free Software Foundation, Inc. +Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999, 2000 Free Software Foundation, Inc. .PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. -.PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +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. diff --git a/contrib/binutils/binutils/ar.c b/contrib/binutils/binutils/ar.c index d67f4b3..fe5709f 100644 --- a/contrib/binutils/binutils/ar.c +++ b/contrib/binutils/binutils/ar.c @@ -250,7 +250,7 @@ usage (help) if (! is_ranlib) { /* xgettext:c-format */ - fprintf (s, _("Usage: %s [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"), + fprintf (s, _("Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"), program_name); /* xgettext:c-format */ fprintf (s, _(" %s -M [ filename) + if (filename == NULL || (bslash != NULL && bslash > filename)) filename = bslash; if (filename == NULL && file[0] != '\0' && file[1] == ':') - filename = file + 1; + filename = file + 1; } #endif if (filename != (char *) NULL) @@ -392,7 +393,7 @@ main (argc, argv) { /* We could have foo/bar\\baz, or foo\\bar, or d:bar. */ char *bslash = strrchr (program_name, '\\'); - if (bslash > temp) + if (temp == NULL || (bslash != NULL && bslash > temp)) temp = bslash; if (temp == NULL && program_name[0] != '\0' && program_name[1] == ':') temp = program_name + 1; @@ -431,6 +432,17 @@ main (argc, argv) xatexit (remove_output); + /* Ignored for (partial) AIX compatibility. On AIX, + the -X option can be used to ignore certain kinds + of object files in the archive (the 64-bit objects + or the 32-bit objects). GNU ar always looks at all + kinds of objects in an archive. */ + while (argc > 1 && strcmp (argv[1], "-X32_64") == 0) + { + argv++; + argc--; + } + if (is_ranlib) { boolean touch = false; @@ -812,7 +824,8 @@ print_contents (abfd) fatal (_("internal stat error on %s"), bfd_get_filename (abfd)); if (verbose) - printf ("\n<%s>\n\n", bfd_get_filename (abfd)); + /* xgettext:c-format */ + printf (_("\n\n\n"), bfd_get_filename (abfd)); bfd_seek (abfd, 0, SEEK_SET); diff --git a/contrib/binutils/binutils/binutils.texi b/contrib/binutils/binutils/binutils.texi index c2232e3..4114663 100644 --- a/contrib/binutils/binutils/binutils.texi +++ b/contrib/binutils/binutils/binutils.texi @@ -26,11 +26,14 @@ END-INFO-DIR-ENTRY @end ifinfo @ifinfo -Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + 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 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 "GNU Free Documentation License". @ignore Permission is granted to process this file through TeX and print the @@ -39,14 +42,6 @@ notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore - -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end ifinfo @synindex ky cp @@ -54,10 +49,10 @@ into another language, under the above conditions for modified versions. @c This file documents the GNU binary utilities "ar", "ld", "objcopy", @c "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib". @c -@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. @c @c This text may be freely distributed under the terms of the GNU -@c General Public License. +@c Free Documentation License. @c @setchapternewpage odd @@ -79,19 +74,15 @@ into another language, under the above conditions for modified versions. @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. +Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998, 2000, 2001 Free Software Foundation, Inc. -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. + 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 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 "GNU Free Documentation License". -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end titlepage @node Top @@ -148,6 +139,10 @@ Create the files needed to build and use Dynamic Link Libraries @end table @end iftex +This document is distributed under the terms of the GNU Free +Documentation License. A copy of the license is included in the +section entitled "GNU Free Documentation License". + @menu * ar:: Create, modify, and extract from archives * nm:: List symbols from object files @@ -166,6 +161,7 @@ Create the files needed to build and use Dynamic Link Libraries * dlltool:: Create files needed to build and use DLLs * Selecting The Target System:: How these utilities determine the target. * Reporting Bugs:: Reporting Bugs +* GNU Free Documentation License:: GNU Free Documentation License * Index:: Index @end menu @@ -234,7 +230,7 @@ program. @section Controlling @code{ar} on the command line @smallexample -ar [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}] +ar [-X32_64] [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}] @end smallexample @cindex Unix compatibility, @code{ar} @@ -451,6 +447,12 @@ when the modifier @samp{v} is appended. This modifier shows the version number of @code{ar}. @end table +@code{ar} ignores an initial option spelt @code{-X32_64}, for +compatibility with AIX. The behaviour produced by this option is the +default for GNU @code{ar}. @code{ar} does not support any of the other +@code{-X} options; in particular, it does not support @code{-X32} +which is the default for AIX @code{ar}. + @node ar scripts @section Controlling @code{ar} with a script @@ -630,14 +632,14 @@ The @sc{gnu} linker @code{ld} is now described in a separate manual. @smallexample nm [ -a | --debug-syms ] [ -g | --extern-only ] - [ -B ] [ -C | --demangle ] [ -D | --dynamic ] + [ -B ] [ -C | --demangle[=@var{style}] ] [ -D | --dynamic ] [ -s | --print-armap ] [ -A | -o | --print-file-name ] [ -n | -v | --numeric-sort ] [ -p | --no-sort ] [ -r | --reverse-sort ] [ --size-sort ] [ -u | --undefined-only ] [ -t @var{radix} | --radix=@var{radix} ] [ -P | --portability ] [ --target=@var{bfdname} ] [ -f @var{format} | --format=@var{format} ] - [ --defined-only ] [-l | --line-numbers ] - [ --no-demangle ] [ -V | --version ] [ --help ] [ @var{objfile}@dots{} ] + [ --defined-only ] [-l | --line-numbers ] [ --no-demangle ] + [ -V | --version ] [ -X 32_64 ] [ --help ] [ @var{objfile}@dots{} ] @end smallexample @sc{gnu} @code{nm} lists the symbols from object files @var{objfile}@dots{}. @@ -754,12 +756,14 @@ listed. The same as @samp{--format=bsd} (for compatibility with the MIPS @code{nm}). @item -C -@itemx --demangle +@itemx --demangle[=@var{style}] @cindex demangling in nm Decode (@dfn{demangle}) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system, this -makes C++ function names readable. @xref{c++filt}, for more information -on demangling. +makes C++ function names readable. Different compilers have different +mangling styles. The optional demangling style argument can be used to +choose an appropriate demangling style for your compiler. @xref{c++filt}, +for more information on demangling. @item --no-demangle Do not demangle low-level symbol names. This is the default. @@ -853,6 +857,12 @@ Display only defined symbols for each object file. @itemx --version Show the version number of @code{nm} and exit. +@item -X +This option is ignored for compatibility with the AIX version of +@code{nm}. It takes one parameter which must be the string +@code{32_64}. The default mode of AIX @code{nm} corresponds +to @code{-X 32}, which is not supported by @sc{gnu} @code{nm}. + @item --help Show a summary of the options to @code{nm} and exit. @end table @@ -885,6 +895,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ] [ --set-section-flags @var{section}=@var{flags} ] [ --add-section @var{sectionname}=@var{filename} ] [ --change-leading-char ] [ --remove-leading-char ] + [ --srec-len=@var{ival} ] [ --srec-forceS3 ] [ --redefine-sym @var{old}=@var{new} ] [ --weaken ] [ -v | --verbose ] [ -V | --version ] [ --help ] @var{infile} [@var{outfile}] @@ -895,6 +906,9 @@ file to another. @code{objcopy} uses the @sc{gnu} @sc{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 @code{objcopy} is controlled by command-line options. +Note that @code{objcopy} 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. @code{objcopy} creates temporary files to do its translations and deletes them afterward. @code{objcopy} uses @sc{bfd} to do all its @@ -917,6 +931,11 @@ use @samp{-S} to remove sections containing debugging information. In some cases @samp{-R} will be useful to remove sections which contain information that is not needed by the binary file. +Note - @code{objcopy} is not able to change the endianness of its input +files. If the input format has an endianness, (some formats do not), +@code{objcopy} can only copy the inputs into file formats that have the +same endianness or which have no endianness (eg @samp{srec}). + @table @code @item @var{infile} @itemx @var{outfile} @@ -1137,6 +1156,15 @@ different conventions for symbol names. This is different from when appropriate, regardless of the object file format of the output file. +@item --srec-len=@var{ival} +Meaningful only for srec output. Set the maximum length of the Srecords +being produced to @var{ival}. This length covers both address, data and +crc fields. + +@item --srec-forceS3 +Meaningful only for srec output. Avoid generation of S1/S2 records, +creating S3-only record format. + @item --redefine-sym @var{old}=@var{new} Change the name of a symbol @var{old}, to @var{new}. This can be useful when one is trying link two things together for which you have no @@ -1170,7 +1198,7 @@ Show a summary of the options to @code{objcopy}. @smallexample objdump [ -a | --archive-headers ] [ -b @var{bfdname} | --target=@var{bfdname} ] - [ -C | --demangle ] + [ -C | --demangle[=@var{style}] ] [ -d | --disassemble ] [ -D | --disassemble-all ] [ -z | --disassemble-zeroes ] @@ -1255,12 +1283,14 @@ formats available with the @samp{-i} option. @xref{Target Selection}, for more information. @item -C -@itemx --demangle +@itemx --demangle[=@var{style}] @cindex demangling in objdump Decode (@dfn{demangle}) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system, this -makes C++ function names readable. @xref{c++filt}, for more information -on demangling. +makes C++ function names readable. Different compilers have different +mangling styles. The optional demangling style argument can be used to +choose an appropriate demangling style for your compiler. @xref{c++filt}, +for more information on demangling. @item -G @item --debugging @@ -1856,6 +1886,8 @@ the one specified by the C++ Annotated Reference Manual the one used by the HP compiler @item edg the one used by the EDG compiler +@item gnu-new-abi +the one used by the @sc{gnu} compiler with the new ABI. @end table @item --help @@ -1891,7 +1923,7 @@ c++filt @var{option} @var{symbol} @smallexample addr2line [ -b @var{bfdname} | --target=@var{bfdname} ] - [ -C | --demangle ] + [ -C | --demangle[=@var{style} ] [ -e @var{filename} | --exe=@var{filename} ] [ -f | --functions ] [ -s | --basename ] [ -H | --help ] [ -V | --version ] @@ -1938,12 +1970,14 @@ Specify that the object-code format for the object files is @var{bfdname}. @item -C -@itemx --demangle +@itemx --demangle[=@var{style}] @cindex demangling in objdump Decode (@dfn{demangle}) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system, this -makes C++ function names readable. @xref{c++filt}, for more information -on demangling. +makes C++ function names readable. Different compilers have different +mangling styles. The optional demangling style argument can be used to +choose an appropriate demangling style for your compiler. @xref{c++filt}, +for more information on demangling. @item -e @var{filename} @itemx --exe=@var{filename} @@ -2449,7 +2483,7 @@ readelf [ -a | --all ] [ -V | --version-info] [ -D | --use-dynamic] [ -x | --hex-dump=] - [ -w[liapr] | --debug-dump[=info,=line,=abbrev,=pubnames,=ranges]] + [ -w[liaprf] | --debug-dump[=info,=line,=abbrev,=pubnames,=ranges,=frames]] [ --histogram] [ -v | --version] [ -H | --help] @@ -2537,8 +2571,8 @@ symbols section. @itemx --hex-dump= Displays the contents of the indicated section as a hexadecimal dump. -@item -w[liapr] -@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges] +@item -w[liaprf] +@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames] Displays the contents of the debug sections in the file, if any are present. If one of the optional letters or words follows the switch then only data found in those specific sections will be dumped. @@ -2871,7 +2905,7 @@ individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs distribution. In any event, we also recommend that you send bug reports for the binary -utilities to @samp{bug-gnu-utils@@gnu.org}. +utilities to @samp{bug-binutils@@gnu.org}. The fundamental principle of reporting bugs usefully is this: @strong{report all the facts}. If you are not sure whether to state a @@ -2932,7 +2966,7 @@ A complete input file, or set of input files, that will reproduce the bug. If the utility is reading an object file or files, then it is generally most helpful to send the actual object files, uuencoded if necessary to get them through the mail system. Note that -@samp{bug-gnu-utils@@gnu.org} is a mailing list, so you should avoid +@samp{bug-binutils@@gnu.org} is a mailing list, so you should avoid sending very large files to it. Making the files available for anonymous FTP is OK. @@ -3020,6 +3054,370 @@ Such guesses are usually wrong. Even we cannot guess right about such things without first using the debugger to find the facts. @end itemize +@node GNU Free Documentation License +@chapter GNU Free Documentation License +@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. + + +0. PREAMBLE + +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. + +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. + +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. + + +1. APPLICABILITY AND DEFINITIONS + +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". + +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. + +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. + +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. + +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. + +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". + +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. + +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. + + +2. VERBATIM COPYING + +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. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +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. + +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. + +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. + +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. + + +4. MODIFICATIONS + +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: + +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. +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). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +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. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +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. +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. +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. +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. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +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. + +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. + +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. + +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. + + +5. COMBINING DOCUMENTS + +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. + +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. + +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." + + +6. COLLECTIONS OF DOCUMENTS + +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. + +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. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +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. + +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. + + +8. TRANSLATION + +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. + + +9. TERMINATION + +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. + + +10. FUTURE REVISIONS OF THIS LICENSE + +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/. + +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. + + +ADDENDUM: How to use this License for your documents + +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: + +@smallexample + 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". +@end smallexample + +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. + +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. + @node Index @unnumbered Index diff --git a/contrib/binutils/binutils/bucomm.c b/contrib/binutils/binutils/bucomm.c index 76ffa60..86c327f 100644 --- a/contrib/binutils/binutils/bucomm.c +++ b/contrib/binutils/binutils/bucomm.c @@ -219,7 +219,7 @@ make_tempname (filename) { /* We could have foo/bar\\baz, or foo\\bar, or d:bar. */ char *bslash = strrchr (filename, '\\'); - if (bslash > slash) + if (slash == NULL || (bslash != NULL && bslash > slash)) slash = bslash; if (slash == NULL && filename[0] != '\0' && filename[1] == ':') slash = filename + 1; diff --git a/contrib/binutils/binutils/bucomm.h b/contrib/binutils/binutils/bucomm.h index c6dc26a..e9d675e 100644 --- a/contrib/binutils/binutils/bucomm.h +++ b/contrib/binutils/binutils/bucomm.h @@ -138,12 +138,11 @@ void *alloca (); # define N_(String) (String) # endif #else -/* Stubs that do something close enough. */ -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) while (0) /* nothing */ +# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */ # define _(String) (String) # define N_(String) (String) #endif diff --git a/contrib/binutils/binutils/coffgrok.c b/contrib/binutils/binutils/coffgrok.c index 8c4e6c9..3486c5f 100644 --- a/contrib/binutils/binutils/coffgrok.c +++ b/contrib/binutils/binutils/coffgrok.c @@ -245,7 +245,7 @@ static struct coff_line * do_lines (i, name) int i; - char *name; + char *name ATTRIBUTE_UNUSED; { struct coff_line *res = (struct coff_line *) xcalloc (sizeof (struct coff_line), 1); asection *s; diff --git a/contrib/binutils/binutils/config.in b/contrib/binutils/binutils/config.in index 7b70d16..8a0e1c5 100644 --- a/contrib/binutils/binutils/config.in +++ b/contrib/binutils/binutils/config.in @@ -28,9 +28,6 @@ /* 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 4c75b62..a9ad848 100644 --- a/contrib/binutils/binutils/config.texi +++ b/contrib/binutils/binutils/config.texi @@ -1 +1 @@ -@set VERSION 2.10.1 +@set VERSION 2.11 diff --git a/contrib/binutils/binutils/configure b/contrib/binutils/binutils/configure index f454df5..bfadf47 100755 --- a/contrib/binutils/binutils/configure +++ b/contrib/binutils/binutils/configure @@ -22,10 +22,14 @@ ac_help="$ac_help ac_help="$ac_help --disable-libtool-lock avoid locking (might break parallel builds)" ac_help="$ac_help + --with-pic try to use only PIC/non-PIC objects [default=use both]" +ac_help="$ac_help --enable-targets alternative target configurations" ac_help="$ac_help --enable-commonbfdlib build shared BFD/opcodes/libiberty library" ac_help="$ac_help + --enable-build-warnings Enable build-time compiler warnings if gcc is used" +ac_help="$ac_help --disable-nls do not use Native Language Support" ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" @@ -49,6 +53,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -163,6 +168,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -333,6 +339,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -498,12 +509,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -541,6 +556,68 @@ else ac_n= ac_c='\c' ac_t= fi +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:561: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:594: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes ac_aux_dir= @@ -590,7 +667,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:594: checking host system type" >&5 +echo "configure:671: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -611,7 +688,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:615: checking target system type" >&5 +echo "configure:692: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -629,7 +706,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:633: checking build system type" >&5 +echo "configure:710: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -651,316 +728,116 @@ 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:658: 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:688: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + 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 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. + ac_save_LIBS="$LIBS" +LIBS="-lcposix $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" 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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi +rm -f conftest* +LIBS="$ac_save_LIBS" + fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$LIBS -lcposix" 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:739: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./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 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+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 + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac 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 + IFS="$ac_save_IFS" + fi - ;; - esac + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" fi - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi +echo "$ac_t""$INSTALL" 1>&6 -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:771: 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 +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -cat > conftest.$ac_ext << EOF +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' -#line 782 "configure" -#include "confdefs.h" - -main(){return(0);} -EOF -if { (eval echo configure:787: \"$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:813: 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:818: 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:846: 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 - -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:878: 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 - 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 -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./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:911: 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 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi -fi -echo "$ac_t""$INSTALL" 1>&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:964: checking whether build environment is sane" >&5 +echo "configure:841: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1017,7 +894,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:1021: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:898: 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 @@ -1046,7 +923,7 @@ fi PACKAGE=binutils -VERSION=2.10.1 +VERSION=2.11 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; } @@ -1063,7 +940,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:1067: checking for working aclocal" >&5 +echo "configure:944: 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. @@ -1076,7 +953,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:1080: checking for working autoconf" >&5 +echo "configure:957: 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. @@ -1089,7 +966,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:1093: checking for working automake" >&5 +echo "configure:970: 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. @@ -1102,7 +979,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1106: checking for working autoheader" >&5 +echo "configure:983: 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. @@ -1115,7 +992,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1119: checking for working makeinfo" >&5 +echo "configure:996: 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. @@ -1195,13 +1072,777 @@ no) enable_fast_install=no ;; ;; esac else - enable_fast_install=yes + 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" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +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 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case "$ac_prog" in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + 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 +else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +echo "configure:1346: 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 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + ac_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + ac_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$ac_cv_path_LD" +if test -n "$LD"; then + echo "$ac_t""$LD" 1>&6 +else + echo "$ac_t""no" 1>&6 +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 +if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 +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 +if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_ld_reload_flag='-r' +fi + +echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 +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 +if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$NM"; then + # Let the user override the test. + ac_cv_path_NM="$NM" +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + test -z "$ac_dir" && ac_dir=. + tmp_nm=$ac_dir/${ac_tool_prefix}nm + if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then + ac_cv_path_NM="$tmp_nm -B" + break + elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$tmp_nm -p" + break + else + ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm +fi +fi + +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 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 +echo "configure:1469: 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 + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [regex]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given egrep regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case "$host_os" in +aix4*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi4*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin* | mingw* |pw32*) + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +freebsd* ) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case "$host_cpu" in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20*) + # TODO: Does this work for hpux-11 too? + lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + +irix5* | irix6*) + case "$host_os" in + irix5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case "$LD" in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux-gnu*) + case "$host_cpu" in + alpha* | i*86 | powerpc* | sparc* | ia64* ) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : + else + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case "$host_vendor" in + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + esac + ;; +esac + +fi + +echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 +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 +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 + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1638: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +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 + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# Only perform the check for file, if the check method requires it +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 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +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 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +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 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 fi -# Extract the first word of "ranlib", so it can be a program name with args. + +if test -z "$ac_cv_prog_RANLIB"; then +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:1205: checking for $ac_word" >&5 +echo "configure:1846: 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 @@ -1228,157 +1869,78 @@ else echo "$ac_t""no" 1>&6 fi -# Check whether --with-gnu-ld or --without-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then - withval="$with_gnu_ld" - test "$withval" = no || with_gnu_ld=yes else - with_gnu_ld=no + RANLIB=":" fi - -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:1244: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1268: checking for GNU ld" >&5 -else - echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1271: checking for non-GNU ld" >&5 fi -if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + +# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1881: 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 - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi + if test -f $ac_dir/$ac_word; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + break fi done IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. fi fi - -LD="$ac_cv_path_LD" -if test -n "$LD"; then - echo "$ac_t""$LD" 1>&6 +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 else echo "$ac_t""no" 1>&6 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:1306: 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 - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 -echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1322: checking for BSD-compatible nm" >&5 -if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then +if test -z "$ac_cv_prog_STRIP"; then +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 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + 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/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi + if test -f $ac_dir/$ac_word; then + ac_cv_prog_STRIP="strip" + break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi -fi - -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:1358: 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 - rm -f conftestdata -if ln -s X conftestdata 2>/dev/null -then - rm -f conftestdata - ac_cv_prog_LN_S="ln -s" -else - ac_cv_prog_LN_S=ln + test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" fi fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 else echo "$ac_t""no" 1>&6 fi +else + STRIP=":" +fi +fi -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" @@ -1398,13 +1960,24 @@ fi test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi + +test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" +test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" + # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$lt_target" in +case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1407 "configure"' > conftest.$ac_ext - if { (eval echo configure:1408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1980 "configure"' > conftest.$ac_ext + if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1425,19 +1998,27 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1429: checking whether the C compiler needs -belf" >&5 +echo "configure:2002: 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 - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2022: \"$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 @@ -1447,6 +2028,13 @@ else lt_cv_cc_needs_belf=no fi rm -f 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 + fi echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 @@ -1510,12 +2098,14 @@ rm -f confcache # Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ +AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ +objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ +deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig @@ -1529,7 +2119,7 @@ fi # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -1539,6 +2129,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' exec 5>>./config.log + + + + + + # Check whether --enable-targets or --disable-targets was given. if test "${enable_targets+set}" = set; then enableval="$enable_targets" @@ -1559,6 +2155,29 @@ if test "${enable_commonbfdlib+set}" = set; then esac fi +build_warnings="-W -Wall" +# Check whether --enable-build-warnings or --disable-build-warnings was given. +if test "${enable_build_warnings+set}" = set; then + enableval="$enable_build_warnings" + case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi +fi +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi + + @@ -1573,7 +2192,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:1577: checking for $ac_word" >&5 +echo "configure:2196: 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 @@ -1603,7 +2222,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:1607: checking for $ac_word" >&5 +echo "configure:2226: 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 @@ -1654,7 +2273,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:1658: checking for $ac_word" >&5 +echo "configure:2277: 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 @@ -1686,7 +2305,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1690: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2309: 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. @@ -1697,12 +2316,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1701 "configure" +#line 2320 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2325: \"$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 @@ -1728,12 +2347,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:1732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2351: 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:1737: checking whether we are using GNU C" >&5 +echo "configure:2356: 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 @@ -1742,7 +2361,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1746: \"$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:2365: \"$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 @@ -1761,7 +2380,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:1765: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2384: 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 @@ -1798,7 +2417,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:1802: checking for $ac_word" >&5 +echo "configure:2421: 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 @@ -1829,7 +2448,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1833: checking how to run the C preprocessor" >&5 +echo "configure:2452: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1844,13 +2463,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:1854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2473: \"$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 : @@ -1861,13 +2480,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:1871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2490: \"$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 : @@ -1878,13 +2497,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:1888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2507: \"$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 : @@ -1914,7 +2533,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:1918: checking for $ac_word" >&5 +echo "configure:2537: 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 @@ -1942,12 +2561,12 @@ fi test -n "$LEX" && break done -test -n "$LEX" || LEX=""$missing_dir/missing flex"" +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:1951: checking for $ac_word" >&5 +echo "configure:2570: 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 @@ -1981,7 +2600,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:1985: checking for yywrap in -l$ac_lib" >&5 +echo "configure:2604: 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 @@ -1989,7 +2608,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:2623: \"$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 @@ -2023,7 +2642,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:2027: checking lex output file root" >&5 +echo "configure:2646: 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 @@ -2044,7 +2663,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:2048: checking whether yytext is a pointer" >&5 +echo "configure:2667: 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 @@ -2056,14 +2675,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:2686: \"$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 @@ -2086,13 +2705,43 @@ fi 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 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2091: checking for ANSI C header files" >&5 +echo "configure:2740: 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 @@ -2100,7 +2749,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2753: \"$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* @@ -2117,7 +2766,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 @@ -2135,7 +2784,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 @@ -2156,7 +2805,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2167,7 +2816,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2191,18 +2840,18 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2195: checking for working const" >&5 +echo "configure:2844: 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:2898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2266,21 +2915,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2270: checking for inline" >&5 +echo "configure:2919: 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:2933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2306,12 +2955,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2310: checking for off_t" >&5 +echo "configure:2959: 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 @@ -2339,12 +2988,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2343: checking for size_t" >&5 +echo "configure:2992: 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 @@ -2374,19 +3023,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:2378: checking for working alloca.h" >&5 +echo "configure:3027: 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() { -void *p = alloca(2 * sizeof(int)); +char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3039: \"$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 @@ -2407,12 +3056,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2411: checking for alloca" >&5 +echo "configure:3060: 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:3093: \"$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 @@ -2472,12 +3121,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2476: checking whether alloca needs Cray hooks" >&5 +echo "configure:3125: 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:2506: checking for $ac_func" >&5 +echo "configure:3155: 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:3183: \"$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 @@ -2557,7 +3206,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2561: checking stack direction for C alloca" >&5 +echo "configure:3210: 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 @@ -2565,7 +3214,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:3237: \"$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 @@ -2609,17 +3258,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:2613: checking for $ac_hdr" >&5 +echo "configure:3262: 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:2623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3272: \"$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* @@ -2648,12 +3297,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2652: checking for $ac_func" >&5 +echo "configure:3301: 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:3329: \"$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 @@ -2701,7 +3350,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2705: checking for working mmap" >&5 +echo "configure:3354: 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 @@ -2709,7 +3358,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include #include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -2799,7 +3445,7 @@ main() /* * First, make a file with some known garbage in it. */ - data = (char*)malloc(pagesize); + data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) @@ -2820,7 +3466,7 @@ main() fd = open("conftestmmap", O_RDWR); if (fd < 0) exit(1); - data2 = (char*)malloc(2 * pagesize); + data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); @@ -2838,7 +3484,7 @@ main() */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; - data3 = (char*)malloc(pagesize); + data3 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) @@ -2852,7 +3498,7 @@ main() } EOF -if { (eval echo configure:2856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3502: \"$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 @@ -2880,17 +3526,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:2884: checking for $ac_hdr" >&5 +echo "configure:3530: 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:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3540: \"$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* @@ -2920,12 +3566,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2924: checking for $ac_func" >&5 +echo "configure:3570: 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:3598: \"$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 @@ -2977,12 +3623,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2981: checking for $ac_func" >&5 +echo "configure:3627: 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:3655: \"$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 @@ -3039,19 +3685,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3043: checking for LC_MESSAGES" >&5 +echo "configure:3689: 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:3055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3701: \"$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 @@ -3072,7 +3718,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3076: checking whether NLS is requested" >&5 +echo "configure:3722: 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" @@ -3092,7 +3738,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3096: checking whether included gettext is requested" >&5 +echo "configure:3742: 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" @@ -3111,17 +3757,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3115: checking for libintl.h" >&5 +echo "configure:3761: 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:3125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3771: \"$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* @@ -3138,19 +3784,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:3142: checking for gettext in libc" >&5 +echo "configure:3788: 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:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3800: \"$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 @@ -3166,7 +3812,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:3170: checking for bindtextdomain in -lintl" >&5 +echo "configure:3816: 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 @@ -3174,7 +3820,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:3835: \"$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 @@ -3201,19 +3847,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:3205: checking for gettext in libintl" >&5 +echo "configure:3851: 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:3863: \"$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 @@ -3241,7 +3887,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:3245: checking for $ac_word" >&5 +echo "configure:3891: 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 @@ -3275,12 +3921,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3279: checking for $ac_func" >&5 +echo "configure:3925: 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:3953: \"$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 @@ -3330,7 +3976,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:3334: checking for $ac_word" >&5 +echo "configure:3980: 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 @@ -3366,7 +4012,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:3370: checking for $ac_word" >&5 +echo "configure:4016: 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 @@ -3398,7 +4044,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3438,7 +4084,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:3442: checking for $ac_word" >&5 +echo "configure:4088: 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 @@ -3472,7 +4118,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:3476: checking for $ac_word" >&5 +echo "configure:4122: 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 @@ -3508,7 +4154,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:3512: checking for $ac_word" >&5 +echo "configure:4158: 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 @@ -3598,7 +4244,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3602: checking for catalogs to be installed" >&5 +echo "configure:4248: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -3626,17 +4272,17 @@ echo "configure:3602: 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:3630: checking for linux/version.h" >&5 +echo "configure:4276: 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:3640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4286: \"$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* @@ -3699,7 +4345,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:3703: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4349: 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" @@ -3721,72 +4367,10 @@ fi MAINT=$MAINTAINER_MODE_TRUE -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:3726: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:3759: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:3790: checking for executable suffix" >&5 +echo "configure:4374: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3796,10 +4380,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:4384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -3839,7 +4423,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:3843: checking for $ac_word" >&5 +echo "configure:4427: 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 @@ -3878,7 +4462,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:3882: checking for a BSD compatible install" >&5 +echo "configure:4466: 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 @@ -3945,7 +4529,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:3949: checking for build system executable suffix" >&5 +echo "configure:4533: 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 @@ -3980,17 +4564,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:3984: checking for $ac_hdr" >&5 +echo "configure:4568: 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:3994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4578: \"$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* @@ -4017,12 +4601,12 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:4021: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:4605: 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 @@ -4038,7 +4622,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -4061,19 +4645,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:4065: checking for working alloca.h" >&5 +echo "configure:4649: 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() { -void *p = alloca(2 * sizeof(int)); +char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4661: \"$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 @@ -4094,12 +4678,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4098: checking for alloca" >&5 +echo "configure:4682: 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:4715: \"$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 @@ -4159,12 +4743,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4163: checking whether alloca needs Cray hooks" >&5 +echo "configure:4747: 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:4193: checking for $ac_func" >&5 +echo "configure:4777: 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:4805: \"$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 @@ -4244,7 +4828,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4248: checking stack direction for C alloca" >&5 +echo "configure:4832: 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 @@ -4252,7 +4836,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:4859: \"$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 @@ -4295,12 +4879,12 @@ fi for ac_func in sbrk utimes setmode do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4299: checking for $ac_func" >&5 +echo "configure:4883: 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:4911: \"$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 @@ -4351,14 +4935,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:4355: checking for library containing frexp" >&5 +echo "configure:4939: 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:4957: \"$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 @@ -4380,7 +4964,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:4979: \"$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 @@ -4413,19 +4997,19 @@ else : fi echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6 -echo "configure:4417: checking for time_t in time.h" >&5 +echo "configure:5001: 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:4429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_decl_time_t_time_h=yes else @@ -4446,19 +5030,19 @@ EOF fi echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:4450: checking for time_t in sys/types.h" >&5 +echo "configure:5034: 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:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_decl_time_t_types_h=yes else @@ -4481,12 +5065,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:4485: checking for utime.h" >&5 +echo "configure:5069: 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 @@ -4497,7 +5081,7 @@ int main() { struct utimbuf s; ; return 0; } EOF -if { (eval echo configure:4501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bu_cv_header_utime_h=yes else @@ -4518,12 +5102,12 @@ EOF fi echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6 -echo "configure:4522: checking whether fprintf must be declared" >&5 +echo "configure:5106: 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 < @@ -4544,7 +5128,7 @@ int main() { char *(*pfn) = (char *(*)) fprintf ; return 0; } EOF -if { (eval echo configure:4548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_fprintf=no else @@ -4565,12 +5149,12 @@ EOF fi echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:4569: checking whether strstr must be declared" >&5 +echo "configure:5153: 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 < @@ -4591,7 +5175,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4612,12 +5196,12 @@ EOF fi echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6 -echo "configure:4616: checking whether sbrk must be declared" >&5 +echo "configure:5200: 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 < @@ -4638,7 +5222,7 @@ int main() { char *(*pfn) = (char *(*)) sbrk ; return 0; } EOF -if { (eval echo configure:4642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_sbrk=no else @@ -4659,12 +5243,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:4663: checking whether getenv must be declared" >&5 +echo "configure:5247: 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 < @@ -4685,7 +5269,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -4706,12 +5290,12 @@ EOF fi echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6 -echo "configure:4710: checking whether environ must be declared" >&5 +echo "configure:5294: 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 < @@ -4732,7 +5316,7 @@ int main() { char *(*pfn) = (char *(*)) environ ; return 0; } EOF -if { (eval echo configure:4736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_environ=no else @@ -4787,6 +5371,7 @@ DLLTOOL_DEFS= BUILD_WINDRES= BUILD_DLLWRAP= BUILD_MISC= +OBJDUMP_DEFS= for targ in $target $canon_targets do @@ -4818,6 +5403,11 @@ do *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;; esac case $targ in + arm-epoc-pe*) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; arm-*pe* | arm-*-wince) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" @@ -4828,6 +5418,9 @@ do DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; + arm*-* | xscale-* | strongarm-* | d10v-*) + OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS" + ;; i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386" @@ -4875,6 +5468,7 @@ done + cat >> confdefs.h <&1 +fi])dnl +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi +AC_SUBST(WARN_CFLAGS) + AM_CONFIG_HEADER(config.h:config.in) if test -z "$target" ; then @@ -150,6 +171,7 @@ DLLTOOL_DEFS= BUILD_WINDRES= BUILD_DLLWRAP= BUILD_MISC= +OBJDUMP_DEFS= for targ in $target $canon_targets do @@ -183,6 +205,11 @@ changequote([,])dnl *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;; esac case $targ in + arm-epoc-pe*) + BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' + DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM" + BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' + ;; arm-*pe* | arm-*-wince) BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)' DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" @@ -193,6 +220,9 @@ changequote([,])dnl DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM" BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)' ;; + arm*-* | xscale-* | strongarm-* | d10v-*) + OBJDUMP_DEFS="-DDISASSEMBLER_NEEDS_RELOCS" + ;; changequote(,)dnl i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*) changequote([,])dnl @@ -241,6 +271,7 @@ AC_SUBST(DLLTOOL_DEFS) AC_SUBST(BUILD_WINDRES) AC_SUBST(BUILD_DLLWRAP) AC_SUBST(BUILD_MISC) +AC_SUBST(OBJDUMP_DEFS) AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.]) diff --git a/contrib/binutils/binutils/dlltool.c b/contrib/binutils/binutils/dlltool.c index b618b96..e989f0c 100644 --- a/contrib/binutils/binutils/dlltool.c +++ b/contrib/binutils/binutils/dlltool.c @@ -383,8 +383,12 @@ static FILE *output_def; static FILE *base_file; #ifdef DLLTOOL_ARM +#ifdef DLLTOOL_ARM_EPOC +static const char *mname = "arm-epoc"; +#else static const char *mname = "arm"; #endif +#endif #ifdef DLLTOOL_I386 static const char *mname = "i386"; @@ -605,7 +609,7 @@ mtable[] = , { #define MARM_EPOC 9 - "arm", ".byte", ".short", ".long", ".asciz", "@", + "arm-epoc", ".byte", ".short", ".long", ".asciz", "@", "ldr\tip,[pc]\n\tldr\tpc,[ip]\n\t.long", ".global", ".space", ".align\t2",".align\t4", "", "epoc-pe-arm-little", bfd_arch_arm, @@ -726,6 +730,7 @@ rvaafter (machine) case MMCORE_LE: case MMCORE_ELF: case MMCORE_ELF_LE: + case MARM_EPOC: break; default: /* xgettext:c-format */ @@ -750,6 +755,7 @@ rvabefore (machine) case MMCORE_LE: case MMCORE_ELF: case MMCORE_ELF_LE: + case MARM_EPOC: return ".rva\t"; default: /* xgettext:c-format */ @@ -773,6 +779,7 @@ asm_prefix (machine) case MMCORE_LE: case MMCORE_ELF: case MMCORE_ELF_LE: + case MARM_EPOC: break; case M386: return "_"; diff --git a/contrib/binutils/binutils/dllwrap.c b/contrib/binutils/binutils/dllwrap.c index 637fa52..291abfd 100644 --- a/contrib/binutils/binutils/dllwrap.c +++ b/contrib/binutils/binutils/dllwrap.c @@ -857,10 +857,10 @@ main (argc, argv) dlltool_cmdline = dyn_string_new (cmdline_len); if (verbose) { - dyn_string_append (dlltool_cmdline, " -v"); + dyn_string_append_cstr (dlltool_cmdline, " -v"); } - dyn_string_append (dlltool_cmdline, " --dllname "); - dyn_string_append (dlltool_cmdline, dll_name); + dyn_string_append_cstr (dlltool_cmdline, " --dllname "); + dyn_string_append_cstr (dlltool_cmdline, dll_name); for (i = 1; i < argc; ++i) { @@ -868,10 +868,10 @@ main (argc, argv) { char *arg = saved_argv[i]; int quote = (strchr (arg, ' ') || strchr (arg, '\t')); - dyn_string_append (dlltool_cmdline, + dyn_string_append_cstr (dlltool_cmdline, (quote) ? " \"" : " "); - dyn_string_append (dlltool_cmdline, arg); - dyn_string_append (dlltool_cmdline, + dyn_string_append_cstr (dlltool_cmdline, arg); + dyn_string_append_cstr (dlltool_cmdline, (quote) ? "\"" : ""); } } @@ -894,9 +894,9 @@ main (argc, argv) break; } } - dyn_string_append (driver_cmdline, driver_flags); - dyn_string_append (driver_cmdline, " -o "); - dyn_string_append (driver_cmdline, dll_file_name); + dyn_string_append_cstr (driver_cmdline, driver_flags); + dyn_string_append_cstr (driver_cmdline, " -o "); + dyn_string_append_cstr (driver_cmdline, dll_file_name); if (! entry_point || strlen (entry_point) == 0) { @@ -915,10 +915,10 @@ main (argc, argv) break; } } - dyn_string_append (driver_cmdline, " -Wl,-e,"); - dyn_string_append (driver_cmdline, entry_point); - dyn_string_append (dlltool_cmdline, " --exclude-symbol="); - dyn_string_append (dlltool_cmdline, + dyn_string_append_cstr (driver_cmdline, " -Wl,-e,"); + dyn_string_append_cstr (driver_cmdline, entry_point); + dyn_string_append_cstr (dlltool_cmdline, " --exclude-symbol="); + dyn_string_append_cstr (dlltool_cmdline, (entry_point[0] == '_') ? entry_point+1 : entry_point); if (! image_base_str || strlen (image_base_str) == 0) @@ -929,12 +929,12 @@ main (argc, argv) image_base_str = tmpbuf; } - dyn_string_append (driver_cmdline, " -Wl,--image-base,"); - dyn_string_append (driver_cmdline, image_base_str); + dyn_string_append_cstr (driver_cmdline, " -Wl,--image-base,"); + dyn_string_append_cstr (driver_cmdline, image_base_str); if (verbose) { - dyn_string_append (driver_cmdline, " -v"); + dyn_string_append_cstr (driver_cmdline, " -v"); } for (i = 1; i < argc; ++i) @@ -943,10 +943,10 @@ main (argc, argv) { char *arg = saved_argv[i]; int quote = (strchr (arg, ' ') || strchr (arg, '\t')); - dyn_string_append (driver_cmdline, + dyn_string_append_cstr (driver_cmdline, (quote) ? " \"" : " "); - dyn_string_append (driver_cmdline, arg); - dyn_string_append (driver_cmdline, + dyn_string_append_cstr (driver_cmdline, arg); + dyn_string_append_cstr (driver_cmdline, (quote) ? "\"" : ""); } } @@ -963,15 +963,15 @@ main (argc, argv) step_pre1 = dyn_string_new (1024); - dyn_string_append (step_pre1, dlltool_cmdline->s); + dyn_string_append_cstr (step_pre1, dlltool_cmdline->s); if (export_all) { - dyn_string_append (step_pre1, " --export-all --exclude-symbol="); - dyn_string_append (step_pre1, + dyn_string_append_cstr (step_pre1, " --export-all --exclude-symbol="); + dyn_string_append_cstr (step_pre1, "_cygwin_dll_entry@12,DllMainCRTStartup@12,DllMain@12,DllEntryPoint@12"); } - dyn_string_append (step_pre1, " --output-def "); - dyn_string_append (step_pre1, def_file_name); + dyn_string_append_cstr (step_pre1, " --output-def "); + dyn_string_append_cstr (step_pre1, def_file_name); for (i = 1; i < argc; ++i) { @@ -983,10 +983,10 @@ main (argc, argv) && (arg[len-1] == 'o' || arg[len-1] == 'a')) { int quote = (strchr (arg, ' ') || strchr (arg, '\t')); - dyn_string_append (step_pre1, + dyn_string_append_cstr (step_pre1, (quote) ? " \"" : " "); - dyn_string_append (step_pre1, arg); - dyn_string_append (step_pre1, + dyn_string_append_cstr (step_pre1, arg); + dyn_string_append_cstr (step_pre1, (quote) ? "\"" : ""); } } @@ -998,8 +998,8 @@ main (argc, argv) dyn_string_delete (step_pre1); } - dyn_string_append (dlltool_cmdline, " --def "); - dyn_string_append (dlltool_cmdline, def_file_name); + dyn_string_append_cstr (dlltool_cmdline, " --def "); + dyn_string_append_cstr (dlltool_cmdline, def_file_name); if (verbose) { @@ -1036,18 +1036,18 @@ main (argc, argv) dyn_string_t step1 = dyn_string_new (driver_cmdline->length + strlen (base_file_name) + 20); - dyn_string_append (step1, "-Wl,--base-file,"); + dyn_string_append_cstr (step1, "-Wl,--base-file,"); quote = (strchr (base_file_name, ' ') || strchr (base_file_name, '\t')); - dyn_string_append (step1, + dyn_string_append_cstr (step1, (quote) ? "\"" : ""); - dyn_string_append (step1, base_file_name); - dyn_string_append (step1, + dyn_string_append_cstr (step1, base_file_name); + dyn_string_append_cstr (step1, (quote) ? "\"" : ""); if (driver_cmdline->length) { - dyn_string_append (step1, " "); - dyn_string_append (step1, driver_cmdline->s); + dyn_string_append_cstr (step1, " "); + dyn_string_append_cstr (step1, driver_cmdline->s); } if (run (driver_name, step1->s)) @@ -1087,28 +1087,28 @@ main (argc, argv) + strlen (exp_file_name) + 20); - dyn_string_append (step2, "--base-file "); + dyn_string_append_cstr (step2, "--base-file "); quote = (strchr (base_file_name, ' ') || strchr (base_file_name, '\t')); - dyn_string_append (step2, + dyn_string_append_cstr (step2, (quote) ? "\"" : ""); - dyn_string_append (step2, base_file_name); - dyn_string_append (step2, + dyn_string_append_cstr (step2, base_file_name); + dyn_string_append_cstr (step2, (quote) ? "\" " : " "); - dyn_string_append (step2, "--output-exp "); + dyn_string_append_cstr (step2, "--output-exp "); quote = (strchr (exp_file_name, ' ') || strchr (exp_file_name, '\t')); - dyn_string_append (step2, + dyn_string_append_cstr (step2, (quote) ? "\"" : ""); - dyn_string_append (step2, exp_file_name); - dyn_string_append (step2, + dyn_string_append_cstr (step2, exp_file_name); + dyn_string_append_cstr (step2, (quote) ? "\"" : ""); if (dlltool_cmdline->length) { - dyn_string_append (step2, " "); - dyn_string_append (step2, dlltool_cmdline->s); + dyn_string_append_cstr (step2, " "); + dyn_string_append_cstr (step2, dlltool_cmdline->s); } if (run (dlltool_name, step2->s)) @@ -1131,27 +1131,27 @@ main (argc, argv) + strlen (exp_file_name) + strlen (base_file_name) + 20); - dyn_string_append (step3, "-Wl,--base-file,"); + dyn_string_append_cstr (step3, "-Wl,--base-file,"); quote = (strchr (base_file_name, ' ') || strchr (base_file_name, '\t')); - dyn_string_append (step3, + dyn_string_append_cstr (step3, (quote) ? "\"" : ""); - dyn_string_append (step3, base_file_name); - dyn_string_append (step3, + dyn_string_append_cstr (step3, base_file_name); + dyn_string_append_cstr (step3, (quote) ? "\" " : " "); quote = (strchr (exp_file_name, ' ') || strchr (exp_file_name, '\t')); - dyn_string_append (step3, + dyn_string_append_cstr (step3, (quote) ? "\"" : ""); - dyn_string_append (step3, exp_file_name); - dyn_string_append (step3, + dyn_string_append_cstr (step3, exp_file_name); + dyn_string_append_cstr (step3, (quote) ? "\"" : ""); if (driver_cmdline->length) { - dyn_string_append (step3, " "); - dyn_string_append (step3, driver_cmdline->s); + dyn_string_append_cstr (step3, " "); + dyn_string_append_cstr (step3, driver_cmdline->s); } if (run (driver_name, step3->s)) @@ -1172,34 +1172,34 @@ main (argc, argv) + strlen (exp_file_name) + 20); - dyn_string_append (step4, "--base-file "); + dyn_string_append_cstr (step4, "--base-file "); quote = (strchr (base_file_name, ' ') || strchr (base_file_name, '\t')); - dyn_string_append (step4, + dyn_string_append_cstr (step4, (quote) ? "\"" : ""); - dyn_string_append (step4, base_file_name); - dyn_string_append (step4, + dyn_string_append_cstr (step4, base_file_name); + dyn_string_append_cstr (step4, (quote) ? "\" " : " "); - dyn_string_append (step4, "--output-exp "); + dyn_string_append_cstr (step4, "--output-exp "); quote = (strchr (exp_file_name, ' ') || strchr (exp_file_name, '\t')); - dyn_string_append (step4, + dyn_string_append_cstr (step4, (quote) ? "\"" : ""); - dyn_string_append (step4, exp_file_name); - dyn_string_append (step4, + dyn_string_append_cstr (step4, exp_file_name); + dyn_string_append_cstr (step4, (quote) ? "\"" : ""); if (dlltool_cmdline->length) { - dyn_string_append (step4, " "); - dyn_string_append (step4, dlltool_cmdline->s); + dyn_string_append_cstr (step4, " "); + dyn_string_append_cstr (step4, dlltool_cmdline->s); } if (output_lib_file_name) { - dyn_string_append (step4, " --output-lib "); - dyn_string_append (step4, output_lib_file_name); + dyn_string_append_cstr (step4, " --output-lib "); + dyn_string_append_cstr (step4, output_lib_file_name); } if (run (dlltool_name, step4->s)) @@ -1225,16 +1225,16 @@ main (argc, argv) + 20); quote = (strchr (exp_file_name, ' ') || strchr (exp_file_name, '\t')); - dyn_string_append (step5, + dyn_string_append_cstr (step5, (quote) ? "\"" : ""); - dyn_string_append (step5, exp_file_name); - dyn_string_append (step5, + dyn_string_append_cstr (step5, exp_file_name); + dyn_string_append_cstr (step5, (quote) ? "\"" : ""); if (driver_cmdline->length) { - dyn_string_append (step5, " "); - dyn_string_append (step5, driver_cmdline->s); + dyn_string_append_cstr (step5, " "); + dyn_string_append_cstr (step5, driver_cmdline->s); } if (run (driver_name, step5->s)) diff --git a/contrib/binutils/binutils/ieee.c b/contrib/binutils/binutils/ieee.c index 27409cc..52149b2 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 (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. @@ -410,7 +410,7 @@ ieee_read_optional_number (info, pp, pv, ppresent) } ieee_error (info, *pp - 1, _("invalid number")); - return false; + return false; } /* Read a required string from an IEEE file. */ @@ -563,7 +563,7 @@ ieee_read_expression (info, pp, pv) ieee_error (info, start, _("unknown section")); return false; } - + if (esp - expr_stack >= EXPR_STACK_SIZE) { ieee_error (info, start, _("expression stack overflow")); @@ -4494,7 +4494,7 @@ ieee_start_range (info, low) r->next = info->pending_ranges; info->pending_ranges = r; return true; -} +} /* Finish a range started by ieee_start_range. */ @@ -4927,7 +4927,9 @@ ieee_start_compilation_unit (p, filename) { struct ieee_handle *info = (struct ieee_handle *) p; const char *modname; +#ifdef HAVE_DOS_BASED_FILE_SYSTEM const char *backslash; +#endif char *c, *s; unsigned int nindx; @@ -4939,10 +4941,12 @@ ieee_start_compilation_unit (p, filename) info->filename = filename; modname = strrchr (filename, '/'); +#ifdef HAVE_DOS_BASED_FILE_SYSTEM /* We could have a mixed forward/back slash case. */ - backslash = strrchr (modname, '\\'); - if (backslash > modname) + backslash = strrchr (filename, '\\'); + if (modname == NULL || (backslash != NULL && backslash > modname)) modname = backslash; +#endif if (modname != NULL) ++modname; @@ -5200,15 +5204,20 @@ ieee_add_bb11 (info, sec, low, high) } else { - const char *filename, *modname, *backslash; + const char *filename, *modname; +#ifdef HAVE_DOS_BASED_FILE_SYSTEM + const char *backslash; +#endif char *c, *s; /* Start the enclosing BB10 block. */ filename = bfd_get_filename (info->abfd); modname = strrchr (filename, '/'); - backslash = strrchr (modname, '\\'); - if (backslash > modname) +#ifdef HAVE_DOS_BASED_FILE_SYSTEM + backslash = strrchr (filename, '\\'); + if (modname == NULL || (backslash != NULL && backslash > modname)) modname = backslash; +#endif if (modname != NULL) ++modname; @@ -5838,7 +5847,7 @@ ieee_offset_type (p) which seems pretty important. I'm going to punt this for now. */ return ieee_int_type (p, 4, true); -} +} /* Make a method type. */ @@ -7312,7 +7321,7 @@ ieee_function_parameter (p, name, kind, val) return false; ++info->fnargcount; - return true; + return true; } /* Output pending function parameters. */ diff --git a/contrib/binutils/binutils/nm.1 b/contrib/binutils/binutils/nm.1 index c2ad99e..dbb116c 100644 --- a/contrib/binutils/binutils/nm.1 +++ b/contrib/binutils/binutils/nm.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1991 Free Software Foundation +.\" Copyright (c) 1991, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH nm 1 "5 November 1991" "cygnus support" "GNU Development Tools" +.TH nm 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -212,19 +212,377 @@ The GNU Binary Utilities\c .SH COPYING -Copyright (c) 1991 Free Software Foundation, Inc. +Copyright (c) 1991, 2000 Free Software Foundation, Inc. .PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. -.PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +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. diff --git a/contrib/binutils/binutils/nm.c b/contrib/binutils/binutils/nm.c index ad5a00d..3695d1e 100644 --- a/contrib/binutils/binutils/nm.c +++ b/contrib/binutils/binutils/nm.c @@ -1,5 +1,5 @@ /* nm.c -- Describe symbol table of a rel file. - Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -260,7 +260,7 @@ static bfd *lineno_cache_rel_bfd; static struct option long_options[] = { {"debug-syms", no_argument, &print_debug_syms, 1}, - {"demangle", no_argument, &do_demangle, 1}, + {"demangle", optional_argument, 0, 'C'}, {"dynamic", no_argument, &dynamic, 1}, {"extern-only", no_argument, &external_only, 1}, {"format", required_argument, 0, 'f'}, @@ -297,7 +297,9 @@ usage (stream, status) -a, --debug-syms Display debugger-only symbols\n\ -A, --print-file-name Print name of the input file before every symbol\n\ -B Same as --format=bsd\n\ - -C, --demangle Decode low-level symbol names into user-level names\n\ + -C, --demangle[=STYLE] Decode low-level symbol names into user-level names\n\ + The STYLE, if specified, can be `auto' (the default),\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\ @@ -319,6 +321,7 @@ usage (stream, status) --target=BFDNAME Specify the target object format as BFDNAME\n\ -u, --undefined-only Display only undefined symbols\n\ -V, --version Display this program's version number\n\ + -X 32_64 (ignored)\n\ \n")); list_supported_targets (program_name, stream); if (status == 0) @@ -407,7 +410,8 @@ main (argc, argv) bfd_init (); set_default_bfd_target (); - while ((c = getopt_long (argc, argv, "aABCDef:glnopPrst:uvV", long_options, (int *) 0)) != EOF) + while ((c = getopt_long (argc, argv, "aABCDef:glnopPrst:uvVX:", + long_options, (int *) 0)) != EOF) { switch (c) { @@ -423,6 +427,17 @@ main (argc, argv) break; case 'C': do_demangle = 1; + if (optarg != NULL) + { + enum demangling_styles style; + + style = cplus_demangle_name_to_style (optarg); + if (style == unknown_demangling) + fatal (_("unknown demangling style `%s'"), + optarg); + + cplus_demangle_set_style (style); + } break; case 'D': dynamic = 1; @@ -466,6 +481,17 @@ main (argc, argv) case 'V': show_version = 1; break; + case 'X': + /* Ignored for (partial) AIX compatibility. On AIX, the + argument has values 32, 64, or 32_64, and specfies that + only 32-bit, only 64-bit, or both kinds of objects should + be examined. The default is 32. So plain AIX nm on a + library archive with both kinds of objects will ignore + the 64-bit ones. For GNU nm, the default is and always + has been -X 32_64, and other options are not supported. */ + if (strcmp (optarg, "32_64") != 0) + fatal (_("Only -X 32_64 is supported")); + break; case OPTION_TARGET: /* --target */ target = optarg; @@ -1447,13 +1473,11 @@ print_symbol_info_bsd (info, abfd) { if (bfd_is_undefined_symclass (info->type)) { - printf ("%*s", #ifdef BFD64 - 16, + printf ("%*s", 16, ""); #else - 8, + printf ("%*s", 8, ""); #endif - ""); } else print_value (info->value); diff --git a/contrib/binutils/binutils/objcopy.1 b/contrib/binutils/binutils/objcopy.1 index 80ca216..d2eed15 100644 --- a/contrib/binutils/binutils/objcopy.1 +++ b/contrib/binutils/binutils/objcopy.1 @@ -1,6 +1,6 @@ .\" 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" "Cygnus Solutions" "GNU Development Tools" +.TH objcopy 1 "05 April 2000" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -47,6 +47,8 @@ objcopy \- copy and translate object files .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 "\|]" @@ -282,6 +284,14 @@ with different conventions for symbol names. This is different from \fB\-\-change\-leading\-char\fP 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 when one is trying link two things together for which you have no @@ -314,19 +324,377 @@ The GNU Binary Utilities\c \&, Roland H. Pesch (June 1993). .SH COPYING -Copyright (c) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. -.PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. +Copyright (c) 1993, 94, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. .PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +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. diff --git a/contrib/binutils/binutils/objcopy.c b/contrib/binutils/binutils/objcopy.c index 6a6a327..cae66fc 100644 --- a/contrib/binutils/binutils/objcopy.c +++ b/contrib/binutils/binutils/objcopy.c @@ -1,5 +1,5 @@ /* objcopy.c -- copy object file from input to output, optionally massaging it. - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -215,6 +215,8 @@ static boolean weaken = false; #define OPTION_STRIP_UNNEEDED (OPTION_SET_START + 1) #define OPTION_WEAKEN (OPTION_STRIP_UNNEEDED + 1) #define OPTION_REDEFINE_SYM (OPTION_WEAKEN + 1) +#define OPTION_SREC_LEN (OPTION_REDEFINE_SYM + 1) +#define OPTION_SREC_FORCES3 (OPTION_SREC_LEN + 1) /* Options to handle if running as "strip". */ @@ -290,6 +292,8 @@ static struct option copy_options[] = {"weaken", no_argument, 0, OPTION_WEAKEN}, {"weaken-symbol", required_argument, 0, 'W'}, {"redefine-sym", required_argument, 0, OPTION_REDEFINE_SYM}, + {"srec-len", required_argument, 0, OPTION_SREC_LEN}, + {"srec-forceS3", no_argument, 0, OPTION_SREC_FORCES3}, {0, no_argument, 0, 0} }; @@ -301,6 +305,14 @@ extern char *program_name; -1 means if we should use argv[0] to decide. */ extern int is_strip; +/* The maximum length of an S record. This variable is declared in srec.c + and can be modified by the --srec-len parameter. */ +extern unsigned int Chunk; + +/* Restrict the generation of Srecords to type S3 only. + This variable is declare in bfd/srec.c and can be toggled + on by the --srec-forceS3 command line switch. */ +extern boolean S3Forced; static void copy_usage (stream, exit_status) @@ -350,6 +362,8 @@ copy_usage (stream, exit_status) --change-leading-char Force output format's leading character style\n\ --remove-leading-char Remove leading character from global symbols\n\ --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\ -v --verbose List all object files modified\n\ -V --version Display this program's version number\n\ -h --help Display this output\n\ @@ -557,6 +571,8 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount) { register asymbol **from = isyms, **to = osyms; long src_count = 0, dst_count = 0; + int relocatable = (abfd->flags & (HAS_RELOC | EXEC_P | DYNAMIC)) + == HAS_RELOC; for (; src_count < symcount; src_count++) { @@ -611,6 +627,9 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount) && ((*bfd_get_section (sym)->symbol_ptr_ptr)->flags & BSF_KEEP) != 0)) keep = 1; + else if (relocatable /* Relocatable file. */ + && (flags & (BSF_GLOBAL | BSF_WEAK)) != 0) + keep = 1; else if ((flags & BSF_GLOBAL) != 0 /* Global symbol. */ || (flags & BSF_WEAK) != 0 || bfd_is_und_section (bfd_get_section (sym)) @@ -746,6 +765,13 @@ copy_object (ibfd, obfd) long symsize; PTR dhandle; + if (ibfd->xvec->byteorder != obfd->xvec->byteorder + && ibfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN + && obfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN) + { + fatal (_("Unable to change endianness of input file(s)")); + return; + } if (!bfd_set_format (obfd, bfd_get_format (ibfd))) RETURN_NONFATAL (bfd_get_filename (obfd)); @@ -1246,7 +1272,7 @@ setup_section (ibfd, isection, obfdarg) bfd_vma vma; bfd_vma lma; flagword flags; - char *err; + const char *err; if ((bfd_get_section_flags (ibfd, isection) & SEC_DEBUGGING) != 0 && (strip_symbols == STRIP_DEBUG @@ -1269,7 +1295,7 @@ setup_section (ibfd, isection, obfdarg) if (osection == NULL) { - err = "making"; + err = _("making"); goto loser; } @@ -1278,7 +1304,7 @@ setup_section (ibfd, isection, obfdarg) size = (size + interleave - 1) / interleave; if (! bfd_set_section_size (obfd, osection, size)) { - err = "size"; + err = _("size"); goto loser; } @@ -1292,7 +1318,7 @@ setup_section (ibfd, isection, obfdarg) if (! bfd_set_section_vma (obfd, osection, vma)) { - err = "vma"; + err = _("vma"); goto loser; } @@ -1318,7 +1344,7 @@ setup_section (ibfd, isection, obfdarg) bfd_section_alignment (ibfd, isection)) == false) { - err = "alignment"; + err = _("alignment"); goto loser; } @@ -1327,7 +1353,7 @@ setup_section (ibfd, isection, obfdarg) flags = p->flags | (flags & SEC_HAS_CONTENTS); if (!bfd_set_section_flags (obfd, osection, flags)) { - err = "flags"; + err = _("flags"); goto loser; } @@ -1341,7 +1367,7 @@ setup_section (ibfd, isection, obfdarg) from the input section to the output section. */ if (!bfd_copy_private_section_data (ibfd, isection, obfd, osection)) { - err = "private data"; + err = _("private data"); goto loser; } @@ -1687,7 +1713,7 @@ strip_main (argc, argv) break; case 'S': case 'g': - case 'd': /* NetBSD, historic BSD strip */ + case 'd': /* Historic BSD alias for -g. Used by early NetBSD. */ strip_symbols = STRIP_DEBUG; break; case OPTION_STRIP_UNNEEDED: @@ -2124,6 +2150,14 @@ copy_main (argc, argv) set_start_set = true; break; + case OPTION_SREC_LEN: + Chunk = parse_vma (optarg, "--srec-len"); + break; + + case OPTION_SREC_FORCES3: + S3Forced = true; + break; + case 0: break; /* we've been given a long option */ diff --git a/contrib/binutils/binutils/objdump.1 b/contrib/binutils/binutils/objdump.1 index ddc153e..1c2fa61 100644 --- a/contrib/binutils/binutils/objdump.1 +++ b/contrib/binutils/binutils/objdump.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation +.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH objdump 1 "5 November 1991" "cygnus support" "GNU Development Tools" +.TH objdump 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -396,17 +396,376 @@ The GNU Binary Utilities\c .SH COPYING Copyright (c) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. .PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. .PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. -.PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +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. diff --git a/contrib/binutils/binutils/objdump.c b/contrib/binutils/binutils/objdump.c index 4832e9d..a665831 100644 --- a/contrib/binutils/binutils/objdump.c +++ b/contrib/binutils/binutils/objdump.c @@ -255,7 +255,9 @@ usage (stream, status) -EL --endian=little Assume little endian format when disassembling\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 Decode mangled/processed symbol names\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\ -w, --wide Format output for more than 80 columns\n\ -z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n\ --start-address=ADDR Only process data whoes address is >= ADDR\n\ @@ -288,7 +290,7 @@ static struct option long_options[]= {"architecture", required_argument, NULL, 'm'}, {"archive-headers", no_argument, NULL, 'a'}, {"debugging", no_argument, NULL, 'g'}, - {"demangle", no_argument, NULL, 'C'}, + {"demangle", optional_argument, NULL, 'C'}, {"disassemble", no_argument, NULL, 'd'}, {"disassemble-all", no_argument, NULL, 'D'}, {"disassembler-options", required_argument, NULL, 'M'}, @@ -371,6 +373,8 @@ dump_section_header (abfd, section, ignored) PF (SEC_NEVER_LOAD, "NEVER_LOAD"); PF (SEC_EXCLUDE, "EXCLUDE"); PF (SEC_SORT_ENTRIES, "SORT_ENTRIES"); + PF (SEC_BLOCK, "BLOCK"); + PF (SEC_CLINK, "CLINK"); PF (SEC_SMALL_DATA, "SMALL_DATA"); PF (SEC_SHARED, "SHARED"); @@ -1354,13 +1358,15 @@ disassemble_bytes (info, disassemble_fn, insns, data, info->bytes_per_line = 0; info->bytes_per_chunk = 0; +#ifdef DISASSEMBLER_NEEDS_RELOCS /* FIXME: This is wrong. It tests the number of octets in the last instruction, not the current one. */ if (*relppp < relppend && (**relppp)->address >= addr_offset - && (**relppp)->address < addr_offset + octets / opb) + && (**relppp)->address <= addr_offset + octets / opb) info->flags = INSN_HAS_RELOC; else +#endif info->flags = 0; octets = (*disassemble_fn) (section->vma + addr_offset, info); @@ -1500,12 +1506,20 @@ disassemble_bytes (info, disassemble_fn, insns, data, need_nl = true; } - if (dump_reloc_info - && (section->flags & SEC_RELOC) != 0) + if ((section->flags & SEC_RELOC) != 0 +#ifndef DISASSEMBLER_NEEDS_RELOCS + && dump_reloc_info +#endif + ) { while ((*relppp) < relppend && ((**relppp)->address >= (bfd_vma) addr_offset && (**relppp)->address < (bfd_vma) addr_offset + octets / opb)) +#ifdef DISASSEMBLER_NEEDS_RELOCS + if (! dump_reloc_info) + ++(*relppp); + else +#endif { arelent *q; @@ -1661,8 +1675,11 @@ disassemble_data (abfd) if (only != (char *) NULL && strcmp (only, section->name) != 0) continue; - if (dump_reloc_info - && (section->flags & SEC_RELOC) != 0) + if ((section->flags & SEC_RELOC) != 0 +#ifndef DISASSEMBLER_NEEDS_RELOCS + && dump_reloc_info +#endif + ) { long relsize; @@ -2631,7 +2648,7 @@ display_target_list () char *dummy_name; int t; - dummy_name = choose_temp_base (); + dummy_name = make_temp_file (NULL); for (t = 0; bfd_target_vector[t]; t++) { bfd_target *p = bfd_target_vector[t]; @@ -2685,7 +2702,7 @@ display_info_table (first, last) printf ("%s ", bfd_target_vector[t]->name); putchar ('\n'); - dummy_name = choose_temp_base (); + dummy_name = make_temp_file (NULL); for (a = (int) bfd_arch_obscure + 1; a < (int) bfd_arch_last; a++) if (strcmp (bfd_printable_arch_mach (a, 0), "UNKNOWN!") != 0) { @@ -2831,6 +2848,17 @@ main (argc, argv) break; case 'C': do_demangle = true; + if (optarg != NULL) + { + enum demangling_styles style; + + style = cplus_demangle_name_to_style (optarg); + if (style == unknown_demangling) + fatal (_("unknown demangling style `%s'"), + optarg); + + cplus_demangle_set_style (style); + } break; case 'w': wide_output = true; diff --git a/contrib/binutils/binutils/po/POTFILES.in b/contrib/binutils/binutils/po/POTFILES.in index a3a0586..861e0ff 100644 --- a/contrib/binutils/binutils/po/POTFILES.in +++ b/contrib/binutils/binutils/po/POTFILES.in @@ -14,8 +14,6 @@ debug.h dlltool.c dlltool.h dllwrap.c -dyn-string.c -dyn-string.h filemode.c ieee.c ieee.c diff --git a/contrib/binutils/binutils/po/binutils.pot b/contrib/binutils/binutils/po/binutils.pot index ed7ba0c..b497a04 100644 --- a/contrib/binutils/binutils/po/binutils.pot +++ b/contrib/binutils/binutils/po/binutils.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-04-05 14:09+0930\n" +"POT-Creation-Date: 2001-01-11 12:02-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,12 +18,12 @@ msgstr "" #, c-format msgid "" "Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n" -" [-e executable] [--exe=executable] [--demangle]\n" +" [-e executable] [--exe=executable] [--demangle[=style]]\n" " [--basenames] [--functions] [addr addr ...]\n" msgstr "" -#: addr2line.c:83 ar.c:286 nlmconv.c:1141 nm.c:306 objcopy.c:358 objcopy.c:390 -#: objdump.c:277 readelf.c:1703 size.c:89 strings.c:512 windres.c:737 +#: 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 #, c-format msgid "Report bugs to %s\n" msgstr "" @@ -33,264 +33,281 @@ msgstr "" msgid "%s: can not get addresses from archive" msgstr "" -#: ar.c:235 +#: addr2line.c:310 nm.c:436 objdump.c:2857 +#, c-format +msgid "unknown demangling style `%s'" +msgstr "" + +#: ar.c:236 #, c-format msgid "no entry %s in archive\n" msgstr "" -#: ar.c:252 +#: ar.c:253 #, c-format msgid "" -"Usage: %s [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file " -"file...\n" +"Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] " +"archive-file file...\n" msgstr "" -#: ar.c:255 +#: ar.c:256 #, c-format msgid " %s -M [\n" +"\n" +msgstr "" + +#: ar.c:845 ar.c:913 #, c-format msgid "%s is not a valid archive" msgstr "" -#: ar.c:846 +#: ar.c:881 #, c-format msgid "stat returns negative size for %s" msgstr "" -#: ar.c:967 +#: ar.c:1008 #, c-format msgid "%s is not an archive" msgstr "" -#: ar.c:974 +#: ar.c:1015 #, c-format -msgid "%s: creating %s\n" +msgid "creating %s" msgstr "" -#: ar.c:1181 +#: ar.c:1221 #, c-format msgid "No member named `%s'\n" msgstr "" -#: ar.c:1233 +#: ar.c:1273 #, c-format -msgid "%s: no entry %s in archive %s!\n" +msgid "no entry %s in archive %s!" msgstr "" -#: ar.c:1395 +#: ar.c:1434 #, c-format msgid "%s: no archive map to update" msgstr "" -#: arsup.c:87 +#: arsup.c:88 #, c-format msgid "No entry %s in archive.\n" msgstr "" -#: arsup.c:119 +#: arsup.c:120 #, c-format msgid "Can't open file %s\n" msgstr "" -#: arsup.c:167 +#: arsup.c:170 #, c-format msgid "%s: Can't open output archive %s\n" msgstr "" -#: arsup.c:179 +#: arsup.c:182 #, c-format msgid "%s: Can't open input archive %s\n" msgstr "" -#: arsup.c:185 +#: arsup.c:188 #, c-format msgid "%s: file %s is not an archive\n" msgstr "" -#: arsup.c:226 +#: arsup.c:229 #, c-format msgid "%s: no output archive specified yet\n" msgstr "" -#: arsup.c:246 arsup.c:281 arsup.c:317 arsup.c:337 arsup.c:395 +#: arsup.c:249 arsup.c:284 arsup.c:320 arsup.c:340 arsup.c:398 #, c-format msgid "%s: no open output archive\n" msgstr "" -#: arsup.c:254 arsup.c:355 arsup.c:375 +#: arsup.c:257 arsup.c:358 arsup.c:378 #, c-format msgid "%s: can't open file %s\n" msgstr "" -#: arsup.c:302 arsup.c:371 arsup.c:450 +#: arsup.c:305 arsup.c:374 arsup.c:453 #, c-format msgid "%s: can't find module file %s\n" msgstr "" -#: arsup.c:402 +#: arsup.c:405 #, c-format msgid "Current open archive is %s\n" msgstr "" -#: arsup.c:429 +#: arsup.c:432 #, c-format msgid "%s: no open archive\n" msgstr "" -#: bucomm.c:139 +#: bucomm.c:135 #, c-format msgid "can't set BFD default target to `%s': %s" msgstr "" -#: bucomm.c:151 +#: bucomm.c:147 #, c-format msgid "%s: Matching formats:" msgstr "" -#: bucomm.c:168 +#: bucomm.c:164 msgid "Supported targets:" msgstr "" -#: bucomm.c:170 +#: bucomm.c:166 #, c-format msgid "%s: supported targets:" msgstr "" -#: bucomm.c:263 +#: bucomm.c:272 #, c-format msgid "%s: bad number: %s" msgstr "" @@ -305,14 +322,13 @@ msgstr "" msgid "%s: Print a human readable interpretation of a SYSROFF object file\n" msgstr "" -#: coffdump.c:498 srconv.c:1940 sysdump.c:755 +#: coffdump.c:498 srconv.c:1941 sysdump.c:755 #, c-format msgid "GNU %s version %s\n" msgstr "" -#: coffdump.c:516 srconv.c:1977 sysdump.c:775 -#, c-format -msgid "%s: no input file specified\n" +#: coffdump.c:516 srconv.c:1975 sysdump.c:775 +msgid "no input file specified" msgstr "" #: debug.c:653 @@ -412,688 +428,880 @@ msgstr "" msgid "debug_write_type: illegal type encountered" msgstr "" -#: dlltool.c:770 dlltool.c:794 dlltool.c:819 +#: dlltool.c:737 dlltool.c:762 dlltool.c:788 #, c-format -msgid "Internal error: Unknown machine type: %d\n" +msgid "Internal error: Unknown machine type: %d" msgstr "" -#: dlltool.c:856 +#: dlltool.c:825 #, c-format msgid "Can't open def file: %s" msgstr "" -#: dlltool.c:861 +#: dlltool.c:830 #, c-format msgid "Processing def file: %s" msgstr "" -#: dlltool.c:865 +#: dlltool.c:834 msgid "Processed def file" msgstr "" -#: dlltool.c:890 +#: dlltool.c:859 #, c-format -msgid "Syntax error in def file %s:%d\n" +msgid "Syntax error in def file %s:%d" msgstr "" -#: dlltool.c:923 +#: dlltool.c:892 #, c-format msgid "NAME: %s base: %x" msgstr "" -#: dlltool.c:926 -msgid "Can't have LIBRARY and NAME\n" +#: dlltool.c:895 dlltool.c:914 +msgid "Can't have LIBRARY and NAME" msgstr "" -#: dlltool.c:942 +#: dlltool.c:911 #, c-format msgid "LIBRARY: %s base: %x" msgstr "" -#: dlltool.c:945 -#, c-format -msgid "%s: Can't have LIBRARY and NAME\n" -msgstr "" - -#: dlltool.c:1200 resrc.c:271 +#: dlltool.c:1169 resrc.c:271 #, c-format msgid "wait: %s" msgstr "" -#: dlltool.c:1205 resrc.c:276 +#: dlltool.c:1174 dllwrap.c:456 resrc.c:276 #, c-format msgid "subprocess got fatal signal %d" msgstr "" -#: dlltool.c:1211 +#: dlltool.c:1180 dllwrap.c:463 resrc.c:283 #, c-format -msgid "%s exited with status %d\n" +msgid "%s exited with status %d" msgstr "" -#: dlltool.c:1243 +#: dlltool.c:1212 #, c-format -msgid "Sucking in info from %s section in %s\n" +msgid "Sucking in info from %s section in %s" msgstr "" -#: dlltool.c:1367 +#: dlltool.c:1336 #, c-format -msgid "Excluding symbol: %s\n" +msgid "Excluding symbol: %s" msgstr "" -#: dlltool.c:1462 dlltool.c:1473 nm.c:904 nm.c:915 objdump.c:444 objdump.c:461 +#: dlltool.c:1431 dlltool.c:1442 nm.c:946 nm.c:957 objdump.c:443 objdump.c:460 #, c-format -msgid "%s: no symbols\n" +msgid "%s: no symbols" msgstr "" #. FIXME: we ought to read in and block out the base relocations -#: dlltool.c:1500 +#: dlltool.c:1469 #, c-format -msgid "Done reading %s\n" +msgid "Done reading %s" msgstr "" -#: dlltool.c:1511 +#: dlltool.c:1480 #, c-format msgid "Unable to open object file: %s" msgstr "" -#: dlltool.c:1514 +#: dlltool.c:1483 #, c-format msgid "Scanning object file %s" msgstr "" -#: dlltool.c:1529 +#: dlltool.c:1498 #, c-format msgid "Cannot produce mcore-elf dll from archive file: %s" msgstr "" -#: dlltool.c:1621 +#: dlltool.c:1590 msgid "Adding exports to output file" msgstr "" -#: dlltool.c:1666 +#: dlltool.c:1635 msgid "Added exports to output file" msgstr "" -#: dlltool.c:1790 +#: dlltool.c:1759 #, c-format -msgid "Generating export file: %s\n" +msgid "Generating export file: %s" msgstr "" -#: dlltool.c:1795 +#: dlltool.c:1764 #, c-format msgid "Unable to open temporary assembler file: %s" msgstr "" -#: dlltool.c:1798 +#: dlltool.c:1767 #, c-format msgid "Opened temporary file: %s" msgstr "" -#: dlltool.c:2012 +#: dlltool.c:1981 msgid "Generated exports file" msgstr "" -#: dlltool.c:2267 +#: dlltool.c:2236 #, c-format msgid "bfd_open failed open stub file: %s" msgstr "" -#: dlltool.c:2270 +#: dlltool.c:2239 #, c-format msgid "Creating stub file: %s" msgstr "" -#: dlltool.c:2657 +#: dlltool.c:2626 #, c-format msgid "failed to open temporary head file: %s" msgstr "" -#: dlltool.c:2716 +#: dlltool.c:2685 #, c-format msgid "failed to open temporary tail file: %s" msgstr "" -#: dlltool.c:2784 +#: dlltool.c:2753 #, c-format msgid "Can't open .lib file: %s" msgstr "" -#: dlltool.c:2787 +#: dlltool.c:2756 #, c-format -msgid "Creating library file: %s\n" +msgid "Creating library file: %s" msgstr "" -#: dlltool.c:2846 +#: dlltool.c:2815 #, c-format -msgid "cannot delete %s: %s\n" +msgid "cannot delete %s: %s" msgstr "" -#: dlltool.c:2850 +#: dlltool.c:2819 msgid "Created lib file" msgstr "" -#: dlltool.c:2955 +#: dlltool.c:2924 #, c-format -msgid "Warning, ignoring duplicate EXPORT %s %d,%d\n" +msgid "Warning, ignoring duplicate EXPORT %s %d,%d" msgstr "" -#: dlltool.c:2961 +#: dlltool.c:2930 #, c-format msgid "Error, duplicate EXPORT with oridinals: %s" msgstr "" -#: dlltool.c:3088 +#: dlltool.c:3057 msgid "Processing definitions" msgstr "" -#: dlltool.c:3126 +#: dlltool.c:3095 msgid "Processed definitions" msgstr "" #. xgetext:c-format -#: dlltool.c:3137 +#: dlltool.c:3106 dllwrap.c:520 #, c-format msgid "Usage %s \n" msgstr "" #. xgetext:c-format -#: dlltool.c:3139 +#: dlltool.c:3108 #, c-format msgid "" " -m --machine Create as DLL for . [default: %s]\n" msgstr "" -#: dlltool.c:3140 +#: dlltool.c:3109 msgid "" " possible : arm[_interwork], i386, mcore[-elf]{-le|-be}, " "ppc, thumb\n" msgstr "" -#: dlltool.c:3141 +#: dlltool.c:3110 msgid " -e --output-exp Generate an export file.\n" msgstr "" -#: dlltool.c:3142 +#: dlltool.c:3111 msgid " -l --output-lib Generate an interface library.\n" msgstr "" -#: dlltool.c:3143 +#: dlltool.c:3112 msgid " -a --add-indirect Add dll indirects to export file.\n" msgstr "" -#: dlltool.c:3144 +#: dlltool.c:3113 msgid "" " -D --dllname Name of input dll to put into interface lib.\n" msgstr "" -#: dlltool.c:3145 +#: dlltool.c:3114 msgid " -d --input-def Name of .def file to be read in.\n" msgstr "" -#: dlltool.c:3146 +#: dlltool.c:3115 msgid " -z --output-def Name of .def file to be created.\n" msgstr "" -#: dlltool.c:3147 +#: dlltool.c:3116 msgid " --export-all-symbols Export all symbols to .def\n" msgstr "" -#: dlltool.c:3148 +#: dlltool.c:3117 msgid " --no-export-all-symbols Only export listed symbols\n" msgstr "" -#: dlltool.c:3149 +#: dlltool.c:3118 msgid " --exclude-symbols Don't export \n" msgstr "" -#: dlltool.c:3150 +#: dlltool.c:3119 msgid " --no-default-excludes Clear default exclude symbols\n" msgstr "" -#: dlltool.c:3151 +#: dlltool.c:3120 msgid " -b --base-file Read linker generated base file.\n" msgstr "" -#: dlltool.c:3152 +#: dlltool.c:3121 msgid " -x --no-idata4 Don't generate idata$4 section.\n" msgstr "" -#: dlltool.c:3153 +#: dlltool.c:3122 msgid " -c --no-idata5 Don't generate idata$5 section.\n" msgstr "" -#: dlltool.c:3154 +#: dlltool.c:3123 msgid "" " -U --add-underscore Add underscores to symbols in interface " "library.\n" msgstr "" -#: dlltool.c:3155 +#: dlltool.c:3124 msgid " -k --kill-at Kill @ from exported names.\n" msgstr "" -#: dlltool.c:3156 +#: dlltool.c:3125 msgid " -A --add-stdcall-alias Add aliases without @.\n" msgstr "" -#: dlltool.c:3157 +#: dlltool.c:3126 msgid " -S --as Use for assembler.\n" msgstr "" -#: dlltool.c:3158 +#: dlltool.c:3127 msgid " -f --as-flags Pass to the assembler.\n" msgstr "" -#: dlltool.c:3159 +#: dlltool.c:3128 msgid "" " -C --compat-implib Create backward compatible import library.\n" msgstr "" -#: dlltool.c:3160 +#: dlltool.c:3129 msgid "" " -n --no-delete Keep temp files (repeat for extra " "preservation).\n" msgstr "" -#: dlltool.c:3161 +#: dlltool.c:3130 msgid " -v --verbose Be verbose.\n" msgstr "" -#: dlltool.c:3162 +#: dlltool.c:3131 msgid " -V --version Display the program version.\n" msgstr "" -#: dlltool.c:3163 +#: dlltool.c:3132 msgid " -h --help Display this information.\n" msgstr "" -#: dlltool.c:3165 +#: dlltool.c:3134 msgid "" " -M --mcore-elf Process mcore-elf object files into .\n" msgstr "" -#: dlltool.c:3166 +#: dlltool.c:3135 msgid " -L --linker Use as the linker.\n" msgstr "" -#: dlltool.c:3167 +#: dlltool.c:3136 msgid " -F --linker-flags Pass to the linker.\n" msgstr "" -#: dlltool.c:3311 +#: dlltool.c:3280 #, c-format msgid "Unable to open base-file: %s" msgstr "" -#: dlltool.c:3340 +#: dlltool.c:3309 #, c-format msgid "Machine '%s' not supported" msgstr "" -#: dlltool.c:3443 dllwrap.c:215 +#: dlltool.c:3412 dllwrap.c:241 #, c-format msgid "Tried file: %s" msgstr "" -#: dlltool.c:3450 dllwrap.c:222 +#: dlltool.c:3419 dllwrap.c:248 #, c-format msgid "Using file: %s" msgstr "" -#: ieee.c:316 +#: dllwrap.c:335 +#, c-format +msgid "Keeping temporary base file %s" +msgstr "" + +#: dllwrap.c:337 +#, c-format +msgid "Deleting temporary base file %s" +msgstr "" + +#: dllwrap.c:351 +#, c-format +msgid "Keeping temporary exp file %s" +msgstr "" + +#: dllwrap.c:353 +#, c-format +msgid "Deleting temporary exp file %s" +msgstr "" + +#: dllwrap.c:366 +#, c-format +msgid "Keeping temporary def file %s" +msgstr "" + +#: dllwrap.c:368 +#, c-format +msgid "Deleting temporary def file %s" +msgstr "" + +#: dllwrap.c:521 +msgid " Generic options:\n" +msgstr "" + +#: dllwrap.c:522 +msgid " --quiet, -q Work quietly\n" +msgstr "" + +#: dllwrap.c:523 +msgid " --verbose, -v Verbose\n" +msgstr "" + +#: dllwrap.c:524 +msgid " --version Print dllwrap version\n" +msgstr "" + +#: dllwrap.c:525 +msgid " --implib Synonym for --output-lib\n" +msgstr "" + +#: dllwrap.c:526 +#, c-format +msgid " Options for %s:\n" +msgstr "" + +#: dllwrap.c:527 +msgid " --driver-name Defaults to \"gcc\"\n" +msgstr "" + +#: dllwrap.c:528 +msgid " --driver-flags Override default ld flags\n" +msgstr "" + +#: dllwrap.c:529 +msgid " --dlltool-name Defaults to \"dlltool\"\n" +msgstr "" + +#: dllwrap.c:530 +msgid " --entry Specify alternate DLL entry point\n" +msgstr "" + +#: dllwrap.c:531 +msgid " --image-base Specify image base address\n" +msgstr "" + +#: dllwrap.c:532 +msgid " --target i386-cygwin32 or i386-mingw32\n" +msgstr "" + +#: dllwrap.c:533 +msgid " --dry-run Show what needs to be run\n" +msgstr "" + +#: dllwrap.c:534 +msgid " --mno-cygwin Create Mingw DLL\n" +msgstr "" + +#: dllwrap.c:535 +msgid " Options passed to DLLTOOL:\n" +msgstr "" + +#: dllwrap.c:536 +msgid " --machine \n" +msgstr "" + +#: dllwrap.c:537 +msgid " --output-exp Generate export file.\n" +msgstr "" + +#: dllwrap.c:538 +msgid " --output-lib Generate input library.\n" +msgstr "" + +#: dllwrap.c:539 +msgid " --add-indirect Add dll indirects to export file.\n" +msgstr "" + +#: dllwrap.c:540 +msgid " --dllname Name of input dll to put into output lib.\n" +msgstr "" + +#: dllwrap.c:541 +msgid " --def Name input .def file\n" +msgstr "" + +#: dllwrap.c:542 +msgid " --output-def Name output .def file\n" +msgstr "" + +#: dllwrap.c:543 +msgid " --export-all-symbols Export all symbols to .def\n" +msgstr "" + +#: dllwrap.c:544 +msgid " --no-export-all-symbols Only export .drectve symbols\n" +msgstr "" + +#: dllwrap.c:545 +msgid " --exclude-symbols Exclude from .def\n" +msgstr "" + +#: dllwrap.c:546 +msgid " --no-default-excludes Zap default exclude symbols\n" +msgstr "" + +#: dllwrap.c:547 +msgid " --base-file Read linker generated base file\n" +msgstr "" + +#: dllwrap.c:548 +msgid " --no-idata4 Don't generate idata$4 section\n" +msgstr "" + +#: dllwrap.c:549 +msgid " --no-idata5 Don't generate idata$5 section\n" +msgstr "" + +#: dllwrap.c:550 +msgid " -U Add underscores to .lib\n" +msgstr "" + +#: dllwrap.c:551 +msgid " -k Kill @ from exported names\n" +msgstr "" + +#: dllwrap.c:552 +msgid " --add-stdcall-alias Add aliases without @\n" +msgstr "" + +#: dllwrap.c:553 +msgid " --as Use for assembler\n" +msgstr "" + +#: dllwrap.c:554 +msgid " --nodelete Keep temp files.\n" +msgstr "" + +#: dllwrap.c:555 +msgid " Rest are passed unmodified to the language driver\n" +msgstr "" + +#: dllwrap.c:816 +msgid "Must provide at least one of -o or --dllname options" +msgstr "" + +#: dllwrap.c:844 +msgid "no export definition file provided" +msgstr "" + +#: dllwrap.c:845 +msgid "creating one, but that may not be what you want" +msgstr "" + +#: dllwrap.c:1006 +#, c-format +msgid "DLLTOOL name : %s\n" +msgstr "" + +#: dllwrap.c:1007 +#, c-format +msgid "DLLTOOL options : %s\n" +msgstr "" + +#: dllwrap.c:1008 +#, c-format +msgid "DRIVER name : %s\n" +msgstr "" + +#: dllwrap.c:1009 +#, c-format +msgid "DRIVER options : %s\n" +msgstr "" + +#: ieee.c:317 msgid "unexpected end of debugging information" msgstr "" -#: ieee.c:411 +#: ieee.c:412 msgid "invalid number" msgstr "" -#: ieee.c:470 +#: ieee.c:471 msgid "invalid string length" msgstr "" -#: ieee.c:527 ieee.c:568 +#: ieee.c:528 ieee.c:569 msgid "expression stack overflow" msgstr "" -#: ieee.c:547 +#: ieee.c:548 msgid "unsupported IEEE expression operator" msgstr "" -#: ieee.c:562 +#: ieee.c:563 msgid "unknown section" msgstr "" -#: ieee.c:583 +#: ieee.c:584 msgid "expression stack underflow" msgstr "" -#: ieee.c:597 +#: ieee.c:598 msgid "expression stack mismatch" msgstr "" -#: ieee.c:636 +#: ieee.c:637 msgid "unknown builtin type" msgstr "" -#: ieee.c:781 +#: ieee.c:782 msgid "BCD float type not supported" msgstr "" -#: ieee.c:927 +#: ieee.c:928 msgid "unexpected number" msgstr "" -#: ieee.c:934 +#: ieee.c:935 msgid "unexpected record type" msgstr "" -#: ieee.c:967 +#: ieee.c:968 msgid "blocks left on stack at end" msgstr "" -#: ieee.c:1232 +#: ieee.c:1233 msgid "unknown BB type" msgstr "" -#: ieee.c:1241 +#: ieee.c:1242 msgid "stack overflow" msgstr "" -#: ieee.c:1266 +#: ieee.c:1267 msgid "stack underflow" msgstr "" -#: ieee.c:1380 ieee.c:1452 ieee.c:2151 +#: ieee.c:1381 ieee.c:1453 ieee.c:2152 msgid "illegal variable index" msgstr "" -#: ieee.c:1430 +#: ieee.c:1431 msgid "illegal type index" msgstr "" -#: ieee.c:1440 ieee.c:1477 +#: ieee.c:1441 ieee.c:1478 msgid "unknown TY code" msgstr "" -#: ieee.c:1459 +#: ieee.c:1460 msgid "undefined variable in TY" msgstr "" #. Pascal file name. FIXME. -#: ieee.c:1870 +#: ieee.c:1871 msgid "Pascal file name not supported" msgstr "" -#: ieee.c:1918 +#: ieee.c:1919 msgid "unsupported qualifer" msgstr "" -#: ieee.c:2189 +#: ieee.c:2190 msgid "undefined variable in ATN" msgstr "" -#: ieee.c:2232 +#: ieee.c:2233 msgid "unknown ATN type" msgstr "" #. Reserved for FORTRAN common. -#: ieee.c:2354 +#: ieee.c:2355 msgid "unsupported ATN11" msgstr "" #. We have no way to record this information. FIXME. -#: ieee.c:2381 +#: ieee.c:2382 msgid "unsupported ATN12" msgstr "" -#: ieee.c:2441 +#: ieee.c:2442 msgid "unexpected string in C++ misc" msgstr "" -#: ieee.c:2454 +#: ieee.c:2455 msgid "bad misc record" msgstr "" -#: ieee.c:2497 +#: ieee.c:2498 msgid "unrecognized C++ misc record" msgstr "" -#: ieee.c:2614 +#: ieee.c:2615 msgid "undefined C++ object" msgstr "" -#: ieee.c:2648 +#: ieee.c:2649 msgid "unrecognized C++ object spec" msgstr "" -#: ieee.c:2684 +#: ieee.c:2685 msgid "unsupported C++ object type" msgstr "" -#: ieee.c:2694 +#: ieee.c:2695 msgid "C++ base class not defined" msgstr "" -#: ieee.c:2706 ieee.c:2811 +#: ieee.c:2707 ieee.c:2812 msgid "C++ object has no fields" msgstr "" -#: ieee.c:2725 +#: ieee.c:2726 msgid "C++ base class not found in container" msgstr "" -#: ieee.c:2832 +#: ieee.c:2833 msgid "C++ data member not found in container" msgstr "" -#: ieee.c:2873 ieee.c:3023 +#: ieee.c:2874 ieee.c:3024 msgid "unknown C++ visibility" msgstr "" -#: ieee.c:2907 +#: ieee.c:2908 msgid "bad C++ field bit pos or size" msgstr "" -#: ieee.c:2999 +#: ieee.c:3000 msgid "bad type for C++ method function" msgstr "" -#: ieee.c:3009 +#: ieee.c:3010 msgid "no type information for C++ method function" msgstr "" -#: ieee.c:3048 +#: ieee.c:3049 msgid "C++ static virtual method" msgstr "" -#: ieee.c:3143 +#: ieee.c:3144 msgid "unrecognized C++ object overhead spec" msgstr "" -#: ieee.c:3182 +#: ieee.c:3183 msgid "undefined C++ vtable" msgstr "" -#: ieee.c:3253 +#: ieee.c:3254 msgid "C++ default values not in a function" msgstr "" -#: ieee.c:3293 +#: ieee.c:3294 msgid "unrecognized C++ default type" msgstr "" -#: ieee.c:3324 +#: ieee.c:3325 msgid "reference parameter is not a pointer" msgstr "" -#: ieee.c:3409 +#: ieee.c:3410 msgid "unrecognized C++ reference type" msgstr "" -#: ieee.c:3491 +#: ieee.c:3492 msgid "C++ reference not found" msgstr "" -#: ieee.c:3499 +#: ieee.c:3500 msgid "C++ reference is not pointer" msgstr "" -#: ieee.c:3528 ieee.c:3536 +#: ieee.c:3529 ieee.c:3537 msgid "missing required ASN" msgstr "" -#: ieee.c:3566 ieee.c:3574 +#: ieee.c:3567 ieee.c:3575 msgid "missing required ATN65" msgstr "" -#: ieee.c:3588 +#: ieee.c:3589 msgid "bad ATN65 record" msgstr "" -#: ieee.c:4235 +#: ieee.c:4236 msgid "IEEE numeric overflow: 0x" msgstr "" -#: ieee.c:4281 +#: ieee.c:4282 #, c-format msgid "IEEE string length overflow: %u\n" msgstr "" -#: ieee.c:5315 +#: ieee.c:5324 #, c-format msgid "IEEE unsupported integer type size %u\n" msgstr "" -#: ieee.c:5351 +#: ieee.c:5360 #, c-format msgid "IEEE unsupported float type size %u\n" msgstr "" -#: ieee.c:5387 +#: ieee.c:5396 #, c-format msgid "IEEE unsupported complex type size %u\n" msgstr "" #: nlmconv.c:275 srconv.c:1966 -#, c-format -msgid "%s: input and output files must be different\n" +msgid "input and output files must be different" msgstr "" -#: nlmconv.c:325 -#, c-format -msgid "%s: input file named both on command line and with INPUT\n" +#: nlmconv.c:322 +msgid "input file named both on command line and with INPUT" msgstr "" -#: nlmconv.c:336 -#, c-format -msgid "%s: no input file\n" +#: nlmconv.c:331 +msgid "no input file" msgstr "" -#: nlmconv.c:366 -#, c-format -msgid "%s: no name for output file\n" +#: nlmconv.c:361 +msgid "no name for output file" msgstr "" -#: nlmconv.c:381 -#, c-format -msgid "%s: warning:input and output formats are not compatible\n" +#: nlmconv.c:374 +msgid "warning: input and output formats are not compatible" msgstr "" -#: nlmconv.c:411 +#: nlmconv.c:403 msgid "make .bss section" msgstr "" -#: nlmconv.c:420 +#: nlmconv.c:412 msgid "make .nlmsections section" msgstr "" -#: nlmconv.c:422 +#: nlmconv.c:414 msgid "set .nlmsections flags" msgstr "" -#: nlmconv.c:450 +#: nlmconv.c:442 msgid "set .bss vma" msgstr "" -#: nlmconv.c:457 +#: nlmconv.c:449 msgid "set .data size" msgstr "" -#: nlmconv.c:638 +#: nlmconv.c:629 #, c-format -msgid "%s: warning: symbol %s imported but not in import list\n" +msgid "warning: symbol %s imported but not in import list" msgstr "" -#: nlmconv.c:658 +#: nlmconv.c:649 msgid "set start address" msgstr "" -#: nlmconv.c:707 +#: nlmconv.c:698 #, c-format -msgid "%s: warning: START procedure %s not defined\n" +msgid "warning: START procedure %s not defined" msgstr "" -#: nlmconv.c:710 +#: nlmconv.c:700 #, c-format -msgid "%s: warning: EXIT procedure %s not defined\n" +msgid "warning: EXIT procedure %s not defined" msgstr "" -#: nlmconv.c:714 +#: nlmconv.c:702 #, c-format -msgid "%s: warning: CHECK procedure %s not defined\n" +msgid "warning: CHECK procedure %s not defined" msgstr "" -#: nlmconv.c:736 nlmconv.c:928 +#: nlmconv.c:723 nlmconv.c:912 msgid "custom section" msgstr "" -#: nlmconv.c:757 nlmconv.c:960 +#: nlmconv.c:744 nlmconv.c:941 msgid "help section" msgstr "" -#: nlmconv.c:779 nlmconv.c:979 +#: nlmconv.c:766 nlmconv.c:959 msgid "message section" msgstr "" -#: nlmconv.c:795 nlmconv.c:1012 +#: nlmconv.c:782 nlmconv.c:992 msgid "module section" msgstr "" -#: nlmconv.c:815 nlmconv.c:1029 +#: nlmconv.c:802 nlmconv.c:1008 msgid "rpc section" msgstr "" -#: nlmconv.c:852 +#. There is no place to record this information. +#: nlmconv.c:838 #, c-format -msgid "%s:%s: warning: shared libraries can not have uninitialized data\n" +msgid "%s: warning: shared libraries can not have uninitialized data" msgstr "" -#: nlmconv.c:873 nlmconv.c:1049 +#: nlmconv.c:859 nlmconv.c:1027 msgid "shared section" msgstr "" -#: nlmconv.c:881 -#, c-format -msgid "%s: warning: No version number given\n" +#: nlmconv.c:867 +msgid "warning: No version number given" msgstr "" -#: nlmconv.c:922 nlmconv.c:954 nlmconv.c:973 nlmconv.c:1023 nlmconv.c:1043 +#: nlmconv.c:907 nlmconv.c:936 nlmconv.c:954 nlmconv.c:1003 nlmconv.c:1022 #, c-format -msgid "%s:%s: read: %s\n" +msgid "%s: read: %s" msgstr "" -#: nlmconv.c:946 -#, c-format -msgid "%s: warning: MAP and FULLMAP are not supported; try ld -M\n" +#: nlmconv.c:929 +msgid "warning: MAP and FULLMAP are not supported; try ld -M" msgstr "" -#: nlmconv.c:1121 +#: nlmconv.c:1099 #, c-format msgid "%s: Convert an object file into a NetWare Loadable Module\n" msgstr "" -#: nlmconv.c:1133 +#: nlmconv.c:1111 #, c-format msgid "" "Usage: %s [-dhV] [-I bfdname] [-O bfdname] [-T header-file] [-l linker]\n" @@ -1103,92 +1311,135 @@ msgid "" " [in-file [out-file]]\n" msgstr "" -#: nlmconv.c:1173 +#: nlmconv.c:1151 #, c-format -msgid "%s: support not compiled in for %s\n" +msgid "support not compiled in for %s" msgstr "" -#: nlmconv.c:1216 +#: nlmconv.c:1191 msgid "make section" msgstr "" -#: nlmconv.c:1230 +#: nlmconv.c:1205 msgid "set section size" msgstr "" -#: nlmconv.c:1236 +#: nlmconv.c:1211 msgid "set section alignment" msgstr "" -#: nlmconv.c:1240 +#: nlmconv.c:1215 msgid "set section flags" msgstr "" -#: nlmconv.c:1251 +#: nlmconv.c:1226 msgid "set .nlmsections size" msgstr "" -#: nlmconv.c:1339 nlmconv.c:1347 nlmconv.c:1356 nlmconv.c:1361 +#: nlmconv.c:1314 nlmconv.c:1322 nlmconv.c:1331 nlmconv.c:1336 msgid "set .nlmsection contents" msgstr "" -#: nlmconv.c:1864 +#: nlmconv.c:1839 msgid "stub section sizes" msgstr "" -#: nlmconv.c:1913 +#: nlmconv.c:1888 msgid "writing stub" msgstr "" -#: nlmconv.c:2003 +#: nlmconv.c:1978 #, c-format -msgid "%s: unresolved PC relative reloc against %s\n" +msgid "unresolved PC relative reloc against %s" msgstr "" -#: nlmconv.c:2068 +#: nlmconv.c:2042 #, c-format -msgid "%s: overflow when adjusting relocation against %s\n" +msgid "overflow when adjusting relocation against %s" msgstr "" -#: nlmconv.c:2191 +#: nlmconv.c:2159 #, c-format msgid "%s: execution of %s failed: " msgstr "" -#: nlmconv.c:2206 +#: nlmconv.c:2174 #, c-format -msgid "%s: Execution of %s failed\n" +msgid "Execution of %s failed" msgstr "" #: nm.c:294 #, c-format +msgid "Usage: %s [OPTION]... [FILE]...\n" +msgstr "" + +#: nm.c:295 +msgid "List symbols from FILEs (a.out by default).\n" +msgstr "" + +#: nm.c:296 msgid "" -"Usage: %s [-aABCDglnopPrsuvV] [-t radix] [--radix=radix] [--target=bfdname]\n" -" [--debug-syms] [--extern-only] [--print-armap] [--print-file-name]\n" -" [--numeric-sort] [--no-sort] [--reverse-sort] [--size-sort]\n" -" [--undefined-only] [--portability] [-f {bsd,sysv,posix}]\n" -" [--format={bsd,sysv,posix}] [--demangle] [--no-demangle] [--dynamic]\n" -" [--defined-only] [--line-numbers]\n" -" [--version] [--help]\n" -" [file...]\n" +"\n" +" -a, --debug-syms Display debugger-only symbols\n" +" -A, --print-file-name Print name of the input file before every symbol\n" +" -B Same as --format=bsd\n" +" -C, --demangle[=STYLE] Decode low-level symbol names into user-level " +"names\n" +" The STYLE, if specified, can be `auto' (the " +"default),\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" +" -e (ignored)\n" +" -f, --format=FORMAT Use the output format FORMAT. FORMAT can be " +"`bsd',\n" +" `sysv' or `posix'. The default is `bsd'\n" +" -g, --extern-only Display only external symbols\n" +" -h, --help Display this information\n" +" -l, --line-numbers Use debugging information to find a filename and\n" +" line number for each symbol\n" +" -n, --numeric-sort Sort symbols numerically by address\n" +" -o Same as -A\n" +" -p, --no-sort Do not sort the symbols\n" +" -P, --portability Same as --format=posix\n" +" -r, --reverse-sort Reverse the sense of the sort\n" +" -s, --print-armap Include index for symbols from archive members\n" +" --size-sort Sort symbols by size\n" +" -t, --radix=RADIX Use RADIX for printing symbol values\n" +" --target=BFDNAME Specify the target object format as BFDNAME\n" +" -u, --undefined-only Display only undefined symbols\n" +" -V, --version Display this program's version number\n" +" -X 32_64 (ignored)\n" +"\n" +msgstr "" + +#: nm.c:328 objdump.c:274 +#, c-format +msgid "Report bugs to %s.\n" msgstr "" -#: nm.c:339 +#: nm.c:361 #, c-format -msgid "%s: %s: invalid radix\n" +msgid "%s: invalid radix" msgstr "" -#: nm.c:365 +#: nm.c:386 #, c-format -msgid "%s: %s: invalid output format\n" +msgid "%s: invalid output format" msgstr "" -#: nm.c:492 +#: nm.c:493 +msgid "Only -X 32_64 is supported" +msgstr "" + +#: nm.c:535 #, c-format -msgid "%s: data size %ld\n" +msgid "data size %ld" msgstr "" -#: nm.c:1283 +#: nm.c:1325 #, c-format msgid "" "\n" @@ -1197,7 +1448,7 @@ msgid "" "\n" msgstr "" -#: nm.c:1285 +#: nm.c:1327 #, c-format msgid "" "\n" @@ -1206,14 +1457,14 @@ msgid "" "\n" msgstr "" -#: nm.c:1286 nm.c:1340 +#: nm.c:1328 nm.c:1382 msgid "" "Name Value Class Type Size Line " "Section\n" "\n" msgstr "" -#: nm.c:1337 +#: nm.c:1379 #, c-format msgid "" "\n" @@ -1222,7 +1473,7 @@ msgid "" "\n" msgstr "" -#: nm.c:1339 +#: nm.c:1381 #, c-format msgid "" "\n" @@ -1231,22 +1482,22 @@ msgid "" "\n" msgstr "" -#: nm.c:1510 +#: nm.c:1552 msgid "" "\n" "Archive index:\n" msgstr "" -#: objcopy.c:309 +#: objcopy.c:322 #, c-format msgid "Usage: %s in-file [out-file]\n" msgstr "" -#: objcopy.c:310 objcopy.c:368 +#: objcopy.c:323 objcopy.c:383 msgid " The switches are:\n" msgstr "" -#: objcopy.c:311 +#: objcopy.c:324 msgid "" " -I --input-target Assume input file is in format \n" " -O --output-target Create an output file in format " @@ -1308,17 +1559,21 @@ msgid "" " --remove-leading-char Remove leading character from global " "symbols\n" " --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" " -v --verbose List all object files modified\n" " -V --version Display this program's version number\n" " -h --help Display this output\n" msgstr "" -#: objcopy.c:367 +#: objcopy.c:382 #, c-format msgid "Usage: %s in-file(s)\n" msgstr "" -#: objcopy.c:369 +#: objcopy.c:384 msgid "" " -I --input-target Assume input file is in format \n" " -O --output-target Create an output file in format " @@ -1343,1266 +1598,1382 @@ msgid "" " -o Place stripped output into \n" msgstr "" -#: objcopy.c:439 +#: objcopy.c:454 #, c-format msgid "unrecognized section flag `%s'" msgstr "" -#: objcopy.c:440 +#: objcopy.c:455 #, c-format msgid "supported flags: %s" msgstr "" -#: objcopy.c:692 +#: objcopy.c:712 #, c-format msgid "%s: Multiple redefinition of symbol \"%s\"" msgstr "" -#: objcopy.c:699 +#: objcopy.c:719 #, c-format msgid "%s: Symbol \"%s\" is target of more than one redefinition" msgstr "" -#: objcopy.c:753 +#: objcopy.c:773 #, c-format msgid "copy from %s(%s) to %s(%s)\n" msgstr "" -#: objcopy.c:772 +#: objcopy.c:792 #, c-format msgid "Warning: Output file cannot represent architecture %s" msgstr "" -#: objcopy.c:799 +#: objcopy.c:819 #, c-format msgid "can't create section `%s': %s" msgstr "" -#: objcopy.c:885 +#: objcopy.c:905 #, c-format msgid "Can't fill gap after %s: %s" msgstr "" -#: objcopy.c:910 +#: objcopy.c:930 #, c-format msgid "Can't add padding to %s: %s" msgstr "" -#: objcopy.c:1048 +#: objcopy.c:1068 #, c-format msgid "%s: error copying private BFD data: %s" msgstr "" -#: objcopy.c:1082 +#: objcopy.c:1102 #, c-format msgid "cannot mkdir %s for archive copying (error: %s)" msgstr "" -#: objcopy.c:1351 +#: objcopy.c:1291 +msgid "making" +msgstr "" + +#: objcopy.c:1300 +msgid "size" +msgstr "" + +#: objcopy.c:1314 +msgid "vma" +msgstr "" + +#: objcopy.c:1340 +msgid "alignment" +msgstr "" + +#: objcopy.c:1349 +msgid "flags" +msgstr "" + +#: objcopy.c:1363 +msgid "private data" +msgstr "" + +#: objcopy.c:1371 #, c-format msgid "%s: section `%s': error in %s: %s" msgstr "" -#: objcopy.c:1625 +#: objcopy.c:1645 #, c-format msgid "%s: can't create debugging section: %s" msgstr "" -#: objcopy.c:1640 +#: objcopy.c:1660 #, c-format msgid "%s: can't set debugging section contents: %s" msgstr "" -#: objcopy.c:1649 +#: objcopy.c:1669 #, c-format msgid "%s: don't know how to write debugging information for %s" msgstr "" -#: objcopy.c:1754 +#: objcopy.c:1775 #, c-format msgid "%s: cannot stat: %s" msgstr "" -#: objcopy.c:1804 +#: objcopy.c:1825 msgid "byte number must be non-negative" msgstr "" -#: objcopy.c:1810 +#: objcopy.c:1831 msgid "interleave must be positive" msgstr "" -#: objcopy.c:1830 objcopy.c:1838 +#: objcopy.c:1851 objcopy.c:1859 #, c-format msgid "%s both copied and removed" msgstr "" -#: objcopy.c:1907 objcopy.c:1977 objcopy.c:2078 objcopy.c:2106 +#: objcopy.c:1928 objcopy.c:1998 objcopy.c:2099 objcopy.c:2127 #, c-format msgid "bad format for %s" msgstr "" -#: objcopy.c:1910 +#: objcopy.c:1931 #, c-format msgid "cannot stat: %s: %s" msgstr "" -#: objcopy.c:1928 +#: objcopy.c:1949 #, c-format msgid "cannot open: %s: %s" msgstr "" -#: objcopy.c:1932 +#: objcopy.c:1953 #, c-format msgid "%s: fread failed" msgstr "" -#: objcopy.c:2046 +#: objcopy.c:2067 #, c-format msgid "Warning: truncating gap-fill from 0x%s to 0x%x" msgstr "" -#: objcopy.c:2140 +#: objcopy.c:2169 msgid "byte number must be less than interleave" msgstr "" -#: objcopy.c:2159 +#: objcopy.c:2188 #, c-format msgid "Cannot stat: %s: %s" msgstr "" -#: objcopy.c:2199 objcopy.c:2213 +#: objcopy.c:2228 objcopy.c:2242 #, c-format msgid "%s %s%c0x%s never used" msgstr "" -#: objdump.c:229 +#: objdump.c:223 #, c-format -msgid "Usage: %s file(s)\n" +msgid "Usage: %s OPTION... FILE...\n" msgstr "" -#: objdump.c:230 -msgid " At least one of the following switches must be given:\n" +#: objdump.c:224 +msgid "Display information from object FILE.\n" msgstr "" -#: objdump.c:231 +#: objdump.c:225 msgid "" -" -a --archive-headers Display archive header information\n" -" -f --file-headers Display the contents of the overall file header\n" -" -p --private-headers Display object format specific file header " +"\n" +" At least one of the following switches must be given:\n" +msgstr "" + +#: objdump.c:226 +msgid "" +" -a, --archive-headers Display archive header information\n" +" -f, --file-headers Display the contents of the overall file header\n" +" -p, --private-headers Display object format specific file header " "contents\n" -" -h --[section-]headers Display the contents of the section headers\n" -" -x --all-headers Display the contents of all headers\n" -" -d --disassemble Display assembler contents of executable " +" -h, --[section-]headers Display the contents of the section headers\n" +" -x, --all-headers Display the contents of all headers\n" +" -d, --disassemble Display assembler contents of executable " "sections\n" -" -D --disassemble-all Display assembler contents of all sections\n" -" -S --source Intermix source code with disassembly\n" -" -s --full-contents Display the full contents of all sections " +" -D, --disassemble-all Display assembler contents of all sections\n" +" -S, --source Intermix source code with disassembly\n" +" -s, --full-contents Display the full contents of all sections " "requested\n" -" -g --debugging Display debug information in object file\n" -" -G --stabs Display the STABS contents of an ELF format file\n" -" -t --syms Display the contents of the symbol table(s)\n" -" -T --dynamic-syms Display the contents of the dynamic symbol table\n" -" -r --reloc Display the relocation entries in the file\n" -" -R --dynamic-reloc Display the dynamic relocation entries in the " +" -g, --debugging Display debug information in object file\n" +" -G, --stabs Display (in raw form) any STABS info in the file\n" +" -t, --syms Display the contents of the symbol table(s)\n" +" -T, --dynamic-syms Display the contents of the dynamic symbol table\n" +" -r, --reloc Display the relocation entries in the file\n" +" -R, --dynamic-reloc Display the dynamic relocation entries in the " "file\n" -" -V --version Display this program's version number\n" -" -i --info List object formats and architectures supported\n" -" -H --help Display this information\n" +" -V, --version Display this program's version number\n" +" -i, --info List object formats and architectures supported\n" +" -H, --help Display this information\n" msgstr "" -#: objdump.c:253 +#: objdump.c:248 msgid "" "\n" " The following switches are optional:\n" msgstr "" -#: objdump.c:254 +#: objdump.c:249 msgid "" -" -b --target Specify the target object format as " -"\n" -" -m --architecture Specify the target architecture as " -"\n" -" -j --section Only display information for section " -"\n" -" -M --disassembler-options Pass text on to the disassembler\n" +" -b, --target=BFDNAME Specify the target object format as " +"BFDNAME\n" +" -m, --architecture=MACHINE Specify the target architecture as MACHINE\n" +" -j, --section=NAME Only display information for section NAME\n" +" -M, --disassembler-options=OPT Pass text OPT on to the disassembler\n" " -EB --endian=big Assume big endian format when " "disassembling\n" " -EL --endian=little Assume little endian format when " "disassembling\n" " --file-start-context Include context from start of file (with " "-S)\n" -" -l --line-numbers Include line numbers and filenames in " +" -l, --line-numbers Include line numbers and filenames in " "output\n" -" -C --demangle Decode mangled/processed symbol names\n" -" -w --wide Format output for more than 80 columns\n" -" -z --disassemble-zeroes Do not skip blocks of zeroes when " +" -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" +" -w, --wide Format output for more than 80 columns\n" +" -z, --disassemble-zeroes Do not skip blocks of zeroes when " "disassembling\n" -" --start-address Only process data whoes address is >= " -"\n" -" --stop-address Only process data whoes address is <= " -"\n" +" --start-address=ADDR Only process data whoes address is >= ADDR\n" +" --stop-address=ADDR Only process data whoes address is <= ADDR\n" " --prefix-addresses Print complete address alongside " "disassembly\n" " --[no-]show-raw-insn Display hex alongside symbolic disassembly\n" -" --adjust-vma Add to all displayed section " +" --adjust-vma=OFFSET Add OFFSET to all displayed section " "addresses\n" "\n" msgstr "" -#: objdump.c:420 +#: objdump.c:419 msgid "Sections:\n" msgstr "" -#: objdump.c:423 +#: objdump.c:422 msgid "Idx Name Size VMA LMA File off Algn" msgstr "" -#: objdump.c:425 +#: objdump.c:424 msgid "" "Idx Name Size VMA LMA File off " "Algn" msgstr "" -#: objdump.c:429 +#: objdump.c:428 msgid " Flags" msgstr "" -#: objdump.c:479 +#: objdump.c:478 #, c-format -msgid "%s: %s: not a dynamic object\n" +msgid "%s: not a dynamic object" msgstr "" -#: objdump.c:496 +#: objdump.c:494 #, c-format -msgid "%s: %s: No dynamic symbols\n" +msgid "%s: No dynamic symbols" msgstr "" -#: objdump.c:1200 -msgid "Out of virtual memory\n" +#: objdump.c:1197 +msgid "Out of virtual memory" msgstr "" -#: objdump.c:1611 +#: objdump.c:1616 #, c-format -msgid "%s: Can't use supplied machine %s\n" +msgid "Can't use supplied machine %s" msgstr "" -#: objdump.c:1632 +#: objdump.c:1634 #, c-format -msgid "%s: Can't disassemble for architecture %s\n" +msgid "Can't disassemble for architecture %s\n" msgstr "" -#: objdump.c:1709 +#: objdump.c:1716 #, c-format msgid "Disassembly of section %s:\n" msgstr "" -#: objdump.c:1883 +#: objdump.c:1890 #, c-format msgid "" "No %s section present\n" "\n" msgstr "" -#: objdump.c:1890 +#: objdump.c:1897 #, c-format -msgid "%s: %s has no %s section\n" +msgid "%s has no %s section" msgstr "" -#: objdump.c:1904 objdump.c:1916 +#: objdump.c:1911 #, c-format -msgid "%s: Reading %s section of %s failed: %s\n" +msgid "Reading %s section of %s failed: %s" msgstr "" -#: objdump.c:1959 +#: objdump.c:1923 +#, c-format +msgid "Reading %s section of %s failed: %s\n" +msgstr "" + +#: objdump.c:1966 #, c-format msgid "" "Contents of %s section:\n" "\n" msgstr "" -#: objdump.c:2059 +#: objdump.c:2066 #, c-format msgid "architecture: %s, " msgstr "" -#: objdump.c:2062 +#: objdump.c:2069 #, c-format msgid "flags 0x%08x:\n" msgstr "" -#: objdump.c:2075 +#: objdump.c:2082 msgid "" "\n" "start address 0x" msgstr "" -#: objdump.c:2107 +#: objdump.c:2114 #, c-format msgid "" "\n" "%s: file format %s\n" msgstr "" -#: objdump.c:2150 +#: objdump.c:2156 #, c-format -msgid "%s: printing debugging information failed\n" +msgid "%s: printing debugging information failed" msgstr "" -#: objdump.c:2227 +#: objdump.c:2233 #, c-format msgid "In archive %s:\n" msgstr "" -#: objdump.c:2279 +#: objdump.c:2285 #, c-format msgid "Contents of section %s:\n" msgstr "" -#: objdump.c:2788 +#: objdump.c:2798 #, c-format msgid "BFD header file version %s\n" msgstr "" -#: objdump.c:2861 -#, c-format -msgid "%s: unrecognized -E option\n" +#: objdump.c:2882 +msgid "unrecognized -E option" msgstr "" -#: objdump.c:2873 +#: objdump.c:2893 #, c-format -msgid "%s: unrecognized --endian type `%s'\n" +msgid "unrecognized --endian type `%s'" msgstr "" -#: rdcoff.c:204 +#: rdcoff.c:205 #, c-format -msgid "%s: parse_coff_type: Bad type code 0x%x\n" +msgid "parse_coff_type: Bad type code 0x%x" msgstr "" -#: rdcoff.c:423 rdcoff.c:531 rdcoff.c:712 +#: rdcoff.c:423 rdcoff.c:531 rdcoff.c:730 #, c-format -msgid "%s: bfd_coff_get_syment failed: %s\n" +msgid "bfd_coff_get_syment failed: %s" msgstr "" -#: rdcoff.c:439 rdcoff.c:732 +#: rdcoff.c:439 rdcoff.c:750 #, c-format -msgid "%s: bfd_coff_get_auxent failed: %s\n" +msgid "bfd_coff_get_auxent failed: %s" msgstr "" -#: rdcoff.c:798 +#: rdcoff.c:817 #, c-format -msgid "%s: %ld: .bf without preceding function\n" +msgid "%ld: .bf without preceding function" msgstr "" -#: rdcoff.c:848 +#: rdcoff.c:867 #, c-format -msgid "%s: %ld: unexpected .ef\n" +msgid "%ld: unexpected .ef\n" msgstr "" #: rddbg.c:87 #, c-format -msgid "%s: no recognized debugging information\n" +msgid "%s: no recognized debugging information" msgstr "" #: rddbg.c:410 msgid "Last stabs entries before error:\n" msgstr "" -#: readelf.c:303 readelf.c:329 +#: readelf.c:260 +#, c-format +msgid "Unable to seek to start of %s at %x\n" +msgstr "" + +#: readelf.c:268 +#, c-format +msgid "Out of memory allocating %d bytes for %s\n" +msgstr "" + +#: readelf.c:274 +#, c-format +msgid "Unable to read in %d bytes of %s\n" +msgstr "" + +#: readelf.c:284 +#, c-format +msgid "Unable to seek to %x for %s\n" +msgstr "" + +#: readelf.c:289 +#, c-format +msgid "Unable to read data at %x for %s\n" +msgstr "" + +#: readelf.c:304 readelf.c:330 #, c-format msgid "%s: Error: " msgstr "" -#: readelf.c:315 readelf.c:344 +#: readelf.c:316 readelf.c:345 #, c-format msgid "%s: Warning: " msgstr "" -#: readelf.c:394 readelf.c:532 +#: readelf.c:395 readelf.c:533 #, c-format msgid "Unhandled data length: %d\n" msgstr "" -#: readelf.c:591 +#: readelf.c:597 msgid "Don't know about relocations on this machine architecture\n" msgstr "" -#: readelf.c:631 readelf.c:660 readelf.c:692 readelf.c:720 +#: readelf.c:637 readelf.c:666 readelf.c:698 readelf.c:726 msgid "out of memory parsing relocs" msgstr "" -#: readelf.c:738 +#: readelf.c:744 msgid "" " Offset Info Type Symbol's Value Symbol's Name " "Addend\n" msgstr "" -#: readelf.c:741 +#: readelf.c:747 msgid " Offset Info Type Symbol's Value Symbol's Name\n" msgstr "" -#: readelf.c:885 readelf.c:887 +#: readelf.c:907 readelf.c:909 #, c-format msgid "unrecognised: %-7lx" msgstr "" -#: readelf.c:912 +#: readelf.c:934 #, c-format msgid "" msgstr "" -#: readelf.c:1119 +#: readelf.c:1147 #, c-format msgid "Processor Specific: %lx" msgstr "" -#: readelf.c:1138 +#: readelf.c:1166 #, c-format msgid "Operating System specific: %lx" msgstr "" -#: readelf.c:1141 readelf.c:1506 +#: readelf.c:1169 readelf.c:1677 #, c-format msgid ": %lx" msgstr "" -#: readelf.c:1155 +#: readelf.c:1183 msgid "NONE (None)" msgstr "" -#: readelf.c:1156 +#: readelf.c:1184 msgid "REL (Relocatable file)" msgstr "" -#: readelf.c:1157 +#: readelf.c:1185 msgid "EXEC (Executable file)" msgstr "" -#: readelf.c:1158 +#: readelf.c:1186 msgid "DYN (Shared object file)" msgstr "" -#: readelf.c:1159 +#: readelf.c:1187 msgid "CORE (Core file)" msgstr "" -#: readelf.c:1163 +#: readelf.c:1191 #, c-format msgid "Processor Specific: (%x)" msgstr "" -#: readelf.c:1165 +#: readelf.c:1193 #, c-format msgid "OS Specific: (%x)" msgstr "" -#: readelf.c:1167 readelf.c:1244 readelf.c:1638 +#: readelf.c:1195 readelf.c:1281 readelf.c:1811 #, c-format msgid ": %x" msgstr "" -#: readelf.c:1180 +#: readelf.c:1208 msgid "None" msgstr "" -#: readelf.c:1676 +#: readelf.c:1849 msgid "Usage: readelf {options} elf-file(s)\n" msgstr "" -#: readelf.c:1677 +#: readelf.c:1850 msgid " Options are:\n" msgstr "" -#: readelf.c:1678 +#: readelf.c:1851 msgid " -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n" msgstr "" -#: readelf.c:1679 +#: readelf.c:1852 msgid " -h or --file-header Display the ELF file header\n" msgstr "" -#: readelf.c:1680 +#: readelf.c:1853 msgid " -l or --program-headers or --segments\n" msgstr "" -#: readelf.c:1681 +#: readelf.c:1854 msgid " Display the program headers\n" msgstr "" -#: readelf.c:1682 +#: readelf.c:1855 msgid " -S or --section-headers or --sections\n" msgstr "" -#: readelf.c:1683 +#: readelf.c:1856 msgid " Display the sections' header\n" msgstr "" -#: readelf.c:1684 +#: readelf.c:1857 msgid " -e or --headers Equivalent to: -h -l -S\n" msgstr "" -#: readelf.c:1685 +#: readelf.c:1858 msgid " -s or --syms or --symbols Display the symbol table\n" msgstr "" -#: readelf.c:1686 +#: readelf.c:1859 msgid " -n or --notes Display the core notes (if present)\n" msgstr "" -#: readelf.c:1687 +#: readelf.c:1860 msgid " -r or --relocs Display the relocations (if present)\n" msgstr "" -#: readelf.c:1688 +#: readelf.c:1861 msgid " -d or --dynamic Display the dynamic segment (if present)\n" msgstr "" -#: readelf.c:1689 +#: readelf.c:1862 msgid " -V or --version-info Display the version sections (if present)\n" msgstr "" -#: readelf.c:1690 +#: readelf.c:1863 msgid "" " -A or --arch-specific Display architecture specific information (if " "any).\n" msgstr "" -#: readelf.c:1691 +#: readelf.c:1864 msgid "" " -D or --use-dynamic Use the dynamic section info when displaying " "symbols\n" msgstr "" -#: readelf.c:1692 +#: readelf.c:1865 msgid " -x or --hex-dump=\n" msgstr "" -#: readelf.c:1693 +#: readelf.c:1866 msgid " Dump the contents of section \n" msgstr "" -#: readelf.c:1694 -msgid " -w[liapr] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges]\n" +#: readelf.c:1867 +msgid "" +" -w[liaprf] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]\n" msgstr "" -#: readelf.c:1695 +#: readelf.c:1868 msgid "" " Display the contents of DWARF2 debug sections\n" msgstr "" -#: readelf.c:1697 +#: readelf.c:1870 msgid " -i or --instruction-dump=\n" msgstr "" -#: readelf.c:1698 +#: readelf.c:1871 msgid "" " Disassemble the contents of section \n" msgstr "" -#: readelf.c:1700 +#: readelf.c:1873 msgid " -I or --histogram Display histogram of bucket list lengths\n" msgstr "" -#: readelf.c:1701 +#: readelf.c:1874 msgid " -v or --version Display the version number of readelf\n" msgstr "" -#: readelf.c:1702 +#: readelf.c:1875 msgid " -H or --help Display this information\n" msgstr "" -#: readelf.c:1720 +#: readelf.c:1893 msgid "Out of memory allocating dump request table." msgstr "" -#: readelf.c:1855 +#: readelf.c:2033 #, c-format msgid "Unrecognised debug option '%s'\n" msgstr "" -#: readelf.c:1880 +#: readelf.c:2058 #, c-format msgid "Invalid option '-%c'\n" msgstr "" -#: readelf.c:1893 +#: readelf.c:2071 msgid "Nothing to do.\n" msgstr "" -#: readelf.c:1906 readelf.c:1923 readelf.c:3493 +#: readelf.c:2084 readelf.c:2101 readelf.c:3740 msgid "none" msgstr "" -#: readelf.c:1907 +#: readelf.c:2085 msgid "ELF32" msgstr "" -#: readelf.c:1908 +#: readelf.c:2086 msgid "ELF64" msgstr "" -#: readelf.c:1910 readelf.c:1927 readelf.c:1946 +#: readelf.c:2088 readelf.c:2105 readelf.c:2133 #, c-format msgid "" msgstr "" -#: readelf.c:1924 +#: readelf.c:2102 msgid "2's complement, little endian" msgstr "" -#: readelf.c:1925 +#: readelf.c:2103 msgid "2's complement, big endian" msgstr "" -#: readelf.c:1940 +#: readelf.c:2118 msgid "UNIX - System V" msgstr "" -#: readelf.c:1941 +#: readelf.c:2119 msgid "UNIX - HP-UX" msgstr "" -#: readelf.c:1942 +#: readelf.c:2120 +msgid "UNIX - NetBSD" +msgstr "" + +#: readelf.c:2121 msgid "UNIX - Linux" msgstr "" -#: readelf.c:1943 +#: readelf.c:2122 +msgid "GNU/Hurd" +msgstr "" + +#: readelf.c:2123 +msgid "UNIX - Solaris" +msgstr "" + +#: readelf.c:2124 +msgid "UNIX - AIX" +msgstr "" + +#: readelf.c:2125 +msgid "UNIX - IRIX" +msgstr "" + +#: readelf.c:2126 +msgid "UNIX - FreeBSD" +msgstr "" + +#: readelf.c:2127 +msgid "UNIX - TRU64" +msgstr "" + +#: readelf.c:2128 +msgid "Novell - Modesto" +msgstr "" + +#: readelf.c:2129 +msgid "UNIX - OpenBSD" +msgstr "" + +#: readelf.c:2130 msgid "Standalone App" msgstr "" -#: readelf.c:1944 +#: readelf.c:2131 msgid "ARM" msgstr "" -#: readelf.c:1961 +#: readelf.c:2148 msgid "Not an ELF file - it has the wrong magic bytes at the start\n" msgstr "" -#: readelf.c:1969 +#: readelf.c:2156 msgid "ELF Header:\n" msgstr "" -#: readelf.c:1970 +#: readelf.c:2157 msgid " Magic: " msgstr "" -#: readelf.c:1974 +#: readelf.c:2161 #, c-format msgid " Class: %s\n" msgstr "" -#: readelf.c:1976 +#: readelf.c:2163 #, c-format msgid " Data: %s\n" msgstr "" -#: readelf.c:1978 +#: readelf.c:2165 #, c-format msgid " Version: %d %s\n" msgstr "" -#: readelf.c:1985 +#: readelf.c:2172 #, c-format msgid " OS/ABI: %s\n" msgstr "" -#: readelf.c:1987 +#: readelf.c:2174 #, c-format msgid " ABI Version: %d\n" msgstr "" -#: readelf.c:1989 +#: readelf.c:2176 #, c-format msgid " Type: %s\n" msgstr "" -#: readelf.c:1991 +#: readelf.c:2178 #, c-format msgid " Machine: %s\n" msgstr "" -#: readelf.c:1993 +#: readelf.c:2180 #, c-format msgid " Version: 0x%lx\n" msgstr "" -#: readelf.c:1996 +#: readelf.c:2183 msgid " Entry point address: " msgstr "" -#: readelf.c:1998 +#: readelf.c:2185 msgid "" "\n" " Start of program headers: " msgstr "" -#: readelf.c:2000 +#: readelf.c:2187 msgid "" " (bytes into file)\n" " Start of section headers: " msgstr "" -#: readelf.c:2002 +#: readelf.c:2189 msgid " (bytes into file)\n" msgstr "" -#: readelf.c:2004 +#: readelf.c:2191 #, c-format msgid " Flags: 0x%lx%s\n" msgstr "" -#: readelf.c:2007 +#: readelf.c:2194 #, c-format msgid " Size of this header: %ld (bytes)\n" msgstr "" -#: readelf.c:2009 +#: readelf.c:2196 #, c-format msgid " Size of program headers: %ld (bytes)\n" msgstr "" -#: readelf.c:2011 +#: readelf.c:2198 #, c-format msgid " Number of program headers: %ld\n" msgstr "" -#: readelf.c:2013 +#: readelf.c:2200 #, c-format msgid " Size of section headers: %ld (bytes)\n" msgstr "" -#: readelf.c:2015 +#: readelf.c:2202 #, c-format msgid " Number of section headers: %ld\n" msgstr "" -#: readelf.c:2017 +#: readelf.c:2204 #, c-format msgid " Section header string table index: %ld\n" msgstr "" -#: readelf.c:2102 +#: readelf.c:2289 msgid "" "\n" "There are no program headers in this file.\n" msgstr "" -#: readelf.c:2108 +#: readelf.c:2295 #, c-format msgid "" "\n" "Elf file type is %s\n" msgstr "" -#: readelf.c:2109 +#: readelf.c:2296 msgid "Entry point " msgstr "" -#: readelf.c:2111 +#: readelf.c:2298 #, c-format msgid "" "\n" "There are %d program headers, starting at offset " msgstr "" -#: readelf.c:2122 readelf.c:2298 readelf.c:2340 readelf.c:2383 readelf.c:2424 -#: readelf.c:2932 readelf.c:2973 readelf.c:3149 readelf.c:4111 readelf.c:4125 -#: readelf.c:7023 readelf.c:7063 +#: 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 msgid "Out of memory\n" msgstr "" -#: readelf.c:2140 +#: readelf.c:2327 #, c-format msgid "" "\n" "Program Header%s:\n" msgstr "" -#: readelf.c:2144 +#: readelf.c:2331 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n" msgstr "" -#: readelf.c:2148 +#: readelf.c:2335 msgid " Type Offset VirtAddr PhysAddr\n" msgstr "" -#: readelf.c:2150 +#: readelf.c:2337 msgid " FileSiz MemSiz Flags Align\n" msgstr "" -#: readelf.c:2208 +#: readelf.c:2395 msgid "more than one dynamic segment\n" msgstr "" -#: readelf.c:2216 +#: readelf.c:2403 msgid "Unable to find program interpreter name\n" msgstr "" -#: readelf.c:2223 +#: readelf.c:2410 #, c-format msgid "" "\n" " [Requesting program interpreter: %s]" msgstr "" -#: readelf.c:2241 +#: readelf.c:2428 msgid "" "\n" " Section to Segment mapping:\n" msgstr "" -#: readelf.c:2242 +#: readelf.c:2429 msgid " Segment Sections...\n" msgstr "" -#: readelf.c:2505 +#: readelf.c:2693 msgid "" "\n" "There are no sections in this file.\n" msgstr "" -#: readelf.c:2511 +#: readelf.c:2699 #, c-format msgid "There are %d section headers, starting at offset 0x%lx:\n" msgstr "" -#: readelf.c:2551 +#: readelf.c:2739 msgid "File contains multiple dynamic symbol tables\n" msgstr "" -#: readelf.c:2564 +#: readelf.c:2752 msgid "File contains multiple dynamic string tables\n" msgstr "" -#: readelf.c:2591 +#: readelf.c:2786 #, c-format msgid "" "\n" "Section Header%s:\n" msgstr "" -#: readelf.c:2595 +#: readelf.c:2790 msgid "" " [Nr] Name Type Addr Off Size ES Flg Lk " "Inf Al\n" msgstr "" -#: readelf.c:2598 +#: readelf.c:2793 msgid " [Nr] Name Type Address Offset\n" msgstr "" -#: readelf.c:2599 +#: readelf.c:2794 msgid " Size EntSize Flags Link Info Align\n" msgstr "" -#: readelf.c:2646 -msgid "" -"Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings)\n" +#: readelf.c:2841 +msgid "Key to Flags:\n" msgstr "" -#: readelf.c:2647 -msgid "" -" I (info), L (link order), O (extra OS processing required)\n" +#: readelf.c:2842 +msgid " W (write), A (alloc), X (execute), M (merge), S (strings)\n" +msgstr "" + +#: readelf.c:2843 +msgid " I (info), L (link order), G (group), x (unknown)\n" msgstr "" -#: readelf.c:2648 -msgid " o (os specific), p (processor specific) x (unknown)\n" +#: readelf.c:2844 +msgid "" +" O (extra OS processing required) o (OS specific), p (processor specific)\n" msgstr "" -#: readelf.c:2706 +#: readelf.c:2902 #, c-format msgid "" "\n" "Relocation section at offset 0x%lx contains %ld bytes:\n" msgstr "" -#: readelf.c:2713 +#: readelf.c:2909 msgid "" "\n" "There are no dynamic relocations in this file.\n" msgstr "" -#: readelf.c:2741 +#: readelf.c:2937 msgid "" "\n" "Relocation section " msgstr "" -#: readelf.c:2748 +#: readelf.c:2944 #, c-format msgid " at offset 0x%lx contains %lu entries:\n" msgstr "" -#: readelf.c:2776 +#: readelf.c:2972 msgid "" "\n" "There are no relocations in this file.\n" msgstr "" -#: readelf.c:3026 +#: readelf.c:3227 msgid "" "\n" "There is no dynamic segment in this file.\n" msgstr "" -#: readelf.c:3060 +#: readelf.c:3261 msgid "Unable to seek to end of file!" msgstr "" -#: readelf.c:3069 +#: readelf.c:3270 msgid "Unable to determine the number of symbols to load\n" msgstr "" -#: readelf.c:3099 +#: readelf.c:3300 msgid "Unable to seek to end of file\n" msgstr "" -#: readelf.c:3105 +#: readelf.c:3306 msgid "Unable to determine the length of the dynamic string table\n" msgstr "" -#: readelf.c:3166 +#: readelf.c:3367 #, c-format msgid "" "\n" "Dynamic segment at offset 0x%x contains %ld entries:\n" msgstr "" -#: readelf.c:3169 +#: readelf.c:3370 msgid " Tag Type Name/Value\n" msgstr "" -#: readelf.c:3200 +#: readelf.c:3406 msgid "Auxiliary library" msgstr "" -#: readelf.c:3202 +#: readelf.c:3410 msgid "Filter library" msgstr "" -#: readelf.c:3218 readelf.c:3239 readelf.c:3265 +#: readelf.c:3414 +msgid "Configuration file" +msgstr "" + +#: readelf.c:3418 +msgid "Dependency audit library" +msgstr "" + +#: readelf.c:3422 +msgid "Audit library" +msgstr "" + +#: readelf.c:3440 readelf.c:3466 readelf.c:3492 msgid "Flags:" msgstr "" -#: readelf.c:3220 readelf.c:3241 readelf.c:3267 +#: readelf.c:3442 readelf.c:3468 readelf.c:3494 msgid " None\n" msgstr "" -#: readelf.c:3370 +#: readelf.c:3613 #, c-format msgid "Shared library: [%s]" msgstr "" -#: readelf.c:3373 +#: readelf.c:3616 msgid " program interpreter" msgstr "" -#: readelf.c:3377 +#: readelf.c:3620 #, c-format msgid "Library soname: [%s]" msgstr "" -#: readelf.c:3381 +#: readelf.c:3624 #, c-format msgid "Library rpath: [%s]" msgstr "" -#: readelf.c:3442 +#: readelf.c:3628 +#, c-format +msgid "Library runpath: [%s]" +msgstr "" + +#: readelf.c:3689 #, c-format msgid "Not needed object: [%s]\n" msgstr "" -#: readelf.c:3539 +#: readelf.c:3786 #, c-format msgid "" "\n" "Version definition section '%s' contains %ld entries:\n" msgstr "" -#: readelf.c:3542 +#: readelf.c:3789 msgid " Addr: 0x" msgstr "" -#: readelf.c:3544 readelf.c:3732 +#: readelf.c:3791 readelf.c:3979 #, c-format msgid " Offset: %#08lx Link: %lx (%s)\n" msgstr "" -#: readelf.c:3574 +#: readelf.c:3821 #, c-format msgid " %#06x: Rev: %d Flags: %s" msgstr "" -#: readelf.c:3577 +#: readelf.c:3824 #, c-format msgid " Index: %d Cnt: %d " msgstr "" -#: readelf.c:3588 +#: readelf.c:3835 #, c-format msgid "Name: %s\n" msgstr "" -#: readelf.c:3590 +#: readelf.c:3837 #, c-format msgid "Name index: %ld\n" msgstr "" -#: readelf.c:3605 +#: readelf.c:3852 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr "" -#: readelf.c:3608 +#: readelf.c:3855 #, c-format msgid " %#06x: Parent %d, name index: %ld\n" msgstr "" -#: readelf.c:3627 +#: readelf.c:3874 #, c-format msgid "" "\n" "Version needs section '%s' contains %ld entries:\n" msgstr "" -#: readelf.c:3630 +#: readelf.c:3877 msgid " Addr: 0x" msgstr "" -#: readelf.c:3632 +#: readelf.c:3879 #, c-format msgid " Offset: %#08lx Link to section: %ld (%s)\n" msgstr "" -#: readelf.c:3658 +#: readelf.c:3905 #, c-format msgid " %#06x: Version: %d" msgstr "" -#: readelf.c:3661 +#: readelf.c:3908 #, c-format msgid " File: %s" msgstr "" -#: readelf.c:3663 +#: readelf.c:3910 #, c-format msgid " File: %lx" msgstr "" -#: readelf.c:3665 +#: readelf.c:3912 #, c-format msgid " Cnt: %d\n" msgstr "" -#: readelf.c:3683 +#: readelf.c:3930 #, c-format msgid " %#06x: Name: %s" msgstr "" -#: readelf.c:3686 +#: readelf.c:3933 #, c-format msgid " %#06x: Name index: %lx" msgstr "" -#: readelf.c:3689 +#: readelf.c:3936 #, c-format msgid " Flags: %s Version: %d\n" msgstr "" -#: readelf.c:3727 +#: readelf.c:3974 #, c-format msgid "" "\n" "Version symbols section '%s' contains %d entries:\n" msgstr "" -#: readelf.c:3730 +#: readelf.c:3977 msgid " Addr: " msgstr "" -#: readelf.c:3760 +#: readelf.c:4007 msgid " 0 (*local*) " msgstr "" -#: readelf.c:3764 +#: readelf.c:4011 msgid " 1 (*global*) " msgstr "" -#: readelf.c:3986 +#: readelf.c:4233 msgid "" "\n" "No version information found in this file.\n" msgstr "" -#: readelf.c:4004 readelf.c:4039 +#: readelf.c:4251 readelf.c:4286 #, c-format msgid ": %d" msgstr "" -#: readelf.c:4006 readelf.c:4051 +#: readelf.c:4253 readelf.c:4298 #, c-format msgid ": %d" msgstr "" -#: readelf.c:4008 readelf.c:4054 +#: readelf.c:4255 readelf.c:4301 #, c-format msgid ": %d" msgstr "" -#: readelf.c:4117 +#: readelf.c:4364 msgid "Unable to read in dynamic data\n" msgstr "" -#: readelf.c:4159 +#: readelf.c:4406 msgid "Unable to seek to start of dynamic information" msgstr "" -#: readelf.c:4165 +#: readelf.c:4412 msgid "Failed to read in number of buckets\n" msgstr "" -#: readelf.c:4171 +#: readelf.c:4418 msgid "Failed to read in number of chains\n" msgstr "" -#: readelf.c:4191 +#: readelf.c:4438 msgid "" "\n" "Symbol table for image:\n" msgstr "" -#: readelf.c:4193 +#: readelf.c:4440 msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:4195 +#: readelf.c:4442 msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:4239 +#: readelf.c:4486 #, c-format msgid "" "\n" "Symbol table '%s' contains %lu entries:\n" msgstr "" -#: readelf.c:4243 +#: readelf.c:4490 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:4245 +#: readelf.c:4492 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: readelf.c:4354 +#: readelf.c:4601 msgid "bad dynamic symbol" msgstr "" -#: readelf.c:4413 +#: readelf.c:4660 msgid "" "\n" "Dynamic symbol information is not available for displaying symbols.\n" msgstr "" -#: readelf.c:4425 +#: readelf.c:4672 #, c-format msgid "" "\n" "Histogram for bucket list length (total of %d buckets):\n" msgstr "" -#: readelf.c:4427 +#: readelf.c:4674 msgid " Length Number %% of total Coverage\n" msgstr "" -#: readelf.c:4432 readelf.c:4451 readelf.c:6704 readelf.c:6897 +#: readelf.c:4679 readelf.c:4698 readelf.c:7423 readelf.c:7616 msgid "Out of memory" msgstr "" -#: readelf.c:4500 +#: readelf.c:4747 #, c-format msgid "" "\n" "Dynamic info segment at offset 0x%lx contains %d entries:\n" msgstr "" -#: readelf.c:4503 +#: readelf.c:4750 msgid " Num: Name BoundTo Flags\n" msgstr "" -#: readelf.c:4551 +#: readelf.c:4798 #, c-format msgid "" "\n" "Assembly dump of section %s\n" msgstr "" -#: readelf.c:4574 +#: readelf.c:4821 #, c-format msgid "" "\n" "Section '%s' has no data to dump.\n" msgstr "" -#: readelf.c:4579 +#: readelf.c:4826 #, c-format msgid "" "\n" "Hex dump of section '%s':\n" msgstr "" -#: readelf.c:4731 +#: readelf.c:4978 msgid "badly formed extended line op encountered!" msgstr "" -#: readelf.c:4738 +#: readelf.c:4985 #, c-format msgid " Extended opcode %d: " msgstr "" -#: readelf.c:4743 +#: readelf.c:4990 msgid "" "End of Sequence\n" "\n" msgstr "" -#: readelf.c:4749 +#: readelf.c:4996 #, c-format msgid "set Address to 0x%lx\n" msgstr "" -#: readelf.c:4754 +#: readelf.c:5001 msgid " define new File Table entry\n" msgstr "" -#: readelf.c:4755 readelf.c:4877 +#: readelf.c:5002 readelf.c:5124 msgid " Entry\tDir\tTime\tSize\tName\n" msgstr "" -#: readelf.c:4757 +#: readelf.c:5004 #, c-format msgid " %d\t" msgstr "" -#: readelf.c:4760 readelf.c:4762 readelf.c:4764 readelf.c:4889 readelf.c:4891 -#: readelf.c:4893 +#: readelf.c:5007 readelf.c:5009 readelf.c:5011 readelf.c:5136 readelf.c:5138 +#: readelf.c:5140 #, c-format msgid "%lu\t" msgstr "" -#: readelf.c:4765 +#: readelf.c:5012 #, c-format msgid "" "%s\n" "\n" msgstr "" -#: readelf.c:4769 +#: readelf.c:5016 #, c-format msgid "UNKNOWN: length %d\n" msgstr "" -#: readelf.c:4795 +#: readelf.c:5042 #, c-format msgid "" "\n" @@ -2610,493 +2981,503 @@ msgid "" "\n" msgstr "" -#: readelf.c:4807 +#: readelf.c:5054 msgid "The line info appears to be corrupt - the section is too small\n" msgstr "" -#: readelf.c:4815 +#: readelf.c:5062 msgid "Only DWARF version 2 line info is currently supported.\n" msgstr "" -#: readelf.c:4830 +#: readelf.c:5077 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:4831 +#: readelf.c:5078 #, c-format msgid " DWARF Version: %d\n" msgstr "" -#: readelf.c:4832 +#: readelf.c:5079 #, c-format msgid " Prolgue Length: %d\n" msgstr "" -#: readelf.c:4833 +#: readelf.c:5080 #, c-format msgid " Minimum Instruction Length: %d\n" msgstr "" -#: readelf.c:4834 +#: readelf.c:5081 #, c-format msgid " Initial value of 'is_stmt': %d\n" msgstr "" -#: readelf.c:4835 +#: readelf.c:5082 #, c-format msgid " Line Base: %d\n" msgstr "" -#: readelf.c:4836 +#: readelf.c:5083 #, c-format msgid " Line Range: %d\n" msgstr "" -#: readelf.c:4837 +#: readelf.c:5084 #, c-format msgid " Opcode Base: %d\n" msgstr "" -#: readelf.c:4846 +#: readelf.c:5093 msgid "" "\n" " Opcodes:\n" msgstr "" -#: readelf.c:4849 +#: readelf.c:5096 #, c-format msgid " Opcode %d has %d args\n" msgstr "" -#: readelf.c:4855 +#: readelf.c:5102 msgid "" "\n" " The Directory Table is empty.\n" msgstr "" -#: readelf.c:4858 +#: readelf.c:5105 msgid "" "\n" " The Directory Table:\n" msgstr "" -#: readelf.c:4862 +#: readelf.c:5109 #, c-format msgid " %s\n" msgstr "" -#: readelf.c:4873 +#: readelf.c:5120 msgid "" "\n" " The File Name Table is empty.\n" msgstr "" -#: readelf.c:4876 +#: readelf.c:5123 msgid "" "\n" " The File Name Table:\n" msgstr "" -#: readelf.c:4884 +#: readelf.c:5131 #, c-format msgid " %d\t" msgstr "" -#: readelf.c:4895 +#: readelf.c:5142 #, c-format msgid "%s\n" msgstr "" #. Now display the statements. -#: readelf.c:4903 +#: readelf.c:5150 msgid "" "\n" " Line Number Statements:\n" msgstr "" -#: readelf.c:4922 +#: readelf.c:5169 msgid " Copy\n" msgstr "" -#: readelf.c:4929 +#: readelf.c:5176 #, c-format msgid " Advance PC by %d to %lx\n" msgstr "" -#: readelf.c:4937 +#: readelf.c:5184 #, c-format msgid " Advance Line by %d to %d\n" msgstr "" -#: readelf.c:4944 +#: readelf.c:5191 #, c-format msgid " Set File Name to entry %d in the File Name Table\n" msgstr "" -#: readelf.c:4952 +#: readelf.c:5199 #, c-format msgid " Set column to %d\n" msgstr "" -#: readelf.c:4959 +#: readelf.c:5206 #, c-format msgid " Set is_stmt to %d\n" msgstr "" -#: readelf.c:4964 +#: readelf.c:5211 msgid " Set basic block\n" msgstr "" -#: readelf.c:4972 +#: readelf.c:5219 #, c-format msgid " Advance PC by constant %d to 0x%lx\n" msgstr "" -#: readelf.c:4980 +#: readelf.c:5227 #, c-format msgid " Advance PC by fixed size amount %d to 0x%lx\n" msgstr "" -#: readelf.c:4988 +#: readelf.c:5235 #, c-format msgid " Special opcode %d: advance Address by %d to 0x%lx" msgstr "" -#: readelf.c:4992 +#: readelf.c:5239 #, c-format msgid " and Line by %d to %d\n" msgstr "" -#: readelf.c:5015 readelf.c:5437 +#: readelf.c:5262 readelf.c:5691 #, c-format msgid "" "Contents of the %s section:\n" "\n" msgstr "" -#: readelf.c:5034 -msgid "Only DWARF 2 pubnames are currently supported" +#: readelf.c:5285 +msgid "Only DWARF 2 pubnames are currently supported\n" msgstr "" -#: readelf.c:5038 +#: readelf.c:5292 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:5040 +#: readelf.c:5294 #, c-format msgid " Version: %d\n" msgstr "" -#: readelf.c:5042 +#: readelf.c:5296 #, c-format msgid " Offset into .debug_info section: %ld\n" msgstr "" -#: readelf.c:5044 +#: readelf.c:5298 #, c-format msgid " Size of area in .debug_info section: %ld\n" msgstr "" -#: readelf.c:5047 +#: readelf.c:5301 msgid "" "\n" " Offset\tName\n" msgstr "" -#: readelf.c:5129 +#: readelf.c:5383 #, c-format msgid "Unknown TAG value: %lx" msgstr "" -#: readelf.c:5224 +#: readelf.c:5478 #, c-format msgid "Unknown AT value: %lx" msgstr "" -#: readelf.c:5261 +#: readelf.c:5515 #, c-format msgid "Unknown FORM value: %lx" msgstr "" -#: readelf.c:5443 +#: readelf.c:5697 msgid " Number TAG\n" msgstr "" -#: readelf.c:5449 +#: readelf.c:5703 #, c-format msgid " %ld %s [%s]\n" msgstr "" -#: readelf.c:5452 +#: readelf.c:5706 msgid "has children" msgstr "" -#: readelf.c:5452 +#: readelf.c:5706 msgid "no children" msgstr "" -#: readelf.c:5456 +#: readelf.c:5710 #, c-format msgid " %-18s %s\n" msgstr "" -#: readelf.c:5475 +#: readelf.c:5729 #, c-format msgid " %lu byte block: " msgstr "" -#: readelf.c:5939 +#: readelf.c:6036 msgid "(User defined location op)" msgstr "" -#: readelf.c:5941 +#: readelf.c:6038 msgid "(Unknown location op)" msgstr "" -#: readelf.c:6058 +#: readelf.c:6165 #, c-format msgid "Unable to handle FORM: %d" msgstr "" -#: readelf.c:6062 +#: readelf.c:6169 #, c-format msgid "Unrecognised form: %d" msgstr "" -#: readelf.c:6075 +#: readelf.c:6182 msgid "(not inlined)" msgstr "" -#: readelf.c:6076 +#: readelf.c:6183 msgid "(inlined)" msgstr "" -#: readelf.c:6077 +#: readelf.c:6184 msgid "(declared as inline but ignored)" msgstr "" -#: readelf.c:6078 +#: readelf.c:6185 msgid "(declared as inline and inlined)" msgstr "" -#: readelf.c:6079 +#: readelf.c:6186 #, c-format msgid " (Unknown inline attribute value: %lx)" msgstr "" -#: readelf.c:6209 readelf.c:6333 +#: readelf.c:6315 readelf.c:6441 #, c-format msgid "" "The section %s contains:\n" "\n" msgstr "" -#: readelf.c:6231 -msgid "Only version 2 DWARF debug information is currently supported.\n" -msgstr "" - -#: readelf.c:6235 -msgid " Compilation Unit:\n" +#: readelf.c:6337 +#, c-format +msgid " Compilation Unit @ %lx:\n" msgstr "" -#: readelf.c:6236 +#: readelf.c:6338 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:6237 +#: readelf.c:6339 #, c-format msgid " Version: %d\n" msgstr "" -#: readelf.c:6238 +#: readelf.c:6340 #, c-format msgid " Abbrev Offset: %ld\n" msgstr "" -#: readelf.c:6239 +#: readelf.c:6341 #, c-format msgid " Pointer Size: %d\n" msgstr "" -#: readelf.c:6259 +#: readelf.c:6345 +msgid "Only version 2 DWARF debug information is currently supported.\n" +msgstr "" + +#: readelf.c:6367 msgid "Unable to locate .debug_abbrev section!\n" msgstr "" -#: readelf.c:6299 +#: readelf.c:6407 #, c-format msgid "Unable to locate entry %lu in the abbreviation table\n" msgstr "" -#: readelf.c:6304 +#: readelf.c:6412 #, c-format msgid " <%d><%x>: Abbrev Number: %lu (%s)\n" msgstr "" -#: readelf.c:6352 +#: readelf.c:6462 +msgid "Only DWARF 2 aranges are currently supported.\n" +msgstr "" + +#: readelf.c:6466 #, c-format msgid " Length: %ld\n" msgstr "" -#: readelf.c:6353 +#: readelf.c:6467 #, c-format msgid " Version: %d\n" msgstr "" -#: readelf.c:6354 +#: readelf.c:6468 #, c-format msgid " Offset into .debug_info: %lx\n" msgstr "" -#: readelf.c:6355 +#: readelf.c:6469 #, c-format msgid " Pointer Size: %d\n" msgstr "" -#: readelf.c:6356 +#: readelf.c:6470 #, c-format msgid " Segment Size: %d\n" msgstr "" -#: readelf.c:6358 +#: readelf.c:6472 msgid "" "\n" " Address Length\n" msgstr "" -#: readelf.c:6399 +#: readelf.c:6634 +#, c-format +msgid "The section %s contains:\n" +msgstr "" + +#: readelf.c:7109 #, c-format msgid "Displaying the debug contents of section %s is not yet supported.\n" msgstr "" -#: readelf.c:6461 +#: readelf.c:7173 #, c-format msgid "" "\n" "Section '%s' has no debugging data.\n" msgstr "" -#: readelf.c:6477 +#: readelf.c:7192 #, c-format msgid "Unrecognised debug section: %s\n" msgstr "" -#: readelf.c:6549 +#: readelf.c:7264 msgid "Some sections were not dumped because they do not exist!\n" msgstr "" -#: readelf.c:6728 +#: readelf.c:7447 #, c-format msgid "" "\n" "Section '%s' contains %d entries:\n" msgstr "" -#: readelf.c:6890 +#: readelf.c:7609 msgid "conflict list with without table" msgstr "" -#: readelf.c:6918 +#: readelf.c:7637 #, c-format msgid "" "\n" "Section '.conflict' contains %d entries:\n" msgstr "" -#: readelf.c:6919 +#: readelf.c:7638 msgid " Num: Index Value Name" msgstr "" -#: readelf.c:6944 +#: readelf.c:7663 msgid "NT_PRSTATUS (prstatus structure)" msgstr "" -#: readelf.c:6945 +#: readelf.c:7664 msgid "NT_FPREGSET (floating point registers)" msgstr "" -#: readelf.c:6946 +#: readelf.c:7665 msgid "NT_PRPSINFO (prpsinfo structure)" msgstr "" -#: readelf.c:6947 +#: readelf.c:7666 msgid "NT_TASKSTRUCT (task structure)" msgstr "" -#: readelf.c:6948 +#: readelf.c:7667 msgid "NT_PRXFPREG (user_xfpregs structure)" msgstr "" -#: readelf.c:6949 +#: readelf.c:7668 msgid "NT_PSTATUS (pstatus structure)" msgstr "" -#: readelf.c:6950 +#: readelf.c:7669 msgid "NT_FPREGS (floating point registers)" msgstr "" -#: readelf.c:6951 +#: readelf.c:7670 msgid "NT_PSINFO (psinfo structure)" msgstr "" -#: readelf.c:6952 +#: readelf.c:7671 msgid "NT_LWPSTATUS (lwpstatus_t structure)" msgstr "" -#: readelf.c:6953 +#: readelf.c:7672 msgid "NT_LWPSINFO (lwpsinfo_t structure)" msgstr "" -#: readelf.c:6954 +#: readelf.c:7673 msgid "NT_WIN32PSTATUS (win32_pstatus strcuture)" msgstr "" -#: readelf.c:6956 +#: readelf.c:7675 #, c-format msgid "Unknown note type: (0x%08x)" msgstr "" -#: readelf.c:6994 +#: readelf.c:7713 #, c-format msgid "" "\n" "Notes at offset 0x%08lx with length 0x%08lx:\n" msgstr "" -#: readelf.c:6997 +#: readelf.c:7715 msgid " Owner\t\tData size\tDescription\n" msgstr "" -#: readelf.c:7108 +#: readelf.c:7826 msgid "No note segments present in the core file.\n" msgstr "" -#: readelf.c:7186 +#: readelf.c:7904 msgid "This instance of readelf has been built without support for a\n" msgstr "" -#: readelf.c:7187 +#: readelf.c:7905 msgid "64 bit data type and so it cannot read 64 bit ELF files.\n" msgstr "" -#: readelf.c:7222 +#: readelf.c:7940 #, c-format msgid "Cannot stat input file %s.\n" msgstr "" -#: readelf.c:7229 +#: readelf.c:7947 #, c-format msgid "Input file %s not found.\n" msgstr "" -#: readelf.c:7235 +#: readelf.c:7953 #, c-format msgid "%s: Failed to read file header\n" msgstr "" -#: readelf.c:7249 +#: readelf.c:7967 #, c-format msgid "" "\n" @@ -3325,71 +3706,71 @@ msgstr "" #: rescoff.c:145 #, c-format -msgid "%s: %s: no resource section\n" +msgid "%s: no resource section" msgstr "" -#: rescoff.c:154 +#: rescoff.c:152 msgid "can't read resource section" msgstr "" -#: rescoff.c:180 +#: rescoff.c:178 #, c-format msgid "%s: %s: address out of bounds" msgstr "" -#: rescoff.c:199 +#: rescoff.c:197 msgid "directory" msgstr "" -#: rescoff.c:227 +#: rescoff.c:225 msgid "named directory entry" msgstr "" -#: rescoff.c:236 +#: rescoff.c:234 msgid "directory entry name" msgstr "" -#: rescoff.c:256 +#: rescoff.c:254 msgid "named subdirectory" msgstr "" -#: rescoff.c:264 +#: rescoff.c:262 msgid "named resource" msgstr "" -#: rescoff.c:279 +#: rescoff.c:277 msgid "ID directory entry" msgstr "" -#: rescoff.c:296 +#: rescoff.c:294 msgid "ID subdirectory" msgstr "" -#: rescoff.c:304 +#: rescoff.c:302 msgid "ID resource" msgstr "" -#: rescoff.c:330 +#: rescoff.c:328 msgid "resource type unknown" msgstr "" -#: rescoff.c:333 +#: rescoff.c:331 msgid "data entry" msgstr "" -#: rescoff.c:341 +#: rescoff.c:339 msgid "resource data" msgstr "" -#: rescoff.c:346 +#: rescoff.c:344 msgid "resource data size" msgstr "" -#: rescoff.c:441 +#: rescoff.c:439 msgid "filename required for COFF output" msgstr "" -#: rescoff.c:740 +#: rescoff.c:738 msgid "can't get BFD_RELOC_RVA relocation type" msgstr "" @@ -3408,11 +3789,6 @@ msgstr "" msgid "%s %s: %s" msgstr "" -#: resrc.c:283 -#, c-format -msgid "%s exited with status %d" -msgstr "" - #: resrc.c:308 #, c-format msgid "can't execute `%s': %s" @@ -3442,42 +3818,50 @@ msgstr "" msgid "Using `%s'\n" msgstr "" -#: resrc.c:544 +#: resrc.c:541 #, c-format msgid "%s:%d: %s\n" msgstr "" -#: resrc.c:553 +#: resrc.c:550 #, c-format msgid "%s: unexpected EOF" msgstr "" -#: resrc.c:610 +#: resrc.c:607 #, c-format msgid "%s: read of %lu returned %lu" msgstr "" -#: resrc.c:652 resrc.c:883 resrc.c:1156 resrc.c:1310 +#: resrc.c:649 resrc.c:903 resrc.c:1176 resrc.c:1330 #, c-format msgid "stat failed on bitmap file `%s': %s" msgstr "" -#: resrc.c:705 +#: resrc.c:702 #, c-format msgid "cursor file `%s' does not contain cursor data" msgstr "" -#: resrc.c:737 resrc.c:1027 +#: resrc.c:734 resrc.c:1047 #, c-format msgid "%s: fseek to %lu failed: %s" msgstr "" -#: resrc.c:996 +#: resrc.c:871 +msgid "help ID requires DIALOGEX" +msgstr "" + +#: resrc.c:873 +msgid "control data requires DIALOGEX" +msgstr "" + +#: resrc.c:1016 #, c-format msgid "icon file `%s' does not contain icon data" msgstr "" -#: resrc.c:1515 +#: resrc.c:1535 #, c-format msgid "can't open `%s' for output: %s" msgstr "" @@ -3485,44 +3869,45 @@ msgstr "" #: size.c:79 #, c-format msgid "" -"Usage: %s [-ABdoxV] [--format=berkeley|sysv] [--radix=8|10|16]\n" -" [--target=bfdname] [--version] [--help] [file...]\n" +"Usage: %s [-A | --format=sysv | -B | --format=berkeley]\n" +" [-o | --radix=8 | -d | --radix=10 | -h | --radix=16]\n" +" [-V | --version] [--target=bfdname] [--help] [file...]\n" msgstr "" -#: size.c:83 +#: size.c:85 msgid "default is --format=berkeley\n" msgstr "" -#: size.c:85 +#: size.c:87 msgid "default is --format=sysv\n" msgstr "" -#: size.c:139 +#: size.c:141 #, c-format -msgid "invalid argument to --format: %s\n" +msgid "invalid argument to --format: %s" msgstr "" -#: size.c:166 +#: size.c:168 #, c-format msgid "Invalid radix: %s\n" msgstr "" -#: srconv.c:1879 +#: srconv.c:1880 #, c-format msgid "Usage: %s [-dhVq] in-file [out-file]\n" msgstr "" -#: srconv.c:1886 +#: srconv.c:1887 #, c-format msgid "%s: Convert a COFF object file into a SYSROFF object file\n" msgstr "" -#: srconv.c:2024 +#: srconv.c:2020 #, c-format -msgid "%s: unable to open output file %s\n" +msgid "unable to open output file %s" msgstr "" -#: stabs.c:349 stabs.c:1769 +#: stabs.c:349 stabs.c:1770 msgid "numeric overflow" msgstr "" @@ -3550,84 +3935,84 @@ msgstr "" #. Complain and keep going, so compilers can invent new #. cross-reference types. -#: stabs.c:1306 +#: stabs.c:1307 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:1861 +#: stabs.c:1862 msgid "missing index type" msgstr "" -#: stabs.c:2188 +#: stabs.c:2189 msgid "unknown virtual character for baseclass" msgstr "" -#: stabs.c:2206 +#: stabs.c:2207 msgid "unknown visibility character for baseclass" msgstr "" -#: stabs.c:2398 +#: stabs.c:2399 msgid "unnamed $vb type" msgstr "" -#: stabs.c:2404 +#: stabs.c:2405 msgid "unrecognized C++ abbreviation" msgstr "" -#: stabs.c:2484 +#: stabs.c:2485 msgid "unknown visibility character for field" msgstr "" -#: stabs.c:2740 +#: stabs.c:2741 msgid "const/volatile indicator missing" msgstr "" -#: stabs.c:2980 +#: stabs.c:2981 #, c-format msgid "No mangling for \"%s\"\n" msgstr "" -#: stabs.c:3293 +#: stabs.c:3294 msgid "Undefined N_EXCL" msgstr "" -#: stabs.c:3381 +#: stabs.c:3382 #, c-format msgid "Type file number %d out of range\n" msgstr "" -#: stabs.c:3386 +#: stabs.c:3387 #, c-format msgid "Type index number %d out of range\n" msgstr "" -#: stabs.c:3473 +#: stabs.c:3474 #, c-format msgid "Unrecognized XCOFF type %d\n" msgstr "" -#: stabs.c:3772 +#: stabs.c:3773 #, c-format msgid "bad mangled name `%s'\n" msgstr "" -#: stabs.c:3868 +#: stabs.c:3869 msgid "no argument types in mangled string\n" msgstr "" -#: strings.c:159 +#: strings.c:177 #, c-format -msgid "%s: invalid number %s\n" +msgid "invalid number %s" msgstr "" -#: strings.c:494 +#: strings.c:513 #, c-format -msgid "%s: invalid integer argument %s\n" +msgid "invalid integer argument %s" msgstr "" -#: strings.c:505 +#: strings.c:523 #, c-format msgid "" "Usage: %s [-afov] [-n min-len] [-min-len] [-t {o,x,d}] [-]\n" @@ -3640,13 +4025,13 @@ msgstr "" msgid "Usage: %s [-hV] in-file\n" msgstr "" -#: sysdump.c:783 +#: sysdump.c:781 #, c-format -msgid "%s: cannot open input file %s\n" +msgid "cannot open input file %s" msgstr "" #: version.c:39 -msgid "Copyright 1997, 1998, 1999 Free Software Foundation, Inc.\n" +msgid "Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.\n" msgstr "" #: version.c:40 @@ -3679,7 +4064,7 @@ msgstr "" #: windres.c:602 #, c-format -msgid "%s: unknown format type `%s'\n" +msgid "unknown format type `%s'" msgstr "" #: windres.c:603 @@ -3740,17 +4125,17 @@ msgstr "" msgid "no resources" msgstr "" -#: wrstabs.c:366 wrstabs.c:2028 +#: wrstabs.c:366 wrstabs.c:2027 #, c-format -msgid "string_hash_lookup failed: %s\n" +msgid "string_hash_lookup failed: %s" msgstr "" #: wrstabs.c:666 #, c-format -msgid "stab_int_type: bad size %u\n" +msgid "stab_int_type: bad size %u" msgstr "" -#: wrstabs.c:1468 +#: wrstabs.c:1467 #, c-format -msgid "%s: warning: unknown size for field `%s' in struct\n" +msgid "%s: warning: unknown size for field `%s' in struct" msgstr "" diff --git a/contrib/binutils/binutils/ranlib.1 b/contrib/binutils/binutils/ranlib.1 index 7efb5c8..9e973c6 100644 --- a/contrib/binutils/binutils/ranlib.1 +++ b/contrib/binutils/binutils/ranlib.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1991 Free Software Foundation +.\" Copyright (c) 1991, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH ranlib 1 "5 November 1991" "cygnus support" "GNU Development Tools" +.TH ranlib 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -65,19 +65,377 @@ The GNU Binary Utilities\c .SH COPYING -Copyright (c) 1991 Free Software Foundation, Inc. +Copyright (c) 1991, 2000 Free Software Foundation, Inc. .PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. -.PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +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. diff --git a/contrib/binutils/binutils/rclex.c b/contrib/binutils/binutils/rclex.c index b2967bb..be3602e 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.2.1 2000/05/29 14:08:52 pb Exp $ + * $Header: /cvs/src/src/binutils/Attic/rclex.c,v 1.1.4.1 2001/03/12 15:40:35 pb Exp $ */ #define FLEX_SCANNER diff --git a/contrib/binutils/binutils/rcparse.c b/contrib/binutils/binutils/rcparse.c index dff3302..63578af 100644 --- a/contrib/binutils/binutils/rcparse.c +++ b/contrib/binutils/binutils/rcparse.c @@ -196,11 +196,11 @@ typedef union -#define YYFINAL 475 +#define YYFINAL 483 #define YYFLAG -32768 #define YYNTBASE 99 -#define YYTRANSLATE(x) ((unsigned)(x) <= 339 ? yytranslate[x] : 189) +#define YYTRANSLATE(x) ((unsigned)(x) <= 339 ? yytranslate[x] : 191) static const char yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -249,22 +249,23 @@ static const short yyprhs[] = { 0, 192, 200, 204, 208, 213, 217, 218, 221, 222, 226, 227, 231, 232, 236, 237, 241, 242, 246, 247, 251, 263, 276, 289, 303, 304, 308, 309, 313, 314, 318, - 319, 323, 324, 328, 335, 346, 358, 359, 363, 364, - 368, 369, 373, 374, 378, 379, 383, 384, 388, 389, - 393, 394, 398, 399, 403, 404, 421, 429, 439, 450, - 451, 454, 455, 459, 460, 464, 465, 469, 470, 474, - 479, 484, 488, 495, 496, 499, 504, 507, 514, 515, - 519, 522, 524, 526, 528, 530, 532, 534, 541, 542, - 545, 548, 552, 558, 561, 567, 574, 582, 592, 597, - 604, 605, 608, 609, 611, 613, 615, 619, 623, 624, - 631, 632, 636, 641, 648, 653, 660, 661, 668, 675, - 679, 683, 687, 691, 695, 696, 705, 713, 714, 720, - 721, 725, 727, 729, 730, 733, 737, 742, 746, 747, - 750, 751, 754, 756, 758, 760, 762, 764, 766, 768, - 770, 772, 774, 777, 781, 786, 788, 792, 793, 795, - 798, 800, 802, 806, 809, 812, 816, 820, 824, 828, - 832, 836, 840, 844, 847, 849, 851, 855, 858, 862, - 866, 870, 874, 878, 882, 886 + 319, 323, 324, 328, 335, 344, 355, 367, 368, 372, + 373, 377, 378, 382, 383, 387, 388, 392, 393, 397, + 398, 402, 403, 407, 408, 412, 413, 430, 438, 448, + 459, 460, 462, 465, 466, 470, 471, 475, 476, 480, + 481, 485, 490, 495, 499, 506, 507, 510, 515, 518, + 525, 526, 530, 533, 535, 537, 539, 541, 543, 545, + 552, 553, 556, 559, 563, 569, 572, 578, 585, 593, + 603, 608, 615, 616, 619, 620, 622, 624, 626, 630, + 634, 635, 642, 643, 647, 652, 659, 664, 671, 672, + 679, 686, 690, 694, 698, 702, 706, 707, 716, 724, + 725, 731, 732, 736, 738, 740, 742, 745, 748, 751, + 753, 754, 757, 761, 766, 770, 771, 774, 775, 778, + 780, 782, 784, 786, 788, 790, 792, 794, 796, 798, + 801, 805, 810, 812, 816, 817, 819, 822, 824, 826, + 830, 833, 836, 840, 844, 848, 852, 856, 860, 864, + 868, 871, 873, 875, 879, 882, 886, 890, 894, 898, + 902, 906, 910 }; static const short yyrhs[] = { -1, @@ -274,89 +275,92 @@ static const short yyrhs[] = { -1, 151, 0, 99, 100, 156, 0, 99, 100, 159, 0, 99, 100, 160, 0, 99, 100, 165, 0, 99, 100, 168, 0, 99, 100, 169, 0, 99, 100, 84, 0, - 0, 174, 5, 175, 3, 102, 4, 0, 0, 102, - 103, 0, 104, 186, 0, 104, 186, 95, 105, 0, - 80, 0, 187, 0, 106, 0, 105, 95, 106, 0, + 0, 174, 5, 177, 3, 102, 4, 0, 0, 102, + 103, 0, 104, 188, 0, 104, 188, 95, 105, 0, + 80, 0, 189, 0, 106, 0, 105, 95, 106, 0, 105, 106, 0, 6, 0, 7, 0, 8, 0, 9, - 0, 10, 0, 11, 0, 174, 12, 177, 179, 0, - 174, 13, 176, 179, 0, 0, 174, 14, 177, 113, - 187, 183, 183, 183, 110, 114, 3, 116, 4, 0, - 0, 174, 15, 177, 113, 187, 183, 183, 183, 111, - 114, 3, 116, 4, 0, 0, 174, 15, 177, 113, - 187, 183, 183, 183, 183, 112, 114, 3, 116, 4, - 0, 0, 16, 96, 184, 0, 0, 114, 17, 80, - 0, 114, 18, 174, 0, 0, 114, 19, 115, 180, - 0, 114, 16, 184, 0, 114, 41, 184, 95, 80, - 0, 114, 41, 184, 95, 80, 183, 183, 0, 114, - 46, 174, 0, 114, 44, 184, 0, 114, 43, 184, - 183, 0, 114, 45, 184, 0, 0, 116, 117, 0, + 0, 10, 0, 11, 0, 174, 12, 179, 181, 0, + 174, 13, 178, 181, 0, 0, 174, 14, 179, 113, + 189, 185, 185, 185, 110, 114, 3, 116, 4, 0, + 0, 174, 15, 179, 113, 189, 185, 185, 185, 111, + 114, 3, 116, 4, 0, 0, 174, 15, 179, 113, + 189, 185, 185, 185, 185, 112, 114, 3, 116, 4, + 0, 0, 16, 96, 186, 0, 0, 114, 17, 80, + 0, 114, 18, 174, 0, 0, 114, 19, 115, 182, + 0, 114, 16, 186, 0, 114, 41, 186, 95, 80, + 0, 114, 41, 186, 95, 80, 185, 185, 0, 114, + 46, 174, 0, 114, 44, 186, 0, 114, 43, 186, + 185, 0, 114, 45, 186, 0, 0, 116, 117, 0, 0, 20, 118, 139, 0, 0, 21, 119, 139, 0, 0, 22, 120, 139, 0, 0, 38, 121, 139, 0, 0, 23, 122, 139, 0, 0, 24, 123, 139, 0, - 10, 140, 184, 183, 142, 183, 183, 183, 183, 182, - 141, 0, 10, 140, 184, 183, 142, 183, 183, 183, - 183, 183, 183, 141, 0, 10, 140, 184, 95, 80, - 142, 183, 183, 183, 183, 182, 141, 0, 10, 140, - 184, 95, 80, 142, 183, 183, 183, 183, 183, 183, + 10, 140, 186, 185, 142, 185, 185, 185, 185, 184, + 141, 0, 10, 140, 186, 185, 142, 185, 185, 185, + 185, 185, 185, 141, 0, 10, 140, 186, 95, 80, + 142, 185, 185, 185, 185, 184, 141, 0, 10, 140, + 186, 95, 80, 142, 185, 185, 185, 185, 185, 185, 141, 0, 0, 25, 124, 139, 0, 0, 26, 125, 139, 0, 0, 27, 126, 139, 0, 0, 28, 127, - 139, 0, 0, 39, 128, 139, 0, 42, 140, 184, - 183, 183, 141, 0, 42, 140, 184, 183, 183, 183, - 183, 144, 182, 141, 0, 42, 140, 184, 183, 183, - 183, 183, 144, 183, 183, 141, 0, 0, 40, 129, - 139, 0, 0, 29, 130, 139, 0, 0, 30, 131, - 139, 0, 0, 31, 132, 139, 0, 0, 32, 133, - 139, 0, 0, 33, 134, 139, 0, 0, 34, 135, - 139, 0, 0, 35, 136, 139, 0, 0, 36, 137, - 139, 0, 0, 37, 80, 95, 184, 95, 184, 95, - 184, 95, 184, 95, 184, 95, 138, 180, 182, 0, - 140, 184, 183, 183, 183, 183, 141, 0, 140, 184, - 183, 183, 183, 183, 146, 182, 141, 0, 140, 184, - 183, 183, 183, 183, 146, 183, 183, 141, 0, 0, - 80, 95, 0, 0, 3, 161, 4, 0, 0, 95, - 143, 180, 0, 0, 95, 145, 180, 0, 0, 95, - 147, 180, 0, 174, 41, 176, 179, 0, 174, 42, - 176, 179, 0, 43, 184, 183, 0, 174, 46, 175, - 3, 152, 4, 0, 0, 152, 153, 0, 48, 80, - 183, 154, 0, 48, 49, 0, 50, 80, 154, 3, - 152, 4, 0, 0, 154, 95, 155, 0, 154, 155, - 0, 51, 0, 52, 0, 53, 0, 54, 0, 55, - 0, 56, 0, 174, 47, 175, 3, 157, 4, 0, - 0, 157, 158, 0, 48, 80, 0, 48, 80, 183, - 0, 48, 80, 183, 183, 182, 0, 48, 49, 0, - 50, 80, 3, 157, 4, 0, 50, 80, 183, 3, - 157, 4, 0, 50, 80, 183, 183, 3, 157, 4, - 0, 50, 80, 183, 183, 183, 182, 3, 157, 4, - 0, 174, 57, 177, 179, 0, 174, 58, 175, 3, - 161, 4, 0, 0, 162, 163, 0, 0, 164, 0, - 83, 0, 185, 0, 164, 95, 83, 0, 164, 95, - 185, 0, 0, 59, 175, 3, 166, 167, 4, 0, - 0, 167, 184, 80, 0, 167, 184, 95, 80, 0, - 174, 174, 175, 3, 161, 4, 0, 174, 174, 175, - 179, 0, 174, 60, 170, 3, 171, 4, 0, 0, - 170, 61, 184, 183, 183, 183, 0, 170, 62, 184, - 183, 183, 183, 0, 170, 63, 184, 0, 170, 64, - 184, 0, 170, 65, 184, 0, 170, 66, 184, 0, - 170, 67, 184, 0, 0, 171, 68, 3, 71, 3, - 172, 4, 4, 0, 171, 69, 3, 70, 80, 173, - 4, 0, 0, 172, 70, 80, 95, 80, 0, 0, - 173, 183, 183, 0, 187, 0, 81, 0, 0, 175, - 178, 0, 175, 44, 184, 0, 175, 43, 184, 183, - 0, 175, 45, 184, 0, 0, 176, 178, 0, 0, - 177, 178, 0, 72, 0, 73, 0, 74, 0, 75, - 0, 76, 0, 77, 0, 78, 0, 80, 0, 81, - 0, 181, 0, 79, 181, 0, 180, 85, 181, 0, - 180, 85, 79, 181, 0, 82, 0, 97, 184, 98, - 0, 0, 183, 0, 95, 184, 0, 185, 0, 82, - 0, 97, 185, 98, 0, 93, 185, 0, 89, 185, - 0, 185, 90, 185, 0, 185, 91, 185, 0, 185, - 92, 185, 0, 185, 88, 185, 0, 185, 89, 185, - 0, 185, 87, 185, 0, 185, 86, 185, 0, 185, - 85, 185, 0, 95, 187, 0, 188, 0, 82, 0, - 97, 185, 98, 0, 93, 185, 0, 188, 90, 185, - 0, 188, 91, 185, 0, 188, 92, 185, 0, 188, - 88, 185, 0, 188, 89, 185, 0, 188, 87, 185, - 0, 188, 86, 185, 0, 188, 85, 185, 0 + 139, 0, 0, 39, 128, 139, 0, 42, 176, 186, + 185, 185, 141, 0, 42, 176, 186, 185, 185, 185, + 185, 141, 0, 42, 176, 186, 185, 185, 185, 185, + 144, 184, 141, 0, 42, 176, 186, 185, 185, 185, + 185, 144, 185, 185, 141, 0, 0, 40, 129, 139, + 0, 0, 29, 130, 139, 0, 0, 30, 131, 139, + 0, 0, 31, 132, 139, 0, 0, 32, 133, 139, + 0, 0, 33, 134, 139, 0, 0, 34, 135, 139, + 0, 0, 35, 136, 139, 0, 0, 36, 137, 139, + 0, 0, 37, 80, 95, 186, 95, 186, 95, 186, + 95, 186, 95, 186, 95, 138, 182, 184, 0, 140, + 186, 185, 185, 185, 185, 141, 0, 140, 186, 185, + 185, 185, 185, 146, 184, 141, 0, 140, 186, 185, + 185, 185, 185, 146, 185, 185, 141, 0, 0, 80, + 0, 80, 95, 0, 0, 3, 161, 4, 0, 0, + 95, 143, 182, 0, 0, 95, 145, 182, 0, 0, + 95, 147, 182, 0, 174, 41, 178, 181, 0, 174, + 42, 178, 181, 0, 43, 186, 185, 0, 174, 46, + 177, 3, 152, 4, 0, 0, 152, 153, 0, 48, + 80, 185, 154, 0, 48, 49, 0, 50, 80, 154, + 3, 152, 4, 0, 0, 154, 95, 155, 0, 154, + 155, 0, 51, 0, 52, 0, 53, 0, 54, 0, + 55, 0, 56, 0, 174, 47, 177, 3, 157, 4, + 0, 0, 157, 158, 0, 48, 80, 0, 48, 80, + 185, 0, 48, 80, 185, 185, 184, 0, 48, 49, + 0, 50, 80, 3, 157, 4, 0, 50, 80, 185, + 3, 157, 4, 0, 50, 80, 185, 185, 3, 157, + 4, 0, 50, 80, 185, 185, 185, 184, 3, 157, + 4, 0, 174, 57, 179, 181, 0, 174, 58, 177, + 3, 161, 4, 0, 0, 162, 163, 0, 0, 164, + 0, 83, 0, 187, 0, 164, 95, 83, 0, 164, + 95, 187, 0, 0, 59, 177, 3, 166, 167, 4, + 0, 0, 167, 186, 80, 0, 167, 186, 95, 80, + 0, 174, 174, 177, 3, 161, 4, 0, 174, 174, + 177, 181, 0, 174, 60, 170, 3, 171, 4, 0, + 0, 170, 61, 186, 185, 185, 185, 0, 170, 62, + 186, 185, 185, 185, 0, 170, 63, 186, 0, 170, + 64, 186, 0, 170, 65, 186, 0, 170, 66, 186, + 0, 170, 67, 186, 0, 0, 171, 68, 3, 71, + 3, 172, 4, 4, 0, 171, 69, 3, 70, 80, + 173, 4, 0, 0, 172, 70, 80, 95, 80, 0, + 0, 173, 185, 185, 0, 189, 0, 81, 0, 80, + 0, 80, 95, 0, 81, 95, 0, 189, 95, 0, + 175, 0, 0, 177, 180, 0, 177, 44, 186, 0, + 177, 43, 186, 185, 0, 177, 45, 186, 0, 0, + 178, 180, 0, 0, 179, 180, 0, 72, 0, 73, + 0, 74, 0, 75, 0, 76, 0, 77, 0, 78, + 0, 80, 0, 81, 0, 183, 0, 79, 183, 0, + 182, 85, 183, 0, 182, 85, 79, 183, 0, 82, + 0, 97, 186, 98, 0, 0, 185, 0, 95, 186, + 0, 187, 0, 82, 0, 97, 187, 98, 0, 93, + 187, 0, 89, 187, 0, 187, 90, 187, 0, 187, + 91, 187, 0, 187, 92, 187, 0, 187, 88, 187, + 0, 187, 89, 187, 0, 187, 87, 187, 0, 187, + 86, 187, 0, 187, 85, 187, 0, 95, 189, 0, + 190, 0, 82, 0, 97, 187, 98, 0, 93, 187, + 0, 190, 90, 187, 0, 190, 91, 187, 0, 190, + 92, 187, 0, 190, 88, 187, 0, 190, 89, 187, + 0, 190, 87, 187, 0, 190, 86, 187, 0, 190, + 85, 187, 0 }; #endif @@ -371,22 +375,23 @@ static const short yyrline[] = { 0, 435, 448, 452, 456, 460, 466, 468, 478, 486, 489, 496, 499, 506, 509, 516, 522, 529, 532, 539, 542, 553, 562, 575, 586, 593, 596, 603, 606, 613, 616, - 623, 626, 633, 639, 650, 662, 672, 679, 685, 692, - 695, 702, 705, 712, 715, 722, 725, 732, 735, 742, - 745, 752, 755, 762, 765, 768, 782, 795, 806, 817, - 822, 828, 833, 841, 845, 847, 851, 853, 857, 861, - 870, 880, 889, 896, 901, 917, 922, 926, 932, 937, - 941, 947, 952, 956, 960, 964, 968, 976, 983, 988, - 1004, 1009, 1013, 1017, 1021, 1025, 1029, 1033, 1042, 1051, - 1061, 1066, 1072, 1078, 1084, 1093, 1101, 1110, 1123, 1126, - 1129, 1131, 1135, 1144, 1149, 1157, 1164, 1171, 1177, 1183, - 1188, 1193, 1198, 1203, 1216, 1221, 1225, 1231, 1236, 1242, - 1247, 1255, 1261, 1278, 1286, 1292, 1297, 1302, 1311, 1318, - 1328, 1335, 1346, 1352, 1357, 1362, 1367, 1372, 1377, 1386, - 1391, 1407, 1412, 1416, 1420, 1426, 1431, 1439, 1444, 1452, - 1461, 1470, 1475, 1479, 1484, 1489, 1494, 1499, 1504, 1509, - 1514, 1519, 1524, 1534, 1543, 1554, 1559, 1563, 1568, 1573, - 1578, 1583, 1588, 1593, 1598, 1603 + 623, 626, 633, 639, 644, 650, 656, 662, 669, 675, + 682, 685, 692, 695, 702, 705, 712, 715, 722, 725, + 732, 735, 742, 745, 752, 755, 758, 772, 785, 796, + 807, 812, 816, 822, 827, 835, 839, 841, 845, 847, + 851, 855, 864, 874, 883, 890, 895, 911, 916, 920, + 926, 931, 935, 941, 946, 950, 954, 958, 962, 970, + 977, 982, 998, 1003, 1007, 1011, 1015, 1019, 1023, 1027, + 1036, 1045, 1055, 1060, 1066, 1072, 1078, 1087, 1095, 1104, + 1117, 1120, 1123, 1125, 1129, 1138, 1143, 1151, 1158, 1165, + 1171, 1177, 1182, 1187, 1192, 1197, 1210, 1215, 1219, 1225, + 1230, 1236, 1241, 1249, 1255, 1271, 1276, 1280, 1287, 1293, + 1310, 1318, 1324, 1329, 1334, 1343, 1350, 1360, 1367, 1378, + 1384, 1389, 1394, 1399, 1404, 1409, 1418, 1423, 1439, 1444, + 1448, 1452, 1458, 1463, 1471, 1476, 1484, 1493, 1502, 1507, + 1511, 1516, 1521, 1526, 1531, 1536, 1541, 1546, 1551, 1556, + 1566, 1575, 1586, 1591, 1595, 1600, 1605, 1610, 1615, 1620, + 1625, 1630, 1635 }; #endif @@ -415,9 +420,9 @@ static const char * const yytname[] = { "$","error","$undefined.","BEG","END", "menuitem_flag","menuex","menuexitems","menuexitem","messagetable","rcdata", "optrcdata_data","@29","optrcdata_data_int","rcdata_data","stringtable","@30", "string_data","user","versioninfo","fixedverinfo","verblocks","vervals","vertrans", -"id","suboptions","memflags_move_discard","memflags_move","memflag","file_name", -"styleexpr","parennumber","optcnumexpr","cnumexpr","numexpr","sizednumexpr", -"cposnumexpr","posnumexpr","sizedposnumexpr", NULL +"id","resname","resref","suboptions","memflags_move_discard","memflags_move", +"memflag","file_name","styleexpr","parennumber","optcnumexpr","cnumexpr","numexpr", +"sizednumexpr","cposnumexpr","posnumexpr","sizedposnumexpr", NULL }; #endif @@ -430,22 +435,23 @@ static const short yyr1[] = { 0, 114, 114, 114, 114, 114, 116, 116, 118, 117, 119, 117, 120, 117, 121, 117, 122, 117, 123, 117, 117, 117, 117, 117, 124, 117, 125, 117, 126, 117, 127, - 117, 128, 117, 117, 117, 117, 129, 117, 130, 117, - 131, 117, 132, 117, 133, 117, 134, 117, 135, 117, - 136, 117, 137, 117, 138, 117, 139, 139, 139, 140, - 140, 141, 141, 143, 142, 145, 144, 147, 146, 148, - 149, 150, 151, 152, 152, 153, 153, 153, 154, 154, - 154, 155, 155, 155, 155, 155, 155, 156, 157, 157, - 158, 158, 158, 158, 158, 158, 158, 158, 159, 160, - 162, 161, 163, 163, 164, 164, 164, 164, 166, 165, - 167, 167, 167, 168, 168, 169, 170, 170, 170, 170, - 170, 170, 170, 170, 171, 171, 171, 172, 172, 173, - 173, 174, 174, 175, 175, 175, 175, 175, 176, 176, - 177, 177, 178, 178, 178, 178, 178, 178, 178, 179, - 179, 180, 180, 180, 180, 181, 181, 182, 182, 183, - 184, 185, 185, 185, 185, 185, 185, 185, 185, 185, - 185, 185, 185, 186, 187, 188, 188, 188, 188, 188, - 188, 188, 188, 188, 188, 188 + 117, 128, 117, 117, 117, 117, 117, 129, 117, 130, + 117, 131, 117, 132, 117, 133, 117, 134, 117, 135, + 117, 136, 117, 137, 117, 138, 117, 139, 139, 139, + 140, 140, 140, 141, 141, 143, 142, 145, 144, 147, + 146, 148, 149, 150, 151, 152, 152, 153, 153, 153, + 154, 154, 154, 155, 155, 155, 155, 155, 155, 156, + 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, + 159, 160, 162, 161, 163, 163, 164, 164, 164, 164, + 166, 165, 167, 167, 167, 168, 168, 169, 170, 170, + 170, 170, 170, 170, 170, 170, 171, 171, 171, 172, + 172, 173, 173, 174, 174, 175, 175, 175, 176, 176, + 177, 177, 177, 177, 177, 178, 178, 179, 179, 180, + 180, 180, 180, 180, 180, 180, 181, 181, 182, 182, + 182, 182, 183, 183, 184, 184, 185, 186, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 188, 189, 190, 190, 190, 190, 190, 190, 190, 190, + 190, 190, 190 }; static const short yyr2[] = { 0, @@ -457,302 +463,305 @@ static const short yyr2[] = { 0, 7, 3, 3, 4, 3, 0, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 11, 12, 12, 13, 0, 3, 0, 3, 0, 3, 0, - 3, 0, 3, 6, 10, 11, 0, 3, 0, 3, - 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, - 0, 3, 0, 3, 0, 16, 7, 9, 10, 0, - 2, 0, 3, 0, 3, 0, 3, 0, 3, 4, - 4, 3, 6, 0, 2, 4, 2, 6, 0, 3, - 2, 1, 1, 1, 1, 1, 1, 6, 0, 2, - 2, 3, 5, 2, 5, 6, 7, 9, 4, 6, - 0, 2, 0, 1, 1, 1, 3, 3, 0, 6, - 0, 3, 4, 6, 4, 6, 0, 6, 6, 3, - 3, 3, 3, 3, 0, 8, 7, 0, 5, 0, - 3, 1, 1, 0, 2, 3, 4, 3, 0, 2, - 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 3, 4, 1, 3, 0, 1, 2, - 1, 1, 3, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 2, 1, 1, 3, 2, 3, 3, - 3, 3, 3, 3, 3, 3 + 3, 0, 3, 6, 8, 10, 11, 0, 3, 0, + 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, + 3, 0, 3, 0, 3, 0, 16, 7, 9, 10, + 0, 1, 2, 0, 3, 0, 3, 0, 3, 0, + 3, 4, 4, 3, 6, 0, 2, 4, 2, 6, + 0, 3, 2, 1, 1, 1, 1, 1, 1, 6, + 0, 2, 2, 3, 5, 2, 5, 6, 7, 9, + 4, 6, 0, 2, 0, 1, 1, 1, 3, 3, + 0, 6, 0, 3, 4, 6, 4, 6, 0, 6, + 6, 3, 3, 3, 3, 3, 0, 8, 7, 0, + 5, 0, 3, 1, 1, 1, 2, 2, 2, 1, + 0, 2, 3, 4, 3, 0, 2, 0, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 3, 4, 1, 3, 0, 1, 2, 1, 1, 3, + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 1, 1, 3, 2, 3, 3, 3, 3, 3, + 3, 3, 3 }; static const short yydefact[] = { 1, - 17, 0, 0, 184, 183, 226, 16, 0, 0, 2, + 17, 0, 0, 191, 185, 233, 16, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 0, 182, 225, 212, 0, 0, 0, - 0, 211, 0, 228, 0, 184, 191, 189, 191, 191, - 189, 189, 184, 184, 191, 184, 167, 184, 0, 0, - 0, 0, 0, 0, 0, 0, 215, 214, 0, 0, - 122, 0, 0, 0, 0, 0, 0, 0, 0, 159, - 0, 0, 0, 193, 194, 195, 196, 197, 198, 199, - 185, 227, 0, 0, 0, 42, 42, 0, 0, 0, - 0, 0, 0, 0, 0, 236, 235, 234, 232, 233, - 229, 230, 231, 213, 210, 223, 222, 221, 219, 220, - 216, 217, 218, 161, 0, 186, 188, 19, 200, 201, - 192, 34, 190, 35, 0, 0, 0, 120, 121, 124, - 139, 149, 151, 175, 0, 0, 0, 0, 0, 0, - 0, 151, 165, 0, 187, 0, 0, 0, 0, 0, - 0, 0, 153, 0, 0, 0, 170, 171, 172, 173, - 174, 0, 160, 0, 18, 23, 20, 0, 24, 43, - 0, 0, 123, 0, 0, 125, 138, 0, 0, 140, - 150, 155, 152, 154, 156, 166, 0, 0, 0, 0, - 164, 162, 0, 0, 21, 0, 0, 127, 0, 129, - 144, 141, 0, 0, 0, 0, 0, 0, 163, 224, - 0, 36, 38, 129, 0, 142, 139, 0, 157, 158, - 0, 0, 168, 169, 28, 29, 30, 31, 32, 33, - 22, 25, 44, 44, 40, 126, 124, 132, 133, 134, - 135, 136, 137, 0, 131, 208, 0, 139, 0, 178, - 180, 0, 27, 0, 0, 44, 0, 130, 143, 209, - 145, 0, 139, 208, 0, 0, 26, 56, 0, 0, - 0, 47, 0, 0, 0, 0, 0, 56, 0, 128, - 146, 0, 0, 0, 0, 177, 0, 0, 49, 45, - 46, 0, 0, 0, 53, 55, 52, 0, 56, 147, - 139, 176, 0, 181, 37, 110, 58, 60, 62, 66, - 68, 74, 76, 78, 80, 89, 91, 93, 95, 97, - 99, 101, 103, 0, 64, 82, 87, 110, 57, 0, - 206, 0, 48, 202, 0, 54, 39, 0, 0, 0, - 0, 0, 110, 110, 110, 110, 110, 110, 110, 110, - 110, 110, 110, 110, 110, 110, 110, 110, 110, 0, - 110, 110, 110, 0, 203, 0, 0, 50, 41, 148, - 179, 111, 0, 59, 0, 61, 63, 67, 69, 75, - 77, 79, 81, 90, 92, 94, 96, 98, 100, 102, - 104, 0, 65, 83, 88, 0, 207, 0, 204, 0, - 0, 0, 0, 0, 0, 205, 51, 0, 114, 0, - 0, 0, 112, 0, 0, 0, 0, 0, 151, 84, - 0, 0, 115, 0, 0, 0, 0, 0, 0, 0, - 112, 0, 113, 116, 208, 0, 208, 118, 107, 208, - 0, 0, 112, 209, 208, 112, 209, 0, 112, 209, - 0, 117, 85, 112, 112, 209, 70, 112, 119, 108, - 112, 0, 86, 72, 112, 71, 109, 0, 73, 105, - 0, 208, 106, 0, 0 + 13, 14, 15, 0, 184, 232, 219, 0, 0, 0, + 0, 218, 0, 235, 0, 191, 198, 196, 198, 198, + 196, 196, 191, 191, 198, 191, 169, 191, 0, 0, + 0, 0, 0, 0, 0, 0, 222, 221, 0, 0, + 124, 0, 0, 0, 0, 0, 0, 0, 0, 161, + 0, 0, 0, 200, 201, 202, 203, 204, 205, 206, + 192, 234, 0, 0, 0, 42, 42, 0, 0, 0, + 0, 0, 0, 0, 0, 243, 242, 241, 239, 240, + 236, 237, 238, 220, 217, 230, 229, 228, 226, 227, + 223, 224, 225, 163, 0, 193, 195, 19, 207, 208, + 199, 34, 197, 35, 0, 0, 0, 122, 123, 126, + 141, 151, 153, 177, 0, 0, 0, 0, 0, 0, + 0, 153, 167, 0, 194, 0, 0, 0, 0, 0, + 0, 0, 155, 0, 0, 0, 172, 173, 174, 175, + 176, 0, 162, 0, 18, 23, 20, 0, 24, 43, + 0, 0, 125, 0, 0, 127, 140, 0, 0, 142, + 152, 157, 154, 156, 158, 168, 0, 0, 0, 0, + 166, 164, 0, 0, 21, 0, 0, 129, 0, 131, + 146, 143, 0, 0, 0, 0, 0, 0, 165, 231, + 0, 36, 38, 131, 0, 144, 141, 0, 159, 160, + 0, 0, 170, 171, 28, 29, 30, 31, 32, 33, + 22, 25, 44, 44, 40, 128, 126, 134, 135, 136, + 137, 138, 139, 0, 133, 215, 0, 141, 0, 180, + 182, 0, 27, 0, 0, 44, 0, 132, 145, 216, + 147, 0, 141, 215, 0, 0, 26, 56, 0, 0, + 0, 47, 0, 0, 0, 0, 0, 56, 0, 130, + 148, 0, 0, 0, 0, 179, 0, 0, 49, 45, + 46, 0, 0, 0, 53, 55, 52, 0, 56, 149, + 141, 178, 0, 183, 37, 111, 58, 60, 62, 66, + 68, 74, 76, 78, 80, 90, 92, 94, 96, 98, + 100, 102, 104, 0, 64, 82, 88, 0, 57, 0, + 213, 0, 48, 209, 0, 54, 39, 0, 0, 0, + 112, 0, 111, 111, 111, 111, 111, 111, 111, 111, + 111, 111, 111, 111, 111, 111, 111, 111, 111, 0, + 111, 111, 111, 186, 0, 190, 0, 0, 210, 0, + 0, 50, 41, 150, 181, 113, 0, 59, 0, 61, + 63, 67, 69, 75, 77, 79, 81, 91, 93, 95, + 97, 99, 101, 103, 105, 0, 65, 83, 89, 187, + 188, 0, 189, 214, 0, 211, 0, 0, 0, 0, + 0, 0, 212, 51, 0, 116, 0, 0, 0, 114, + 0, 0, 0, 0, 0, 153, 84, 0, 0, 117, + 0, 0, 0, 0, 114, 0, 0, 114, 0, 115, + 118, 85, 215, 0, 215, 120, 108, 215, 0, 0, + 114, 216, 215, 114, 216, 0, 114, 216, 0, 119, + 86, 114, 114, 216, 70, 114, 121, 109, 114, 0, + 87, 72, 114, 71, 110, 0, 73, 106, 0, 215, + 107, 0, 0 }; static const short yydefgoto[] = { 1, 2, 10, 146, 167, 168, 231, 232, 11, 12, 13, 233, 234, 256, 126, 254, 292, 288, 329, 343, 344, 345, 361, 346, 347, 348, 349, 350, 351, 362, 363, - 352, 353, 354, 355, 356, 357, 358, 359, 471, 374, - 375, 420, 410, 415, 435, 442, 440, 448, 14, 15, + 352, 353, 354, 355, 356, 357, 358, 359, 479, 378, + 379, 427, 417, 422, 443, 450, 448, 456, 14, 15, 16, 17, 150, 176, 215, 245, 18, 151, 180, 19, 20, 152, 153, 183, 184, 21, 114, 144, 22, 23, - 94, 154, 265, 266, 24, 33, 85, 84, 81, 122, - 333, 334, 259, 260, 105, 32, 195, 25, 26 + 94, 154, 265, 266, 24, 366, 367, 33, 85, 84, + 81, 122, 333, 334, 259, 260, 105, 32, 195, 25, + 26 }; static const short yypact[] = {-32768, - 39, 284, 231,-32768,-32768,-32768,-32768, 231, 231,-32768, + 31, 240, 241,-32768,-32768,-32768,-32768, 241, 241,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 233,-32768, 601,-32768, 231, 231, 231, - -60, 609, 35,-32768, 314,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 231, 231, - 231, 231, 231, 231, 231, 231,-32768,-32768, 577, 231, --32768, 231, 231, 231, 231, 231, 231, 231, 231,-32768, - 231, 231, 231,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768, 209, 604, 604, 234, 234, 604, 604, 259, - 273, 604, 319, 169, 113, 616, 152, 386, -33, -33, --32768,-32768,-32768,-32768,-32768, 616, 152, 386, -33, -33, --32768,-32768,-32768,-32768, -60,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768, -1, 99, 99,-32768,-32768,-32768, --32768,-32768,-32768,-32768, 231, 231, 231, 231, 231, 231, - 231,-32768,-32768, 0,-32768, 1, 231, -60, -60, 92, - 95, 110, 337, 52, -60, -60,-32768,-32768,-32768,-32768, --32768, 124,-32768, 59,-32768,-32768,-32768, 32,-32768,-32768, - -60, -60,-32768, -36, 51,-32768,-32768, 42, 68,-32768, --32768,-32768,-32768, 54, 609,-32768, 150, 161, -60, -60, --32768,-32768, 75, 99, 66, -60, -60,-32768, -60,-32768, --32768, -60, 5, 527, 107, 136, -60, -60,-32768,-32768, - 703,-32768, -60,-32768, 20, -60,-32768, 6,-32768, 609, - 212, 137,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, - 23,-32768,-32768,-32768,-32768, 303,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 664,-32768, -60, 102,-32768, 7,-32768, --32768, 703,-32768, 446, 454,-32768, 115,-32768,-32768,-32768, --32768, 120,-32768, -60, 15, 10,-32768,-32768, 231, 141, - 123,-32768, 231, 231, 231, 231, 123,-32768, 463,-32768, --32768, 121, 219, 221, 143,-32768, -60, 492,-32768,-32768, --32768, -57, 131, -60,-32768,-32768,-32768, 529,-32768,-32768, --32768,-32768, 133,-32768,-32768, 157,-32768,-32768,-32768,-32768, +-32768,-32768,-32768, 68,-32768, 578,-32768, 241, 241, 241, + -73, 586, 169,-32768, 388,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 241, 241, + 241, 241, 241, 241, 241, 241,-32768,-32768, 513, 241, +-32768, 241, 241, 241, 241, 241, 241, 241, 241,-32768, + 241, 241, 241,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, 215, 581, 581, 268, 268, 581, 581, 232, + 275, 581, 283, 250, 156, 593, 599, 616, 98, 98, +-32768,-32768,-32768,-32768,-32768, 593, 599, 616, 98, 98, +-32768,-32768,-32768,-32768, -73,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768,-32768, -61, 290, 290,-32768,-32768,-32768, +-32768,-32768,-32768,-32768, 241, 241, 241, 241, 241, 241, + 241,-32768,-32768, 4,-32768, 5, 241, -73, -73, 9, + 92, 32, 309, 10, -73, -73,-32768,-32768,-32768,-32768, +-32768, 54,-32768, -57,-32768,-32768,-32768, -20,-32768,-32768, + -73, -73,-32768, 39, -9,-32768,-32768, 40, 11,-32768, +-32768,-32768,-32768, 36, 586,-32768, 145, 151, -73, -73, +-32768,-32768, 78, 290, 79, -73, -73,-32768, -73,-32768, +-32768, -73, 16, 365, 106, 108, -73, -73,-32768,-32768, + 686,-32768, -73,-32768, 52, -73,-32768, 17,-32768, 586, + 178, 128,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, + 34,-32768,-32768,-32768,-32768, 314,-32768,-32768,-32768,-32768, +-32768,-32768,-32768, 647,-32768, -73, 95,-32768, 18,-32768, +-32768, 686,-32768, 150, 378,-32768, 112,-32768,-32768,-32768, +-32768, 123,-32768, -73, 6, 29,-32768,-32768, 241, 129, + 281,-32768, 241, 241, 241, 241, 281,-32768, 452,-32768, +-32768, 135, 200, 213, 143,-32768, -73, 479,-32768,-32768, +-32768, 182, 91, -73,-32768,-32768,-32768, 516,-32768,-32768, +-32768,-32768, 130,-32768,-32768, 147,-32768,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768, 177,-32768,-32768,-32768, 157,-32768, 65, --32768, 231, 171,-32768, 184,-32768,-32768, 566, 125, 185, - 172, 231, 157, 157, 157, 157, 157, 157, 157, 157, - 157, 157, 157, 157, 157, 157, 157, 157, 157, 173, - 157, 157, 157, 231,-32768, 190, 98, -60,-32768,-32768, --32768,-32768, 174,-32768, 231,-32768,-32768,-32768,-32768,-32768, +-32768,-32768,-32768, 158,-32768,-32768,-32768, 170,-32768, 73, +-32768, 241, 154,-32768, 160,-32768,-32768, 553, 172, 168, + 161, 241, 147, 147, 147, 147, 147, 147, 147, 147, + 147, 147, 147, 147, 147, 147, 147, 147, 147, 173, + 147, 147, 147, 174, 186,-32768, 241, 187,-32768, 196, + 183, -73,-32768,-32768,-32768,-32768, 201,-32768, 241,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768, 231,-32768,-32768,-32768, -60,-32768, 65,-32768, -60, - 289, 194, -60, 197, -60,-32768,-32768, 194,-32768, -60, - -60, 231, 8, -60, -57, -60, -60, 199,-32768,-32768, - -60, -60, 171, -60, -60, 231, 291, 201, -60, -60, - 9, 202,-32768,-32768, -60, -60, -60,-32768,-32768, -60, - 231, -57, 296, -60, -60, 296, -60, -57, 296, -60, - 205, 171,-32768, 296, 296, -60,-32768, 296, 171,-32768, - 296, 231,-32768,-32768, 296,-32768,-32768, 206,-32768,-32768, - -57, 114,-32768, 321,-32768 +-32768,-32768,-32768,-32768,-32768, 241,-32768,-32768,-32768,-32768, +-32768, -73,-32768,-32768, 73,-32768, -73, 293, 202, -73, + 203, -73,-32768,-32768, 202,-32768, -73, -73, 241, 22, + -73, 182, -73, -73, 205,-32768,-32768, -73, -73, 154, + -73, -73, 241, 297, 26, -73, -73, 27, 208,-32768, +-32768,-32768, -73, -73, -73,-32768,-32768, -73, 241, 182, + 251, -73, -73, 251, -73, 182, 251, -73, 230, 154, +-32768, 251, 251, -73,-32768, 251, 154,-32768, 251, 241, +-32768,-32768, 251,-32768,-32768, 236,-32768,-32768, 182, -11, +-32768, 332,-32768 }; static const short yypgoto[] = {-32768, --32768,-32768,-32768,-32768,-32768,-32768, -211,-32768,-32768,-32768, --32768,-32768,-32768, 232, -219,-32768, -254,-32768,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768, -220,-32768,-32768,-32768, +-32768,-32768,-32768, 248, -222,-32768, -262,-32768,-32768,-32768, -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 298, - -285, 176, -85,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768, 88,-32768, 126, 94,-32768, -171,-32768,-32768, +-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 289, + 30, 159, -44,-32768,-32768,-32768,-32768,-32768,-32768,-32768, +-32768,-32768, 117,-32768, 163, 140,-32768, -171,-32768,-32768, -32768, -141,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, --32768,-32768,-32768,-32768, -22, 215, 46, 158, 493, 452, - -325, -312, -261, 11, -3, -2,-32768, -110,-32768 +-32768,-32768,-32768,-32768, -22,-32768,-32768, 486, -24, 55, + 480, 316, -304, -315, -261, 8, -3, -2,-32768, -122, +-32768 }; -#define YYLAST 720 +#define YYLAST 708 static const short yytable[] = { 31, - 162, 48, 283, 163, 165, 34, 35, 217, 248, 263, - 419, 419, 198, 286, 255, 148, 149, 365, 284, 253, - 342, 330, 237, 298, 331, 57, 58, 59, 225, 226, - 227, 228, 229, 230, 60, 169, 279, 70, 474, 332, - 267, 61, 364, 199, 338, 247, 96, 97, 98, 99, - 100, 101, 102, 103, 399, 186, 67, 68, 69, 106, + 162, 48, 283, 148, 149, 34, 35, 163, 165, 284, + 253, 255, 173, 186, 369, 298, 88, 89, 217, 248, + 263, 60, 192, 169, 426, 57, 58, 59, 426, 426, + 482, 267, 286, 279, 147, 181, 338, 193, 61, 225, + 226, 227, 228, 229, 230, 247, 96, 97, 98, 99, + 100, 101, 102, 103, 237, 406, 174, 191, 175, 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, - 238, 239, 240, 241, 242, 243, 262, 71, 72, 73, - 166, 27, 6, 210, 285, 406, 88, 89, 28, 423, - 201, 282, 29, 8, 147, 173, 30, 9, 177, 60, - 60, 60, 60, 438, 60, 261, 74, 75, 76, 77, - 78, 79, 80, 181, 244, 142, 452, 252, 280, 187, - 188, 202, 459, 281, 300, 145, 194, 191, 370, 339, - 200, 155, 156, 157, 158, 159, 160, 161, 192, 174, - 164, 175, 178, 170, 179, 472, 331, 203, 204, 178, - 185, 179, 205, 193, 209, 71, 72, 73, 171, 172, - 211, 332, 174, 206, 175, 189, 190, 178, 178, 179, - 179, 134, 178, 443, 179, 446, 398, 221, 449, 331, - 6, 196, 197, 455, 74, 75, 76, 77, 78, 79, - 80, 8, 119, 120, 332, 9, 86, 87, 367, 207, - 208, 220, 92, 5, 6, 222, 212, 213, 60, 214, - 473, 118, 216, 218, 250, 8, 251, 223, 224, 9, - 290, 301, 303, 235, 302, 335, 246, 340, 249, 135, - 136, 137, 138, 139, 140, 141, 341, 36, 64, 65, - 66, 67, 68, 69, 37, 38, 39, 40, 291, 125, - 83, 71, 72, 73, 297, 367, 360, 90, 91, 264, - 93, 130, 95, 368, 371, 289, 372, 392, 401, 293, - 294, 295, 296, 41, 42, 131, 287, 427, 43, 44, - 74, 75, 76, 77, 78, 79, 80, 397, 409, 45, - 46, 412, 47, 426, 433, 434, 441, 304, 419, 462, - 470, 71, 72, 73, 336, 74, 75, 76, 77, 78, - 79, 80, 27, 5, 6, 71, 72, 73, 127, 28, - 475, 133, 414, 29, 257, 8, 3, 30, 366, 9, - 74, 75, 76, 77, 78, 79, 80, 258, 373, 236, - 0, 0, 4, 0, 74, 75, 76, 77, 78, 79, - 80, 0, 0, 238, 239, 240, 241, 242, 243, 0, - 396, 71, 72, 73, 5, 6, 0, 7, 408, 0, - 27, 403, 0, 0, 0, 0, 8, 28, 400, 0, - 9, 29, 0, 402, 0, 30, 0, 0, 404, 0, - 74, 75, 76, 77, 78, 79, 80, 244, 62, 63, - 64, 65, 66, 67, 68, 69, 405, 0, 418, 0, - 407, 82, 0, 411, 0, 413, 0, 0, 27, 182, - 416, 417, 432, 421, 422, 28, 424, 425, 0, 29, - 0, 428, 429, 30, 430, 431, 0, 451, 0, 436, - 437, 0, 0, 0, 0, 444, 445, 447, 268, 0, - 450, 0, 0, 0, 454, 456, 278, 458, 468, 0, - 461, 269, 270, 271, 272, 299, 465, 0, 0, 269, - 270, 271, 272, 65, 66, 67, 68, 69, 269, 270, - 271, 272, 0, 0, 0, 0, 273, 0, 274, 275, - 276, 277, 0, 0, 273, 305, 274, 275, 276, 277, - 0, 306, 0, 273, 0, 274, 275, 276, 277, 0, - 0, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, - 326, 327, 337, 328, 0, 0, 124, 0, 306, 128, - 129, 0, 0, 132, 0, 0, 143, 0, 307, 308, + 200, 210, 36, 371, 194, 285, 262, 187, 188, 37, + 38, 39, 40, 60, 166, 27, 6, 198, 201, 413, + 203, 282, 28, 86, 87, 177, 29, 8, 261, 92, + 30, 9, 238, 239, 240, 241, 242, 243, 41, 42, + 60, 60, 60, 43, 44, 280, 60, 430, 199, 202, + 441, 446, 145, 60, 45, 46, 281, 47, 252, 339, + 204, 155, 156, 157, 158, 159, 160, 161, 300, 178, + 164, 179, 178, 170, 179, 460, 244, 205, 5, 6, + 185, 467, 268, 206, 331, 171, 172, 209, 142, 174, + 8, 175, 189, 190, 9, 269, 270, 271, 272, 332, + 178, 70, 179, 211, 480, 374, 221, 222, 196, 197, + 250, 451, 178, 454, 179, 335, 457, 67, 68, 69, + 273, 463, 274, 275, 276, 277, 207, 208, 71, 72, + 73, 220, 301, 212, 213, 368, 214, 251, 290, 216, + 218, 71, 72, 73, 223, 224, 302, 118, 481, 178, + 235, 179, 303, 246, 340, 249, 341, 74, 75, 76, + 77, 78, 79, 80, 130, 119, 120, 360, 371, 372, + 74, 75, 76, 77, 78, 79, 80, 375, 291, 364, + 365, 6, 134, 426, 297, 376, 264, 71, 72, 73, + 330, 405, 8, 331, 331, 289, 9, 396, 400, 293, + 294, 295, 296, 287, 71, 72, 73, 131, 332, 332, + 401, 403, 3, 125, 434, 133, 74, 75, 76, 77, + 78, 79, 80, 404, 304, 408, 416, 419, 4, 433, + 440, 336, 449, 74, 75, 76, 77, 78, 79, 80, + 135, 136, 137, 138, 139, 140, 141, 71, 72, 73, + 5, 6, 27, 7, 470, 71, 72, 73, 370, 28, + 478, 483, 8, 29, 127, 342, 9, 30, 377, 74, + 75, 76, 77, 78, 79, 80, 74, 75, 76, 77, + 78, 79, 80, 257, 74, 75, 76, 77, 78, 79, + 80, 5, 6, 402, 238, 239, 240, 241, 242, 243, + 421, 6, 415, 8, 27, 410, 236, 9, 0, 407, + 278, 28, 8, 258, 409, 29, 9, 0, 0, 30, + 27, 182, 411, 269, 270, 271, 272, 28, 0, 0, + 124, 29, 0, 128, 129, 30, 0, 132, 244, 412, + 143, 0, 0, 0, 414, 425, 0, 418, 273, 420, + 274, 275, 276, 277, 423, 424, 0, 428, 429, 439, + 431, 432, 0, 0, 0, 435, 436, 0, 437, 438, + 0, 0, 0, 444, 445, 459, 27, 219, 0, 0, + 452, 453, 455, 28, 299, 458, 0, 29, 0, 462, + 464, 30, 466, 0, 0, 469, 476, 269, 270, 271, + 272, 473, 62, 63, 64, 65, 66, 67, 68, 69, + 0, 0, 305, 0, 0, 82, 0, 0, 306, 0, + 0, 0, 273, 0, 274, 275, 276, 277, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, 327, 369, - 328, 0, 0, 0, 0, 306, 121, 123, 121, 121, - 123, 123, 0, 0, 121, 307, 308, 309, 310, 311, + 319, 320, 321, 322, 323, 324, 325, 326, 327, 337, + 328, 83, 0, 0, 0, 306, 0, 0, 90, 91, + 0, 93, 0, 95, 0, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 327, 439, 328, 27, 219, - 0, 0, 0, 0, 0, 28, 0, 0, 453, 29, - 0, 457, 0, 30, 460, 0, 0, 0, 0, 463, - 464, 0, 0, 466, 0, 0, 467, 0, 0, 0, - 469, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 0, 393, 394, - 395, 62, 63, 64, 65, 66, 67, 68, 69, 0, - 0, 0, 0, 0, 104, 74, 75, 76, 77, 78, - 79, 80, 0, 119, 120, 49, 50, 51, 52, 53, - 54, 55, 56, 62, 63, 64, 65, 66, 67, 68, - 69, 63, 64, 65, 66, 67, 68, 69, 225, 226, - 227, 228, 229, 230, 238, 239, 240, 241, 242, 243 + 322, 323, 324, 325, 326, 327, 373, 328, 0, 0, + 0, 0, 306, 121, 123, 121, 121, 123, 123, 0, + 0, 121, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 442, 328, 0, 447, 62, 63, 64, + 65, 66, 67, 68, 69, 0, 0, 0, 0, 461, + 104, 0, 465, 0, 0, 468, 0, 0, 0, 0, + 471, 472, 0, 0, 474, 0, 0, 475, 0, 0, + 0, 477, 380, 381, 382, 383, 384, 385, 386, 387, + 388, 389, 390, 391, 392, 393, 394, 395, 0, 397, + 398, 399, 74, 75, 76, 77, 78, 79, 80, 0, + 119, 120, 49, 50, 51, 52, 53, 54, 55, 56, + 62, 63, 64, 65, 66, 67, 68, 69, 63, 64, + 65, 66, 67, 68, 69, 64, 65, 66, 67, 68, + 69, 225, 226, 227, 228, 229, 230, 238, 239, 240, + 241, 242, 243, 65, 66, 67, 68, 69 }; static const short yycheck[] = { 3, - 142, 24, 264, 4, 4, 8, 9, 3, 3, 3, - 3, 3, 49, 4, 234, 126, 127, 330, 4, 231, - 306, 79, 3, 278, 82, 28, 29, 30, 6, 7, - 8, 9, 10, 11, 95, 146, 256, 3, 0, 97, - 252, 31, 328, 80, 299, 217, 49, 50, 51, 52, - 53, 54, 55, 56, 367, 4, 90, 91, 92, 62, + 142, 24, 264, 126, 127, 8, 9, 4, 4, 4, + 231, 234, 4, 4, 330, 278, 41, 42, 3, 3, + 3, 95, 80, 146, 3, 28, 29, 30, 3, 3, + 0, 252, 4, 256, 96, 4, 299, 95, 31, 6, + 7, 8, 9, 10, 11, 217, 49, 50, 51, 52, + 53, 54, 55, 56, 3, 371, 48, 4, 50, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, - 51, 52, 53, 54, 55, 56, 248, 43, 44, 45, - 80, 82, 82, 194, 70, 398, 41, 42, 89, 415, - 49, 263, 93, 93, 96, 4, 97, 97, 4, 95, - 95, 95, 95, 95, 95, 4, 72, 73, 74, 75, - 76, 77, 78, 4, 95, 3, 442, 95, 4, 68, - 69, 80, 448, 4, 4, 115, 95, 4, 4, 301, - 80, 135, 136, 137, 138, 139, 140, 141, 80, 48, - 144, 50, 48, 147, 50, 471, 82, 80, 95, 48, - 153, 50, 3, 95, 80, 43, 44, 45, 148, 149, - 95, 97, 48, 3, 50, 155, 156, 48, 48, 50, - 50, 3, 48, 435, 50, 437, 79, 71, 440, 82, - 82, 171, 172, 445, 72, 73, 74, 75, 76, 77, - 78, 93, 80, 81, 97, 97, 39, 40, 85, 189, - 190, 204, 45, 81, 82, 70, 196, 197, 95, 199, - 472, 3, 202, 203, 3, 93, 80, 207, 208, 97, - 80, 3, 80, 213, 4, 95, 216, 95, 218, 61, - 62, 63, 64, 65, 66, 67, 80, 5, 87, 88, - 89, 90, 91, 92, 12, 13, 14, 15, 271, 16, - 36, 43, 44, 45, 277, 85, 80, 43, 44, 249, - 46, 3, 48, 80, 80, 269, 95, 95, 95, 273, - 274, 275, 276, 41, 42, 3, 266, 419, 46, 47, - 72, 73, 74, 75, 76, 77, 78, 98, 95, 57, - 58, 95, 60, 95, 4, 95, 95, 287, 3, 95, - 95, 43, 44, 45, 294, 72, 73, 74, 75, 76, - 77, 78, 82, 81, 82, 43, 44, 45, 87, 89, - 0, 3, 408, 93, 237, 93, 43, 97, 332, 97, - 72, 73, 74, 75, 76, 77, 78, 244, 342, 214, - -1, -1, 59, -1, 72, 73, 74, 75, 76, 77, - 78, -1, -1, 51, 52, 53, 54, 55, 56, -1, - 364, 43, 44, 45, 81, 82, -1, 84, 80, -1, - 82, 375, -1, -1, -1, -1, 93, 89, 368, -1, - 97, 93, -1, 373, -1, 97, -1, -1, 392, -1, - 72, 73, 74, 75, 76, 77, 78, 95, 85, 86, - 87, 88, 89, 90, 91, 92, 396, -1, 412, -1, - 400, 98, -1, 403, -1, 405, -1, -1, 82, 83, - 410, 411, 426, 413, 414, 89, 416, 417, -1, 93, - -1, 421, 422, 97, 424, 425, -1, 441, -1, 429, - 430, -1, -1, -1, -1, 435, 436, 437, 3, -1, - 440, -1, -1, -1, 444, 445, 3, 447, 462, -1, - 450, 16, 17, 18, 19, 3, 456, -1, -1, 16, - 17, 18, 19, 88, 89, 90, 91, 92, 16, 17, - 18, 19, -1, -1, -1, -1, 41, -1, 43, 44, - 45, 46, -1, -1, 41, 4, 43, 44, 45, 46, - -1, 10, -1, 41, -1, 43, 44, 45, 46, -1, - -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 4, 42, -1, -1, 85, -1, 10, 88, - 89, -1, -1, 92, -1, -1, 95, -1, 20, 21, + 80, 194, 5, 85, 95, 70, 248, 68, 69, 12, + 13, 14, 15, 95, 80, 82, 82, 49, 49, 405, + 80, 263, 89, 39, 40, 4, 93, 93, 4, 45, + 97, 97, 51, 52, 53, 54, 55, 56, 41, 42, + 95, 95, 95, 46, 47, 4, 95, 422, 80, 80, + 95, 95, 115, 95, 57, 58, 4, 60, 95, 301, + 95, 135, 136, 137, 138, 139, 140, 141, 4, 48, + 144, 50, 48, 147, 50, 450, 95, 3, 81, 82, + 153, 456, 3, 3, 82, 148, 149, 80, 3, 48, + 93, 50, 155, 156, 97, 16, 17, 18, 19, 97, + 48, 3, 50, 95, 479, 4, 71, 70, 171, 172, + 3, 443, 48, 445, 50, 95, 448, 90, 91, 92, + 41, 453, 43, 44, 45, 46, 189, 190, 43, 44, + 45, 204, 3, 196, 197, 328, 199, 80, 80, 202, + 203, 43, 44, 45, 207, 208, 4, 3, 480, 48, + 213, 50, 80, 216, 95, 218, 80, 72, 73, 74, + 75, 76, 77, 78, 3, 80, 81, 80, 85, 80, + 72, 73, 74, 75, 76, 77, 78, 80, 271, 80, + 81, 82, 3, 3, 277, 95, 249, 43, 44, 45, + 79, 79, 93, 82, 82, 269, 97, 95, 95, 273, + 274, 275, 276, 266, 43, 44, 45, 3, 97, 97, + 95, 95, 43, 16, 426, 3, 72, 73, 74, 75, + 76, 77, 78, 98, 287, 95, 95, 95, 59, 95, + 4, 294, 95, 72, 73, 74, 75, 76, 77, 78, + 61, 62, 63, 64, 65, 66, 67, 43, 44, 45, + 81, 82, 82, 84, 95, 43, 44, 45, 332, 89, + 95, 0, 93, 93, 87, 306, 97, 97, 342, 72, + 73, 74, 75, 76, 77, 78, 72, 73, 74, 75, + 76, 77, 78, 237, 72, 73, 74, 75, 76, 77, + 78, 81, 82, 367, 51, 52, 53, 54, 55, 56, + 415, 82, 80, 93, 82, 379, 214, 97, -1, 372, + 3, 89, 93, 244, 377, 93, 97, -1, -1, 97, + 82, 83, 396, 16, 17, 18, 19, 89, -1, -1, + 85, 93, -1, 88, 89, 97, -1, 92, 95, 402, + 95, -1, -1, -1, 407, 419, -1, 410, 41, 412, + 43, 44, 45, 46, 417, 418, -1, 420, 421, 433, + 423, 424, -1, -1, -1, 428, 429, -1, 431, 432, + -1, -1, -1, 436, 437, 449, 82, 83, -1, -1, + 443, 444, 445, 89, 3, 448, -1, 93, -1, 452, + 453, 97, 455, -1, -1, 458, 470, 16, 17, 18, + 19, 464, 85, 86, 87, 88, 89, 90, 91, 92, + -1, -1, 4, -1, -1, 98, -1, -1, 10, -1, + -1, -1, 41, -1, 43, 44, 45, 46, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 4, - 42, -1, -1, -1, -1, 10, 84, 85, 86, 87, - 88, 89, -1, -1, 92, 20, 21, 22, 23, 24, + 42, 36, -1, -1, -1, 10, -1, -1, 43, 44, + -1, 46, -1, 48, -1, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 431, 42, 82, 83, - -1, -1, -1, -1, -1, 89, -1, -1, 443, 93, - -1, 446, -1, 97, 449, -1, -1, -1, -1, 454, - 455, -1, -1, 458, -1, -1, 461, -1, -1, -1, - 465, 344, 345, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, -1, 361, 362, - 363, 85, 86, 87, 88, 89, 90, 91, 92, -1, - -1, -1, -1, -1, 98, 72, 73, 74, 75, 76, - 77, 78, -1, 80, 81, 85, 86, 87, 88, 89, - 90, 91, 92, 85, 86, 87, 88, 89, 90, 91, - 92, 86, 87, 88, 89, 90, 91, 92, 6, 7, - 8, 9, 10, 11, 51, 52, 53, 54, 55, 56 + 35, 36, 37, 38, 39, 40, 4, 42, -1, -1, + -1, -1, 10, 84, 85, 86, 87, 88, 89, -1, + -1, 92, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 435, 42, -1, 438, 85, 86, 87, + 88, 89, 90, 91, 92, -1, -1, -1, -1, 451, + 98, -1, 454, -1, -1, 457, -1, -1, -1, -1, + 462, 463, -1, -1, 466, -1, -1, 469, -1, -1, + -1, 473, 344, 345, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 356, 357, 358, 359, -1, 361, + 362, 363, 72, 73, 74, 75, 76, 77, 78, -1, + 80, 81, 85, 86, 87, 88, 89, 90, 91, 92, + 85, 86, 87, 88, 89, 90, 91, 92, 86, 87, + 88, 89, 90, 91, 92, 87, 88, 89, 90, 91, + 92, 6, 7, 8, 9, 10, 11, 51, 52, 53, + 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" @@ -1837,50 +1846,41 @@ case 83: case 84: #line 640 "rcparse.y" { - yyval.dialog_control = define_control (yyvsp[-4].s, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-1].il, 0, 0, CTL_STATIC, - SS_ICON | WS_CHILD | WS_VISIBLE, 0); - if (yyvsp[0].rcdata_item != NULL) - { - if (dialog.ex == NULL) - rcparse_warning (_("control data requires DIALOGEX")); - yyval.dialog_control->data = yyvsp[0].rcdata_item; - } - ; + yyval.dialog_control = define_icon_control (yyvsp[-4].id, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-1].il, 0, 0, 0, yyvsp[0].rcdata_item, + dialog.ex); + ; break;} case 85: -#line 652 "rcparse.y" +#line 646 "rcparse.y" { - yyval.dialog_control = define_control (yyvsp[-8].s, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, CTL_STATIC, - style, yyvsp[-1].il); - if (yyvsp[0].rcdata_item != NULL) - { - if (dialog.ex == NULL) - rcparse_warning (_("control data requires DIALOGEX")); - yyval.dialog_control->data = yyvsp[0].rcdata_item; - } - ; + yyval.dialog_control = define_icon_control (yyvsp[-6].id, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, 0, 0, 0, yyvsp[0].rcdata_item, + dialog.ex); + ; break;} case 86: -#line 664 "rcparse.y" +#line 652 "rcparse.y" { - yyval.dialog_control = define_control (yyvsp[-9].s, yyvsp[-8].il, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, CTL_STATIC, - style, yyvsp[-2].il); - if (dialog.ex == NULL) - rcparse_warning (_("help ID requires DIALOGEX")); - yyval.dialog_control->help = yyvsp[-1].il; - yyval.dialog_control->data = yyvsp[0].rcdata_item; - ; + yyval.dialog_control = define_icon_control (yyvsp[-8].id, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, style, yyvsp[-1].il, 0, yyvsp[0].rcdata_item, + dialog.ex); + ; break;} case 87: -#line 673 "rcparse.y" +#line 658 "rcparse.y" +{ + yyval.dialog_control = define_icon_control (yyvsp[-9].id, yyvsp[-8].il, yyvsp[-7].il, yyvsp[-6].il, style, yyvsp[-2].il, yyvsp[-1].il, yyvsp[0].rcdata_item, + dialog.ex); + ; + break;} +case 88: +#line 663 "rcparse.y" { default_style = ES_LEFT | WS_BORDER | WS_TABSTOP; base_style = ES_LEFT | WS_BORDER | WS_TABSTOP; class = CTL_EDIT; ; break;} -case 88: -#line 679 "rcparse.y" +case 89: +#line 669 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; if (dialog.ex == NULL) @@ -1888,131 +1888,131 @@ case 88: res_string_to_id (&yyval.dialog_control->class, "IEDIT"); ; break;} -case 89: -#line 686 "rcparse.y" +case 90: +#line 676 "rcparse.y" { default_style = LBS_NOTIFY | WS_BORDER; base_style = LBS_NOTIFY | WS_BORDER; class = CTL_LISTBOX; ; break;} -case 90: -#line 692 "rcparse.y" +case 91: +#line 682 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; ; break;} -case 91: -#line 696 "rcparse.y" +case 92: +#line 686 "rcparse.y" { default_style = SS_LEFT | WS_GROUP; base_style = SS_LEFT; class = CTL_STATIC; ; break;} -case 92: -#line 702 "rcparse.y" +case 93: +#line 692 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; ; break;} -case 93: -#line 706 "rcparse.y" +case 94: +#line 696 "rcparse.y" { default_style = BS_PUSHBOX | WS_TABSTOP; base_style = BS_PUSHBOX; class = CTL_BUTTON; ; break;} -case 94: -#line 712 "rcparse.y" +case 95: +#line 702 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; ; break;} -case 95: -#line 716 "rcparse.y" +case 96: +#line 706 "rcparse.y" { default_style = BS_PUSHBUTTON | WS_TABSTOP; base_style = BS_PUSHBUTTON | WS_TABSTOP; class = CTL_BUTTON; ; break;} -case 96: -#line 722 "rcparse.y" +case 97: +#line 712 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; ; break;} -case 97: -#line 726 "rcparse.y" +case 98: +#line 716 "rcparse.y" { default_style = BS_RADIOBUTTON | WS_TABSTOP; base_style = BS_RADIOBUTTON; class = CTL_BUTTON; ; break;} -case 98: -#line 732 "rcparse.y" +case 99: +#line 722 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; ; break;} -case 99: -#line 736 "rcparse.y" +case 100: +#line 726 "rcparse.y" { default_style = SS_RIGHT | WS_GROUP; base_style = SS_RIGHT; class = CTL_STATIC; ; break;} -case 100: -#line 742 "rcparse.y" +case 101: +#line 732 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; ; break;} -case 101: -#line 746 "rcparse.y" +case 102: +#line 736 "rcparse.y" { default_style = SBS_HORZ; base_style = 0; class = CTL_SCROLLBAR; ; break;} -case 102: -#line 752 "rcparse.y" +case 103: +#line 742 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; ; break;} -case 103: -#line 756 "rcparse.y" +case 104: +#line 746 "rcparse.y" { default_style = BS_3STATE | WS_TABSTOP; base_style = BS_3STATE; class = CTL_BUTTON; ; break;} -case 104: -#line 762 "rcparse.y" +case 105: +#line 752 "rcparse.y" { yyval.dialog_control = yyvsp[0].dialog_control; ; break;} -case 105: -#line 767 "rcparse.y" +case 106: +#line 757 "rcparse.y" { style = WS_CHILD | WS_VISIBLE; ; break;} -case 106: -#line 769 "rcparse.y" +case 107: +#line 759 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-14].s, yyvsp[-12].il, yyvsp[-10].il, yyvsp[-8].il, yyvsp[-6].il, yyvsp[-4].il, CTL_BUTTON, style, yyvsp[0].il); ; break;} -case 107: -#line 785 "rcparse.y" +case 108: +#line 775 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-6].s, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-2].il, yyvsp[-1].il, class, default_style | WS_CHILD | WS_VISIBLE, 0); @@ -2024,8 +2024,8 @@ case 107: } ; break;} -case 108: -#line 797 "rcparse.y" +case 109: +#line 787 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-8].s, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, class, style, yyvsp[-1].il); if (yyvsp[0].rcdata_item != NULL) @@ -2036,8 +2036,8 @@ case 108: } ; break;} -case 109: -#line 808 "rcparse.y" +case 110: +#line 798 "rcparse.y" { yyval.dialog_control = define_control (yyvsp[-9].s, yyvsp[-8].il, yyvsp[-7].il, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, class, style, yyvsp[-2].il); if (dialog.ex == NULL) @@ -2046,74 +2046,80 @@ case 109: yyval.dialog_control->data = yyvsp[0].rcdata_item; ; break;} -case 110: -#line 819 "rcparse.y" +case 111: +#line 809 "rcparse.y" { yyval.s = NULL; ; break;} -case 111: -#line 823 "rcparse.y" +case 112: +#line 813 "rcparse.y" +{ + yyval.s = yyvsp[0].s; + ; + break;} +case 113: +#line 817 "rcparse.y" { yyval.s = yyvsp[-1].s; ; break;} -case 112: -#line 830 "rcparse.y" +case 114: +#line 824 "rcparse.y" { yyval.rcdata_item = NULL; ; break;} -case 113: -#line 834 "rcparse.y" +case 115: +#line 828 "rcparse.y" { yyval.rcdata_item = yyvsp[-1].rcdata.first; ; break;} -case 114: -#line 843 "rcparse.y" +case 116: +#line 837 "rcparse.y" { style = WS_CHILD | WS_VISIBLE; ; break;} -case 116: -#line 849 "rcparse.y" +case 118: +#line 843 "rcparse.y" { style = SS_ICON | WS_CHILD | WS_VISIBLE; ; break;} -case 118: -#line 855 "rcparse.y" +case 120: +#line 849 "rcparse.y" { style = base_style | WS_CHILD | WS_VISIBLE; ; break;} -case 120: -#line 863 "rcparse.y" +case 122: +#line 857 "rcparse.y" { define_font (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s); ; break;} -case 121: -#line 872 "rcparse.y" +case 123: +#line 866 "rcparse.y" { define_icon (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s); ; break;} -case 122: -#line 882 "rcparse.y" +case 124: +#line 876 "rcparse.y" { language = yyvsp[-1].il | (yyvsp[0].il << 8); ; break;} -case 123: -#line 891 "rcparse.y" +case 125: +#line 885 "rcparse.y" { define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem); ; break;} -case 124: -#line 898 "rcparse.y" +case 126: +#line 892 "rcparse.y" { yyval.menuitem = NULL; ; break;} -case 125: -#line 902 "rcparse.y" +case 127: +#line 896 "rcparse.y" { if (yyvsp[-1].menuitem == NULL) yyval.menuitem = yyvsp[0].menuitem; @@ -2128,92 +2134,92 @@ case 125: } ; break;} -case 126: -#line 919 "rcparse.y" +case 128: +#line 913 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-2].s, yyvsp[-1].il, yyvsp[0].is, 0, 0, NULL); ; break;} -case 127: -#line 923 "rcparse.y" +case 129: +#line 917 "rcparse.y" { yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL); ; break;} -case 128: -#line 927 "rcparse.y" +case 130: +#line 921 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-4].s, 0, yyvsp[-3].is, 0, 0, yyvsp[-1].menuitem); ; break;} -case 129: -#line 934 "rcparse.y" +case 131: +#line 928 "rcparse.y" { yyval.is = 0; ; break;} -case 130: -#line 938 "rcparse.y" +case 132: +#line 932 "rcparse.y" { yyval.is = yyvsp[-2].is | yyvsp[0].is; ; break;} -case 131: -#line 942 "rcparse.y" +case 133: +#line 936 "rcparse.y" { yyval.is = yyvsp[-1].is | yyvsp[0].is; ; break;} -case 132: -#line 949 "rcparse.y" +case 134: +#line 943 "rcparse.y" { yyval.is = MENUITEM_CHECKED; ; break;} -case 133: -#line 953 "rcparse.y" +case 135: +#line 947 "rcparse.y" { yyval.is = MENUITEM_GRAYED; ; break;} -case 134: -#line 957 "rcparse.y" +case 136: +#line 951 "rcparse.y" { yyval.is = MENUITEM_HELP; ; break;} -case 135: -#line 961 "rcparse.y" +case 137: +#line 955 "rcparse.y" { yyval.is = MENUITEM_INACTIVE; ; break;} -case 136: -#line 965 "rcparse.y" +case 138: +#line 959 "rcparse.y" { yyval.is = MENUITEM_MENUBARBREAK; ; break;} -case 137: -#line 969 "rcparse.y" +case 139: +#line 963 "rcparse.y" { yyval.is = MENUITEM_MENUBREAK; ; break;} -case 138: -#line 978 "rcparse.y" +case 140: +#line 972 "rcparse.y" { define_menu (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].menuitem); ; break;} -case 139: -#line 985 "rcparse.y" +case 141: +#line 979 "rcparse.y" { yyval.menuitem = NULL; ; break;} -case 140: -#line 989 "rcparse.y" +case 142: +#line 983 "rcparse.y" { if (yyvsp[-1].menuitem == NULL) yyval.menuitem = yyvsp[0].menuitem; @@ -2228,94 +2234,94 @@ case 140: } ; break;} -case 141: -#line 1006 "rcparse.y" +case 143: +#line 1000 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[0].s, 0, 0, 0, 0, NULL); ; break;} -case 142: -#line 1010 "rcparse.y" +case 144: +#line 1004 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-1].s, yyvsp[0].il, 0, 0, 0, NULL); ; break;} -case 143: -#line 1014 "rcparse.y" +case 145: +#line 1008 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-3].s, yyvsp[-2].il, yyvsp[-1].il, yyvsp[0].il, 0, NULL); ; break;} -case 144: -#line 1018 "rcparse.y" +case 146: +#line 1012 "rcparse.y" { yyval.menuitem = define_menuitem (NULL, 0, 0, 0, 0, NULL); ; break;} -case 145: -#line 1022 "rcparse.y" +case 147: +#line 1016 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-3].s, 0, 0, 0, 0, yyvsp[-1].menuitem); ; break;} -case 146: -#line 1026 "rcparse.y" +case 148: +#line 1020 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-4].s, yyvsp[-3].il, 0, 0, 0, yyvsp[-1].menuitem); ; break;} -case 147: -#line 1030 "rcparse.y" +case 149: +#line 1024 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-5].s, yyvsp[-4].il, yyvsp[-3].il, 0, 0, yyvsp[-1].menuitem); ; break;} -case 148: -#line 1035 "rcparse.y" +case 150: +#line 1029 "rcparse.y" { yyval.menuitem = define_menuitem (yyvsp[-7].s, yyvsp[-6].il, yyvsp[-5].il, yyvsp[-4].il, yyvsp[-3].il, yyvsp[-1].menuitem); ; break;} -case 149: -#line 1044 "rcparse.y" +case 151: +#line 1038 "rcparse.y" { define_messagetable (yyvsp[-3].id, &yyvsp[-1].res_info, yyvsp[0].s); ; break;} -case 150: -#line 1053 "rcparse.y" +case 152: +#line 1047 "rcparse.y" { define_rcdata (yyvsp[-5].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first); ; break;} -case 151: -#line 1062 "rcparse.y" +case 153: +#line 1056 "rcparse.y" { rcparse_rcdata (); ; break;} -case 152: -#line 1066 "rcparse.y" +case 154: +#line 1060 "rcparse.y" { rcparse_normal (); yyval.rcdata = yyvsp[0].rcdata; ; break;} -case 153: -#line 1074 "rcparse.y" +case 155: +#line 1068 "rcparse.y" { yyval.rcdata.first = NULL; yyval.rcdata.last = NULL; ; break;} -case 154: -#line 1079 "rcparse.y" +case 156: +#line 1073 "rcparse.y" { yyval.rcdata = yyvsp[0].rcdata; ; break;} -case 155: -#line 1086 "rcparse.y" +case 157: +#line 1080 "rcparse.y" { struct rcdata_item *ri; @@ -2324,8 +2330,8 @@ case 155: yyval.rcdata.last = ri; ; break;} -case 156: -#line 1094 "rcparse.y" +case 158: +#line 1088 "rcparse.y" { struct rcdata_item *ri; @@ -2334,8 +2340,8 @@ case 156: yyval.rcdata.last = ri; ; break;} -case 157: -#line 1102 "rcparse.y" +case 159: +#line 1096 "rcparse.y" { struct rcdata_item *ri; @@ -2345,8 +2351,8 @@ case 157: yyval.rcdata.last = ri; ; break;} -case 158: -#line 1111 "rcparse.y" +case 160: +#line 1105 "rcparse.y" { struct rcdata_item *ri; @@ -2356,150 +2362,150 @@ case 158: yyval.rcdata.last = ri; ; break;} -case 159: -#line 1125 "rcparse.y" +case 161: +#line 1119 "rcparse.y" { sub_res_info = yyvsp[-1].res_info; ; break;} -case 162: -#line 1132 "rcparse.y" +case 164: +#line 1126 "rcparse.y" { define_stringtable (&sub_res_info, yyvsp[-1].il, yyvsp[0].s); ; break;} -case 163: -#line 1136 "rcparse.y" +case 165: +#line 1130 "rcparse.y" { define_stringtable (&sub_res_info, yyvsp[-2].il, yyvsp[0].s); ; break;} -case 164: -#line 1146 "rcparse.y" +case 166: +#line 1140 "rcparse.y" { define_user_data (yyvsp[-5].id, yyvsp[-4].id, &yyvsp[-3].res_info, yyvsp[-1].rcdata.first); ; break;} -case 165: -#line 1150 "rcparse.y" +case 167: +#line 1144 "rcparse.y" { define_user_file (yyvsp[-3].id, yyvsp[-2].id, &yyvsp[-1].res_info, yyvsp[0].s); ; break;} -case 166: -#line 1159 "rcparse.y" +case 168: +#line 1153 "rcparse.y" { define_versioninfo (yyvsp[-5].id, language, yyvsp[-3].fixver, yyvsp[-1].verinfo); ; break;} -case 167: -#line 1166 "rcparse.y" +case 169: +#line 1160 "rcparse.y" { yyval.fixver = ((struct fixed_versioninfo *) res_alloc (sizeof (struct fixed_versioninfo))); memset (yyval.fixver, 0, sizeof (struct fixed_versioninfo)); ; break;} -case 168: -#line 1172 "rcparse.y" +case 170: +#line 1166 "rcparse.y" { yyvsp[-5].fixver->file_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il; yyvsp[-5].fixver->file_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il; yyval.fixver = yyvsp[-5].fixver; ; break;} -case 169: -#line 1178 "rcparse.y" +case 171: +#line 1172 "rcparse.y" { yyvsp[-5].fixver->product_version_ms = (yyvsp[-3].il << 16) | yyvsp[-2].il; yyvsp[-5].fixver->product_version_ls = (yyvsp[-1].il << 16) | yyvsp[0].il; yyval.fixver = yyvsp[-5].fixver; ; break;} -case 170: -#line 1184 "rcparse.y" +case 172: +#line 1178 "rcparse.y" { yyvsp[-2].fixver->file_flags_mask = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; ; break;} -case 171: -#line 1189 "rcparse.y" +case 173: +#line 1183 "rcparse.y" { yyvsp[-2].fixver->file_flags = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; ; break;} -case 172: -#line 1194 "rcparse.y" +case 174: +#line 1188 "rcparse.y" { yyvsp[-2].fixver->file_os = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; ; break;} -case 173: -#line 1199 "rcparse.y" +case 175: +#line 1193 "rcparse.y" { yyvsp[-2].fixver->file_type = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; ; break;} -case 174: -#line 1204 "rcparse.y" +case 176: +#line 1198 "rcparse.y" { yyvsp[-2].fixver->file_subtype = yyvsp[0].il; yyval.fixver = yyvsp[-2].fixver; ; break;} -case 175: -#line 1218 "rcparse.y" +case 177: +#line 1212 "rcparse.y" { yyval.verinfo = NULL; ; break;} -case 176: -#line 1222 "rcparse.y" +case 178: +#line 1216 "rcparse.y" { yyval.verinfo = append_ver_stringfileinfo (yyvsp[-7].verinfo, yyvsp[-4].s, yyvsp[-2].verstring); ; break;} -case 177: -#line 1226 "rcparse.y" +case 179: +#line 1220 "rcparse.y" { yyval.verinfo = append_ver_varfileinfo (yyvsp[-6].verinfo, yyvsp[-2].s, yyvsp[-1].vervar); ; break;} -case 178: -#line 1233 "rcparse.y" +case 180: +#line 1227 "rcparse.y" { yyval.verstring = NULL; ; break;} -case 179: -#line 1237 "rcparse.y" +case 181: +#line 1231 "rcparse.y" { yyval.verstring = append_verval (yyvsp[-4].verstring, yyvsp[-2].s, yyvsp[0].s); ; break;} -case 180: -#line 1244 "rcparse.y" +case 182: +#line 1238 "rcparse.y" { yyval.vervar = NULL; ; break;} -case 181: -#line 1248 "rcparse.y" +case 183: +#line 1242 "rcparse.y" { yyval.vervar = append_vertrans (yyvsp[-2].vervar, yyvsp[-1].il, yyvsp[0].il); ; break;} -case 182: -#line 1257 "rcparse.y" +case 184: +#line 1251 "rcparse.y" { yyval.id.named = 0; yyval.id.u.id = yyvsp[0].il; ; break;} -case 183: -#line 1262 "rcparse.y" +case 185: +#line 1256 "rcparse.y" { char *copy, *s; @@ -2512,8 +2518,47 @@ case 183: free (copy); ; break;} -case 184: -#line 1280 "rcparse.y" +case 186: +#line 1273 "rcparse.y" +{ + yyval.s = yyvsp[0].s; + ; + break;} +case 187: +#line 1277 "rcparse.y" +{ + yyval.s = yyvsp[-1].s; + ; + break;} +case 188: +#line 1281 "rcparse.y" +{ + yyval.s = yyvsp[-1].s; + ; + break;} +case 189: +#line 1289 "rcparse.y" +{ + yyval.id.named = 0; + yyval.id.u.id = yyvsp[-1].il; + ; + break;} +case 190: +#line 1294 "rcparse.y" +{ + char *copy, *s; + + /* It seems that resource ID's are forced to upper case. */ + copy = xstrdup (yyvsp[0].s); + for (s = copy; *s != '\0'; s++) + if (islower ((unsigned char) *s)) + *s = toupper ((unsigned char) *s); + res_string_to_id (&yyval.id, copy); + free (copy); + ; + break;} +case 191: +#line 1312 "rcparse.y" { memset (&yyval.res_info, 0, sizeof (struct res_res_info)); yyval.res_info.language = language; @@ -2521,352 +2566,352 @@ case 184: yyval.res_info.memflags = MEMFLAG_MOVEABLE; ; break;} -case 185: -#line 1287 "rcparse.y" +case 192: +#line 1319 "rcparse.y" { yyval.res_info = yyvsp[-1].res_info; yyval.res_info.memflags |= yyvsp[0].memflags.on; yyval.res_info.memflags &=~ yyvsp[0].memflags.off; ; break;} -case 186: -#line 1293 "rcparse.y" +case 193: +#line 1325 "rcparse.y" { yyval.res_info = yyvsp[-2].res_info; yyval.res_info.characteristics = yyvsp[0].il; ; break;} -case 187: -#line 1298 "rcparse.y" +case 194: +#line 1330 "rcparse.y" { yyval.res_info = yyvsp[-3].res_info; yyval.res_info.language = yyvsp[-1].il | (yyvsp[0].il << 8); ; break;} -case 188: -#line 1303 "rcparse.y" +case 195: +#line 1335 "rcparse.y" { yyval.res_info = yyvsp[-2].res_info; yyval.res_info.version = yyvsp[0].il; ; break;} -case 189: -#line 1313 "rcparse.y" +case 196: +#line 1345 "rcparse.y" { memset (&yyval.res_info, 0, sizeof (struct res_res_info)); yyval.res_info.language = language; yyval.res_info.memflags = MEMFLAG_MOVEABLE | MEMFLAG_DISCARDABLE; ; break;} -case 190: -#line 1319 "rcparse.y" +case 197: +#line 1351 "rcparse.y" { yyval.res_info = yyvsp[-1].res_info; yyval.res_info.memflags |= yyvsp[0].memflags.on; yyval.res_info.memflags &=~ yyvsp[0].memflags.off; ; break;} -case 191: -#line 1330 "rcparse.y" +case 198: +#line 1362 "rcparse.y" { memset (&yyval.res_info, 0, sizeof (struct res_res_info)); yyval.res_info.language = language; yyval.res_info.memflags = MEMFLAG_MOVEABLE; ; break;} -case 192: -#line 1336 "rcparse.y" +case 199: +#line 1368 "rcparse.y" { yyval.res_info = yyvsp[-1].res_info; yyval.res_info.memflags |= yyvsp[0].memflags.on; yyval.res_info.memflags &=~ yyvsp[0].memflags.off; ; break;} -case 193: -#line 1348 "rcparse.y" +case 200: +#line 1380 "rcparse.y" { yyval.memflags.on = MEMFLAG_MOVEABLE; yyval.memflags.off = 0; ; break;} -case 194: -#line 1353 "rcparse.y" +case 201: +#line 1385 "rcparse.y" { yyval.memflags.on = 0; yyval.memflags.off = MEMFLAG_MOVEABLE; ; break;} -case 195: -#line 1358 "rcparse.y" +case 202: +#line 1390 "rcparse.y" { yyval.memflags.on = MEMFLAG_PURE; yyval.memflags.off = 0; ; break;} -case 196: -#line 1363 "rcparse.y" +case 203: +#line 1395 "rcparse.y" { yyval.memflags.on = 0; yyval.memflags.off = MEMFLAG_PURE; ; break;} -case 197: -#line 1368 "rcparse.y" +case 204: +#line 1400 "rcparse.y" { yyval.memflags.on = MEMFLAG_PRELOAD; yyval.memflags.off = 0; ; break;} -case 198: -#line 1373 "rcparse.y" +case 205: +#line 1405 "rcparse.y" { yyval.memflags.on = 0; yyval.memflags.off = MEMFLAG_PRELOAD; ; break;} -case 199: -#line 1378 "rcparse.y" +case 206: +#line 1410 "rcparse.y" { yyval.memflags.on = MEMFLAG_DISCARDABLE; yyval.memflags.off = 0; ; break;} -case 200: -#line 1388 "rcparse.y" +case 207: +#line 1420 "rcparse.y" { yyval.s = yyvsp[0].s; ; break;} -case 201: -#line 1392 "rcparse.y" +case 208: +#line 1424 "rcparse.y" { yyval.s = yyvsp[0].s; ; break;} -case 202: -#line 1409 "rcparse.y" +case 209: +#line 1441 "rcparse.y" { style |= yyvsp[0].il; ; break;} -case 203: -#line 1413 "rcparse.y" +case 210: +#line 1445 "rcparse.y" { style &=~ yyvsp[0].il; ; break;} -case 204: -#line 1417 "rcparse.y" +case 211: +#line 1449 "rcparse.y" { style |= yyvsp[0].il; ; break;} -case 205: -#line 1421 "rcparse.y" +case 212: +#line 1453 "rcparse.y" { style &=~ yyvsp[0].il; ; break;} -case 206: -#line 1428 "rcparse.y" +case 213: +#line 1460 "rcparse.y" { yyval.il = yyvsp[0].i.val; ; break;} -case 207: -#line 1432 "rcparse.y" +case 214: +#line 1464 "rcparse.y" { yyval.il = yyvsp[-1].il; ; break;} -case 208: -#line 1441 "rcparse.y" +case 215: +#line 1473 "rcparse.y" { yyval.il = 0; ; break;} -case 209: -#line 1445 "rcparse.y" +case 216: +#line 1477 "rcparse.y" { yyval.il = yyvsp[0].il; ; break;} -case 210: -#line 1454 "rcparse.y" +case 217: +#line 1486 "rcparse.y" { yyval.il = yyvsp[0].il; ; break;} -case 211: -#line 1463 "rcparse.y" +case 218: +#line 1495 "rcparse.y" { yyval.il = yyvsp[0].i.val; ; break;} -case 212: -#line 1472 "rcparse.y" +case 219: +#line 1504 "rcparse.y" { yyval.i = yyvsp[0].i; ; break;} -case 213: -#line 1476 "rcparse.y" +case 220: +#line 1508 "rcparse.y" { yyval.i = yyvsp[-1].i; ; break;} -case 214: -#line 1480 "rcparse.y" +case 221: +#line 1512 "rcparse.y" { yyval.i.val = ~ yyvsp[0].i.val; yyval.i.dword = yyvsp[0].i.dword; ; break;} -case 215: -#line 1485 "rcparse.y" +case 222: +#line 1517 "rcparse.y" { yyval.i.val = - yyvsp[0].i.val; yyval.i.dword = yyvsp[0].i.dword; ; break;} -case 216: -#line 1490 "rcparse.y" +case 223: +#line 1522 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 217: -#line 1495 "rcparse.y" +case 224: +#line 1527 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 218: -#line 1500 "rcparse.y" +case 225: +#line 1532 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 219: -#line 1505 "rcparse.y" +case 226: +#line 1537 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 220: -#line 1510 "rcparse.y" +case 227: +#line 1542 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 221: -#line 1515 "rcparse.y" +case 228: +#line 1547 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 222: -#line 1520 "rcparse.y" +case 229: +#line 1552 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 223: -#line 1525 "rcparse.y" +case 230: +#line 1557 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 224: -#line 1536 "rcparse.y" +case 231: +#line 1568 "rcparse.y" { yyval.il = yyvsp[0].il; ; break;} -case 225: -#line 1545 "rcparse.y" +case 232: +#line 1577 "rcparse.y" { yyval.il = yyvsp[0].i.val; ; break;} -case 226: -#line 1556 "rcparse.y" +case 233: +#line 1588 "rcparse.y" { yyval.i = yyvsp[0].i; ; break;} -case 227: -#line 1560 "rcparse.y" +case 234: +#line 1592 "rcparse.y" { yyval.i = yyvsp[-1].i; ; break;} -case 228: -#line 1564 "rcparse.y" +case 235: +#line 1596 "rcparse.y" { yyval.i.val = ~ yyvsp[0].i.val; yyval.i.dword = yyvsp[0].i.dword; ; break;} -case 229: -#line 1569 "rcparse.y" +case 236: +#line 1601 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val * yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 230: -#line 1574 "rcparse.y" +case 237: +#line 1606 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val / yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 231: -#line 1579 "rcparse.y" +case 238: +#line 1611 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val % yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 232: -#line 1584 "rcparse.y" +case 239: +#line 1616 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val + yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 233: -#line 1589 "rcparse.y" +case 240: +#line 1621 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val - yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 234: -#line 1594 "rcparse.y" +case 241: +#line 1626 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val & yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 235: -#line 1599 "rcparse.y" +case 242: +#line 1631 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val ^ yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; ; break;} -case 236: -#line 1604 "rcparse.y" +case 243: +#line 1636 "rcparse.y" { yyval.i.val = yyvsp[-2].i.val | yyvsp[0].i.val; yyval.i.dword = yyvsp[-2].i.dword || yyvsp[0].i.dword; @@ -3094,7 +3139,7 @@ yyerrhandle: } return 1; } -#line 1610 "rcparse.y" +#line 1642 "rcparse.y" /* Set the language from the command line. */ diff --git a/contrib/binutils/binutils/rcparse.y b/contrib/binutils/binutils/rcparse.y index 03cbbdc..b67338f 100644 --- a/contrib/binutils/binutils/rcparse.y +++ b/contrib/binutils/binutils/rcparse.y @@ -136,11 +136,11 @@ static unsigned long class; %type vertrans %type suboptions memflags_move_discard memflags_move %type memflag -%type id +%type id resref %type exstyle parennumber %type numexpr posnumexpr cnumexpr optcnumexpr cposnumexpr %type acc_options acc_option menuitem_flags menuitem_flag -%type optstringc file_name +%type optstringc file_name resname %type sizednumexpr sizedposnumexpr %left '|' @@ -636,39 +636,29 @@ control: rcparse_warning (_("IEDIT requires DIALOGEX")); res_string_to_id (&$$->class, "HEDIT"); } - | ICON optstringc numexpr cnumexpr cnumexpr opt_control_data - { - $$ = define_control ($2, $3, $4, $5, 0, 0, CTL_STATIC, - SS_ICON | WS_CHILD | WS_VISIBLE, 0); - if ($6 != NULL) - { - if (dialog.ex == NULL) - rcparse_warning (_("control data requires DIALOGEX")); - $$->data = $6; - } - } - | ICON optstringc numexpr cnumexpr cnumexpr cnumexpr cnumexpr + | ICON resref numexpr cnumexpr cnumexpr opt_control_data + { + $$ = define_icon_control ($2, $3, $4, $5, 0, 0, 0, $6, + dialog.ex); + } + | ICON resref numexpr cnumexpr cnumexpr cnumexpr cnumexpr + opt_control_data + { + $$ = define_icon_control ($2, $3, $4, $5, 0, 0, 0, $8, + dialog.ex); + } + | ICON resref numexpr cnumexpr cnumexpr cnumexpr cnumexpr icon_styleexpr optcnumexpr opt_control_data - { - $$ = define_control ($2, $3, $4, $5, $6, $7, CTL_STATIC, - style, $9); - if ($10 != NULL) - { - if (dialog.ex == NULL) - rcparse_warning (_("control data requires DIALOGEX")); - $$->data = $10; - } - } - | ICON optstringc numexpr cnumexpr cnumexpr cnumexpr cnumexpr + { + $$ = define_icon_control ($2, $3, $4, $5, style, $9, 0, $10, + dialog.ex); + } + | ICON resref numexpr cnumexpr cnumexpr cnumexpr cnumexpr icon_styleexpr cnumexpr cnumexpr opt_control_data - { - $$ = define_control ($2, $3, $4, $5, $6, $7, CTL_STATIC, - style, $9); - if (dialog.ex == NULL) - rcparse_warning (_("help ID requires DIALOGEX")); - $$->help = $10; - $$->data = $11; - } + { + $$ = define_icon_control ($2, $3, $4, $5, style, $9, $10, $11, + dialog.ex); + } | IEDIT { default_style = ES_LEFT | WS_BORDER | WS_TABSTOP; @@ -819,6 +809,10 @@ optstringc: { $$ = NULL; } + | QUOTEDSTRING + { + $$ = $1; + } | QUOTEDSTRING ',' { $$ = $1; @@ -1272,6 +1266,44 @@ id: } ; +/* A resource reference. */ + +resname: + QUOTEDSTRING + { + $$ = $1; + } + | QUOTEDSTRING ',' + { + $$ = $1; + } + | STRING ',' + { + $$ = $1; + } + ; + + +resref: + posnumexpr ',' + { + $$.named = 0; + $$.u.id = $1; + } + | resname + { + char *copy, *s; + + /* It seems that resource ID's are forced to upper case. */ + copy = xstrdup ($1); + for (s = copy; *s != '\0'; s++) + if (islower ((unsigned char) *s)) + *s = toupper ((unsigned char) *s); + res_string_to_id (&$$, copy); + free (copy); + } + ; + /* Generic suboptions. These may appear before the BEGIN in any multiline statement. */ diff --git a/contrib/binutils/binutils/rdcoff.c b/contrib/binutils/binutils/rdcoff.c index e1385c7..14f973e 100644 --- a/contrib/binutils/binutils/rdcoff.c +++ b/contrib/binutils/binutils/rdcoff.c @@ -99,6 +99,7 @@ static debug_type parse_coff_enum_type static boolean parse_coff_symbol PARAMS ((bfd *, struct coff_types *, asymbol *, long, struct internal_syment *, PTR, debug_type, boolean)); +static boolean external_coff_symbol_p PARAMS ((int sym_class)); /* Return the slot for a type. */ @@ -588,6 +589,7 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type, return false; break; + case C_WEAKEXT: case C_EXT: if (! debug_record_variable (dhandle, bfd_asymbol_name (sym), type, DEBUG_GLOBAL, bfd_asymbol_value (sym))) @@ -656,6 +658,23 @@ parse_coff_symbol (abfd, types, sym, coff_symno, psyment, dhandle, type, return true; } +/* Determine if a symbol has external visibility. */ + +static boolean +external_coff_symbol_p (sym_class) + int sym_class; +{ + switch (sym_class) + { + case C_EXT: + case C_WEAKEXT: + return true; + default: + break; + } + return false; +} + /* This is the main routine. It looks through all the symbols and handles them. */ @@ -767,6 +786,7 @@ parse_coff (abfd, syms, symcount, dhandle) if (syment.n_type == T_NULL) break; /* Fall through. */ + case C_WEAKEXT: case C_EXT: if (ISFCN (syment.n_type)) { @@ -805,7 +825,7 @@ parse_coff (abfd, syms, symcount, dhandle) return false; if (! debug_record_function (dhandle, fnname, type, - fnclass == C_EXT, + external_coff_symbol_p (fnclass), bfd_asymbol_value (sym))) return false; diff --git a/contrib/binutils/binutils/readelf.c b/contrib/binutils/binutils/readelf.c index 8858d57..d506925 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 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2000, 2001 Free Software Foundation, Inc. Originally developed by Eric Youngdale Modifications by Nick Clifton @@ -70,6 +70,10 @@ #include "elf/i960.h" #include "elf/pj.h" #include "elf/avr.h" +#include "elf/ia64.h" +#include "elf/cris.h" +#include "elf/i860.h" +#include "elf/x86-64.h" #include "bucomm.h" #include "getopt.h" @@ -81,6 +85,7 @@ 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_Syminfo * dynamic_syminfo; @@ -110,6 +115,7 @@ int do_debug_abbrevs; int do_debug_lines; int do_debug_pubnames; int do_debug_aranges; +int do_debug_frames; int do_arch; int do_notes; int is_32bit_elf; @@ -147,6 +153,7 @@ static const char * get_dynamic_type PARAMS ((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)); +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)); @@ -193,6 +200,7 @@ static int display_debug_not_supported PARAMS ((Elf32_Internal_Sh static int display_debug_lines PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); static int display_debug_abbrev PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); static int display_debug_aranges PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); +static int display_debug_frames PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *)); static unsigned char * process_abbrev_section PARAMS ((unsigned char *, unsigned char *)); static unsigned long read_leb128 PARAMS ((unsigned char *, int *, int)); static int process_extended_line_op PARAMS ((unsigned char *, int, int)); @@ -203,9 +211,9 @@ static char * get_FORM_name PARAMS ((unsigned long)); static void free_abbrevs PARAMS ((void)); static void add_abbrev PARAMS ((unsigned long, unsigned long, int)); static void add_abbrev_attr PARAMS ((unsigned long, unsigned long)); -static unsigned char * read_and_display_attr PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long)); +static unsigned char * read_and_display_attr PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long)); static unsigned char * display_block PARAMS ((unsigned char *, unsigned long)); -static void decode_location_expression PARAMS ((unsigned char *, unsigned int)); +static void decode_location_expression PARAMS ((unsigned char *, unsigned int, unsigned long)); static void request_dump PARAMS ((unsigned int, char)); static const char * get_elf_class PARAMS ((unsigned char)); static const char * get_data_encoding PARAMS ((unsigned char)); @@ -225,7 +233,9 @@ typedef int Elf32_Word; #endif #define UNKNOWN -1 -#define SECTION_NAME(X) (string_table + (X)->sh_name) +#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! */ @@ -419,15 +429,15 @@ print_vma (vma, mode) case FULL_HEX: printf ("0x"); /* drop through */ - + case LONG_HEX: printf_vma (vma); break; - + case PREFIX_HEX: printf ("0x"); /* drop through */ - + case HEX: #if BFD_HOST_64BIT_LONG printf ("%lx", vma); @@ -448,7 +458,7 @@ print_vma (vma, mode) printf ("++%ld", _bfd_int64_low (vma)); else printf ("%ld", _bfd_int64_low (vma)); -#endif +#endif break; case DEC_5: @@ -460,13 +470,13 @@ print_vma (vma, mode) printf ("++%ld", _bfd_int64_low (vma)); else printf ("%5ld", _bfd_int64_low (vma)); -#endif +#endif break; - + case UNSIGNED: #if BFD_HOST_64BIT_LONG printf ("%lu", vma); -#else +#else if (_bfd_int64_high (vma)) /* ugg */ printf ("++%lu", _bfd_int64_low (vma)); @@ -528,8 +538,8 @@ byte_get_big_endian (field, size) } } +/* Guess the relocation size commonly used by the specific machines. */ -/* Guess the relocation sized based on the sized commonly used by the specific machine. */ static int guess_is_rela (e_machine) unsigned long e_machine; @@ -561,6 +571,11 @@ guess_is_rela (e_machine) case EM_SH: case EM_ALPHA: case EM_MCORE: + case EM_IA_64: + case EM_AVR: + case EM_CRIS: + case EM_860: + case EM_X86_64: return TRUE; case EM_MMA: @@ -862,6 +877,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) break; case EM_CYGNUS_ARC: + case EM_ARC: rtype = elf_arc_reloc_type (type); break; @@ -872,6 +888,21 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela) case EM_PJ: rtype = elf_pj_reloc_type (type); break; + case EM_IA_64: + rtype = elf_ia64_reloc_type (type); + break; + + case EM_CRIS: + rtype = elf_cris_reloc_type (type); + break; + + case EM_860: + rtype = elf_i860_reloc_type (type); + break; + + case EM_X86_64: + rtype = elf_x86_64_reloc_type (type); + break; } if (rtype == NULL) @@ -1203,7 +1234,7 @@ get_machine_name (e_machine) case EM_SH: return "Hitachi SH"; case EM_SPARCV9: return "Sparc v9"; case EM_TRICORE: return "Siemens Tricore"; - case EM_ARC: return "Argonaut RISC Core"; + case EM_ARC: return "ARC"; case EM_H8_300: return "Hitachi H8/300"; case EM_H8_300H: return "Hitachi H8/300H"; case EM_H8S: return "Hitachi H8S"; @@ -1215,7 +1246,7 @@ get_machine_name (e_machine) case EM_ALPHA: return "Alpha"; case EM_CYGNUS_D10V: return "d10v"; case EM_CYGNUS_D30V: return "d30v"; - case EM_CYGNUS_ARC: return "Arc"; + case EM_CYGNUS_ARC: return "ARC"; case EM_CYGNUS_M32R: return "Mitsubishi M32r"; case EM_CYGNUS_V850: return "NEC v850"; case EM_CYGNUS_MN10300: return "mn10300"; @@ -1240,12 +1271,130 @@ get_machine_name (e_machine) 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_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_X86_64: return "Advanced Micro Devices X86-64"; default: sprintf (buff, _(": %x"), e_machine); return buff; } } +static void +decode_ARM_machine_flags (e_flags, buf) + unsigned e_flags; + char buf[]; +{ + unsigned eabi; + int unknown = 0; + + eabi = EF_ARM_EABI_VERSION (e_flags); + e_flags &= ~ EF_ARM_EABIMASK; + + /* Handle "generic" ARM flags. */ + if (e_flags & EF_ARM_RELEXEC) + { + strcat (buf, ", relocatable executable"); + e_flags &= ~ EF_ARM_RELEXEC; + } + + if (e_flags & EF_ARM_HASENTRY) + { + strcat (buf, ", has entry point"); + e_flags &= ~ EF_ARM_HASENTRY; + } + + /* Now handle EABI specific flags. */ + switch (eabi) + { + default: + strcat (buf, ", "); + if (e_flags) + unknown = 1; + break; + + case EF_ARM_EABI_VER1: + while (e_flags) + { + unsigned flag; + + /* Process flags one bit at a time. */ + flag = e_flags & - e_flags; + e_flags &= ~ flag; + + switch (flag) + { + case EF_ARM_SYMSARESORTED: /* Conflicts with EF_INTERWORK. */ + strcat (buf, ", sorted symbol tables"); + break; + + default: + unknown = 1; + break; + } + } + break; + + case EF_ARM_EABI_UNKNOWN: + while (e_flags) + { + unsigned flag; + + /* Process flags one bit at a time. */ + flag = e_flags & - e_flags; + e_flags &= ~ flag; + + switch (flag) + { + case EF_INTERWORK: + strcat (buf, ", interworking enabled"); + break; + + case EF_APCS_26: + strcat (buf, ", uses APCS/26"); + break; + + case EF_APCS_FLOAT: + strcat (buf, ", uses APCS/float"); + break; + + case EF_PIC: + strcat (buf, ", position independent"); + break; + + case EF_ALIGN8: + strcat (buf, ", 8 bit structure alignment"); + break; + + case EF_NEW_ABI: + strcat (buf, ", uses new ABI"); + break; + + case EF_OLD_ABI: + strcat (buf, ", uses old ABI"); + break; + + case EF_SOFT_FLOAT: + strcat (buf, ", software FP"); + break; + + default: + unknown = 1; + break; + } + } + } + + if (unknown) + strcat (buf,", "); +} + static char * get_machine_flags (e_flags, e_machine) unsigned e_flags; @@ -1254,7 +1403,7 @@ get_machine_flags (e_flags, e_machine) static char buf [1024]; buf[0] = '\0'; - + if (e_flags) { switch (e_machine) @@ -1262,6 +1411,10 @@ get_machine_flags (e_flags, e_machine) default: break; + case EM_ARM: + decode_ARM_machine_flags (e_flags, buf); + break; + case EM_68K: if (e_flags & EF_CPU32) strcat (buf, ", cpu32"); @@ -1327,6 +1480,27 @@ get_machine_flags (e_flags, e_machine) if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_4) strcat (buf, ", mips4"); + + if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_5) + strcat (buf, ", mips5"); + + if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32) + strcat (buf, ", mips32"); + + if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_64) + strcat (buf, ", mips64"); + + switch ((e_flags & EF_MIPS_MACH)) + { + case E_MIPS_MACH_3900: strcat (buf, ", 3900"); break; + case E_MIPS_MACH_4010: strcat (buf, ", 4010"); break; + case E_MIPS_MACH_4100: strcat (buf, ", 4100"); break; + case E_MIPS_MACH_4650: strcat (buf, ", 4650"); break; + case E_MIPS_MACH_4111: strcat (buf, ", 4111"); break; + case E_MIPS_MACH_MIPS32_4K: strcat (buf, ", mips32-4k"); break; + case E_MIPS_MACH_SB1: strcat (buf, ", sb1"); break; + default: strcat (buf, " UNKNOWN"); break; + } break; case EM_SPARCV9: @@ -1383,7 +1557,7 @@ get_machine_flags (e_flags, e_machine) if (e_flags & EF_PARISC_LAZYSWAP) strcat (buf, ", lazyswap"); break; - + case EM_PJ: if ((e_flags & EF_PICOJAVA_NEWCALLS) == EF_PICOJAVA_NEWCALLS) strcat (buf, ", new calling convention"); @@ -1598,6 +1772,8 @@ get_section_type_name (sh_type) case SHT_INIT_ARRAY: return "INIT_ARRAY"; case SHT_FINI_ARRAY: return "FINI_ARRAY"; case SHT_PREINIT_ARRAY: return "PREINIT_ARRAY"; + case SHT_GROUP: return "GROUP"; + case SHT_SYMTAB_SHNDX: return "SYMTAB SECTION INDICIES"; case SHT_GNU_verdef: return "VERDEF"; case SHT_GNU_verneed: return "VERNEED"; case SHT_GNU_versym: return "VERSYM"; @@ -1691,7 +1867,7 @@ usage () fprintf (stdout, _(" -D or --use-dynamic Use the dynamic section info when displaying symbols\n")); fprintf (stdout, _(" -x or --hex-dump=\n")); fprintf (stdout, _(" Dump the contents of section \n")); - fprintf (stdout, _(" -w[liapr] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges]\n")); + fprintf (stdout, _(" -w[liaprf] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]\n")); fprintf (stdout, _(" Display the contents of DWARF2 debug sections\n")); #ifdef SUPPORT_DISASSEMBLY fprintf (stdout, _(" -i or --instruction-dump=\n")); @@ -1851,6 +2027,11 @@ parse_args (argc, argv) do_debug_aranges = 1; break; + case 'f': + case 'F': + do_debug_frames = 1; + break; + default: warn (_("Unrecognised debug option '%s'\n"), optarg); break; @@ -1943,7 +2124,7 @@ get_osabi_name (osabi) case ELFOSABI_LINUX: return _("UNIX - Linux"); case ELFOSABI_HURD: return _("GNU/Hurd"); case ELFOSABI_SOLARIS: return _("UNIX - Solaris"); - case ELFOSABI_MONTEREY: return _("UNIX - Monterey"); + case ELFOSABI_AIX: return _("UNIX - AIX"); case ELFOSABI_IRIX: return _("UNIX - IRIX"); case ELFOSABI_FREEBSD: return _("UNIX - FreeBSD"); case ELFOSABI_TRU64: return _("UNIX - TRU64"); @@ -2001,7 +2182,7 @@ process_file_header () get_machine_name (elf_header.e_machine)); printf (_(" Version: 0x%lx\n"), (unsigned long) elf_header.e_version); - + printf (_(" Entry point address: ")); print_vma ((bfd_vma) elf_header.e_entry, PREFIX_HEX); printf (_("\n Start of program headers: ")); @@ -2009,7 +2190,7 @@ process_file_header () printf (_(" (bytes into file)\n Start of section headers: ")); print_vma ((bfd_vma) elf_header.e_shoff, DEC); printf (_(" (bytes into file)\n")); - + printf (_(" Flags: 0x%lx%s\n"), (unsigned long) elf_header.e_flags, get_machine_flags (elf_header.e_flags, elf_header.e_machine)); @@ -2147,7 +2328,7 @@ process_program_headers (file) { printf (_("\nProgram Header%s:\n"), elf_header.e_phnum > 1 ? "s" : ""); - + if (is_32bit_elf) printf (_(" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n")); @@ -2460,14 +2641,14 @@ get_elf_section_flags (sh_flags) static char buff [32]; * buff = 0; - + while (sh_flags) { bfd_vma flag; flag = sh_flags & - sh_flags; sh_flags &= ~ flag; - + switch (flag) { case SHF_WRITE: strcat (buff, "W"); break; @@ -2478,7 +2659,8 @@ get_elf_section_flags (sh_flags) case SHF_INFO_LINK: strcat (buff, "I"); break; case SHF_LINK_ORDER: strcat (buff, "L"); break; case SHF_OS_NONCONFORMING: strcat (buff, "O"); break; - + case SHF_GROUP: strcat (buff, "G"); break; + default: if (flag & SHF_MASKOS) { @@ -2495,7 +2677,7 @@ get_elf_section_flags (sh_flags) break; } } - + return buff; } @@ -2533,12 +2715,10 @@ process_section_headers (file) if (section->sh_size != 0) { - unsigned long string_table_offset; - - string_table_offset = section->sh_offset; - GET_DATA_ALLOC (section->sh_offset, section->sh_size, string_table, char *, "string table"); + + string_table_length = section->sh_size; } /* Scan the sections for the dynamic symbol table @@ -2578,7 +2758,7 @@ 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_lines || do_debug_pubnames || do_debug_aranges || do_debug_frames) && strncmp (name, ".debug_", 7) == 0) { name += 7; @@ -2589,16 +2769,23 @@ process_section_headers (file) || (do_debug_lines && (strcmp (name, "line") == 0)) || (do_debug_pubnames && (strcmp (name, "pubnames") == 0)) || (do_debug_aranges && (strcmp (name, "aranges") == 0)) + || (do_debug_frames && (strcmp (name, "frame") == 0)) ) request_dump (i, DEBUG_DUMP); } + /* linkonce section to be combined with .debug_info at link time. */ + else if ((do_debugging || do_debug_info) + && strncmp (name, ".gnu.linkonce.wi.", 17) == 0) + request_dump (i, DEBUG_DUMP); + else if (do_debug_frames && strcmp (name, ".eh_frame") == 0) + request_dump (i, DEBUG_DUMP); } if (! do_sections) return 1; printf (_("\nSection Header%s:\n"), elf_header.e_shnum > 1 ? "s" : ""); - + if (is_32bit_elf) printf (_(" [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n")); @@ -2620,15 +2807,15 @@ process_section_headers (file) if (is_32bit_elf) { print_vma (section->sh_addr, LONG_HEX); - + printf ( " %6.6lx %6.6lx %2.2lx", (unsigned long) section->sh_offset, (unsigned long) section->sh_size, (unsigned long) section->sh_entsize); printf (" %3s ", get_elf_section_flags (section->sh_flags)); - - printf (" %2ld %3lx %ld\n", + + printf ("%2ld %3lx %2ld\n", (unsigned long) section->sh_link, (unsigned long) section->sh_info, (unsigned long) section->sh_addralign); @@ -2642,9 +2829,9 @@ process_section_headers (file) print_vma (section->sh_size, LONG_HEX); printf (" "); print_vma (section->sh_entsize, LONG_HEX); - + printf (" %3s ", get_elf_section_flags (section->sh_flags)); - + printf (" %2ld %3lx %ld\n", (unsigned long) section->sh_link, (unsigned long) section->sh_info, @@ -2652,9 +2839,10 @@ process_section_headers (file) } } - printf (_("Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings)\n")); - printf (_(" I (info), L (link order), O (extra OS processing required)\n")); - printf (_(" o (os specific), p (processor specific) x (unknown)\n")); + printf (_("Key to Flags:\n")); + printf (_(" W (write), A (alloc), X (execute), M (merge), S (strings)\n")); + printf (_(" I (info), L (link order), G (group), x (unknown)\n")); + printf (_(" O (extra OS processing required) o (OS specific), p (processor specific)\n")); return 1; } @@ -2904,7 +3092,7 @@ dynamic_segment_parisc_val (entry) first = 0; val ^= flags[cnt].bit; } - + if (val != 0 || first) { if (! first) @@ -2913,7 +3101,7 @@ dynamic_segment_parisc_val (entry) } } break; - + default: print_vma (entry->d_un.d_ptr, PREFIX_HEX); break; @@ -3188,7 +3376,7 @@ process_dynamic_segment (file) { if (do_dynamic) { - const char *dtype; + const char * dtype; putchar (' '); print_vma (entry->d_tag, FULL_HEX); @@ -3205,7 +3393,7 @@ process_dynamic_segment (file) if (do_dynamic) printf ("%s", get_dynamic_flags (entry->d_un.d_val)); break; - + case DT_AUXILIARY: case DT_FILTER: case DT_CONFIG: @@ -3809,7 +3997,8 @@ process_version_sections (file) for (cnt = 0; cnt < total; cnt += 4) { int j, nn; - char *name; + int check_def, check_need; + char * name; printf (" %03x:", cnt); @@ -3828,111 +4017,20 @@ process_version_sections (file) nn = printf ("%4x%c", data [cnt + j] & 0x7fff, data [cnt + j] & 0x8000 ? 'h' : ' '); - if (symbols [cnt + j].st_shndx < SHN_LORESERVE - && section_headers[symbols [cnt + j].st_shndx].sh_type - == SHT_NOBITS) + check_def = 1; + check_need = 1; + if (symbols [cnt + j].st_shndx >= SHN_LORESERVE + || section_headers[symbols [cnt + j].st_shndx].sh_type + != SHT_NOBITS) { - /* We must test both. */ - Elf_Internal_Verneed ivn; - unsigned long offset; - - offset = version_info [DT_VERSIONTAGIDX (DT_VERNEED)] - - loadaddr; - - do - { - Elf_External_Verneed evn; - Elf_External_Vernaux evna; - Elf_Internal_Vernaux ivna; - unsigned long vna_off; - - GET_DATA (offset, evn, "version need"); - - ivn.vn_aux = BYTE_GET (evn.vn_aux); - ivn.vn_next = BYTE_GET (evn.vn_next); - - vna_off = offset + ivn.vn_aux; - - do - { - GET_DATA (vna_off, evna, - "version need aux (1)"); - - ivna.vna_next = BYTE_GET (evna.vna_next); - ivna.vna_other = BYTE_GET (evna.vna_other); - - vna_off += ivna.vna_next; - } - while (ivna.vna_other != data [cnt + j] - && ivna.vna_next != 0); - - if (ivna.vna_other == data [cnt + j]) - { - ivna.vna_name = BYTE_GET (evna.vna_name); - - name = strtab + ivna.vna_name; - nn += printf ("(%s%-*s", - name, - 12 - (int) strlen (name), - ")"); - break; - } - else if (ivn.vn_next == 0) - { - if (data [cnt + j] != 0x8001) - { - Elf_Internal_Verdef ivd; - Elf_External_Verdef evd; - - offset = version_info - [DT_VERSIONTAGIDX (DT_VERDEF)] - - loadaddr; - - do - { - GET_DATA (offset, evd, - "version definition"); - - ivd.vd_next = BYTE_GET (evd.vd_next); - ivd.vd_ndx = BYTE_GET (evd.vd_ndx); - - offset += ivd.vd_next; - } - while (ivd.vd_ndx - != (data [cnt + j] & 0x7fff) - && ivd.vd_next != 0); - - if (ivd.vd_ndx - == (data [cnt + j] & 0x7fff)) - { - Elf_External_Verdaux evda; - Elf_Internal_Verdaux ivda; - - ivd.vd_aux = BYTE_GET (evd.vd_aux); - - GET_DATA (offset + ivd.vd_aux, evda, - "version definition aux"); - - ivda.vda_name = - BYTE_GET (evda.vda_name); - - name = strtab + ivda.vda_name; - nn += - printf ("(%s%-*s", - name, - 12 - (int) strlen (name), - ")"); - } - } - - break; - } - else - offset += ivn.vn_next; - } - while (ivn.vn_next); + if (symbols [cnt + j].st_shndx == SHN_UNDEF) + check_def = 0; + else + check_need = 0; } - else if (symbols [cnt + j].st_shndx == SHN_UNDEF) + + if (check_need + && version_info [DT_VERSIONTAGIDX (DT_VERNEED)]) { Elf_Internal_Verneed ivn; unsigned long offset; @@ -3976,6 +4074,7 @@ process_version_sections (file) name, 12 - (int) strlen (name), ")"); + check_def = 0; break; } @@ -3983,7 +4082,9 @@ process_version_sections (file) } while (ivn.vn_next); } - else if (data [cnt + j] != 0x8001) + + if (check_def && data [cnt + j] != 0x8001 + && version_info [DT_VERSIONTAGIDX (DT_VERDEF)]) { Elf_Internal_Verdef ivd; Elf_External_Verdef evd; @@ -4161,10 +4262,10 @@ get_dynamic_data (file, number) FILE * file; unsigned int number; { - char * e_data; + unsigned char * e_data; int * i_data; - e_data = (char *) malloc (number * 4); + e_data = (unsigned char *) malloc (number * 4); if (e_data == NULL) { @@ -4201,8 +4302,8 @@ process_symbol_table (file) FILE * file; { Elf32_Internal_Shdr * section; - char nb [4]; - char nc [4]; + unsigned char nb [4]; + unsigned char nc [4]; int nbuckets = 0; int nchains = 0; int * buckets = NULL; @@ -4269,7 +4370,7 @@ process_symbol_table (file) print_vma (psym->st_value, LONG_HEX); putchar (' ' ); print_vma (psym->st_size, DEC_5); - + printf (" %6s", get_symbol_type (ELF_ST_TYPE (psym->st_info))); printf (" %6s", get_symbol_binding (ELF_ST_BIND (psym->st_info))); printf (" %3s", get_symbol_visibility (ELF_ST_VISIBILITY (psym->st_other))); @@ -4360,7 +4461,8 @@ process_symbol_table (file) if ((vers_data & 0x8000) || vers_data > 1) { - if (is_nobits || ! check_def) + if (version_info [DT_VERSIONTAGIDX (DT_VERNEED)] + && (is_nobits || ! check_def)) { Elf_External_Verneed evn; Elf_Internal_Verneed ivn; @@ -4418,7 +4520,8 @@ process_symbol_table (file) if (check_def) { - if (vers_data != 0x8001) + if (vers_data != 0x8001 + && version_info [DT_VERSIONTAGIDX (DT_VERDEF)]) { Elf_Internal_Verdef ivd; Elf_Internal_Verdaux ivda; @@ -4474,13 +4577,13 @@ process_symbol_table (file) if (do_histogram && buckets != NULL) { - int *lengths; - int *counts; - int hn; - int si; - int maxlength = 0; - int nzero_counts = 0; - int nsyms = 0; + int * lengths; + int * counts; + int hn; + int si; + int maxlength = 0; + int nzero_counts = 0; + int nsyms = 0; printf (_("\nHistogram for bucket list length (total of %d buckets):\n"), nbuckets); @@ -4816,7 +4919,7 @@ process_extended_line_op (data, is_stmt, pointer_size) printf (_(" %d\t"), ++ state_machine_regs.last_file_entry); name = data; - data += strlen (data) + 1; + data += strlen ((char *) data) + 1; printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0)); data += bytes_read; printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0)); @@ -4861,7 +4964,7 @@ display_debug_lines (section, start, file) /* Check the length of the block. */ info.li_length = BYTE_GET (external->li_length); - if (info.li_length > section->sh_size) + if (info.li_length + sizeof (external->li_length) > section->sh_size) { warn (_("The line info appears to be corrupt - the section is too small\n")); @@ -4896,7 +4999,7 @@ display_debug_lines (section, start, file) printf (_(" Line Range: %d\n"), info.li_line_range); printf (_(" Opcode Base: %d\n"), info.li_opcode_base); - end_of_sequence = data + info.li_length + sizeof (info.li_length); + end_of_sequence = data + info.li_length + sizeof (external->li_length); reset_state_machine (info.li_default_is_stmt); @@ -4921,7 +5024,7 @@ display_debug_lines (section, start, file) { printf (_(" %s\n"), data); - data += strlen (data) + 1; + data += strlen ((char *) data) + 1; } } @@ -4938,13 +5041,13 @@ display_debug_lines (section, start, file) while (* data != 0) { - char * name; + unsigned char * name; int bytes_read; printf (_(" %d\t"), ++ state_machine_regs.last_file_entry); name = data; - data += strlen (data) + 1; + data += strlen ((char *) data) + 1; printf (_("%lu\t"), read_leb128 (data, & bytes_read, 0)); data += bytes_read; @@ -5098,7 +5201,7 @@ display_debug_pubnames (section, start, file) warn (_("Only DWARF 2 pubnames are currently supported\n")); warned = 1; } - + continue; } @@ -5121,7 +5224,7 @@ display_debug_pubnames (section, start, file) { data += 4; printf (" %ld\t\t%s\n", offset, data); - data += strlen (data) + 1; + data += strlen ((char *) data) + 1; } } while (offset != 0); @@ -5498,7 +5601,7 @@ display_debug_abbrev (section, start, file) unsigned char * start; FILE * file ATTRIBUTE_UNUSED; { - abbrev_entry * entry; + abbrev_entry * entry; unsigned char * end = start + section->sh_size; printf (_("Contents of the %s section:\n\n"), SECTION_NAME (section)); @@ -5548,522 +5651,392 @@ display_block (data, length) } static void -decode_location_expression (data, pointer_size) +decode_location_expression (data, pointer_size, length) unsigned char * data; unsigned int pointer_size; + unsigned long length; +{ + unsigned op; + int bytes_read; + unsigned long uvalue; + unsigned char * end = data + length; + + while (data < end) + { + op = * data ++; + + switch (op) + { + case DW_OP_addr: + printf ("DW_OP_addr: %lx", + (unsigned long) byte_get (data, pointer_size)); + data += pointer_size; + break; + case DW_OP_deref: + printf ("DW_OP_deref"); + break; + case DW_OP_const1u: + printf ("DW_OP_const1u: %lu", (unsigned long) byte_get (data++, 1)); + break; + case DW_OP_const1s: + printf ("DW_OP_const1s: %ld", (long) byte_get (data++, 1)); + break; + case DW_OP_const2u: + printf ("DW_OP_const2u: %lu", (unsigned long) byte_get (data, 2)); + data += 2; + break; + case DW_OP_const2s: + printf ("DW_OP_const2s: %ld", (long) byte_get (data, 2)); + data += 2; + break; + case DW_OP_const4u: + printf ("DW_OP_const4u: %lu", (unsigned long) byte_get (data, 4)); + data += 4; + break; + case DW_OP_const4s: + printf ("DW_OP_const4s: %ld", (long) byte_get (data, 4)); + data += 4; + break; + case DW_OP_const8u: + printf ("DW_OP_const8u: %lu %lu", (unsigned long) byte_get (data, 4), + (unsigned long) byte_get (data + 4, 4)); + data += 8; + break; + case DW_OP_const8s: + printf ("DW_OP_const8s: %ld %ld", (long) byte_get (data, 4), + (long) byte_get (data + 4, 4)); + data += 8; + break; + case DW_OP_constu: + printf ("DW_OP_constu: %lu", read_leb128 (data, &bytes_read, 0)); + data += bytes_read; + break; + case DW_OP_consts: + printf ("DW_OP_consts: %ld", read_leb128 (data, &bytes_read, 1)); + data += bytes_read; + break; + case DW_OP_dup: + printf ("DW_OP_dup"); + break; + case DW_OP_drop: + printf ("DW_OP_drop"); + break; + case DW_OP_over: + printf ("DW_OP_over"); + break; + case DW_OP_pick: + printf ("DW_OP_pick: %ld", (unsigned long) byte_get (data++, 1)); + break; + case DW_OP_swap: + printf ("DW_OP_swap"); + break; + case DW_OP_rot: + printf ("DW_OP_rot"); + break; + case DW_OP_xderef: + printf ("DW_OP_xderef"); + break; + case DW_OP_abs: + printf ("DW_OP_abs"); + break; + case DW_OP_and: + printf ("DW_OP_and"); + break; + case DW_OP_div: + printf ("DW_OP_div"); + break; + case DW_OP_minus: + printf ("DW_OP_minus"); + break; + case DW_OP_mod: + printf ("DW_OP_mod"); + break; + case DW_OP_mul: + printf ("DW_OP_mul"); + break; + case DW_OP_neg: + printf ("DW_OP_neg"); + break; + case DW_OP_not: + printf ("DW_OP_not"); + break; + case DW_OP_or: + printf ("DW_OP_or"); + break; + case DW_OP_plus: + printf ("DW_OP_plus"); + break; + case DW_OP_plus_uconst: + printf ("DW_OP_plus_uconst: %lu", + read_leb128 (data, &bytes_read, 0)); + data += bytes_read; + break; + case DW_OP_shl: + printf ("DW_OP_shl"); + break; + case DW_OP_shr: + printf ("DW_OP_shr"); + break; + case DW_OP_shra: + printf ("DW_OP_shra"); + break; + case DW_OP_xor: + printf ("DW_OP_xor"); + break; + case DW_OP_bra: + printf ("DW_OP_bra: %ld", (long) byte_get (data, 2)); + data += 2; + break; + case DW_OP_eq: + printf ("DW_OP_eq"); + break; + case DW_OP_ge: + printf ("DW_OP_ge"); + break; + case DW_OP_gt: + printf ("DW_OP_gt"); + break; + case DW_OP_le: + printf ("DW_OP_le"); + break; + case DW_OP_lt: + printf ("DW_OP_lt"); + break; + case DW_OP_ne: + printf ("DW_OP_ne"); + break; + case DW_OP_skip: + printf ("DW_OP_skip: %ld", (long) byte_get (data, 2)); + data += 2; + break; + + case DW_OP_lit0: + case DW_OP_lit1: + case DW_OP_lit2: + case DW_OP_lit3: + case DW_OP_lit4: + case DW_OP_lit5: + case DW_OP_lit6: + case DW_OP_lit7: + case DW_OP_lit8: + case DW_OP_lit9: + case DW_OP_lit10: + case DW_OP_lit11: + case DW_OP_lit12: + case DW_OP_lit13: + case DW_OP_lit14: + case DW_OP_lit15: + case DW_OP_lit16: + case DW_OP_lit17: + case DW_OP_lit18: + case DW_OP_lit19: + case DW_OP_lit20: + case DW_OP_lit21: + case DW_OP_lit22: + case DW_OP_lit23: + case DW_OP_lit24: + case DW_OP_lit25: + case DW_OP_lit26: + case DW_OP_lit27: + case DW_OP_lit28: + case DW_OP_lit29: + case DW_OP_lit30: + case DW_OP_lit31: + printf ("DW_OP_lit%d", op - DW_OP_lit0); + break; + + case DW_OP_reg0: + case DW_OP_reg1: + case DW_OP_reg2: + case DW_OP_reg3: + case DW_OP_reg4: + case DW_OP_reg5: + case DW_OP_reg6: + case DW_OP_reg7: + case DW_OP_reg8: + case DW_OP_reg9: + case DW_OP_reg10: + case DW_OP_reg11: + case DW_OP_reg12: + case DW_OP_reg13: + case DW_OP_reg14: + case DW_OP_reg15: + case DW_OP_reg16: + case DW_OP_reg17: + case DW_OP_reg18: + case DW_OP_reg19: + case DW_OP_reg20: + case DW_OP_reg21: + case DW_OP_reg22: + case DW_OP_reg23: + case DW_OP_reg24: + case DW_OP_reg25: + case DW_OP_reg26: + case DW_OP_reg27: + case DW_OP_reg28: + case DW_OP_reg29: + case DW_OP_reg30: + case DW_OP_reg31: + printf ("DW_OP_reg%d", op - DW_OP_reg0); + break; + + case DW_OP_breg0: + case DW_OP_breg1: + case DW_OP_breg2: + case DW_OP_breg3: + case DW_OP_breg4: + case DW_OP_breg5: + case DW_OP_breg6: + case DW_OP_breg7: + case DW_OP_breg8: + case DW_OP_breg9: + case DW_OP_breg10: + case DW_OP_breg11: + case DW_OP_breg12: + case DW_OP_breg13: + case DW_OP_breg14: + case DW_OP_breg15: + case DW_OP_breg16: + case DW_OP_breg17: + case DW_OP_breg18: + case DW_OP_breg19: + case DW_OP_breg20: + case DW_OP_breg21: + case DW_OP_breg22: + case DW_OP_breg23: + case DW_OP_breg24: + case DW_OP_breg25: + case DW_OP_breg26: + case DW_OP_breg27: + case DW_OP_breg28: + case DW_OP_breg29: + case DW_OP_breg30: + case DW_OP_breg31: + printf ("DW_OP_breg%d: %ld", op - DW_OP_breg0, + read_leb128 (data, &bytes_read, 1)); + data += bytes_read; + break; + + case DW_OP_regx: + printf ("DW_OP_regx: %lu", read_leb128 (data, &bytes_read, 0)); + data += bytes_read; + break; + case DW_OP_fbreg: + printf ("DW_OP_fbreg: %ld", read_leb128 (data, &bytes_read, 1)); + data += bytes_read; + break; + case DW_OP_bregx: + uvalue = read_leb128 (data, &bytes_read, 0); + data += bytes_read; + printf ("DW_OP_bregx: %lu %ld", uvalue, + read_leb128 (data, &bytes_read, 1)); + data += bytes_read; + break; + case DW_OP_piece: + printf ("DW_OP_piece: %lu", read_leb128 (data, &bytes_read, 0)); + data += bytes_read; + break; + case DW_OP_deref_size: + printf ("DW_OP_deref_size: %ld", (long) byte_get (data++, 1)); + break; + case DW_OP_xderef_size: + printf ("DW_OP_xderef_size: %ld", (long) byte_get (data++, 1)); + break; + case DW_OP_nop: + printf ("DW_OP_nop"); + break; + + default: + if (op >= DW_OP_lo_user + && op <= DW_OP_hi_user) + printf (_("(User defined location op)")); + else + printf (_("(Unknown location op)")); + /* No way to tell where the next op is, so just bail. */ + return; + } + } +} + + +static unsigned char * +read_and_display_attr (attribute, form, data, cu_offset, pointer_size) + unsigned long attribute; + unsigned long form; + unsigned char * data; + unsigned long cu_offset; + unsigned long pointer_size; { - unsigned char op; - int bytes_read; - unsigned long uvalue; + unsigned long uvalue = 0; + unsigned char * block_start = NULL; + int bytes_read; - op = * data ++; + printf (" %-18s:", get_AT_name (attribute)); - switch (op) + switch (form) { - case DW_OP_addr: - printf ("DW_OP_addr: %lx", (unsigned long) byte_get (data, pointer_size)); - break; - case DW_OP_deref: - printf ("DW_OP_deref"); - break; - case DW_OP_const1u: - printf ("DW_OP_const1u: %lu", (unsigned long) byte_get (data, 1)); + default: break; - case DW_OP_const1s: - printf ("DW_OP_const1s: %ld", (long) byte_get (data, 1)); + + case DW_FORM_ref_addr: + case DW_FORM_addr: + uvalue = byte_get (data, pointer_size); + data += pointer_size; break; - case DW_OP_const2u: - printf ("DW_OP_const2u: %lu", (unsigned long) byte_get (data, 2)); + + case DW_FORM_ref1: + case DW_FORM_flag: + case DW_FORM_data1: + uvalue = byte_get (data ++, 1); break; - case DW_OP_const2s: - printf ("DW_OP_const2s: %ld", (long) byte_get (data, 2)); + + case DW_FORM_ref2: + case DW_FORM_data2: + uvalue = byte_get (data, 2); + data += 2; break; - case DW_OP_const4u: - printf ("DW_OP_const4u: %lu", (unsigned long) byte_get (data, 4)); - break; - case DW_OP_const4s: - printf ("DW_OP_const4s: %ld", (long) byte_get (data, 4)); - break; - case DW_OP_const8u: - printf ("DW_OP_const8u: %lu %lu", (unsigned long) byte_get (data, 4), - (unsigned long) byte_get (data + 4, 4)); - break; - case DW_OP_const8s: - printf ("DW_OP_const8s: %ld %ld", (long) byte_get (data, 4), - (long) byte_get (data + 4, 4)); - break; - case DW_OP_constu: - printf ("DW_OP_constu: %lu", read_leb128 (data, NULL, 0)); - break; - case DW_OP_consts: - printf ("DW_OP_consts: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_dup: - printf ("DW_OP_dup"); - break; - case DW_OP_drop: - printf ("DW_OP_drop"); - break; - case DW_OP_over: - printf ("DW_OP_over"); - break; - case DW_OP_pick: - printf ("DW_OP_pick: %ld", (unsigned long) byte_get (data, 1)); - break; - case DW_OP_swap: - printf ("DW_OP_swap"); - break; - case DW_OP_rot: - printf ("DW_OP_rot"); - break; - case DW_OP_xderef: - printf ("DW_OP_xderef"); - break; - case DW_OP_abs: - printf ("DW_OP_abs"); - break; - case DW_OP_and: - printf ("DW_OP_and"); - break; - case DW_OP_div: - printf ("DW_OP_div"); - break; - case DW_OP_minus: - printf ("DW_OP_minus"); - break; - case DW_OP_mod: - printf ("DW_OP_mod"); - break; - case DW_OP_mul: - printf ("DW_OP_mul"); - break; - case DW_OP_neg: - printf ("DW_OP_neg"); - break; - case DW_OP_not: - printf ("DW_OP_not"); - break; - case DW_OP_or: - printf ("DW_OP_or"); - break; - case DW_OP_plus: - printf ("DW_OP_plus"); - break; - case DW_OP_plus_uconst: - printf ("DW_OP_plus_uconst: %lu", read_leb128 (data, NULL, 0)); - break; - case DW_OP_shl: - printf ("DW_OP_shl"); - break; - case DW_OP_shr: - printf ("DW_OP_shr"); - break; - case DW_OP_shra: - printf ("DW_OP_shra"); - break; - case DW_OP_xor: - printf ("DW_OP_xor"); - break; - case DW_OP_bra: - printf ("DW_OP_bra: %ld", (long) byte_get (data, 2)); - break; - case DW_OP_eq: - printf ("DW_OP_eq"); - break; - case DW_OP_ge: - printf ("DW_OP_ge"); - break; - case DW_OP_gt: - printf ("DW_OP_gt"); - break; - case DW_OP_le: - printf ("DW_OP_le"); - break; - case DW_OP_lt: - printf ("DW_OP_lt"); - break; - case DW_OP_ne: - printf ("DW_OP_ne"); - break; - case DW_OP_skip: - printf ("DW_OP_skip: %ld", (long) byte_get (data, 2)); - break; - case DW_OP_lit0: - printf ("DW_OP_lit0"); - break; - case DW_OP_lit1: - printf ("DW_OP_lit1"); - break; - case DW_OP_lit2: - printf ("DW_OP_lit2"); - break; - case DW_OP_lit3: - printf ("DW_OP_lit3"); - break; - case DW_OP_lit4: - printf ("DW_OP_lit4"); - break; - case DW_OP_lit5: - printf ("DW_OP_lit5"); - break; - case DW_OP_lit6: - printf ("DW_OP_lit6"); - break; - case DW_OP_lit7: - printf ("DW_OP_lit7"); - break; - case DW_OP_lit8: - printf ("DW_OP_lit8"); - break; - case DW_OP_lit9: - printf ("DW_OP_lit9"); - break; - case DW_OP_lit10: - printf ("DW_OP_lit10"); - break; - case DW_OP_lit11: - printf ("DW_OP_lit11"); - break; - case DW_OP_lit12: - printf ("DW_OP_lit12"); - break; - case DW_OP_lit13: - printf ("DW_OP_lit13"); - break; - case DW_OP_lit14: - printf ("DW_OP_lit14"); - break; - case DW_OP_lit15: - printf ("DW_OP_lit15"); - break; - case DW_OP_lit16: - printf ("DW_OP_lit16"); - break; - case DW_OP_lit17: - printf ("DW_OP_lit17"); - break; - case DW_OP_lit18: - printf ("DW_OP_lit18"); - break; - case DW_OP_lit19: - printf ("DW_OP_lit19"); - break; - case DW_OP_lit20: - printf ("DW_OP_lit20"); - break; - case DW_OP_lit21: - printf ("DW_OP_lit21"); - break; - case DW_OP_lit22: - printf ("DW_OP_lit22"); - break; - case DW_OP_lit23: - printf ("DW_OP_lit23"); - break; - case DW_OP_lit24: - printf ("DW_OP_lit24"); - break; - case DW_OP_lit25: - printf ("DW_OP_lit25"); - break; - case DW_OP_lit26: - printf ("DW_OP_lit26"); - break; - case DW_OP_lit27: - printf ("DW_OP_lit27"); - break; - case DW_OP_lit28: - printf ("DW_OP_lit28"); - break; - case DW_OP_lit29: - printf ("DW_OP_lit29"); - break; - case DW_OP_lit30: - printf ("DW_OP_lit30"); - break; - case DW_OP_lit31: - printf ("DW_OP_lit31"); - break; - case DW_OP_reg0: - printf ("DW_OP_reg0"); - break; - case DW_OP_reg1: - printf ("DW_OP_reg1"); - break; - case DW_OP_reg2: - printf ("DW_OP_reg2"); - break; - case DW_OP_reg3: - printf ("DW_OP_reg3"); - break; - case DW_OP_reg4: - printf ("DW_OP_reg4"); - break; - case DW_OP_reg5: - printf ("DW_OP_reg5"); - break; - case DW_OP_reg6: - printf ("DW_OP_reg6"); - break; - case DW_OP_reg7: - printf ("DW_OP_reg7"); - break; - case DW_OP_reg8: - printf ("DW_OP_reg8"); - break; - case DW_OP_reg9: - printf ("DW_OP_reg9"); - break; - case DW_OP_reg10: - printf ("DW_OP_reg10"); - break; - case DW_OP_reg11: - printf ("DW_OP_reg11"); - break; - case DW_OP_reg12: - printf ("DW_OP_reg12"); - break; - case DW_OP_reg13: - printf ("DW_OP_reg13"); - break; - case DW_OP_reg14: - printf ("DW_OP_reg14"); - break; - case DW_OP_reg15: - printf ("DW_OP_reg15"); - break; - case DW_OP_reg16: - printf ("DW_OP_reg16"); - break; - case DW_OP_reg17: - printf ("DW_OP_reg17"); - break; - case DW_OP_reg18: - printf ("DW_OP_reg18"); - break; - case DW_OP_reg19: - printf ("DW_OP_reg19"); - break; - case DW_OP_reg20: - printf ("DW_OP_reg20"); - break; - case DW_OP_reg21: - printf ("DW_OP_reg21"); - break; - case DW_OP_reg22: - printf ("DW_OP_reg22"); - break; - case DW_OP_reg23: - printf ("DW_OP_reg23"); - break; - case DW_OP_reg24: - printf ("DW_OP_reg24"); - break; - case DW_OP_reg25: - printf ("DW_OP_reg25"); - break; - case DW_OP_reg26: - printf ("DW_OP_reg26"); - break; - case DW_OP_reg27: - printf ("DW_OP_reg27"); - break; - case DW_OP_reg28: - printf ("DW_OP_reg28"); - break; - case DW_OP_reg29: - printf ("DW_OP_reg29"); - break; - case DW_OP_reg30: - printf ("DW_OP_reg30"); - break; - case DW_OP_reg31: - printf ("DW_OP_reg31"); - break; - case DW_OP_breg0: - printf ("DW_OP_breg0: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg1: - printf ("DW_OP_breg1: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg2: - printf ("DW_OP_breg2: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg3: - printf ("DW_OP_breg3: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg4: - printf ("DW_OP_breg4: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg5: - printf ("DW_OP_breg5: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg6: - printf ("DW_OP_breg6: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg7: - printf ("DW_OP_breg7: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg8: - printf ("DW_OP_breg8: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg9: - printf ("DW_OP_breg9: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg10: - printf ("DW_OP_breg10: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg11: - printf ("DW_OP_breg11: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg12: - printf ("DW_OP_breg12: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg13: - printf ("DW_OP_breg13: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg14: - printf ("DW_OP_breg14: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg15: - printf ("DW_OP_breg15: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg16: - printf ("DW_OP_breg16: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg17: - printf ("DW_OP_breg17: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg18: - printf ("DW_OP_breg18: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg19: - printf ("DW_OP_breg19: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg20: - printf ("DW_OP_breg20: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg21: - printf ("DW_OP_breg21: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg22: - printf ("DW_OP_breg22: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg23: - printf ("DW_OP_breg23: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg24: - printf ("DW_OP_breg24: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg25: - printf ("DW_OP_breg25: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg26: - printf ("DW_OP_breg26: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg27: - printf ("DW_OP_breg27: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg28: - printf ("DW_OP_breg28: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg29: - printf ("DW_OP_breg29: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg30: - printf ("DW_OP_breg30: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_breg31: - printf ("DW_OP_breg31: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_regx: - printf ("DW_OP_regx: %lu", read_leb128 (data, NULL, 0)); - break; - case DW_OP_fbreg: - printf ("DW_OP_fbreg: %ld", read_leb128 (data, NULL, 1)); - break; - case DW_OP_bregx: - uvalue = read_leb128 (data, &bytes_read, 0); - printf ("DW_OP_bregx: %lu %ld", uvalue, - read_leb128 (data + bytes_read, NULL, 1)); - break; - case DW_OP_piece: - printf ("DW_OP_piece: %lu", read_leb128 (data, NULL, 0)); - break; - case DW_OP_deref_size: - printf ("DW_OP_deref_size: %ld", (long) byte_get (data, 1)); - break; - case DW_OP_xderef_size: - printf ("DW_OP_xderef_size: %ld", (long) byte_get (data, 1)); + + case DW_FORM_ref4: + case DW_FORM_data4: + uvalue = byte_get (data, 4); + data += 4; break; - case DW_OP_nop: - printf ("DW_OP_nop"); + + case DW_FORM_sdata: + uvalue = read_leb128 (data, & bytes_read, 1); + data += bytes_read; break; - default: - if (op >= DW_OP_lo_user - && op <= DW_OP_hi_user) - printf (_("(User defined location op)")); - else - printf (_("(Unknown location op)")); + case DW_FORM_ref_udata: + case DW_FORM_udata: + uvalue = read_leb128 (data, & bytes_read, 0); + data += bytes_read; break; } -} - - -static unsigned char * -read_and_display_attr (attribute, form, data, pointer_size) - unsigned long attribute; - unsigned long form; - unsigned char * data; - unsigned long pointer_size; -{ - unsigned long uvalue = 0; - unsigned char * block_start = NULL; - int bytes_read; - int is_ref = 0; - - printf (" %-18s:", get_AT_name (attribute)); switch (form) { case DW_FORM_ref_addr: + printf (" <#%lx>", uvalue); + break; + case DW_FORM_ref1: case DW_FORM_ref2: case DW_FORM_ref4: - case DW_FORM_ref8: case DW_FORM_ref_udata: - is_ref = 1; - } + printf (" <%lx>", uvalue + cu_offset); + break; - switch (form) - { - case DW_FORM_ref_addr: case DW_FORM_addr: - uvalue = byte_get (data, pointer_size); - printf (is_ref ? " <%lx>" : " %#lx", uvalue); - data += pointer_size; - break; + printf (" %#lx", uvalue); - case DW_FORM_ref1: case DW_FORM_flag: case DW_FORM_data1: - uvalue = byte_get (data ++, 1); - printf (is_ref ? " <%lx>" : " %ld", uvalue); - break; - - case DW_FORM_ref2: case DW_FORM_data2: - uvalue = byte_get (data, 2); - data += 2; - printf (is_ref ? " <%lx>" : " %ld", uvalue); - break; - - case DW_FORM_ref4: case DW_FORM_data4: - uvalue = byte_get (data, 4); - data += 4; - printf (is_ref ? " <%lx>" : " %ld", uvalue); + case DW_FORM_sdata: + case DW_FORM_udata: + printf (" %ld", uvalue); break; case DW_FORM_ref8: @@ -6076,48 +6049,31 @@ read_and_display_attr (attribute, form, data, pointer_size) case DW_FORM_string: printf (" %s", data); - data += strlen (data) + 1; - break; - - case DW_FORM_sdata: - uvalue = read_leb128 (data, & bytes_read, 1); - data += bytes_read; - printf (" %ld", (long) uvalue); - break; - - case DW_FORM_ref_udata: - case DW_FORM_udata: - uvalue = read_leb128 (data, & bytes_read, 0); - data += bytes_read; - printf (is_ref ? " <%lx>" : " %ld", uvalue); + data += strlen ((char *) data) + 1; break; case DW_FORM_block: uvalue = read_leb128 (data, & bytes_read, 0); block_start = data + bytes_read; data = display_block (block_start, uvalue); - uvalue = * block_start; break; case DW_FORM_block1: uvalue = byte_get (data, 1); block_start = data + 1; data = display_block (block_start, uvalue); - uvalue = * block_start; break; case DW_FORM_block2: uvalue = byte_get (data, 2); block_start = data + 2; data = display_block (block_start, uvalue); - uvalue = * block_start; break; case DW_FORM_block4: uvalue = byte_get (data, 4); block_start = data + 4; data = display_block (block_start, uvalue); - uvalue = * block_start; break; case DW_FORM_strp: @@ -6147,11 +6103,6 @@ read_and_display_attr (attribute, form, data, pointer_size) } break; - case DW_AT_frame_base: - if (uvalue >= DW_OP_reg0 && uvalue <= DW_OP_reg31) - printf ("(reg %ld)", uvalue - DW_OP_reg0); - break; - case DW_AT_language: switch (uvalue) { @@ -6248,12 +6199,16 @@ read_and_display_attr (attribute, form, data, pointer_size) } break; + case DW_AT_frame_base: case DW_AT_location: case DW_AT_data_member_location: case DW_AT_vtable_elem_location: - printf ("("); - decode_location_expression (block_start, pointer_size); - printf (")"); + if (block_start) + { + printf ("("); + decode_location_expression (block_start, pointer_size, uvalue); + printf (")"); + } break; default: @@ -6282,6 +6237,7 @@ display_debug_info (section, start, file) unsigned char * tags; int i; int level; + unsigned long cu_offset; external = (DWARF2_External_CompUnit *) start; @@ -6291,20 +6247,21 @@ display_debug_info (section, start, file) compunit.cu_pointer_size = BYTE_GET (external->cu_pointer_size); tags = start + sizeof (* external); + cu_offset = start - section_begin; start += compunit.cu_length + sizeof (external->cu_length); + printf (_(" Compilation Unit @ %lx:\n"), cu_offset); + printf (_(" Length: %ld\n"), compunit.cu_length); + printf (_(" Version: %d\n"), compunit.cu_version); + printf (_(" Abbrev Offset: %ld\n"), compunit.cu_abbrev_offset); + printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size); + if (compunit.cu_version != 2) { warn (_("Only version 2 DWARF debug information is currently supported.\n")); continue; } - printf (_(" Compilation Unit:\n")); - printf (_(" Length: %ld\n"), compunit.cu_length); - printf (_(" Version: %d\n"), compunit.cu_version); - printf (_(" Abbrev Offset: %ld\n"), compunit.cu_abbrev_offset); - printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size); - if (first_abbrev != NULL) free_abbrevs (); @@ -6376,7 +6333,7 @@ display_debug_info (section, start, file) for (attr = entry->first_attr; attr; attr = attr->next) tags = read_and_display_attr (attr->attribute, attr->form, - tags, + tags, cu_offset, compunit.cu_pointer_size); if (entry->children) @@ -6433,7 +6390,7 @@ display_debug_aranges (section, start, file) ranges = start + sizeof (* external); /* Must pad to an alignment boundary that is twice the pointer size. */ - excess = sizeof (*external) % (2 * arange.ar_pointer_size); + excess = sizeof (* external) % (2 * arange.ar_pointer_size); if (excess) ranges += (2 * arange.ar_pointer_size) - excess; @@ -6462,6 +6419,602 @@ display_debug_aranges (section, start, file) return 1; } +typedef struct Frame_Chunk +{ + struct Frame_Chunk * next; + unsigned char * chunk_start; + int ncols; + /* DW_CFA_{undefined,same_value,offset,register,unreferenced} */ + short int * col_type; + int * col_offset; + char * augmentation; + unsigned int code_factor; + unsigned int data_factor; + unsigned long pc_begin; + unsigned long pc_range; + int cfa_reg; + int cfa_offset; + int ra; +} +Frame_Chunk; + +/* A marker for a col_type that means this column was never referenced + in the frame info. */ +#define DW_CFA_unreferenced (-1) + +static void +frame_need_space (fc, reg) + Frame_Chunk * fc; + int reg; +{ + int prev = fc->ncols; + + if (reg < fc->ncols) + return; + + fc->ncols = reg + 1; + fc->col_type = (short int *) xrealloc (fc->col_type, + fc->ncols * sizeof (short int)); + fc->col_offset = (int *) xrealloc (fc->col_offset, + fc->ncols * sizeof (int)); + + while (prev < fc->ncols) + { + fc->col_type[prev] = DW_CFA_unreferenced; + fc->col_offset[prev] = 0; + prev++; + } +} + +static void +frame_display_row (fc, need_col_headers, max_regs) + Frame_Chunk * fc; + int * need_col_headers; + int * max_regs; +{ + int r; + char tmp[100]; + + if (* max_regs < fc->ncols) + * max_regs = fc->ncols; + + if (* need_col_headers) + { + * need_col_headers = 0; + + printf (" LOC CFA "); + + for (r = 0; r < * max_regs; r++) + if (fc->col_type[r] != DW_CFA_unreferenced) + { + if (r == fc->ra) + printf ("ra "); + else + printf ("r%-4d", r); + } + + printf ("\n"); + } + + printf ("%08x ", (unsigned int) fc->pc_begin); + sprintf (tmp, "r%d%+d", fc->cfa_reg, fc->cfa_offset); + printf ("%-8s ", tmp); + + for (r = 0; r < fc->ncols; r++) + { + if (fc->col_type[r] != DW_CFA_unreferenced) + { + switch (fc->col_type[r]) + { + case DW_CFA_undefined: + strcpy (tmp, "u"); + break; + case DW_CFA_same_value: + strcpy (tmp, "s"); + break; + case DW_CFA_offset: + sprintf (tmp, "c%+d", fc->col_offset[r]); + break; + case DW_CFA_register: + sprintf (tmp, "r%d", fc->col_offset[r]); + break; + default: + strcpy (tmp, "n/a"); + break; + } + printf ("%-5s", tmp); + } + } + printf ("\n"); +} + +#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 + +static int +display_debug_frames (section, start, file) + Elf32_Internal_Shdr * section; + unsigned char * start; + FILE * file ATTRIBUTE_UNUSED; +{ + unsigned char * end = start + section->sh_size; + unsigned char * section_start = start; + Frame_Chunk * chunks = 0; + Frame_Chunk * remembered_state = 0; + Frame_Chunk * rs; + int is_eh = (strcmp (SECTION_NAME (section), ".eh_frame") == 0); + int length_return; + int max_regs = 0; + + printf (_("The section %s contains:\n"), SECTION_NAME (section)); + + while (start < end) + { + unsigned char * saved_start; + unsigned char * block_end; + unsigned long length; + unsigned long cie_id; + Frame_Chunk * fc; + Frame_Chunk * cie; + int need_col_headers = 1; + + saved_start = start; + length = byte_get (start, 4); start += 4; + + if (length == 0) + return 1; + + 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)) + { + fc = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk)); + memset (fc, 0, sizeof (Frame_Chunk)); + + fc->next = chunks; + chunks = fc; + fc->chunk_start = saved_start; + fc->ncols = 0; + fc->col_type = (short int *) xmalloc (sizeof (short int)); + fc->col_offset = (int *) xmalloc (sizeof (int)); + frame_need_space (fc, max_regs-1); + + start ++; /* version */ + fc->augmentation = start; + + while (* start) + start++; + + start++; /* skip past NUL */ + + 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; + } + else if (strcmp (fc->augmentation, "eh") == 0) + { + start += 4; + fc->code_factor = LEB (); + fc->data_factor = SLEB (); + fc->ra = byte_get (start, 1); start += 1; + } + else + { + fc->code_factor = LEB (); + fc->data_factor = SLEB (); + 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); + + frame_need_space (fc, fc->ra); + } + else + { + unsigned char * look_for; + static Frame_Chunk fde_fc; + + fc = & fde_fc; + memset (fc, 0, sizeof (Frame_Chunk)); + + look_for = is_eh ? start-4-cie_id : (unsigned char *) 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->chunk_start != look_for); cie = cie->next); + if (!cie) + { + warn ("Invalid CIE pointer %08x in FDE at %08x\n", cie_id, saved_start); + start = block_end; + fc->ncols = 0; + fc->col_type = (short int *) xmalloc (sizeof (short int)); + fc->col_offset = (int *) xmalloc (sizeof (int)); + frame_need_space (fc, max_regs - 1); + cie = fc; + fc->augmentation = ""; + } + else + { + fc->ncols = cie->ncols; + fc->col_type = (short int *) xmalloc (fc->ncols * sizeof (short int)); + fc->col_offset = (int *) xmalloc (fc->ncols * sizeof (int)); + memcpy (fc->col_type, cie->col_type, fc->ncols * sizeof (short int)); + memcpy (fc->col_offset, cie->col_offset, fc->ncols * sizeof (int)); + fc->augmentation = cie->augmentation; + fc->code_factor = cie->code_factor; + fc->data_factor = cie->data_factor; + fc->cfa_reg = cie->cfa_reg; + fc->cfa_offset = cie->cfa_offset; + fc->ra = cie->ra; + frame_need_space (fc, max_regs-1); + } + + if (cie->augmentation[0] == 'z') + { + unsigned long l = LEB (); + start += l; + } + + printf ("FDE cie=%08x pc=%08lx..%08lx\n", + cie->chunk_start-section_start, fc->pc_begin, + fc->pc_begin + fc->pc_range); + } + + /* 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 + + { + /* Start by making a pass over the chunk, allocating storage + and taking note of what registers are used. */ + unsigned char * tmp = start; + + while (start < block_end) + { + 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) + { + case DW_CFA_advance_loc: + break; + case DW_CFA_offset: + LEB (); + frame_need_space (fc, opa); + fc->col_type[opa] = DW_CFA_undefined; + break; + case DW_CFA_restore: + frame_need_space (fc, opa); + fc->col_type[opa] = DW_CFA_undefined; + break; + case DW_CFA_set_loc: + start += sizeof (vma); + break; + case DW_CFA_advance_loc1: + start += 1; + break; + case DW_CFA_advance_loc2: + start += 2; + break; + case DW_CFA_advance_loc4: + start += 4; + break; + case DW_CFA_offset_extended: + reg = LEB (); LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_restore_extended: + reg = LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_undefined: + reg = LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_same_value: + reg = LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_register: + reg = LEB (); LEB (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + break; + case DW_CFA_def_cfa: + LEB (); LEB (); + break; + case DW_CFA_def_cfa_register: + LEB (); + break; + case DW_CFA_def_cfa_offset: + LEB (); + break; +#ifndef DW_CFA_GNU_args_size +#define DW_CFA_GNU_args_size 0x2e +#endif + case DW_CFA_GNU_args_size: + LEB (); + 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 (); + frame_need_space (fc, reg); + fc->col_type[reg] = DW_CFA_undefined; + + default: + break; + } + } + start = tmp; + } + + /* Now we know what registers are used, make a second pass over + the chunk, this time actually printing out the info. */ + + while (start < block_end) + { + unsigned op, opa; + unsigned long ul, reg, roffs; + long l, ofs; + 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 above. */ + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + 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 + fc->col_type[reg] = DW_CFA_same_value; + fc->col_offset[reg] = 0; + break; + + case DW_CFA_register: + reg = LEB (); + roffs = LEB (); +#if FDEBUG + printf (" DW_CFA_register: r%d\n", reg); +#endif + 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 + rs = (Frame_Chunk *) xmalloc (sizeof (Frame_Chunk)); + rs->ncols = fc->ncols; + rs->col_type = (short int *) xmalloc (rs->ncols * sizeof (short int)); + rs->col_offset = (int *) xmalloc (rs->ncols * sizeof (int)); + memcpy (rs->col_type, fc->col_type, rs->ncols); + memcpy (rs->col_offset, fc->col_offset, rs->ncols * sizeof (int)); + rs->next = remembered_state; + remembered_state = rs; + break; + + case DW_CFA_restore_state: +#if FDEBUG + printf (" DW_CFA_restore_state\n"); +#endif + rs = remembered_state; + remembered_state = rs->next; + frame_need_space (fc, rs->ncols-1); + memcpy (fc->col_type, rs->col_type, rs->ncols); + memcpy (fc->col_offset, rs->col_offset, rs->ncols * sizeof (int)); + free (rs->col_type); + free (rs->col_offset); + free (rs); + break; + + 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 + 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 + 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 + break; + + case DW_CFA_nop: +#if FDEBUG + printf (" DW_CFA_nop\n"); +#endif + 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 + 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 + 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 + fc->col_type[reg] = DW_CFA_offset; + fc->col_offset[reg] = l * fc->data_factor; + break; + + default: + fprintf (stderr, "unsupported or unknown DW_CFA_%d\n", op); + start = block_end; + } + } + + frame_display_row (fc, &need_col_headers, &max_regs); + + start = block_end; + } + + printf ("\n"); + + return 1; +} + +#undef GET +#undef LEB +#undef SLEB static int display_debug_not_supported (section, start, file) @@ -6509,6 +7062,8 @@ debug_displays[] = { ".debug_line", display_debug_lines, NULL }, { ".debug_aranges", display_debug_aranges, NULL }, { ".debug_pubnames", display_debug_pubnames, NULL }, + { ".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 }, @@ -6539,6 +7094,9 @@ display_debug_section (section, file) "debug section data"); /* See if we know how to display the contents of this section. */ + if (strncmp (name, ".gnu.linkonce.wi.", 17) == 0) + name = ".debug_info"; + for (i = NUM_ELEM (debug_displays); i--;) if (strcmp (debug_displays[i].name, name) == 0) { @@ -6775,7 +7333,7 @@ process_mips_specific (file) Elf_External_Options *, "options"); iopt = (Elf_Internal_Options *) malloc ((sect->sh_size / sizeof (eopt)) - * sizeof (*iopt)); + * sizeof (* iopt)); if (iopt == NULL) { error (_("Out of memory")); @@ -6784,7 +7342,7 @@ process_mips_specific (file) offset = cnt = 0; option = iopt; - + while (offset < sect->sh_size) { Elf_External_Options * eoption; @@ -6797,16 +7355,16 @@ process_mips_specific (file) option->info = BYTE_GET (eoption->info); offset += option->size; - + ++option; ++cnt; } printf (_("\nSection '%s' contains %d entries:\n"), - string_table + sect->sh_name, cnt); + SECTION_NAME (sect), cnt); option = iopt; - + while (cnt-- > 0) { size_t len; @@ -6822,8 +7380,8 @@ process_mips_specific (file) if (elf_header.e_machine == EM_MIPS) { /* 32bit form. */ - Elf32_External_RegInfo *ereg; - Elf32_RegInfo reginfo; + Elf32_External_RegInfo * ereg; + Elf32_RegInfo reginfo; ereg = (Elf32_External_RegInfo *) (option + 1); reginfo.ri_gprmask = BYTE_GET (ereg->ri_gprmask); @@ -6940,7 +7498,7 @@ process_mips_specific (file) break; } - len = sizeof (*eopt); + len = sizeof (* eopt); while (len < option->size) if (((char *) option)[len] >= ' ' && ((char *) option)[len] < 0x7f) @@ -6968,7 +7526,7 @@ process_mips_specific (file) return 0; } - iconf = (Elf32_Conflict *) malloc (conflictsno * sizeof (*iconf)); + iconf = (Elf32_Conflict *) malloc (conflictsno * sizeof (* iconf)); if (iconf == NULL) { error (_("Out of memory")); @@ -6977,7 +7535,7 @@ process_mips_specific (file) if (is_32bit_elf) { - GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (*econf32), + GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (* econf32), econf32, Elf32_External_Conflict *, "conflict"); for (cnt = 0; cnt < conflictsno; ++cnt) @@ -6985,7 +7543,7 @@ process_mips_specific (file) } else { - GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (*econf64), + GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (* econf64), econf64, Elf64_External_Conflict *, "conflict"); for (cnt = 0; cnt < conflictsno; ++cnt) @@ -7069,8 +7627,7 @@ process_corefile_note_segment (file, offset, length) external = pnotes; printf (_("\nNotes at offset 0x%08lx with length 0x%08lx:\n"), - (unsigned long) offset, - (unsigned long) length); + (unsigned long) offset, (unsigned long) length); printf (_(" Owner\t\tData size\tDescription\n")); while (external < (Elf_External_Note *)((char *) pnotes + length)) @@ -7084,7 +7641,7 @@ process_corefile_note_segment (file, offset, length) inote.descsz = BYTE_GET (external->descsz); inote.descdata = inote.namedata + align_power (inote.namesz, 2); inote.descpos = offset + (inote.descdata - (char *) pnotes); - + external = (Elf_External_Note *)(inote.descdata + align_power (inote.descsz, 2)); /* Verify that name is null terminated. It appears that at least @@ -7094,17 +7651,17 @@ process_corefile_note_segment (file, offset, length) if (inote.namedata[inote.namesz] != '\0') { temp = malloc (inote.namesz + 1); - + if (temp == NULL) { error (_("Out of memory\n")); res = 0; break; } - + strncpy (temp, inote.namedata, inote.namesz); temp[inote.namesz] = 0; - + /* warn (_("'%s' NOTE name not properly null terminated\n"), temp); */ inote.namedata = temp; } @@ -7363,6 +7920,7 @@ process_file (file_name) { free (string_table); string_table = NULL; + string_table_length = 0; } if (dynamic_strings) diff --git a/contrib/binutils/binutils/resrc.c b/contrib/binutils/binutils/resrc.c index 8c3c9a7..68bc7c4 100644 --- a/contrib/binutils/binutils/resrc.c +++ b/contrib/binutils/binutils/resrc.c @@ -78,7 +78,7 @@ /* The default preprocessor. */ -#define DEFAULT_PREPROCESSOR "gcc -E -xc-header -DRC_INVOKED" +#define DEFAULT_PREPROCESSOR "gcc -E -xc -DRC_INVOKED" /* We read the directory entries in a cursor or icon file into instances of this structure. */ @@ -498,9 +498,6 @@ read_rc_file (filename, preprocessor, preprocargs, language, use_temp_file) static void close_input_stream () { - if (cpp_pipe != NULL) - pclose (cpp_pipe); - if (istream_type == ISTREAM_FILE) { if (cpp_pipe != NULL) @@ -844,19 +841,42 @@ define_control (text, id, x, y, width, height, class, style, exstyle) n->height = height; n->class.named = 0; n->class.u.id = class; - if (text != NULL) - res_string_to_id (&n->text, text); - else - { - n->text.named = 0; - n->text.u.id = 0; - } + if (text == NULL) + text = ""; + res_string_to_id (&n->text, text); n->data = NULL; n->help = 0; return n; } +struct dialog_control * +define_icon_control (iid, id, x, y, style, exstyle, help, data, ex) + struct res_id iid; + unsigned long id; + unsigned long x; + unsigned long y; + unsigned long style; + unsigned long exstyle; + unsigned long help; + struct rcdata_item *data; + struct dialog_ex *ex; +{ + struct dialog_control *n; + if (style == 0) + style = SS_ICON | WS_CHILD | WS_VISIBLE; + n = define_control (0, id, x, y, 0, 0, CTL_STATIC, style, exstyle); + n->text = iid; + if (help && !ex) + rcparse_warning (_("help ID requires DIALOGEX")); + if (data && !ex) + rcparse_warning (_("control data requires DIALOGEX")); + n->help = help; + n->data = data; + + return n; +} + /* Define a font resource. */ void diff --git a/contrib/binutils/binutils/size.1 b/contrib/binutils/binutils/size.1 index 3b19bd2..1d182ae 100644 --- a/contrib/binutils/binutils/size.1 +++ b/contrib/binutils/binutils/size.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1991 Free Software Foundation +.\" Copyright (c) 1991, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH size 1 "5 November 1991" "cygnus support" "GNU Development Tools" +.TH size 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -143,19 +143,377 @@ entry in .BR objdump ( 1 ). .SH COPYING -Copyright (c) 1991 Free Software Foundation, Inc. +Copyright (c) 1991, 2000 Free Software Foundation, Inc. .PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. -.PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +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. diff --git a/contrib/binutils/binutils/size.c b/contrib/binutils/binutils/size.c index 070834b..4cf17b2 100644 --- a/contrib/binutils/binutils/size.c +++ b/contrib/binutils/binutils/size.c @@ -77,8 +77,10 @@ usage (stream, status) int status; { fprintf (stream, _("\ -Usage: %s [-ABdoxV] [--format=berkeley|sysv] [--radix=8|10|16]\n\ - [--target=bfdname] [--version] [--help] [file...]\n"), program_name); +Usage: %s [-A | --format=sysv | -B | --format=berkeley]\n\ + [-o | --radix=8 | -d | --radix=10 | -h | --radix=16]\n\ + [-V | --version] [--target=bfdname] [--help] [file...]\n"), + program_name); #if BSD_DEFAULT fputs (_("default is --format=berkeley\n"), stream); #else @@ -120,7 +122,7 @@ main (argc, argv) bfd_init (); set_default_bfd_target (); - while ((c = getopt_long (argc, argv, "ABVdox", long_options, + while ((c = getopt_long (argc, argv, "ABVdfox", long_options, (int *) 0)) != EOF) switch (c) { @@ -186,6 +188,16 @@ main (argc, argv) case 'o': radix = octal; break; + case 'f': /* FIXME : For sysv68, `-f' means `full format', i.e. + `[fname:] M(.text) + N(.data) + O(.bss) + P(.comment) = Q' + where `fname: ' appears only if there are >= 2 input files, + and M, N, O, P, Q are expressed in decimal by default, + hexa or octal if requested by `-x' or `-o'. + Just to make things interesting, Solaris also accepts -f, + which prints out the size of each allocatable section, the + name of the section, and the total of the section sizes. */ + /* For the moment, accept `-f' silently, and ignore it. */ + break; case 0: break; case '?': diff --git a/contrib/binutils/binutils/srconv.c b/contrib/binutils/binutils/srconv.c index c317d98..fb8996b 100644 --- a/contrib/binutils/binutils/srconv.c +++ b/contrib/binutils/binutils/srconv.c @@ -224,7 +224,7 @@ writeBARRAY (data, ptr, idx, size, file) barray data; char *ptr; int *idx; - int size; + int size ATTRIBUTE_UNUSED; FILE *file; { int i; @@ -299,7 +299,7 @@ wr_un (ptr, sfile, first, nsecs) struct coff_ofile *ptr; struct coff_sfile *sfile; int first; - int nsecs; + int nsecs ATTRIBUTE_UNUSED; { struct IT_un un; @@ -438,7 +438,7 @@ wr_hd (p) static void wr_sh (p, sec) - struct coff_ofile *p; + struct coff_ofile *p ATTRIBUTE_UNUSED; struct coff_section *sec; { struct IT_sh sh; @@ -453,7 +453,7 @@ wr_sh (p, sec) static void wr_ob (p, section) - struct coff_ofile *p; + struct coff_ofile *p ATTRIBUTE_UNUSED; struct coff_section *section; { bfd_size_type i; @@ -514,7 +514,7 @@ wr_ob (p, section) static void wr_rl (ptr, sec) - struct coff_ofile *ptr; + struct coff_ofile *ptr ATTRIBUTE_UNUSED; struct coff_section *sec; { int nr = sec->nrelocs; @@ -586,7 +586,7 @@ wr_object_body (p) static void wr_dps_start (sfile, section, scope, type, nest) struct coff_sfile *sfile; - struct coff_section *section; + struct coff_section *section ATTRIBUTE_UNUSED; struct coff_scope *scope; int type; int nest; @@ -623,8 +623,8 @@ wr_dps_start (sfile, section, scope, type, nest) static void wr_dps_end (section, scope, type) - struct coff_section *section; - struct coff_scope *scope; + struct coff_section *section ATTRIBUTE_UNUSED; + struct coff_scope *scope ATTRIBUTE_UNUSED; int type; { struct IT_dps dps; @@ -960,7 +960,7 @@ walk_tree_type (sfile, symbol, type, nest) static void walk_tree_symbol (sfile, section, symbol, nest) struct coff_sfile *sfile; - struct coff_section *section; + struct coff_section *section ATTRIBUTE_UNUSED; struct coff_symbol *symbol; int nest; { @@ -1329,7 +1329,7 @@ wr_du (p, sfile, n) static void wr_dus (p, sfile) - struct coff_ofile *p; + struct coff_ofile *p ATTRIBUTE_UNUSED; struct coff_sfile *sfile; { @@ -1373,11 +1373,12 @@ find_base (sfile, section) { return sfile->section[section->number].low; } + static void wr_dln (p, sfile, n) - struct coff_ofile *p; + struct coff_ofile *p ATTRIBUTE_UNUSED; struct coff_sfile *sfile; - int n; + int n ATTRIBUTE_UNUSED; { #if 0 @@ -1517,7 +1518,7 @@ static void wr_globals (p, sfile, n) struct coff_ofile *p; struct coff_sfile *sfile; - int n; + int n ATTRIBUTE_UNUSED; { struct coff_symbol *sy; for (sy = p->symbol_list_head; @@ -1734,7 +1735,7 @@ return scount; static void wr_er (ptr, sfile, first) struct coff_ofile *ptr; - struct coff_sfile *sfile; + struct coff_sfile *sfile ATTRIBUTE_UNUSED; int first; { int idx = 0; @@ -1760,7 +1761,7 @@ wr_er (ptr, sfile, first) static void wr_ed (ptr, sfile, first) struct coff_ofile *ptr; - struct coff_sfile *sfile; + struct coff_sfile *sfile ATTRIBUTE_UNUSED; int first; { struct coff_symbol *s; diff --git a/contrib/binutils/binutils/stabs.c b/contrib/binutils/binutils/stabs.c index 5f60035..daea301 100644 --- a/contrib/binutils/binutils/stabs.c +++ b/contrib/binutils/binutils/stabs.c @@ -1,5 +1,6 @@ /* stabs.c -- Parse stabs debugging information - Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001 + Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GNU Binutils. @@ -33,6 +34,7 @@ #include "demangle.h" #include "debug.h" #include "budbg.h" +#include "filenames.h" /* Meaningless definition needs by aout64.h. FIXME. */ #define BYTES_IN_WORD 4 @@ -40,14 +42,6 @@ #include "aout/aout64.h" #include "aout/stab_gnu.h" -#ifndef DIR_SEPARATOR -#ifdef _WIN32 -#define DIR_SEPARATOR '\\' -#else -#define DIR_SEPARATOR '/' -#endif -#endif - /* The number of predefined XCOFF types. */ #define XCOFF_TYPE_COUNT 34 @@ -568,12 +562,7 @@ parse_stab (dhandle, handle, type, desc, value, string) f = info->so_string; - if ( (string[0] == '/') - || (string[0] == DIR_SEPARATOR) - || ( (DIR_SEPARATOR == '\\') - && (string[1] == ':') - && ( (string[2] == DIR_SEPARATOR) - || (string[2] == '/')))) + if (IS_ABSOLUTE_PATH (string)) info->so_string = xstrdup (string); else info->so_string = concat (info->so_string, string, @@ -706,6 +695,7 @@ parse_stab (dhandle, handle, type, desc, value, string) case N_OBJ: case N_ENDM: case N_MAIN: + case N_WARNING: break; } @@ -1822,7 +1812,7 @@ parse_stab_range_type (dhandle, info, typename, pp, typenums) else if (n3 == (bfd_signed_vma) 0xffffffff) return debug_make_int_type (dhandle, 4, true); #ifdef BFD64 - else if (n3 == ((((bfd_vma) 0xffffffff) << 32) | 0xffffffff)) + else if (n3 == ((((bfd_signed_vma) 0xffffffff) << 32) | 0xffffffff)) return debug_make_int_type (dhandle, 8, true); #endif } diff --git a/contrib/binutils/binutils/strings.1 b/contrib/binutils/binutils/strings.1 index 4d33b79..4233630 100644 --- a/contrib/binutils/binutils/strings.1 +++ b/contrib/binutils/binutils/strings.1 @@ -1,6 +1,6 @@ .\" Copyright (c) 1993, 94, 95, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH strings 1 "09 March 2000" "cygnus support" "GNU Development Tools" +.TH strings 1 "09 March 2000" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -133,19 +133,377 @@ The GNU Binary Utilities\c .SH COPYING -Copyright (c) 1993 Free Software Foundation, Inc. +Copyright (c) 1993, 2000 Free Software Foundation, Inc. .PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. -.PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +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. diff --git a/contrib/binutils/binutils/strings.c b/contrib/binutils/binutils/strings.c index 54f29e4..a961e41 100644 --- a/contrib/binutils/binutils/strings.c +++ b/contrib/binutils/binutils/strings.c @@ -77,9 +77,9 @@ #endif #ifdef isascii -#define isgraphic(c) (isascii (c) && isprint (c)) +#define isgraphic(c) (isascii (c) && (isprint (c) || (c) == '\t')) #else -#define isgraphic(c) (isprint (c)) +#define isgraphic(c) (isprint (c) || (c) == '\t') #endif #ifndef errno diff --git a/contrib/binutils/binutils/strip.1 b/contrib/binutils/binutils/strip.1 index 1fc415c..5bd6dfb 100644 --- a/contrib/binutils/binutils/strip.1 +++ b/contrib/binutils/binutils/strip.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation +.\" Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 1998, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH strip 1 "5 November 1991" "cygnus support" "GNU Development Tools" +.TH strip 1 "5 November 1991" "Free Software Foundation" "GNU Development Tools" .de BP .sp .ti \-.2i @@ -167,19 +167,377 @@ entry in Roland H. Pesch (October 1991). .SH COPYING -Copyright (c) 1991 Free Software Foundation, Inc. +Copyright (c) 1991, 2000 Free Software Foundation, Inc. .PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. -.PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +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. diff --git a/contrib/binutils/binutils/sysdump.c b/contrib/binutils/binutils/sysdump.c index fd2a0ea..1f8a577 100644 --- a/contrib/binutils/binutils/sysdump.c +++ b/contrib/binutils/binutils/sysdump.c @@ -131,8 +131,8 @@ barray getBARRAY (ptr, idx, dsize, max) unsigned char *ptr; int *idx; - int dsize; - int max; + int dsize ATTRIBUTE_UNUSED; + int max ATTRIBUTE_UNUSED; { barray res; int i; diff --git a/contrib/binutils/binutils/version.c b/contrib/binutils/binutils/version.c index cb893cf..5bd1907 100644 --- a/contrib/binutils/binutils/version.c +++ b/contrib/binutils/binutils/version.c @@ -1,5 +1,5 @@ /* version.c -- binutils version information - Copyright 1991, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright 1991, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Binutils. @@ -36,7 +36,7 @@ print_version (name) /* This output is intended to follow the GNU standards document. */ /* xgettext:c-format */ printf ("GNU %s %s\n", name, program_version); - printf (_("Copyright 1997, 98, 99, 2000 Free Software Foundation, Inc.\n")); + printf (_("Copyright 1997, 98, 99, 2000, 2001 Free Software Foundation, Inc.\n")); printf (_("\ This program is free software; you may redistribute it under the terms of\n\ the GNU General Public License. This program has absolutely no warranty.\n")); diff --git a/contrib/binutils/config-ml.in b/contrib/binutils/config-ml.in index 503f7cf..c968bf0 100644 --- a/contrib/binutils/config-ml.in +++ b/contrib/binutils/config-ml.in @@ -280,6 +280,17 @@ arm-*-*) esac done fi + if [ x"$enable_nofmult" = xno ] + then + old_multidirs="${multidirs}" + multidirs="" + for x in ${old_multidirs}; do + case "$x" in + *nofmult* ) : ;; + *) multidirs="${multidirs} ${x}" ;; + esac + done + fi ;; m68*-*-*) if [ x$enable_softfloat = xno ] @@ -362,6 +373,28 @@ mips*-*-*) esac done fi + case " $multidirs " in + *" mabi=64 "*) + # We will not be able to create libraries with -mabi=64 if + # we cannot even link a trivial program. It usually + # indicates the 64bit libraries are missing. + if echo 'main() {}' > conftest.c && + ${CC-gcc} -mabi=64 conftest.c -o conftest; then + : + else + echo Could not link program with -mabi=64, disabling it. + old_multidirs="${multidirs}" + multidirs="" + for x in ${old_multidirs}; do + case "$x" in + *mabi=64* ) : ;; + *) multidirs="${multidirs} ${x}" ;; + esac + done + fi + rm -f conftest.c conftest + ;; + esac ;; powerpc*-*-* | rs6000*-*-*) if [ x$enable_softfloat = xno ] @@ -442,6 +475,30 @@ powerpc*-*-* | rs6000*-*-*) done fi ;; +sparc*-*-*) + case " $multidirs " in + *" m64 "*) + # We will not be able to create libraries with -m64 if + # we cannot even link a trivial program. It usually + # indicates the 64bit libraries are missing. + if echo 'main() {}' > conftest.c && + ${CC-gcc} -m64 conftest.c -o conftest; then + : + else + echo Could not link program with -m64, disabling it. + old_multidirs="${multidirs}" + multidirs="" + for x in ${old_multidirs}; do + case "$x" in + *m64* ) : ;; + *) multidirs="${multidirs} ${x}" ;; + esac + done + fi + rm -f conftest.c conftest + ;; + esac + ;; esac # Remove extraneous blanks from multidirs. @@ -472,6 +529,8 @@ multi-do: flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(CFLAGS) $${flags}" \ + prefix="$(prefix)" \ + exec_prefix="$(exec_prefix)" \ CXXFLAGS="$(CXXFLAGS) $${flags}" \ LIBCFLAGS="$(LIBCFLAGS) $${flags}" \ LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \ @@ -615,7 +674,24 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then echo "pwd: `pwd`" fi - if [ -d ${ml_dir} ]; then true; else mkdir ${ml_dir}; fi + if [ -d ${ml_dir} ]; then true; else + # ``mkdir -p ${ml_dir}'' See also mkinstalldirs. + pathcomp="" + for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$? + fi + if test ! -d "$pathcomp"; then + exit $lasterr + fi + pathcomp="$pathcomp/" + done + fi if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi # Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../ @@ -666,9 +742,86 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then cd ${ml_dir}/${ml_libdir} if [ -f ${ml_newsrcdir}/configure ]; then - ml_recprog=${ml_newsrcdir}/configure + ml_recprog="${ml_newsrcdir}/configure --cache-file=../config.cache" fi - if eval ${ml_config_shell} ${ml_recprog} \ + + # find compiler flag corresponding to ${ml_dir} + for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do + dir=`echo $i | sed -e 's/;.*$//'` + if [ "${dir}" = "${ml_dir}" ]; then + flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'` + break + fi + done + ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags"' + + if [ "${with_target_subdir}" = "." ]; then + CC_=$CC' ' + CXX_=$CXX' ' + else + # Create a regular expression that matches any string as long + # as ML_POPDIR. + popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'` + CC_= + for arg in ${CC}; do + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;; + "${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) + CC_="${CC_}${arg} " ;; + esac + done + + CXX_= + for arg in ${CXX}; do + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + "${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) + CXX_="${CXX_}${arg} " ;; + esac + done + + if test "x${LD_LIBRARY_PATH+set}" = xset; then + LD_LIBRARY_PATH_= + for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do + case "$arg" in + "${ML_POPDIR}"/*) + arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` + ;; + esac + if test "x$LD_LIBRARY_PATH_" != x; then + LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg + else + LD_LIBRARY_PATH_=$arg + fi + done + ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_" + fi + + if test "x${SHLIB_PATH+set}" = xset; then + SHLIB_PATH_= + for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do + case "$arg" in + "${ML_POPDIR}"/*) + arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` + ;; + esac + if test "x$SHLIB_PATH_" != x; then + SHLIB_PATH_=$SHLIB_PATH_:$arg + else + SHLIB_PATH_=$arg + fi + done + ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_" + fi + fi + + if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \ --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \ ${ml_arguments} ${ml_srcdiroption} ; then true diff --git a/contrib/binutils/config.guess b/contrib/binutils/config.guess index 08e8a75..71de137 100755 --- a/contrib/binutils/config.guess +++ b/contrib/binutils/config.guess @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. -version='2000-09-05' +timestamp='2001-03-16' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -32,30 +32,41 @@ version='2000-09-05' # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# +# don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] -Output the configuration name of this system. +Output the configuration name of the system \`$me' is run on. Operation modes: - -h, --help print this help, then exit - -V, --version print version number, then exit" + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do - case "$1" in - --version | --vers* | -V ) + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; @@ -64,9 +75,7 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - exec >&2 - echo "$me: invalid option $1" - echo "$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; @@ -78,19 +87,30 @@ if test $# != 0; then exit 1 fi -# Use $HOST_CC if defined. $CC may point to a cross-compiler -if test x"$CC_FOR_BUILD" = x; then - if test x"$HOST_CC" != x; then - CC_FOR_BUILD="$HOST_CC" - else - if test x"$CC" != x; then - CC_FOR_BUILD="$CC" - else - CC_FOR_BUILD=cc - fi - fi -fi +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break + fi + done + rm -f $dummy.c $dummy.o $dummy.rel + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) @@ -100,12 +120,9 @@ fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -dummy=dummy-$$ -trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -129,16 +146,24 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac - # The Operating System including object format. - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: @@ -247,7 +272,7 @@ EOF arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - SR2?01:HI-UX/MPP:*:*) + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) @@ -383,7 +408,7 @@ EOF EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm $dummy.c $dummy && exit 0 + && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; @@ -437,6 +462,14 @@ EOF i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c @@ -450,7 +483,7 @@ EOF exit(0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then @@ -459,9 +492,9 @@ EOF echo rs6000-ibm-aix3.2 fi exit 0 ;; - *:AIX:*:4) + *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` - if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -469,7 +502,7 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=4.${UNAME_RELEASE} + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; @@ -495,10 +528,28 @@ EOF echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE @@ -533,11 +584,16 @@ EOF } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy + fi ;; esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include @@ -564,7 +620,7 @@ EOF exit (0); } EOF - $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; @@ -628,23 +684,24 @@ EOF CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY*T3E:*:*:*) + CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; - F300:UNIX_System_V:*:*) + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; @@ -693,57 +750,38 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; - *:Linux:*:*) - - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - ld_help_string=`cd /; ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g - s/.*supported emulations: *// - s/ .*// - p'` - case "$ld_supported_emulations" in - *ia64) - echo "${UNAME_MACHINE}-unknown-linux" - exit 0 - ;; - i?86linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 - ;; - elf_i?86) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - i?86coff) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 - ;; - sparclinux) - echo "${UNAME_MACHINE}-unknown-linux-gnuaout" - exit 0 - ;; - armlinux) - echo "${UNAME_MACHINE}-unknown-linux-gnuaout" - exit 0 - ;; - elf32arm*) - echo "${UNAME_MACHINE}-unknown-linux-gnuoldld" - exit 0 - ;; - armelf_linux*) - echo "${UNAME_MACHINE}-unknown-linux-gnu" - exit 0 - ;; - m68klinux) - echo "${UNAME_MACHINE}-unknown-linux-gnuaout" - exit 0 - ;; - elf32ppc | elf32ppclinux) - # Determine Lib Version - cat >$dummy.c <$dummy.c < /* for printf() prototype */ +int main (int argc, char *argv[]) { +#else +int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + ;; + ppc:Linux:*:*) + # Determine Lib Version + cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; @@ -756,129 +794,127 @@ main(argc, argv) #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else - printf("unkown\n"); + printf("unknown\n"); #endif return 0; } EOF - LIBC="" - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then LIBC="libc1" ; fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 ;; + alpha:Linux:*:*) + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) UNAME_MACHINE="alpha" ;; + 1-0) UNAME_MACHINE="alphaev5" ;; + 1-1) UNAME_MACHINE="alphaev56" ;; + 1-101) UNAME_MACHINE="alphapca56" ;; + 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) UNAME_MACHINE="alphaev67" ;; + esac + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null if test "$?" = 0 ; then - ./$dummy | grep 1\.99 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi + LIBC="libc1" fi - rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i?86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_emulations=`cd /; ld --help 2>&1 \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; - shelf_linux) - echo "${UNAME_MACHINE}-unknown-linux-gnu" + elf_i?86) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - cat <$dummy.s - .data - \$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main - main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - LIBC="" - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - esac - - objdump --private-headers $dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.s $dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >$dummy.c < /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __MIPSEB__ - printf ("%s-unknown-linux-gnu\n", argv[1]); -#endif -#ifdef __MIPSEL__ - printf ("%sel-unknown-linux-gnu\n", argv[1]); -#endif - return 0; -} -EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - elif test "${UNAME_MACHINE}" = "s390"; then - echo s390-ibm-linux && exit 0 - elif test "${UNAME_MACHINE}" = "x86_64"; then - echo x86_64-unknown-linux-gnu && exit 0 - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >$dummy.c <$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ @@ -902,10 +938,10 @@ EOF return 0; } EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - fi ;; + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i?86:DYNIX/ptx:4*:*) @@ -982,7 +1018,7 @@ EOF exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1005,9 +1041,12 @@ EOF TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; @@ -1087,6 +1126,9 @@ EOF NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; @@ -1104,6 +1146,29 @@ EOF fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; + i?86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1195,11 +1260,24 @@ main () #endif #if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif #endif #if defined (alliant) && defined (i860) @@ -1210,7 +1288,7 @@ main () } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. @@ -1246,8 +1324,9 @@ fi cat >&2 < in order to provide the needed information to handle your system. -config.guess version = $version +config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` @@ -1283,7 +1362,7 @@ exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "version='" +# time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: diff --git a/contrib/binutils/config.if b/contrib/binutils/config.if new file mode 100644 index 0000000..625a407 --- /dev/null +++ b/contrib/binutils/config.if @@ -0,0 +1,93 @@ +#! /dev/null +# Don't call it directly. This shell script fragment is called to +# determine: +# +# 1. libstcxx_interface: the interface name for libstdc++. +# 2. cxx_interface: the interface name for c++. +# 3. libc_interface: the interface name for libc. +# + +# Get the top level src dir. +if [ -z "${topsrcdir}" -a -z "${top_srcdir}" ] +then + echo "Undefined top level src dir: topsrcdir and top_srcdir are empty" >&2 + exit 1 +fi + +if [ -n "${topsrcdir}" ] +then + if_topsrcdir=${topsrcdir} +else + if_topsrcdir=${top_srcdir} +fi + +if [ "${enable_libstdcxx_v3}" = "yes" ] ; then + libstdcxx_srcdir=${if_topsrcdir}/libstdc++-v3 +else + libstdcxx_srcdir=${if_topsrcdir}/libstdc++ +fi + +if [ -f ${libstdcxx_srcdir}/Makefile.in ]; then +# We check libstdc++ for libstdcxx_interface. +libstdcxx_interface=`grep "^INTERFACE" ${libstdcxx_srcdir}/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'` +else +libstdcxx_interface= +fi + +if [ -f ${if_topsrcdir}/gcc/cp/Makefile.in ]; then +# We check gcc/cp for cxx_interface. +cxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/gcc/cp/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'` +else +cxx_interface= +fi + +# The trickiest part is libc_interface. +if [ -z "${libc_interface}" ] +then + case ${target_os} in + *linux*libc1*|*linux*libc5*) + case ${target_alias} in + *alpha*|*powerpc*) + libc_interface=-libc5.9- + ;; + *) + libc_interface=-libc5- + ;; + esac + ;; + *linux*gnu*) + # We have to work harder to figure it out. + if [ ${target_alias} = ${build_alias} ] + then + dummy=if$$ + cat >$dummy.c < +main(argc, argv) + int argc; + char *argv[]; +{ + printf("%d\n", __GLIBC_MINOR__); + return 0; +} +EOF + ${CC-cc} $dummy.c -o $dummy 2>/dev/null + if [ "$?" = 0 ] + then + libc_interface=-libc6.`./$dummy`- + rm -f $dummy.c $dummy + else + # It should never happen. + echo "Cannot find the GNU C library minor version number." >&2 + rm -f $dummy.c $dummy + exit 1 + fi + else + # Cross compiling. Assume glibc 2.1. + libc_interface=-libc6.1- + fi + ;; + *) + libc_interface=- + ;; + esac +fi diff --git a/contrib/binutils/config.sub b/contrib/binutils/config.sub index 42fc991..7146a2f 100755 --- a/contrib/binutils/config.sub +++ b/contrib/binutils/config.sub @@ -1,9 +1,9 @@ #! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. -version='2000-09-11' +timestamp='2001-03-19' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -60,16 +60,30 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS Canonicalize a configuration name. Operation modes: - -h, --help print this help, then exit - -V, --version print version number, then exit" + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do - case "$1" in - --version | --vers* | -V ) + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; @@ -78,9 +92,7 @@ while test $# -gt 0 ; do - ) # Use stdin as input. break ;; -* ) - exec >&2 - echo "$me: invalid option $1" - echo "$help" + echo "$me: invalid option $1$help" exit 1 ;; *local*) @@ -105,7 +117,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu*) + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -203,22 +215,25 @@ esac case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \ + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ + | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ - | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ | we32k | ns16k | clipper | i370 | sh | sh[34] \ | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ + | 1750a | dsp16xx | pdp10 | pdp11 \ + | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | miprs64vr5000el | mcore \ + | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ - | thumb | d10v | d30v | fr30 | avr) + | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ + | pj | pjl | h8500) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -226,7 +241,7 @@ case $basic_machine in basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65) ;; # We use `pc' rather than `unknown' @@ -243,26 +258,28 @@ case $basic_machine in # Recognize the basic CPU types with company name. # FIXME: clean up the formatting here. vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ + | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ - | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ - | f301-* | armv*-* | s390-* | sv1-* | t3e-* \ + | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ + | [cjt]90-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ - | bs2000-* | tic54x-* | c54x-* | x86_64-*) + | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -353,8 +370,8 @@ case $basic_machine in basic_machine=cray2-cray os=-unicos ;; - [ctj]90-cray) - basic_machine=c90-cray + [cjt]90) + basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) @@ -410,6 +427,10 @@ case $basic_machine in basic_machine=tron-gmicro os=-sysv ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -509,18 +530,6 @@ case $basic_machine in basic_machine=i386-unknown os=-vsta ;; - i386-go32 | go32) - basic_machine=i386-unknown - os=-go32 - ;; - i386-mingw32 | mingw32) - basic_machine=i386-unknown - os=-mingw32 - ;; - i[34567]86-pw32 | pw32) - basic_machine=i586-unknown - os=-pw32 - ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -546,6 +555,10 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; miniframe) basic_machine=m68000-convergent ;; @@ -576,7 +589,7 @@ case $basic_machine in os=-coff ;; msdos) - basic_machine=i386-unknown + basic_machine=i386-pc os=-msdos ;; mvs) @@ -640,6 +653,10 @@ case $basic_machine in basic_machine=i960-intel os=-mon960 ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; np1) basic_machine=np1-gould ;; @@ -675,28 +692,28 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | k6 | nexen) + pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) - basic_machine=i786-pc + basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexen-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; - power) basic_machine=rs6000-ibm + power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; @@ -711,6 +728,10 @@ case $basic_machine in ps2) basic_machine=i386-ibm ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -901,6 +922,10 @@ case $basic_machine in vax) basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec ;; @@ -908,7 +933,7 @@ case $basic_machine in basic_machine=we32k-att ;; sh3 | sh4) - base_machine=sh-unknown + basic_machine=sh-unknown ;; sparc | sparcv9) basic_machine=sparc-sun @@ -991,7 +1016,8 @@ case $os in | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32*) + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1089,7 +1115,7 @@ case $os in -xenix) os=-xenix ;; - -*mint | -*MiNT) + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) @@ -1123,6 +1149,9 @@ case $basic_machine in arm*-semi) os=-aout ;; + pdp10-*) + os=-tops20 + ;; pdp11-*) os=-none ;; @@ -1231,7 +1260,7 @@ case $basic_machine in *-masscomp) os=-rtu ;; - f301-fujitsu) + f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) @@ -1309,7 +1338,7 @@ case $basic_machine in -mpw* | -macos*) vendor=apple ;; - -*mint | -*MiNT) + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; esac @@ -1322,7 +1351,7 @@ exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "version='" +# time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: diff --git a/contrib/binutils/config/ChangeLog b/contrib/binutils/config/ChangeLog index b5746b1..920ab32 100644 --- a/contrib/binutils/config/ChangeLog +++ b/contrib/binutils/config/ChangeLog @@ -1,3 +1,16 @@ +Fri Jul 14 18:13:23 2000 Mark P Mitchell + + * mh-irix6 (CC): Don't set it. + +2000-06-21 Branko Cibej + + * mh-sparcpic: Use single instead of double quotes. + * mt-sparcpic: Likewise. + +2000-06-19 Syd Polk + + * acinclude.m4: Updated for Incr Tcl 3.0. + 2000-02-23 Linas Vepstas * mh-i370pic: New file. @@ -12,6 +25,10 @@ * mh-aix43: Delete, move to mt-aix43. * mt-aix43: New file. +Tue Sep 7 23:31:01 1999 Linas Vepstas + + * mh-openedition: New file. + 1999-04-07 Michael Meissner * mt-d30v: New file, pass -g -Os -Wa,-C as default options. diff --git a/contrib/binutils/config/acinclude.m4 b/contrib/binutils/config/acinclude.m4 index f799ced..6187b5a 100755 --- a/contrib/binutils/config/acinclude.m4 +++ b/contrib/binutils/config/acinclude.m4 @@ -1045,6 +1045,7 @@ dnl AC_SUBST(TCL_COMPAT_OBJS) AC_SUBST(TCL_RANLIB) AC_SUBST(TCL_BUILD_LIB_SPEC) AC_SUBST(TCL_LIB_SPEC) + AC_SUBST(TCL_BIN_DIR) dnl AC_SUBST(TCL_LIB_VERSIONS_OK) dnl not used, don't export to save symbols diff --git a/contrib/binutils/config/mh-openedition b/contrib/binutils/config/mh-openedition new file mode 100644 index 0000000..e99ef15 --- /dev/null +++ b/contrib/binutils/config/mh-openedition @@ -0,0 +1,2 @@ +RANLIB = true +CC = c89 diff --git a/contrib/binutils/config/mh-sparcpic b/contrib/binutils/config/mh-sparcpic index f6dbc22..e218bb4 100644 --- a/contrib/binutils/config/mh-sparcpic +++ b/contrib/binutils/config/mh-sparcpic @@ -1 +1 @@ -PICFLAG=`case "${LIBCFLAGS} ${LIBCXXFLAGS}" in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac` +PICFLAG=`case '${LIBCFLAGS} ${LIBCXXFLAGS}' in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac` diff --git a/contrib/binutils/config/mt-sparcpic b/contrib/binutils/config/mt-sparcpic index fd0ec27..a62b38b 100644 --- a/contrib/binutils/config/mt-sparcpic +++ b/contrib/binutils/config/mt-sparcpic @@ -1 +1 @@ -PICFLAG_FOR_TARGET=`case "${LIBCFLAGS} ${LIBCXXFLAGS}" in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac` +PICFLAG_FOR_TARGET=`case '${LIBCFLAGS} ${LIBCXXFLAGS}' in *-fpic* ) echo -fpic ;; * ) echo -fPIC ;; esac` diff --git a/contrib/binutils/configure b/contrib/binutils/configure index 3e7d865..57e22d8 100755 --- a/contrib/binutils/configure +++ b/contrib/binutils/configure @@ -86,7 +86,7 @@ subdirs= target_alias=NOTARGET target_makefile_frag= undefs=NOUNDEFS -version="$Revision: 1.5 $" +version="$Revision: 1.11 $" x11=default bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' @@ -237,7 +237,7 @@ do esac enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` - eval "$enableopt='$optarg'" + eval "$enableopt=\$optarg" enableoptions="$enableoptions '$option'" ;; --exec-prefix* | --ex*) @@ -370,7 +370,7 @@ do esac withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` - eval $withopt="$optarg" + eval $withopt="\$optarg" withoptions="$withoptions $option" ;; --without-*) @@ -518,7 +518,8 @@ fi configsub=`echo ${progname} | sed 's/configure$/config.sub/'` moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'` -topsrcdir=`cd \`dirname ${progname}\`; pwd` +## the sed command below emulates the dirname command +topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; pwd` # this is a hack. sun4 must always be a valid host alias or this will fail. @@ -576,7 +577,6 @@ case "${srcdir}" in fi esac - # default exec_prefix case "${exec_prefixoption}" in "") exec_prefix="\$(prefix)" ;; @@ -902,9 +902,6 @@ do test -n "$DEFAULT_LEX" && break done -# BINUTILS LOCAL: This is included in the default CFLAGS when using gcc. -warn_cflags="-W -Wall" - if [ "${build}" != "${host}" ]; then # If we are doing a Canadian Cross, in which the host and build systems # are not the same, we set reasonable default values for the tools. @@ -915,9 +912,10 @@ if [ "${build}" != "${host}" ]; then tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM" tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET" tools="${tools} WINDRES WINDRES_FOR_TARGET YACC" + tools="${tools} OBJCOPY OBJDUMP" for var in ${tools}; do - if [ -z "`eval 'echo $'"${var}"`" ] && [ -r Makefile ]; then + if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then sed -n -e ':loop /\\$/ N s/\\\n//g @@ -926,7 +924,7 @@ t loop < Makefile > Makefile.v t=`tail -1 Makefile.v` if [ -n "${t}" ]; then - eval "${var}='${t}'" + eval "${var}=\${t}" fi rm -f Makefile.v fi @@ -938,7 +936,7 @@ t loop AS_FOR_TARGET=${AS_FOR_TARGET-${target_alias}-as} BISON=${BISON-bison} CC=${CC-${host_alias}-gcc} - CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"} + CFLAGS=${CFLAGS-"-g -O2"} CXX=${CXX-${host_alias}-c++} CXXFLAGS=${CXXFLAGS-"-g -O2"} CC_FOR_BUILD=${CC_FOR_BUILD-gcc} @@ -958,6 +956,8 @@ t loop RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib} WINDRES=${WINDRES-${host_alias}-windres} WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres} + OBJCOPY=${OBJCOPY-${host_alias}-objcopy} + OBJDUMP=${OBJDUMP-${host_alias}-objdump} if [ -z "${YACC}" ]; then IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" @@ -1008,6 +1008,8 @@ t loop export NM export RANLIB export WINDRES + export OBJCOPY + export OBJDUMP else # If CC is still not set, try to get gcc. if [ -z "${CC}" ]; then @@ -1018,10 +1020,10 @@ else CC="gcc" echo 'void f(){}' > conftest.c if test -z "`${CC} -g -c conftest.c 2>&1`"; then - CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"} + CFLAGS=${CFLAGS-"-g -O2"} CXXFLAGS=${CXXFLAGS-"-g -O2"} else - CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"} + CFLAGS=${CFLAGS-"-O2"} CXXFLAGS=${CXXFLAGS-"-O2"} fi rm -f conftest* @@ -1038,10 +1040,10 @@ else *gcc) echo 'void f(){}' > conftest.c if test -z "`${CC} -g -c conftest.c 2>&1`"; then - CFLAGS=${CFLAGS-"-g -O2 ${warn_cflags}"} + CFLAGS=${CFLAGS-"-g -O2"} CXXFLAGS=${CXXFLAGS-"-g -O2"} else - CFLAGS=${CFLAGS-"-O2 ${warn_cflags}"} + CFLAGS=${CFLAGS-"-O2"} CXXFLAGS=${CXXFLAGS-"-O2"} fi rm -f conftest* @@ -1411,6 +1413,7 @@ EOF -e "s:^program_suffix[ ]*=.*$:program_suffix = ${program_suffix}:" \ -e "s:^program_transform_name[ ]*=.*$:program_transform_name = ${program_transform_name}:" \ -e "s|^tooldir[ ]*=.*$|tooldir = ${tooldir}|" \ + -e "s|^build_tooldir[ ]*=.*$|build_tooldir = ${tooldir}|" \ -e "s:^DEFAULT_YACC[ ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \ -e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \ -e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \ @@ -1423,7 +1426,7 @@ EOF # tools. if [ "${build}" != "${host}" ]; then for var in ${tools}; do - val=`eval 'echo $'"${var}"` + eval val=\$${var} sed -e "/^${var}[ ]*=/{ :loop1 /\\\\$/ N diff --git a/contrib/binutils/configure.in b/contrib/binutils/configure.in index 8171c53..221ff45 100644 --- a/contrib/binutils/configure.in +++ b/contrib/binutils/configure.in @@ -47,10 +47,20 @@ if [ "${enable_gdbgui}" = "yes" ] ; then host_libs="${host_libs} libgui" fi +# Set up configure/Makefile variables if libstdc++-v3 is to be built. +if [ "${enable_libstdcxx_v3}" = "yes" ] && test -d $srcdir/libstdc++-v3; then + libstdcxx_version="target-libstdc++-v3" + # Don't use libstdc++-v3's flags to configure/build itself. + libstdcxx_flags='`case $$dir in libstdc++-v3) ;; *) cat $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/libstdc++.INC 2>/dev/null || : ;; esac` -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src -L$$r/$(TARGET_SUBDIR)/libstd++-v3/src/.libs' +else + libstdcxx_version="target-libio target-libstdc++" + libstdcxx_flags='-isystem $$s/libstdc++ -isystem $$s/libstdc++/std -isystem $$s/libstdc++/stl -isystem $$s/libio/ -isystem $$s/libio/stdio -L$$r/$(TARGET_SUBDIR)/libstdc++' +fi + # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to # know that we are building the simulator. -host_tools="byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip" +host_tools="byacc flex bison binutils ld gas gcc cgen sid sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip" # these libraries are built for the target environment, and are built after # the host libraries and the host tools (which may be a cross compiler) @@ -58,10 +68,15 @@ host_tools="byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr target_libs="target-libiberty \ target-libgloss \ target-newlib \ - target-libio \ - target-librx \ - target-libstdc++ \ - target-libg++" + ${libstdcxx_version} \ + target-libf2c \ + target-libchill \ + target-libffi \ + target-libjava \ + target-zlib \ + target-boehm-gc \ + target-qthreads \ + target-libobjc" # these tools are built using the target libs, and are intended to run only # in the target environment @@ -154,6 +169,9 @@ case "${host}" in mips*-*-sysv*) host_makefile_frag="${host_makefile_frag} config/mh-riscos" ;; + i370-ibm-opened*) + host_makefile_frag="${host_makefile_frag} config/mh-openedition" + ;; i[3456]86-*-sysv5*) host_makefile_frag="${host_makefile_frag} config/mh-sysv5" ;; @@ -291,6 +309,9 @@ if [ x${shared} = xyes ]; then i370-*-*) host_makefile_frag="${host_makefile_frag} config/mh-i370pic" ;; + ia64-*-*) + host_makefile_frag="${host_makefile_frag} config/mh-ia64pic" + ;; sparc64-*-*) host_makefile_frag="${host_makefile_frag} config/mh-sparcpic" ;; @@ -524,7 +545,7 @@ case "${host}" in noconfigdirs="tcl expect dejagnu make texinfo bison patch flex byacc send-pr gprof uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext" ;; i[3456]86-*-go32* | i[3456]86-*-msdosdjgpp*) - noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext" + noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv gettext libffi" ;; i[3456]86-*-mingw32*) # noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl apache inet itcl tix db snavigator gnuserv" @@ -542,18 +563,21 @@ case "${host}" in ppc*-*-pe) noconfigdirs="patch diff make tk tcl expect dejagnu cvssrc autoconf automake texinfo bison send-pr gprof rcs guile perl apache inet itcl tix db snavigator gnuserv" ;; + powerpc-*-beos*) + noconfigdirs="$noconfigdirs tk itcl tix libgui gdb dejagnu readline" + ;; esac case "${target}" in *-*-netware) - noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-librx target-newlib target-libiberty target-libgloss" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss target-libffi" ;; *-*-rtems*) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; *-*-vxworks*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss" + noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi" ;; alpha*-dec-osf*) # ld works, but does not support shared libraries. emacs doesn't @@ -562,13 +586,7 @@ case "${target}" in noconfigdirs="$noconfigdirs gas ld emacs fileutils target-newlib target-libgloss" ;; alpha*-*-*vms*) - noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss" - ;; - alpha*-*-linux*) - # newlib is not 64 bit ready - noconfigdirs="$noconfigdirs target-newlib target-libgloss" - # linux has rx in libc - skipdirs="$skipdirs target-librx" + noconfigdirs="$noconfigdirs gdb ld target-newlib target-libgloss target-libffi" ;; alpha*-*-*) # newlib is not 64 bit ready @@ -577,20 +595,20 @@ case "${target}" in sh*-*-pe|mips*-*-pe|*arm-wince-pe) noconfigdirs="$noconfigdirs target-libjava target-libffi target-zlib" noconfigdirs="$noconfigdirs target-boehm-gc target-qthreads target-examples" - noconfigdirs="$noconfigdirs target-librx target-libiberty texinfo send-pr" + noconfigdirs="$noconfigdirs target-libiberty texinfo send-pr" noconfigdirs="$noconfigdirs tcl tix tk itcl libgui sim" noconfigdirs="$noconfigdirs expect dejagnu" # the C++ libraries don't build on top of CE's C libraries - noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio" + noconfigdirs="$noconfigdirs ${libstdcxx_version}" skipdirs="$skipdirs target-newlib" case "${host}" in *-*-cygwin*) ;; # keep gdb and readline - *) noconfigdirs="$noconfigdirs gdb readline target-libio target-libstdc++ target-libg++" + *) noconfigdirs="$noconfigdirs gdb readline ${libstdcxx_version}" ;; esac ;; arc-*-*) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; arm-*-pe*) noconfigdirs="$noconfigdirs target-libgloss" @@ -608,40 +626,55 @@ case "${target}" in fi ;; arm-*-oabi*) - noconfigdirs="$noconfigdirs target-libgloss" - ;; - c4x-*-*) - noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; thumb-*-coff) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; thumb-*-elf) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; thumb-*-oabi) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; strongarm-*-elf) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" if [ x${is_cross_compiler} != xno ] ; then target_configdirs="${target_configdirs} target-bsp target-cygmon" fi ;; strongarm-*-coff) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" + if [ x${is_cross_compiler} != xno ] ; then + target_configdirs="${target_configdirs} target-bsp target-cygmon" + fi + ;; + xscale-*-elf) + noconfigdirs="$noconfigdirs target-libgloss target-libffi" + if [ x${is_cross_compiler} != xno ] ; then + target_configdirs="${target_configdirs} target-bsp target-cygmon" + fi + ;; + xscale-*-coff) + noconfigdirs="$noconfigdirs target-libgloss target-libffi" if [ x${is_cross_compiler} != xno ] ; then target_configdirs="${target_configdirs} target-bsp target-cygmon" fi ;; thumb-*-pe) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; arm-*-riscix*) - noconfigdirs="$noconfigdirs ld target-libgloss" + noconfigdirs="$noconfigdirs ld target-libgloss target-libffi" + ;; + c4x-*-*) + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi" + ;; + c54x*-*-* | tic54x-*-*) + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi gcc gdb newlib" ;; d10v-*-*) - noconfigdirs="$noconfigdirs target-librx target-libg++ target-libstdc++ target-libio" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi" ;; d30v-*-*) ;; @@ -652,12 +685,13 @@ case "${target}" in ;; h8300*-*-* | \ h8500-*-*) - noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi" ;; hppa*-*-*elf* | \ hppa*-*-linux-gnu* | \ - hppa*-*-lites*) - # Do configure ld/binutils/gas for the above cases. + hppa*-*-lites* | \ + hppa*64*-*-*) + # Do configure ld/binutils/gas for this case. ;; hppa*-*-*) # HP's C compiler doesn't handle Emacs correctly (but on BSD and Mach @@ -669,6 +703,10 @@ case "${target}" in esac noconfigdirs="$noconfigdirs ld shellutils" ;; + ia64*-*-elf*) + # No gdb support yet. + noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb" + ;; i[3456]86-*-coff | i[3456]86-*-elf) if [ x${is_cross_compiler} != xno ] ; then target_configdirs="${target_configdirs} target-libstub target-cygmon" @@ -676,11 +714,11 @@ case "${target}" in ;; i[3456]86-*-go32* | i[3456]-*-msdosdjgpp*) # but don't build gdb - noconfigdirs="$noconfigdirs gdb target-libg++ target-libstdc++ target-libio target-librx" + noconfigdirs="$noconfigdirs gdb ${libstdcxx_version} target-libffi" ;; i[3456]86-*-mingw32*) target_configdirs="$target_configdirs target-mingw" - noconfigdirs="$noconfigdirs expect target-libgloss" + noconfigdirs="$noconfigdirs expect target-libgloss target-libffi" # Can't build gdb for mingw32 if not native. case "${host}" in @@ -691,7 +729,7 @@ case "${target}" in ;; *-*-cygwin*) target_configdirs="$target_configdirs target-libtermcap target-winsup" - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-gperf target-libgloss target-libffi" # always build newlib. skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` @@ -703,15 +741,15 @@ case "${target}" in esac ;; i[3456]86-*-pe) - noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx target-libgloss" + noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi" ;; i[3456]86-*-sco3.2v5*) # The linker does not yet know about weak symbols in COFF, # and is not configured to handle mixed ELF and COFF. - noconfigdirs="$noconfigdirs ld target-libgloss" + noconfigdirs="$noconfigdirs ld target-libgloss target-libffi" ;; i[3456]86-*-sco*) - noconfigdirs="$noconfigdirs gprof target-libgloss" + noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi" ;; i[3456]86-*-solaris2*) noconfigdirs="$noconfigdirs target-libgloss" @@ -723,12 +761,15 @@ case "${target}" in *) ;; esac # but that's okay since emacs doesn't work anyway - noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss" + noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss target-libffi" ;; i[3456]86-*-beos*) noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" ;; - m68k-*-elf*) + m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*) + noconfigdirs="$noconfigdirs target-libiberty target-librx target-libg++ target-libstdc++ target-libio target-libf2c target-libchill target-zlib target-libobjc" + ;; + m68k-*-elf*) if [ x${is_cross_compiler} != xno ] ; then target_configdirs="${target_configdirs} target-bsp target-cygmon" fi @@ -739,13 +780,13 @@ case "${target}" in fi ;; mn10200-*-*) - noconfigdirs="$noconfigdirs" + noconfigdirs="$noconfigdirs target-libffi" if [ x${is_cross_compiler} != xno ] ; then target_configdirs="${target_configdirs} target-libstub target-cygmon" fi ;; mn10300-*-*) - noconfigdirs="$noconfigdirs" + noconfigdirs="$noconfigdirs target-libffi" if [ x${is_cross_compiler} != xno ] ; then target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" fi @@ -756,18 +797,21 @@ case "${target}" in # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least) # The symptom is that GDBtk 4.18 fails at startup with a segfault # if linked by GNU ld, but not if linked by the native ld. - noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss ld" + noconfigdirs="$noconfigdirs gprof cvssrc target-libgloss target-libffi ld" use_gnu_ld=no ;; powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe) target_configdirs="$target_configdirs target-winsup" - noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv" + noconfigdirs="$noconfigdirs gdb tcl tk make expect target-libgloss itcl tix db snavigator gnuserv target-libffi" # always build newlib. skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;; # This is temporary until we can link against shared libraries powerpcle-*-solaris*) - noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv" + noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl tix db snavigator gnuserv target-libffi" + ;; + powerpc-*-beos*) + noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss" ;; powerpc-*-eabi) if [ x${is_cross_compiler} != xno ] ; then @@ -776,22 +820,21 @@ case "${target}" in ;; rs6000-*-lynxos*) # The CVS server code doesn't work on the RS/6000 - # Newlib makes problems for libg++ in crosses. - noconfigdirs="$noconfigdirs target-newlib gprof cvssrc" + noconfigdirs="$noconfigdirs target-newlib gprof cvssrc target-libffi" ;; rs6000-*-aix*) # The configure and build of ld are currently disabled because # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least) # The symptom is that GDBtk 4.18 fails at startup with a segfault # if linked by GNU ld, but not if linked by the native ld. - noconfigdirs="$noconfigdirs gprof ld" + noconfigdirs="$noconfigdirs gprof target-libffi ld" use_gnu_ld=no ;; rs6000-*-*) - noconfigdirs="$noconfigdirs gprof" + noconfigdirs="$noconfigdirs gprof target-libffi" ;; m68k-apollo-*) - noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss" + noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss target-libffi" ;; mips*-*-irix5*) # The GNU linker does not support shared libraries. @@ -803,26 +846,21 @@ case "${target}" in # emacs is emacs 18, which does not work on Irix 5 (emacs19 does work) noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss" ;; - mips*-*-linux*) - noconfigdirs="$noconfigdirs gprof" - # linux has rx in libc - skipdirs="$skipdirs target-librx" - ;; mips*-dec-bsd*) - noconfigdirs="$noconfigdirs gprof target-libgloss" + noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi" ;; mips*-*-bsd*) - noconfigdirs="$noconfigdirs gprof target-libgloss" + noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi" ;; mipstx39-*-*) - noconfigdirs="$noconfigdirs gprof" # same as generic mips + noconfigdirs="$noconfigdirs gprof target-libffi" # same as generic mips target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" ;; mips*-*-*) - noconfigdirs="$noconfigdirs gprof" + noconfigdirs="$noconfigdirs gprof target-libffi" ;; romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss" + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss target-libffi" ;; sh-*-*) case "${host}" in @@ -831,7 +869,7 @@ case "${target}" in i[3456]86-*-msdosdjgpp*) ;; # don't add gprof back in *) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;; esac - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; sparc-*-elf*) if [ x${is_cross_compiler} != xno ] ; then @@ -842,11 +880,13 @@ case "${target}" in if [ x${is_cross_compiler} != xno ] ; then target_configdirs="${target_configdirs} target-libstub target-cygmon" fi + noconfigdirs="target-libffi" ;; sparclite-*-*) if [ x${is_cross_compiler} != xno ] ; then target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon" fi + noconfigdirs="target-libffi" ;; sparc-*-sunos4*) if [ x${is_cross_compiler} != xno ] ; then @@ -856,35 +896,31 @@ case "${target}" in fi ;; v810-*-*) - noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libio target-libg++ target-libstdc++ opcodes target-libgloss" + noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss target-libffi" ;; v850-*-*) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; v850e-*-*) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; v850ea-*-*) - noconfigdirs="$noconfigdirs target-libgloss" + noconfigdirs="$noconfigdirs target-libgloss target-libffi" ;; vax-*-vms) - noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss" + noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes target-libgloss target-libffi" ;; vax-*-*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss" - ;; - *-*-linux*) - # linux has rx in libc - skipdirs="$skipdirs target-librx" + noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi" ;; *-*-lynxos*) - # Newlib makes problems for libg++ in crosses. - noconfigdirs="$noconfigdirs target-newlib target-libgloss" + noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libffi" ;; *-*-macos* | \ *-*-mpw*) # Macs want a resource compiler. configdirs="$configdirs grez" + noconfigdirs="target-libffi" ;; esac @@ -907,6 +943,55 @@ if [ x$with_gnu_as = xno ]; then noconfigdirs="$noconfigdirs gas" fi +# Figure out what language subdirectories are present. +# Look if the user specified --enable-languages="..."; if not, use +# the environment variable $LANGUAGES if defined. $LANGUAGES might +# go away some day. +if test x"${enable_languages+set}" != xset; then + if test x"${LANGUAGES+set}" = xset; then + enable_languages="`echo ${LANGUAGES} | tr ' ' ','`" + else + enable_languages=all + fi +else + if test x"${enable_languages}" = x; then + echo configure.in: --enable-languages needs at least one argument 1>&2 + exit 1 + fi +fi +subdirs= +for lang in ${srcdir}/gcc/*/config-lang.in .. +do + case $lang in + ..) ;; + # The odd quoting in the next line works around + # an apparent bug in bash 1.12 on linux. + ${srcdir}/gcc/[*]/config-lang.in) ;; + *) + lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang` + this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang` + build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang` + if test "x$lang_alias" = x + then + echo "$lang doesn't set \$language." 1>&2 + exit 1 + fi + case ${build_by_default},${enable_languages}, in + *,$lang_alias,*) add_this_lang=yes ;; + no,*) add_this_lang=no ;; + *,all,*) add_this_lang=yes ;; + *) add_this_lang=no ;; + esac + if test x"${add_this_lang}" = xyes; then + eval target_libs='"$target_libs "'\"$this_lang_libs\" + else + eval noconfigdirs='"$noconfigdirs "'\"$this_lang_libs\" + fi + ;; + esac +done + + # Remove the entries in $skipdirs and $noconfigdirs from $configdirs and # $target_configdirs. # If we have the source for $noconfigdirs entries, add them to $notsupp. @@ -1047,6 +1132,12 @@ if [ x${shared} = xyes ]; then i[3456]86-*) target_makefile_frag="${target_makefile_frag} config/mt-x86pic" ;; + ia64-*) + target_makefile_frag="${target_makefile_frag} config/mt-ia64pic" + ;; + powerpc*-*-aix*) + # We don't want -fPIC on AIX. + ;; powerpc*-*) target_makefile_frag="${target_makefile_frag} config/mt-ppcpic" ;; @@ -1165,7 +1256,7 @@ fi # provide a proper gxx_include_dir. # Note, if you change the default, make sure to fix both here and in -# the gcc, libio, libstdc++ and libg++ subdirectories. +# the gcc, libio, and libstdc++ subdirectories. # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. gxx_include_dir= if test -n "${with_gxx_include_dir}"; then @@ -1192,9 +1283,113 @@ else gxx_include_dir=${gxx_include_dir} fi -targargs="--host=${target_alias} --build=${build_alias} ${targargs}" +FLAGS_FOR_TARGET= +case " $skipdirs " in +*" target-newlib "*) ;; +*) + case "$target" in + *-cygwin*) + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/include -isystem $$s/winsup/cygwin/include -isystem $$s/winsup/w32api/include -isystem $$s/newlib/libc/sys/cygwin -isystem $$s/newlib/libc/sys/cygwin32' ;; + esac + + # If we're not building GCC, don't discard standard headers. + if test -d ${topsrcdir}/gcc; then + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -nostdinc' + + if test "${build}" != "${host}"; then + # On Canadian crosses, CC_FOR_TARGET will have already been set + # by `configure', so we won't have an opportunity to add -Bgcc/ + # to it. This is right: we don't want to search that directory + # for binaries, but we want the header files in there, so add + # them explicitly. + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -isystem $$r/gcc/include' + + # Someone might think of using the pre-installed headers on + # Canadian crosses, in case the installed compiler is not fully + # compatible with the compiler being built. In this case, it + # would be better to flag an error than risking having + # incompatible object files being constructed. We can't + # guarantee that an error will be flagged, but let's hope the + # compiler will do it, when presented with incompatible header + # files. + fi + fi + + # If we're building newlib, use its generic headers last, but search + # for any libc-related directories first (so make it the last -B + # switch). + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include' + ;; +esac + +# On Canadian crosses, we'll be searching the right directories for +# the previously-installed cross compiler, so don't bother to add +# flags for directories within the install tree of the compiler +# being built; programs in there won't even run. +if test "${build}" = "${host}" && test -d ${topsrcdir}/gcc; then + # Search for pre-installed headers if nothing else fits. + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include' +fi + +if test "x${use_gnu_ld}" = x && test "x${with_gnu_ld}" != xno && + echo " ${configdirs} " | grep " ld " > /dev/null && + test -d ${srcdir}/ld; then + # Arrange for us to find uninstalled linker scripts. + FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/ld' +fi + +if test "x${CC_FOR_TARGET+set}" = xset; then + : +elif test -d ${topsrcdir}/gcc; then + CC_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/' +elif test "$host" = "$target"; then + CC_FOR_TARGET='$(CC)' +else + CC_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}` +fi +# On Canadian crosses, configure reads CC_FOR_TARGET from Makefile, +# if Makefile exists. Prevent $(FLAGS_FOR_TARGET) from being duplicated. +case $CC_FOR_TARGET in +*' $(FLAGS_FOR_TARGET)') ;; +*) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; +esac + +if test "x${CHILL_FOR_TARGET+set}" = xset; then + : +elif test -d ${topsrcdir}/gcc; then + CHILL_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/' +elif test "$host" = "$target"; then + CHILL_FOR_TARGET='$(CC)' +else + CHILL_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}` +fi +case $CHILL_FOR_TARGET in +*' $(FLAGS_FOR_TARGET)') ;; +*) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; +esac + +if test "x${CXX_FOR_TARGET+set}" = xset; then + : +elif test -d ${topsrcdir}/gcc; then + CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags +elif test "$host" = "$target"; then + CXX_FOR_TARGET='$(CXX)' +else + CXX_FOR_TARGET=`echo c++ | sed -e 's/x/x/' ${program_transform_name}` +fi +case $CXX_FOR_TARGET in +*' $(FLAGS_FOR_TARGET)') ;; +*) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; +esac +qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'` + +targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}" sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \ -e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \ + -e "s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \ + -e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \ + -e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \ + -e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \ -e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \ -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \ Makefile > Makefile.tem diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog index ce918a5..7f6a629 100644 --- a/contrib/binutils/gas/ChangeLog +++ b/contrib/binutils/gas/ChangeLog @@ -1,5849 +1,4565 @@ -2000-11-02 Theo Honohan +2001-04-02 Philip Blundell - * config/tc-arm.c (do_msr): Improve error message. + From 2001-03-17 Richard Henderson + * dwarf2dbg.c (user_filenum, user_filenum_allocated): Remove. + (dwarf2_directive_loc): Don't use them. + (dwarf2_directive_file): Reject duplicate file definitions. + (get_filenum): Zero allocated memory. + (out_file_list): Complain about missing file definitions. -2000-11-01 Philip Blundell +2001-03-31 Alan Modra - From 2000-08-01 Nick Clifton - * config/tc-arm.c (do_mrs): Fix skip of 'cpsr_all' flag. + * listing.c (listing_listing): Enable listing on EDICT_NOLIST_NEXT + for one line if not already enabled. + * cond.c (s_elseif): Correct conditional assembly listing. + (s_else): Likewise. -2000-10-16 Philip Blundell + * cond.c (s_endif): Correct handling of "if .. elseif .." trees. + Don't abort on NULL current_cframe. - * configure.in: Set version number to 2.10.1. - * configure: Regenerate. +2001-03-30 Richard Henderson -2000-10-14 Philip Blundell + * write.c (relax_seg, size_seg): Split from relax_and_size_seg. + (write_object_file): Relax code then data, then size sections. - From 2000-06-17 Mark Elbrecht + * config/tc-i386.c (md_convert_frag): Don't die on local symbols + that have been finalized. - * config/obj-coff.c (obj_coff_weak): Typo fix: Change BFD_ASSEMLER - to BFD_ASSEMBLER. +2001-03-28 Alan Modra -2000-09-08 Philip Blundell + * config/tc-hppa.c (DEFAULT_LEVEL): Define. + (md_begin): Use it when setting default architecture. - * config/tc-arm.c (md_apply_fix3): Correct handling of ADRL when - offset is negative. +2001-03-27 Hans-Peter Nilsson -2000-08-30 Matthew Jacob + * configure.in (cris-*-*): Change default emulation to criself. + (cris-*-*aout*): New rule. + * configure: Regenerate. - * config/tc-alpha.c (md_undefined_symbol): Properly understand that - $at is the integer register $r28, vs. both $r28 and the floating - point register $f28. +2001-03-19 Alan Modra -2000-04-14 Matthew Green - - * configure.in: Add NetBSD/sparc ELF and NetBSD/sparc64 support. - * configure: Regenerate. + * config/tc-i386.c (md_assemble ): Correct + used register name. -2000-06-09 Nick Clifton +2001-03-18 Stephane Carrez - * config/tc-arm.c (cons_fix_new_arm): Assign correct reloc value - for size 1 fixes. + * config/tc-m68hc11.c (md_pseudo_table): Recognize xrefb to comply + with 'Motorola specification for assembly language input standard'. -2000-06-01 Scott Bambrough +2001-03-18 Dave Brolley - * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly. + * config/tc-m32r.c (expand_debug_syms): Call frag_align_code rather + than m32r_do_align. -2000-05-22 David O'Brien +2001-03-16 Philip Blundell - * configure.in: Recognize alpha-*-freebsd*. * configure: Regenerate. -2000-05-26 Scott Bambrough +2001-03-15 David Mosberger - Port of patch to mainline by Nick Clifton : - * config/tc-arm.c (struct asm_psr): Add boolean field - distinguishing between CSPR and SPSR. Rename 'number' field - to 'field'. - (psrs): Rearrange contents to match new asm_psr structure. - (arm_psr_parse): Move next to psr_required_here. Make it - return an asm_psr structure. - (psr_required_here): Use asm_psr structure returned by - arm_psr_parse. - (do_msr): Reorganise to allow psr_required_here to be called - only once. - (md_undefined_name): Mark 'name' parameter as unused, since - the COFF target does not use it. - - Port of patch to mainline by Nick Clifton : - * testsuite/gas/arm/arch4t.s: Add tests of new fields - to msr instruction. + * config/tc-ia64.c (md): New member keep_pending_output. + (ia64_flush_pending_output): Flush only if md.keep_pending_output + is not set. + (dot_xdata): Turn on md.keep_pending_output for the duration of + this function. + (dot_xfloat_cons): Ditto. + (dot_xstringer): Ditto. + (dot_xdata_ua): Ditto. + (dot_xfloat_cons_ua): Ditto. - * NEWS: Mention change in behaviour when assembling msr - instruction. +2001-03-15 Jim Wilson -2000-04-24 Nick Clifton + * config/tc-ia64.c (ia64_unrecognized_line, case '['): Add local + label support. - * doc/c-arm.texi (ARM Directives): Document behaviour of .align 0. - * doc/as.texinfo (Align): Include arm and strongarm in list of - targets that have the second form of the behaviour of the .align - directive. +2001-03-11 Philip Blundell -2000-05-29 Philip Blundell + * configure.in: Set version to 2.11. - * doc/as.texinfo: Update copyright dates. - (Local Labels): Delete misplaced mention of ARM. - * NEWS: Mention ARM ELF support. +2001-02-28 Andreas Jaeger , Bo Thorsen -Tue May 23 00:57:05 2000 Hans-Peter Nilsson + * config/tc-i386.c (tc_gen_reloc): Remove ugly hack which is not needed + anymore since we use bfd_elf_generic_reloc now. + (md_apply_fix3): Only apply hack for partial_inplace if not using RELA. - * configure.in (i386-*-freebsd a.out entry): Quote properly. - * configure: Regenerate. +2001-02-21 David Mosberger -2000-05-23 Philip Blundell + * config/tc-ia64.c (enum operand_match_result): New type. + (operand_match): Change return type to operand_match_result. + Fix all returns appropriately, adding support for returning the + out-of-range result. + (parse_operands): New locals result, error_pos, out_of_range_pos, + curr_out_of_range_pos. Rewrite operand matching loop to give better + error messages. - * configure.in: Set version to 2.10. - * configure: Regenerate. +2001-02-21 David Mosberger -2000-05-23 Alan Modra + * config/tc-ia64.c (struct unwind): Add member "prologue_count". + (dot_proc): Clear unwind.prologue_count to zero. + (dot_prologue): Increment unwind.prologue_count. + (dot_restore): If second operand is omitted, use + unwind.prologue_count -1 for "ecount" (# of additional regions to + pop). Decrement unwind.prologue_count by number of regions + popped. - * config/tc-i386.c (md_assemble): Pass jump reloc in fr_var... - (md_estimate_size_before_relax): so we can use it here instead of - old kludges. Localise vars to blocks. Comment. +2001-02-20 Bo Thorsen - * frags.c (frag_new): Update fr_var comments. - * frags.h (struct frag): Ditto. + * config/tc-i386.c (tc_i386_fix_adjustable): Fix GOTPCREL GOT + entry. - * config/tc-i386.c (tc_i386_fix_adjustable): Prevent adjustment - for OBJ_MAYBE_ELF too. Use S_IS_EXTERNAL instead of S_IS_EXTERN. - (md_estimate_size_before_relax): Ensure jumps to weak and - externally visible symbols are relocatable. +001-02-18 David O'Brien -2000-05-14 David O'Brien + * configure.in (cpu_type, arch): Add a generic FreeBSD specification as + all FreeBSD platforms should look the same at this level. + * configure: Rebuilt. + * config/tc-i386.c: Add support for old FreeBSD a.out hosts. + +2001-02-14 Philip Blundell + + From 2001-02-06 H.J. Lu + * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): Do fixup if + there is no relocation. + + From 2001-02-06 H.J. Lu + * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): New. Defined. + * config/tc-ia64.c (md_parse_option): Only accept the valid + ia64 options on "-axxx". + +2001-02-13 Alan Modra + + * expr.c (operator): Don't bump input_line_pointer for two char + operators. Instead return operator size via new param num_chars. + (expr): Use above to parse multi-char operators correctly. - * config/te-freebsd.h: New file. +2001-02-12 Philip Blundell - * doc/as.1: Fix unbalanced brackets. + * config/tc-arm.c (do_ldst): Improve warnings for unpredictable + ldrt/strt instructions. - * config/tc-i386.c (comment_chars): Don't use '/' as comment start if - TE_FreeBSD. - (line_comment_chars): Set to '/' if TE_FreeBSD. +Mon Feb 12 17:44:08 CET 2001 Jan Hubicka -1999-07-03 Joel Sherrill + * tc-i386.c (i386_displacement): Fix handling of + BFD_RELOC_X86_64_GOTPCREL. + (i386_validate_fix): Likewise. - * configure.in (*rtems except sh): Move RTEMS targets to elf. - * configure: Regenerate. +2001-02-09 David Mosberger -2000-05-08 Alan Modra + * config/tc-ia64.h (md_elf_section_type): New macro. + (ELF_TC_SPECIAL_SECTIONS): Drop .IA_64.unwind and .IA_64.unwind_info + (they're now handled via ia64_elf_section_type. - * as.h: #include "file", not on files from ../include. - (as_abort, as_fatal): Add ATTRIBUTE_NORETURN. - * config/tc-m68k.c (m68k_ip): Fix signed/unsigned warnings. - (md_convert_frag): Add ATTRIBUTE_UNUSED. - (tc_coff_symbol_emit_hook): Ditto. - (OPTCOUNT): Cast to int to avoid compiler warning. - (md_begin): Fix signed/unsigned warnings. + * config/tc-ia64.c (unwind): New members saved_text_seg, + saved_text_subseg, and force_unwind_entry. + (optimize_unw_records): New function to optimize away unnecessary + unwind directives. + (ia64_elf_section_type): New function. + (output_unw_records): Generate unwind info only if the size is + non-zero or if it's forced for some other reason (e.g., + handlerdata or a personality routine). + (generate_unwind_image): Don't switch back to previous + section---stay inside the unwind info section instead so that + handlerdata that may follow goes into the right place. + (dot_handlerdata): Force generation of unwind entry and save the + current active text segment before generating unwind image. + (dot_unwentry): Force generation of unwind entry. + (dot_personality): Ditto. + (dot_endp): Generate unwind table entry only if there is + some unwind info or the unwind entry was forced. -2000-05-08 Michael Sokolov + * config/tc-ia64.c (make_unw_section_name): New macro to form + unwind section name. + (generate_unwind_image): Add "text_name" argument. Use it to + form unwind section name. + (dot_handlerdata): Determine current segment (section) name and + pass it to generate_unwind_image(). + (dot_endp): Determine current segment (section) name and use + it to determine the appropriate unwind section name. + (ia64_md_do_align): Add missing ATTRIBUTE_UNUSED declarations to + n, fill, and max arguments. - * config/tc-m68k.c (md_convert_frag_1): Abort if we end up in the - ABRANCH LONG case for a conditional branch on a 68000. - (md_estimate_size_before_relax): Likewise. Also handle - flag_short_refs correctly for ABRANCH, BCC68000, and DBCC. - (m68k-ip: case ABSL): Relax absolute references to 16-bit - PC-relative on all CPUs. - (md_estimate_size_before_relax): Likewise. +2001-02-09 Alexandre Oliva -2000-05-04 Alan Modra + * config/tc-sh.c (md_pseudo_table): Add uaquad. Use s_uacons for + 2byte, 4byte and 8byte. - * as.c (parse_args): Just mention current year in printed - copyright message. +2001-02-08 Alan Modra -2000-05-03 Ian Lance Taylor + * config/tc-hppa.c (pa_build_unwind_subspace): Don't call + md_number_to_chars with size > sizeof (valueT). - * config/atof-ieee.c (gen_to_words): When adding carry back in, - don't permit lp to become less than the words array. +2001-02-05 Jim Wilson -2000-05-03 David O'Brien + * config/tc-ia64.c (errata_nop_necessary_p): Return 0 instead of + aborting for invalid operands. - * as.c (parse_args): Update copyright. +2001-02-06 Alan Modra -2000-05-03 Mark Elbrecht + * config/tc-hppa.c (fix_new_hppa): Pass in unwind directly rather + than via pointer. Update all callers. + (UNWIND_LOW32): Define. + (UNWIND_HIGH32): Define. + (pa_build_unwind_subspace): Use the above macros instead of dumping + bitfields directly. Call frag_more once rather than multiple times. + (md_assemble): Use UNWIND_LOW32. + (pa_entry): Likewise + (pa_procend): Likewise. + (process_exit): Use UNWIND_HIGH32. - * gas/config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 - for the .bss section too. +2001-02-04 Stephane Carrez -2000-04-29 Andreas Jaeger + * config/tc-m68hc11.h (LISTING_HEADER): Use m68hc11_listing_header + function to select the header according to the cpu. + (md_after_pass_hook, md_do_align): Remove. + (md_cleanup, m68hc11_cleanup): Remove. + (md_pcrel_from_section): Declare. + * config/tc-m68hc11.c (build_dbranch_insn): Remove insn_size. + (build_jump_insn, build_insn): Likewise. + (m68hc11_listing_header): New function. + (m68hc11_cleanup): Remove. + +2001-02-02 Stephane Carrez + + * config/tc-m68hc11.c (relaxable_symbol): Relax externally visible + symbols because there is no support for shared libraries and these + symbols can't be overridden (unless they are weak). + +2001-02-01 Momchil Velikov - * as.h: Correctly check GCC version. + * dwarf2dbg.c (out_debug_abbrev): Terminate the abbreviations + for the compilation unit with a zero byte. + +2001-01-30 Alan Modra + + * config/tc-hppa.c (pa_ip): Support 12 bit branches to absolute + destinations. Correct range check for 17 and 22 bit branches. + +2001-01-25 Nick Clifton + + * config/tc-m68k.c (tc_gen_reloc): Do not abort if tcbit is + still set. Issue an error message instead. + (md_estimate_size_before_relax): Delete unused variable + 'buffer_address'. Fixup parentheses around if statement. + +2001-01-23 Kazu Hirata + + * as.c: Fix formatting. + * ehopt.c: Likewise. + * messages.c: Likewise. + * stabs.c: Likewise. + * symbols.c: Likewise. -2000-04-20 Alexandre Oliva +2001-01-23 Ben Elliston - * config/tc-mn10300.c (HAVE_AM30): Define. - (md_assemble): Use it. + * config/tc-m32r.c (m32r_handle_align): Declare type of fragp. -2000-04-19 Alan Modra +2001-01-22 Kazu Hirata - * Makefile.am: (CPU_MULTI_VALID): Remove. - (MULTI_CPU_TYPES): Define. - (MULTI_CPU_OBJ_VALID): Define. - (DEPTC): Use the above. - (DEPOBJ): Same here. - (DEP2): And here. - Regenerate dependencies. - * Makefile.in: Regenerate. + * config/tc-alpha.c: Fix formatting. -2000-04-19 Michael Sokolov +2001-01-19 Kazu Hirata - * Makefile.am (YACC, LEX): Get them from configure. + * config/tc-alpha.c: Fix formatting. - * as.h (SEEK_SET): Define if undefined. +2001-01-18 Kazu Hirata -2000-04-09 Nick Clifton + * config/tc-alpha.c: Fix formatting. - * Makefile.am (CPU_TYPES): Add 'avr'. - (TARGET_CPU_CFILES): Add 'tc-avr.c'. - (TARGET_CPU_HFILES): Add 'tc-avr.h'. +2001-01-18 Nick Clifton -2000-04-05 Alexandre Oliva + * config/tc-arm.c (ldm_flags): Remove redundant bit from "fa" and + "da" flags. + (stm_flags): Remove redundant bit from "ed" and "da" flags. - * config/tc-sparc.c (sparc_ip): Avoid string pasting. +2001-01-18 Alexandre Oliva -2000-04-04 Alan Modra + * configure.in (cpu_type, arch): Match i386 too. + * configure: Rebuilt. - * po/gas.pot: Regenerate. +2001-01-16 Kazu Hirata - * as.c (show_usage): Restore translated part of bug string. - * gasp.c (show_usage): Likewise. + * config/tc-i386.c: Fix formatting. - * Makefile.am (MKDEP): Use gcc -MM rather than ../mkdep. - (DEP): Quote when passing vars to sub-make. Use "mv -f" rather - than move-if-change. - (DEP1): Modify for "gcc -MM". - (DEPTC): Likewise. - (DEPOBJ): Likewise. - (DEP2): Likewise. - (CLEANFILES): Add DEPTCA, DEPOBJA, DEP2a, DEPA. - Update dependencies. - * Makefile.in: Regenerate. +2001-01-16 Alan Modra -2000-04-04 Alexandre Oliva + * config/tc-hppa.c (tc_gen_reloc): Use SEGREL32 instead of DIR32 + relocs for .PARISC.unwind section. - * config/tc-mn10300.c (md_pseudo_table): Use constant names. - (md_begin): Likewise. - (HAVE_AM33): New macro. - (md_assemble): Use it. Match r_regs and xr_regs only if - HAVE_AM33. + * config/tc-hppa.c (pa_build_unwind_subspace): Build unwind + depending on section flags, not just for .text. -2000-04-03 Alan Modra +2001-01-15 Jim Wilson - * as.h: #include "bin-bugs.h" - * as.c (show_usage): Use REPORT_BUGS_TO. - * gasp.c: #include "bin-bugs.h" - (show_usage): Use REPORT_BUGS_TO. + * config/tc-ia64.c (ia64_flush_insns): Handle unwind directives + not immediately followed by an instruction. - * config/tc-sparc.c (md_show_usage): Add a trailing newline. +2001-01-15 Kazu Hirata -2000-04-03 Alan Modra + * config/tc-m68hc11.c: Fix formatting. - * config/tc-i386.c (i386_immediate): Don't assume a constant - immediate is necessarily 16 bits when in 16 bit code mode. - (md_assemble): Instead set guess_suffix here after we have checked - registers. +2001-01-15 Nick Clifton -2000-04-02 Richard Henderson + * symbols.c (colon): Change 'already defined symbol' from a + fatal error to an ordinary error. There is no reason why this + error should be fatal. - * config/tc-d30v.c (check_range): Allow signed or unsigned 32-bit - quantities. Correct right shift sign extension. - (build_insn): Make `number' unsigned long. Mask top 6 bits of - 32-bit value when shifting into place. + * message.c (as_fatal): Delete output file, if one has been + created. -2000-04-01 Ian Lance Taylor +2001-01-14 Alan Modra - * app.c: Add ATTRIBUTE_UNUSED as needed. + * config/tc-hppa.h (TARGET_FORMAT): Add hppa-linux variants. + +2001-01-14 Kazu Hirata + + * config/tc-alpha.c: Fix formatting. + * config/tc-arc.c: Likewise. + * config/tc-arc.h: Likewise. + * config/tc-d10v.c: Likewise. + * config/tc-i370.c: Likewise. + * config/tc-i386.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-m68k.c: Likewise. * config/tc-ppc.c: Likewise. - (ppc_size): Make unsigned long. - (ppc_insert_operand): Add casts to avoid warnings. + * config/tc-sparc.c: Likewise. + * config/tc-tahoe.c: Likewise. + * config/tc-vax.c: Likewise. -2000-03-31 Nick Clifton + * config/tc-arc.c: Fix formatting. - * config/tc-d10v.h (md_flush_pending_output): Define. + * config/tc-arc.c: Fix formatting. -2000-03-29 Nick Clifton +2001-01-14 Alan Modra - * config/tc-sh.h (SEG_NAME): New macro: return the name of a - segment. Works for both BFD_ASSEMBLER and others. - (SUB_SEGMENT_ALIGN): Use SEG_NAME. + * config/tc-hppa.c (pa_build_unwind_subspace): Use SEGREL32 for + both 32 and 64 bit ELF. -2000-03-29 Nick Clifton ' operands. - * config/tc-arm.c (tinsns): Add "bal" instruction pattern. +Sun Jan 14 00:36:42 MET 2001 Jan Hubicka -2000-03-28 Alan Modra + * tc-i386.h (TARGET_MACH): New macro. + (i386_mach): Declare. + * tc-i386.c (i386_mach): New function. - * listing.c (LISTING_LHS_WIDTH): Default depends on - LISTING_WORD_SIZE. - (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH. +2001-01-13 Philip Blundell -2000-03-27 Ian Lance Taylor + * doc/as.texinfo: Fix spelling and cross-references. - * config/tc-sh.c (md_show_usage): Use backslash before newline in - string literal. + * doc/c-arm.texi: Fix typos. Say that `;' is a line separator + character for all systems, not just GNU/Linux. Make it explicit + that `-k' doesn't affect code generation, just ELF flags. -2000-03-27 Alan Modra +Sat Jan 13 01:47:35 MET 2001 Jan Hubicka - * config/tc-avr.h (TC_HANDLES_FX_DONE): Define. + * config/tc-i386.c (md_assemble): Check cpu_flags even for nullary + instructions. - * config/tc-avr.c (mcu_types): Add missing initialiser. - (md_pcrel_from_section): Add prototype. - (avr_operand): Remove redundant test of unsigned < 0. - (avr_cons_fix_new): Ensure exp_mod_pm zero on function exit. +2001-01-12 Frank Ch. Eigler -2000-03-27 Denis Chertykov + * cgen.c (gas_cgen_finish_insn): Call dwarf2_emit_insn. - * config/tc-avr.c: New file for AVR support. - * config/tc-avr.h: Likewise. - * configure.in: Add AVR support. - * configure: Regenerate. +2001-01-12 Nick Clifton -2000-03-26 Timothy Wall + * as.c (print_args): Update copyright date to 2001. - * gasp.c (macro_op): Add new argument to check_macro call. - Macro structure definitions moved to macro.h - * sb.h: Add argument to prototype for input_scrub_include_sb. - * input-scrub.c (input_scrub_include_sb): Allow disabling of sb - nesting checks with an additional flag. - (struct input_save): Add flag to indicate whether current sb - should be checked for proper macro/conditional nesting. - (input_scrub_push/pop): Save/restore nest check flag. - (input_scrub_next_buffer): Ditto. Also call end of macro hook if - defined. - * macro.c (check_macro): Allow caller to retrieve parsed macro - information if a pointer is provided. This information may be - used by the new macro hooks. - * macro.h: Update prototype for check_macro. Macro struct - definitions moved here from macro.c/gasp.c. - * read.c (read_a_source_file): Add parameter to check_macro call, - and pass macro info to the macro hook, if defined. - (input_scrub_insert_line): New. Allow insertion of a line of - characters into the input stream. - (input_scrub_insert_file): New. Allow insertion of an arbitrary - file into the input stream. - (s_include): Use input_scrub_insert_file. - * internals.texi: Document new macro hooks. - * as.h: New prototypes added. - -2000-03-26 Alan Modra +2001-01-12 Peter Targett - * config/tc-i386.c: Don't start any as_bad or as_warn message with - an initial capital letter. - (i386_index_check): Reindent. + * doc/c-arc.texi: New file. + Some sections to be expanded. -2000-03-19 Nick Clifton +2001-01-12 Alan Modra - * config/tc-arm.c (md_apply_fix3): Fix bug detectng overflow of pc - relative branches. + * config/tc-i386.c (md_longopts): Recognize "--64" only for ELF. + (md_parse_option): Always accept "--32". -2000-03-17 Thomas de Lellis +2001-01-11 Peter Targett - * config/tc-arm.c (do_t_adr): Flag "adr Rd,label" - instruction operand bad if Rd > 7 when generating - thumb instructions. Prevents for example, - "adr r12,label" from silently failing and generating - the wrong instruction. - -2000-03-17 Nick Clifton + * as.h (TC_ARC): Ensure struc-symbol.h included. + * as.c (dwarf2dbg.h): Include to remove implicit declaration + warnings. + * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Define. + (TARGET_SYMBOL_FIELDS) added. - * config/tc-arm.c (md_apply_fix3): Handle same-section relocations - that have a destingation >= 0x400000. - Fix compile time warning messages. + * doc/Makefile.am (CPU_DOCS): Added c-arc.texi. + * doc/c-arc.texi: New file. + Some sections to be expanded. + * doc/as.texinfo: Update command-line options. + Removed outdated text for ARC dependant features, instead include + text from above file. -Thu Mar 16 23:45:16 2000 J"orn Rennecke + * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Define local flag. + (TARGET_SYMBOL_FIELDS): Alias to previous definition. + (targ-cpu.h) header. + * config/tc-arc.h: + * config/tc-arc.c: New updated configuration for + ARC, including selection of core variants, and extensibility of + instructions, registers etc. through directives. - * config/tc-sh.c (md_begin): When encountering insn that are - not supported by the current arch, only change the name if - its contents are the same as prev_name. - (get_specific): If the the architecture doesn't match, fail. + * config/tc-arc.c (arc_extinst): Minor corrections for + error messages. + (arc_common) Likewise. Make alignment argument optional for local + symbols also, with default of zero. -Thu Mar 16 21:18:13 2000 J"orn Rennecke +2001-01-11 Stephane Carrez - * config/tc-sh.c (IDENT_CHAR): Define. - (parse_reg): Use it instead of isalnum. Put r[0..7]_bank operand - matching back where it came from. + * config/tc-m68hc11.c (md_estimate_size_before_relax): Fix + STATE_INDEXED_OFFSET when the symbol is undefined (16-bit offset). + (build_indexed_byte): Don't relax indexed byte, use 16-bit offset + and fix_new_exp() instead. + (md_convert_frag): For indexed post byte use the symbol value + rather than the displacement. + (md_relax_table): Fix indexed offset relax. -Thu Mar 16 20:58:10 2000 J"orn Rennecke +2001-01-11 Stephane Carrez - * config/tc-sh.c (md_show_usage): Add description of -dsp. + * config/tc-m68hc11.c (md_estimate_size_before_relax):Don't + relax weak symbols. + (relaxable_symbol): New function. -2000-03-15 Jonathan Larmour +2001-01-11 Andreas Jaeger - * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before - normal operands. + * config/tc-i386.h (TC_RELOC_GLOBAL_OFFSET_TABLE): Removed, it's + not used anywhere. -2000-03-15 Kazu Hirata +2001-01-10 Nick Clifton - * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate. + * config/tc-arm.c (arm_fix_adjustable): Define for OBJ_COFF. + * config/tc-arm.h (obj_fix_adjustable): Define for OBJ_COFF -Mon Mar 13 22:02:59 2000 Hans-Peter Nilsson +2001-01-10 Nick Clifton - * expr.c (operand) [case 'f']: When testing if '0f' can start a - floating-point-number, make sure 'f' is in FLT_CHARS. + * symbols.c (DOLLAR_LABEL_CHAR): New constant - the magic + character used to dollar local symbols. + (LOCAL_LABEL_CHAR): New constant - the magic character used to + local label symbols. + (dollar_label_name): Use DOLLAR_LABEL_CHAR. + (fb_label_name): Prefix local labels with LOCAL_LABEL_PREFIX, + if defined. + Use LOCAL_LABEL_CHAR. + (decode_local_label_name): Skip LOCAL_LABEL_PREFIX. + Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR. + (S_IS_LOCAL): Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR. -Sat Mar 11 00:01:39 2000 Hans-Peter Nilsson +2001-01-08 Bo Thorsen - * read.c (TC_IMPLICIT_LCOMM_ALIGNMENT): New default-definition. - (s_lcomm_internal): Use it. - * doc/internals.texi (CPU backend): Document it. - * config/obj-evax.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Set to 2**3 - bytes. + * config/tc-i386.c (i386_immediate, i386_displacement): + GOTPCREL check fix. -2000-03-10 Geoffrey Keating +2001-01-07 Ian Lance Taylor - * config/tc-mips.c (mips_ip): Don't put stuff in .rodata - when embedded-pic. + * doc/c-i386.texi (i386-Arch): Remove spaces incorrectly inserted + in last change. - * config/tc-mips.c (SWITCH_TABLE): The ELF embedded-pic - implementation doesn't have special handling for switch - statements. - (macro_build): Allow for code in sections other than .text. - (macro): Likewise. - (mips_ip): Likewise. - (md_apply_fix): Do pc-relative relocation madness for MIPS ELF. - Don't perform relocs if we will be outputting them. - (tc_gen_reloc): For ELF, just use fx_addnumber for pc-relative - relocations. Allow BFD_RELOC_16_PCREL_S2 relocs when - embedded-pic. +2001-01-07 Philip Blundell -2000-03-09 Catherine Moore - - * config/tc-m32r.c (m32r_fix_adjustable): Look up the - relocation type based on the entry in the fixup structure. + * doc/as.texinfo (Bug Reporting): Update email address for + reports. + * README: Likewise. -2000-03-08 H.J. Lu (hjl@gnu.org) +Sat Jan 6 13:33:10 MET 2001 Jan Hubicka - * Makefile.am (install-exec-tooldir): Depend on - install-exec-bindir for parallel make. - * Makefile.in: Regenerated. + * configure.in: Define DEFAULT_ARCH for i386. + * tc-i386.c (md_assemble): Return after the error message; + move testing for 64bit operands to proper place. -2000-03-06 Nick Clifton +2001-01-06 Jan Hubicka , Andreas Jaeger - * config/tc-m32r.c (struct md_longopts): Add -m32r command line - switch. - (md_parse_option): Parse -m32r command line switch - disable m32rx - compatability. - (md_show_usage): Document new option. + * doc/as.texinfo: Document '#' as comment character for i386 and + x86_64. Add AMD x86-64 into menu of machine dependent information. - * doc/Makefile.am (CPU_DOCS): Add c-m32r.texi. - * doc/Makefile.in: Regenerate. - * doc/c-m32r.texi (M32R-Opts): Document new command line switch. + * doc/c-i386.texi: Document x86_64 extensions. -2000-03-02 Michael Meissner +Fri Jan 5 13:26:42 MET 2001 Jan Hubicka - * config/tc-d30v.c (check_range): Remove code that incorrectly - sign extended values where bits < 32. + * tc-i386.c (md_assemble): Handle third byte of the opcode as prefix. -2000-03-02 H.J. Lu (hjl@gnu.org) +Thu Jan 4 22:25:26 MET 2001 Jan Hubicka - * configure.in: Support --enable-targets=all on ia32. - * configure: Regenerated. + * tc-i386.c (cpu_arch): Add Pentium4 and modify sledgehammer entry. + * NEWS: Add note about Pentium4 support. -2000-03-01 Nick Clifton +Wed Jan 3 17:26:32 MET 2001 Jan Hubicka - * gasp.c (do_align): Remove bogus check of alignment value. + * tc-i387.c (pi, pte, pt): Update. + (type_names): Add new types. -2000-02-27 Thomas de Lellis +Wed Jan 3 16:26:52 MET 2001 Jan Hubicka - * config/obj-elf.c (elf_frob_symbol): Remove code which when - TC_PPC was defined forced the type of a symbol with no other type - to be BSF_OBJECT. + * tc-i386.h (CpuK6, CpuAthlon, CpuSledgehammer, CpuMMX, Cpu3dnow, + CpuUnknown): Renumber + (CpuP4, CpuSSE2): New. + (CpuUnknownFlags): Add CpuP4 and CpuSSE2 -2000-02-27 Hans-Peter Nilsson +2001-01-03 Philip Blundell - * doc/internals.texi (CPU backend): Mention that - line_separator_chars do not break up comments. Fix typos for - LEX_AT and LEX_NAME descriptions. Document operands for - TC_EQUAL_IN_INSN, md_operand and md_section_align. Correct - description of md_create_short_jump usage. Document argument for - md_undefined_symbol. + * config/tc-alpha.c (alpha_force_relocation): Handle vtable + relocs. + (alpha_fix_adjustable): Likewise. + (md_apply_fix): Likewise. -2000-02-27 Jakub Jelinek +2000-12-31 H.J. Lu - * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option. - (md_parse_option): Handle it. - (md_show_usage): Document it. + * listing.c (listing_message): Allocate string only if it is + used. -2000-02-27 Ian Lance Taylor + * configure: Rebuild. - * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an - opcode, for the instruction `pal19'. From Andrea Arcangeli - . +2000-12-31 Hans-Peter Nilsson -2000-02-26 Alan Modra + * doc/internals.texi (Relaxing with a table) : + Point out caveats with generating fixups for the opcode in a frag. - * config/tc-i386.c (i386_immediate): Move constant operand sizing - from here.. - (md_assemble): To here, before template operands are matched. - Also ensure a constant immediate is sign extended when we know the - size is at most 16 bits. This is to catch cases like "add - $0xffc0,%ax" where we don't know the size, and thus that the - immediate can be represented as Imm8S until after parsing the - register operand. - (i386_displacement): Similarly sign extend 16 bit constant - displacements. - (md_assemble): Relax 16-bit jump constant range check to suit sign - extended displacements. +Sat Dec 30 19:02:48 MET 2000 Jan Hubicka -2000-02-26 Andreas Jaeger + * configure.in: Add support for x86_64 and x86_64-*-linux-gnu* + * NEWS: Add x86_64. - * doc/c-mips.texi (MIPS Opts): Fix typo in last patch. +2000-12-29 H.J. Lu -2000-02-25 Alan Modra + * listing.c (calc_hex): Print the variable part only if the + fragment type is rs_fill. - * config/tc-i386.c (md_assemble): Don't swap intersegment jmp and - call operands when intel_syntax. - (intel_float_operand): Return 2 for "fi...". - (i386_operand_modifier): Change "DWORD PTR" test to suit above. - Return SHORT_MNEM_SUFFIX for "WORD PTR" when "fi...". Revert - earlier "SHORT" change. - (md_assemble): When determining suffix from Regs, exclude - InOutPortReg. +2000-12-29 Hans-Peter Nilsson -2000-02-24 Nick Clifton + * doc/internals.texi (tc_conditional_pseudoop, + TC_LINKRELAX_FIXUP): Fix typos. - * configure: Add arm-wince, mips-pe and sh-pe targets. - * configure: Regenerate. +2000-12-28 Richard Henderson - * config/obj-coff.h (COFF_WITH_PE): Define for mips-pe and - sh-pe targets. - (TARGET_FORMAT): Set to "pe-shl" for the sh-pe target and to - "pe-mips" for the mips-pe target. + * write.c (subsegs_finish): Fix thinko last change -- don't + "optimize" the alignment == 0 case. - * config/tc-arm.c (insns): Change displacement encoded in BL - and B instructions if the target port is arm-wince. - (do_ldst): Do not bias the relocation offset if the target - port is arm-wince. - (md_pcrel_from): Add in missing relocation offset bias if the - target os arm-wince. +2000-12-28 Richard Henderson - * config/tc-mips.c (mips_target_format): Support COFF flavour. - (md_begin): Disable -G support for mips-pe target. - (md_apply_fix): Treat BFD_RELOC_RVA reloc as BFD_RELOC_32. - * config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Add support for - COFF flavour. + * as.h (rs_align_test): New. + * frags.c (NOP_OPCODE): Move default from read.c. + (MAX_MEM_FOR_RS_ALIGN_CODE): New default. + (frag_align_code): New. + * frags.h (frag_align_code): Declare. + * read.c (NOP_OPCODE): Remove. + (do_align): Use frag_align_code. + * write.c (NOP_OPCODE): Remove. + (get_recorded_alignment): New. + (cvt_frag_to_fill): Handle rs_align_test. + (relax_segment): Likewise. + (subsegs_finish): Align last subseg in section to the + section alignment. Use frag_align_code. + * write.h (get_recorded_alignment): Declare. + * config/obj-coff.c (size_section): Handle rs_align_test. + (fill_section, fixup_mdeps): Likewise. + (write_object_file): Use frag_align_code. + + * config/tc-alpha.c (alpha_align): Use frag_align_code. + (alpha_handle_align): New. + * config/tc-alpha.h (HANDLE_ALIGN): New. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + + * config/tc-i386.h (md_do_align): Use frag_align_code. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + + * config/tc-ia64.c (ia64_md_do_align): Don't do code alignment. + (ia64_handle_align): New. + * config/tc-ia64.h (HANDLE_ALIGN): New. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + + * config/tc-m32r.c (m32r_do_align): Remove. + (m32r_handle_align): New. + (fill_insn): Use frag_align_code. + * config/tc-m32r.h (md_do_align): Remove. + (HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): New. + * config/tc-m88k.c, config/tc-m88k.h: Similarly. + * config/tc-mips.c, config/tc-mips.h: Similarly. + + * config/tc-sh.c (sh_cons_align): Use rs_align_test. + (sh_handle_align): Likewise. Handle rs_align_code. + (sh_do_align): Remove. + * config/tc-sh.h (md_do_align): Remove. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + + * config/tc-sparc.c (sparc_cons_align): Use rs_align_test. + (sparc_handle_align): Likewise. Handle rs_align_code. + * config/tc-sparc.h (md_do_align): Remove. + (MAX_MEM_FOR_RS_ALIGN_CODE): New. + +2000-12-22 DJ Delorie + + * config/tc-d10v.c (md_assemble): set prev_seg and prev_subseg + when we assemble the first half of a pair. + +2000-12-22 H.J. Lu + + * config/tc-i386.c (reloc): Update the macro for non-bfd + assembler. + (BFD_RELOC_X86_64_GOTPCREL): Set to 0 for non-bfd assembler. + +2000-12-22 H.J. Lu + + * dwarf2dbg.c (dwarf2_finish): Remove #if BFD_ASSEMBLER. + +Wed Dec 20 14:21:22 MET 2000 Jan Hubicka + + * tc-i386.h (i386_target_format): Define even for ELFs. + (QWORD_MNEM_SUFFIX): New macro. + (CpuK6,CpuAthlon,CpuSledgehammer, Cpu64, CpuNo64, CpuUnknownFlags): + New macros + (CpuMMX,CpuSSE,Cpu3dnow, CpuUnknown): Renumber. + (IgnoreSize, DefaultSize, No_?Suf, FWait, IsString, regKludge, IsPrefix, + ImmExt): Renumber. + (Size64, No_qSuf, NoRex64, Rex64): New macros. + (Reg64, Imm32S, Imm64, Disp32S, Disp64): New macros. + (Imm8, Imm8S, Imm16, Imm32, Imm1, BaseIndex, Disp8, Disp16, Disp32, + InOutPortReg,ShiftCount, Control, Debug, Test, FloatReg, FloatAcc, + SReg2, SReg3, Acc, JumpAbsolute, RegMMX, RegXMM, EsSeg, InvMem): + Renumber. + (Reg, WordReg): Add Reg64. + (Imm): Add Imm32S and Imm64. + (EncImm): New. + (Disp): Add Disp64 and Disp32S. + (AnyMem): Add Disp32S. + (RegRex, RegRex64): New macros. + (rex_byte): New type. + * tc-i386.c (set_16bit_code_flag): Kill. + (fits_in_unsigned_long, fits_in_signed_long): New functions. + (reloc): New parameter "signed"; support x86_64. + (set_code_flag): New. + (DEFAULT_ARCH): New macro; default to "i386". + (default_arch): New static variable. + (struct _i386_insn): New fields Operand_PCrel; rex. + (flag_16bit_code): Kill; All tests replaced to "flag_code == CODE_64BIT" + (flag_code): New enum and static variable. + (use_rela_relocations): New static variable. + (flag_code_names): New static variable. + (cpu_arch_flags): Default to CpuUnknownFlags|CpuNo64. + (cpu_arch): Add "sledgehammer"; Add CPUAthlon to Athlon and CpuK6 to + K6 and Athlon. + (i386_align_code): Return plain "nop" for x86_64. + (mode_from_disp_size): Support Disp32S. + (smallest_imm_type): Support Imm32S and Imm64. + (offset_in_range): Support size of 8. + (set_cpu_arch): Do not clobber to Cpu64/CpuNo64. + (md_pseudo_table): Add "code64"; use set_code_flat. + (md_begin): Emit sane error message on hash failure. + (tc_i386_fix_adjustable): Support x86_64 relocations. + (md_assemble): Support QWORD_MNEM_SUFFIX, REX registers, + instructions supported on particular arch just partially, + output of 64bit immediates, handling of Imm32S and Disp32S type. + (i386_immedaite): Support x86_64 relocations; support 64bit constants. + (i386_displacement): Likewise. + (i386_index_check): Cleanup; support 64bit addresses. + (md_apply_fix3): Support x86_64 relocation and rela. + (md_longopts): Add "32" and "64". + (md_parse_option): Add OPTION_32 and OPTION_64. + (i386_target_format): Call even for ELFs; choose between + elf64-x86-64 and elf32-i386. + (i386_validate_fix): Refuse GOTOFF in 64bit mode. + (tc_gen_reloc): Support rela relocations and x86_64. + (intel_e09_1): Support QWORD. - * config/tc-sh.c (md_begin): sh-pe target is little endian. - * config/tc-sh.h (SUB_SEGMENT_ALIGN): If using a BFD - assembler, just set the alignment to 4. +2000-12-15 Diego Novillo - * config/te-wince-pe.h: New file for WinCE targets. Define - TE_WINCE. + * config/tc-i386.c (intel_e09_1): Only flag as a memory operand if + it's not an offset expression. + (intel_e10_1): Ditto. Also, if the operand is an offset expression, + keep the braces '[' and ']' in the output string. + (intel_e11): Ditto. Also remove comparison intel_parser.op_modifier + != FLAT. There is no such op_modifier. -2000-02-25 Alan Modra +2000-12-14 Michael Sokolov - * config/tc-i386.c (md_assemble): Swap segments too for intel mode - string instructions. - (i386_operand_modifier): Set i.suffix = WORD_MNEM_SUFFIX for SHORT. - (i386_intel_memory_operand): After finding a segment override, - check again for no `[' before looking for a displacement. Bomb if - more than one displacement rather than silently discarding the - second and subsequent ones. Free strings malloc'd by - build_displacement_string. + * dwarf2dbg.c: If we don't have , try including + if we have it. -2000-02-24 Catherine Moore +2000-12-13 Kazu Hirata - * config/obj-som.c (obj_pseudo_table): Add "weak". - (obj_som_weak): New routine. + * as.h: Fix formatting. + * cgen.h: Likewise. + * dwarf2dbg.c: Likewise. + * input-scrub.c: Likewise. + * read.h: Likewise. -2000-02-24 Alan Modra +2000-12-13 Mark Elbrecht - * config/tc-i386.c (union i386_op): New. - (struct _i386_insn): Delete disps[], imms[], regs[]. Add op[]. - Throughout file replace occurences of disps[n], imms[n], regs[n] - with equivalent op[n].disps, op[n].imms, op[n].regs. Simplify - intel mode operand swapping. Add assert in regKludge and - fake_zero_displacement code. Test i.types[n] when outputting - displacements and immediates. Combine output of Disp16 with - Disp32. - (md_assemble): Don't try to fix broken UNIXWARE_COMPAT opcodes - when in intel mode by (not) reversing fsub and fdiv operands - before the template search. This fails for single operand - shorthand forms of the instruction, and if UNIXWARE_COMPAT is - undefined. Instead fix the base_opcode after we've found the - template. Move base_opcode xor with found_reverse_match from - opcode output code to before this fix so we test for the correct - opcodes. - (md_assemble): Don't use strcmp when deciding to ignore the suffix - check in intel mode. Instead compare opcodes. + * configure.in (i386-*-msdosdjgpp): Set bfd_gas to yes. + configure: Regenerate. - * config/tc-i386.h (TC_RELOC): Delete. - * config/tc-i386.c (TC_RELOC): Delete. Replace usage of TC_RELOC - with equivalent call to reloc. +2000-12-13 Michael Sokolov - * as.h (flag_m68k_mri): Move declaration after target include, and - only declare when TC_M68K defined. Define as zero otherwise. - (LABELS_WITHOUT_COLONS, NO_PSEUDO_DOT): If undefined, define as 0. - * app.c (scrub_m68k_mri): Declare only when TC_M68K defined. - Define as zero otherwise. - (do_scrub_begin): Use m68k_mri parameter only when TC_M68K defined. - (struct app_save): Declare scrub_m68k_mri only when TC_M68K. - (app_push, app_pop): Save scrub_m68k_mri only when TC_M68K. - (do_scrub_chars): Use LABELS_WITHOUT_COLONS directly rather than - testing whether defined. - * cond.c (ignore_input): Use NO_PSEUDO_DOT directly. - * expr.c (operand): #ifdef unused case labels when TC_M68K undefined. - * read.c: Use LABELS_WITHOUT_COLONS and NO_PSEUDO_DOT directly - rather than testing whether defined. - (s_mri): Set flag_m68k_mri only when TC_M68K defined. - (parse_mri_cons): Declare and use only when TC_M68K. - * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define as 1. - * config/tc-m68k.h (NO_PSEUDO_DOT): Define as 1. - * config/tc-m88k.h (NO_PSEUDO_DOT): Define as 1. + * dwarf2dbg.c: #include only if it exists. - * NEWS: Mention IBM 370 support. +2000-12-13 Rodney Brown -2000-02-23 Richard Henderson + * config/tc-hppa.c (pa_ip): Correct CHECK_FIELD typo. + (md_apply_fix): Here too. - * config/tc-i386.c (md_assemble): When swapping operands for - intel_syntax, assume everything that's not Imm or Disp is a - register. +2000-12-12 Jim Wilson -2000-02-23 Linas Vepstas + * config/tc-ia64.h (ia64_init): Add prototype. - * config/tc-i370.c, config/tc-i370.h: New files. - * Makefile.am: Add support for Linux/IBM 370. - * configure.in: Likewise. - * app.c (do_scrub_begin): Don't lex single quote when TC_I370. - * config/obj-elf.c: Include elf/i370.h - (obj_elf_section): Don't do anything special for flag_mri if TC_I370. +2000-12-12 H.J. Lu - * Makefile.in: Regenerate. - * configure: Regenerate. + * dwarf2dbg.c: Enabled only if BFD_ASSEMBLER is defined. - * doc/c-i370.texi: New file. - * doc/all.texi: Include it. - * doc/as.texinfo: And here. - * doc/Makefile.am(CPU_DOCS): Add c-i370.texi. - * doc/Makefile.in: Regenerate. + * read.h (outputting_stabs_line_debug): Change it to int. + * stabs.c (outputting_stabs_line_debug): Likewise. -2000-02-19 Michael Meissner +2000-12-12 Geoffrey Keating - * config/tc-d30v.c (parallel_ok): Use FLAG_NOT_WITH_ADDSUBppp to - determine if an instruction can be used in parallel with an ADDppp - or SUBppp instruction. + * config/obj-bout.c (obj_crawl_symbol_chain): Don't take + the address of a function result. -2000-02-22 Andrew Haley +2000-12-12 Franz Sirl - * doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64. + * config/tc-ppc.c (md_pseudo_table): Add .file and .loc. + (md_assemble): Call dwarf2_emit_insn. + (shlib): Fix typo SHILB -> SHLIB. + (md_parse_option): Likewise. + (ppc_elf_validate_fix): Likewise: + * config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): New. -1999-12-30 Andrew Haley +2000-12-12 Nick Clifton - * config/tc-mips.c (mips_gp32): New variable. - (macro_build) Use mips_gp32. - (mips_ip): Ditto. - (md_longopts): Add "-mgp32" and "-mgp64". - (md_parse_option): Add OPTION_GP32 and OPTION_GP64. - -2000-02-22 Alexandre Oliva + * cgen.h: Fix formatting. + * input-scrub.c: Fix formatting. + * macro.c: Fix formatting. + * config/tc-mips.c: Fix formatting. + * doc/c-mips.texi: Fix formatting. - * config/obj-coff.c (add_lineno): Accept non-positive lineno with - warning, and bump it to 1. +Mon Dec 11 14:35:42 MET 2000 Jan hubicka -2000-02-22 Ian Lance Taylor + * tc-i386.c (md_assemble): Refuse 's' and 'l' suffixes in the intel + mode; convert 'd' suffix to 's' or 'l'; remove all DWORD_MNEM_SUFFIX + references. + (intel_e09_1): Convert QWORD to 'l' suffix for FP operations; refuse + otherwise. + * tc-i386.h (DWORD_MNEM_SUFFIX): Kill. + (No_dSuf): Kill. - From Brad Lucier : - * dwarf2dbg.c (print_stats): Add cast to force printf argument to - match format. + * i386.h (*_Suf): Remove No_dSuf. + (d_suf, wld_Suf,sld_Suf, sldx_Suf, bwld_Suf, d_FP, sld_FP, sldx_FP) + Remove. + (i386_optab): Remove 'd' in the suffixes. -2000-02-21 Catherine Moore +2000-12-06 Mark Elbrecht - * config/tc-mips.c (MF_HILO_INSN): Define. - (mips_7000_hilo_fix): Declare. - (append_insn): Conditionally insert nops after an mfhi/mflo insn. - (md_parse_option): Check for 7000_HILO_FIX options. - (OPTION_M7000_HILO_FIX): Define. - (OPTION_NO_M7000_HILO_FIX): Define. - * doc/c-mips.texi (-mfix7000): Describe. + * config/tc-i386.c (T_SHORT): Undefine before defining. -2000-02-21 Alan Modra +2000-12-05 Kazu Hirata - * listing.c (print_lines): Remove unused variable `end'. + * config/tc-mips.c: Fix formatting. - * config/tc-i386.c (md_assemble): Use `reloc()' to select reloc - type for JumpInterSegment output. Use enum bfd_reloc_code_real for - reloc_type when BFD_ASSEMBLER. - (md_estimate_size_before_relax): Use enum bfd_reloc_code_real for - reloc_type when BFD_ASSEMBLER. Move common code out of switch - statement and quell signed vs. unsigned comparison warning. +2000-12-04 Matthew Hiller -2000-02-18 Nick Clifton + * config/tc-d10v.c (flag_allow_gstabs_packing): New variable. + (md_longopts): New options --gstabs-packing, --no-gstabs-packing. + (md_show_usage): Ditto. + (md_parse_option): Ditto. + (d10v_cleanup): Writes pending instruction only if + ! outputting_stabs_line_debug || ! flag_allow_gstabs_packing. + Fix compile time warning messages. - * config/tc-d10v.c (find_opcode): Add a symbol's value to - the computed frag offset, rather than overwriting it. + * doc/c-d10v.texi: Documents new options. -Thu Feb 17 00:11:08 2000 J"orn Rennecke +2000-12-04 Matthew Hiller - * config/tc-sh.c ("elf/sh.h"): Include. - (sh_dsp, valid_arch, reg_x, reg_y, reg_efg): New static variables. - (md.begin): Initialize target_arch. - Only include opcodes in has table that match selected architecture. - (parse_reg): Recognize register names for sh-dsp. - (parse_at): Recognize post-modify addressing. - (get_operands): The leading space is now optional. - (get_specific): Remove FDREG_N support. Add support for sh-dsp - arguments. Update valid_arch. - (build_Mytes): Add support for SDT_REG_N. - (find_cooked_opcode): New function, broken out of md_assemble. - (assemble_ppi, sh_elf_final_processing): New functions. - (md_assemble): Use find_cooked_opcode and assemble_ppi. - (md_longopts, md_parse_option): New option: -dsp. - * config/tc-sh.h (elf_tc_final_processing): Define. - (sh_elf_final_processing): Declare. + * stabs.c (outputting_stabs_line_debug): New variable. + (stabs_generate_asm_lineno): Set outputting_stabs_line_debug at + function entry and unset at function exit. -Fri Feb 11 14:21:51 2000 Jeffrey A Law (law@cygnus.com) + * read.h (outputting_stabs_line_debug): New extern declaration. - * config/tc-hppa.c (pa_build_unwind_subspace): Use subseg_new to create - the unwinder subspace. Save the current seg/subseg before creating - the new seg/subseg. + * as.c: Include dwarf2dbg.h for definition of dwarf2_finish. -2000-02-10 Nick Clifton + * dwarf2dbg.c: Fix compile time warning messages. - * config/tc-mcore.c (INST_BYTE0): Redefine to handle big and - little endian targets. - (INST_BYTE1): Redefine to handle big and little endian - targets. - (cpu_type): New type: Select between M340 and M210. - (parse_psrmod): New function: Parse the PSRCLR and PSRSET - instructions of the M340. - (md_assemble): Add support for the MULSH and OPSR classes of - instructions. - (md_atof): Add support for little endian targets. - (md_parse_option): Add support for -EL, -EB and -mcpu command - line switches. - (md_convert_frag): Add support for little endian targets. - (md_apply_fix3): Add support for little endian targets. - (md_number_to_chars): Add support for little endian targets. +2000-12-03 Kazu Hirata -2000-02-10 Timothy Wall + * config/tc-a29k.c: Fix formatting. + * config/tc-alpha.c: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-cris.c: Likewise. + * config/tc-hppa.c: Likewise. + * config/tc-i370.c: Likewise. + * config/tc-i386.c: Likewise. + * config/tc-i860.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-m68hc11.c: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-m88k.c: Likewise. + * config/tc-pj.c: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-sh.c: Likewise. + * config/tc-sparc.c: Likewise. + * config/tc-tahoe.c: Likewise. + * config/tc-vax.c: Likewise. + +2000-12-01 Chris Demetriou + + * config/tc-mips.c (mips_ip): When calculating offsets, + don't accept as constant the difference between the + addresses of symbols in two different sections. + + * config/tc-mips.c (macro_build): Add new 'U' and 'J' operand + specifiers. + (validate_mips_insn): Likewise. Also, update 'B' operand + specifier to use OP_*_CODE20 constants and delete 'm' operand + specifier. + (mips_ip): Remove 'm' operand specifier, add 'U' and 'J' + operand specifiers. Change warning generated by 'B' operand + specifier to reflect its new multi-purpose usage. + + * config/tc-mips.c (mips_set_options): Use ISA_UNKNOWN rather than + -1, and update comment. + (file_mips_isa): Likewise. + (mips_cpu): Use CPU_UNKNOWN rather than -1, and update comment. + (ISA_HAS_COPROC_DELAYS, ISA_HAS_64BIT_REGS, gpr_interlocks): Use + ISA_* constants rather than hard-coded numbers. + (mips_cpu_info): New structure. + (mips_cpu_info_table): New table describing CPU and ISA names + and numbers. + (mips_cpu_info_from_name, mips_cpu_info_from_isa, + mips_cpu_info_from_cpu): New functions. + (mips_isa_to_str): New function to get string for ISA name. + (mips_cpu_to_str): Convert to use mips_cpu_info_from_cpu, and + return const char *. + (md_begin): Redo CPU and ISA selection logic, using + mips_cpu_info_from_*. Convert to use ISA_* constants rather + than hard-coded numbers. + (append_insn, mips_emit_delays, macro, macro2): Convert to use + ISA_* constants rather than hard-coded numbers. + (mips_ip): Convert to use mips_isa_to_str to get ISA name. + (md_longopts): Delete OPTION_NO_MIPS32. + (md_parse_option): Convert to use ISA_* constants rather than + hard-coded numbers. Make OPTIONS_MIPS32 case treat MIPS32 + as an ISA. Delete OPTION_NO_MIPS32 case. Convert OPTION_MCPU + to use strcasecmp to recognize "default" and to use + mips_cpu_info_from_name to get CPU numbers from argument. + (md_show_usage): Move -mips32 so it's with the rest of the ISA + flags. Change 4Kc, 4Kp and 4Km CPU entries to just be + mips32-4k. + (s_mipsset): Accept ISA value 32. + * doc/as.texinfo: Clean up MIPS options summary slightly, + remove -no-mips32. Add note about -mips4 and -mips32 + specifying those ISA levels. Delete -mips32 and -no-mips32 + cpu flag descriptions. + * doc/c-mips.texi: Add -mips32 to list of ISA switches. Clean + up the supported CPU switch list, and replace 4Kc, 4Km, and + 4Kp entries with a single mips32-4k entry. Note that you can + use ".set mips32". + + * tc-mips.c (ISA_HAS_64BIT_REGS): Add checks for ISA_MIPS5 and + ISA_MIPS64. + (md_longopts, OPTION_MIPS5, OPTION_MIPS64): Add options for + -mips5 and -mips64. + (md_parse_option): Add cases for OPTION_MIPS5 and + OPTION_MIPS64. + (md_show_usage): Mention -mips5 and -mips64 arguments. + (s_mipsset): Add cases for MIPS5 and MIPS64. + (mips_cpu_info_table): Add entries for MIPS5 and MIPS64 ISAs + and pseudo-CPUs. + * doc/as.texinfo: Mention -mips5 and -mips64 options + and their meanings. + * doc/c-mips.texi: Likewise. Also update introduction + and ".set" usage information. + + * config/tc-mips.c (md_show_usage): Add "sb1" to the + CPU list. + (mips_cpu_info_table): Add SB-1 entries. + * doc/c-mips.texi: Add "sb1" to the list of CPUs + known to the -mcpu option. + + * doc/as.texinfo: Correct description of MIPS -mcpu + option, by copying some of the text from doc/c-mips.texi. + +2000-12-01 Joel Sherrill + + * configure.in (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*): + New targets. + (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets. + (sparc*-*-rtems*): Switched from a.out to ELF. + * configure: Regenerate. + * config.in: Regenerate. + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * po/gas.pot: Regenerate. - * read.c (read_a_source_file): If TC_START_LABEL_WITHOUT_COLON is - defined, use it to verify the symbol just read should be a label. +2000-11-30 Philip Blundell -2000-02-10 Timothy Wall + * config/obj-coff.c (obj_coff_weak): Use S_SET_WEAK if it exists, + even in non BFD_ASSEMBLER case. - * app.c (do_scrub_chars): Handle "||" for parallel instructions - when DOUBLEBAR_PARALLEL is defined. Avoid stripping whitespace - around colons when KEEP_WHITE_AROUND_COLON is defined. - * doc/internals.texi (CPU backend): Document DOUBLEBAR_PARALLEL - and KEEP_WHITE_AROUND_COLON. +2000-11-30 Diego Novillo -2000-02-08 Timothy Wall + * tc-i386.c (md_assemble): Swap i.disp_relocs when using intel + syntax. - * read.c (s_rept): Call do_repeat, which abstracts the repeat - logic. - (do_repeat): New. Abstract repeat logic so that a "break" can be - implemented. - (end_repeat): New. Provide support for a "break" out of the - repeat loop. - * read.h: Add prototypes for new functions. - -2000-02-08 Timothy Wall +2000-11-29 Richard Henderson - * doc/internals.texi: Document NUMBERS_WITH_SUFFIX macro. - * as.h: Provide a default NUMBERS_WITH_SUFFIX definition (zero). - * expr.c: Handle numbers with suffixes if NUMBERS_WITH_SUFFIX is - non-zero. - -2000-02-08 Timothy Wall + * dwarf2dbg.c: Rewrite from scratch. Queue all debugging output + until dwarf2_finish; use relaxation to get cross-fragment offsets; + thread multiple subsegments properly; handle multiple code + sections properly; emit proper compilation unit info for assembler + generated debugging. - * read.c: Added elseif to directives table. - * read.h: Added prototype for s_elseif. - * doc/as.texinfo: Added description for elseif. - * cond.c (s_elseif): New function - -2000-02-04 Timothy Wall + * as.h (enum _relax_state): Add rs_dwarf2dbg. + * dwarf2dbg.h (struct dwarf2_line_info): Remove filename. + (dwarf2dbg_estimate_size_before_relax): Declare. + (dwarf2dbg_relax_frag, dwarf2dbg_convert_frag): Declare. + * write.c: Include dwarf2dbg.h. + (cvt_frag_to_fill): Handle rs_dwarf2dbg. + (relax_segment): Likewise. - * listing.c (print_lines): Remove conditionals causing bug in - listings. +2000-11-28 Hans-Peter Nilsson -2000-02-03 Timothy Wall - - * as.h: Define OCTETS_PER_BYTE and OCTETS_PER_BYTE_POWER - default values. - * frags.c (frag_new): Calculate fr_fix in octets - (frag_now_fix) Return offset as target address offset (bytes). - (frag_now_fix_octets) New - Return offset in octets (8-bit - quantities). - * frags.h: Added prototype for frag_now_fix_octets(). - Distinguish between octets and bytes in field descriptions. - * listing.c (calc_hex): Account for octets vs bytes when - printing addresses/offsets. - (print_lines) Ditto. Also, if LISTING_WORD_SIZE is not 1, and - target is little-endian, print the octets in a word in big-endian - order so that the display looks like a proper hexadecimal number, - instead of having the octets reversed. - * read.c (do_align): When recording alignment, alignment power - should be in terms of target bytes (minimum addressible unit) - instead of octets. - (do_org) Convert ORG target address (byte) argument into an - octet offset when generating a variable fragment. - * symbols.c (resolve_symbol_value): Symbol final value - converted to a target address offset (bytes) from its octet offset. - * config/obj-coff.c (coff_frob_symbol): Symbol target address - offset (bytes) is adjusted by the frag offset (octets) converted - to bytes. - (coff_frob_section) Section alignment power is in terms of bytes; - convert it to an octet alignment power when calculating size (and - size mask) in octets. Don't modify the section size in order to - "align" it for TI COFF, since that format has a different method - for storing alignment information. - -2000-02-01 Timothy Wall + * config/tc-sh.c (md_convert_frag) : Use as_bad_where instead of as_bad. Tweak error message + accordingly. Stabilize frag by updating fix part and resetting + variant part. + : Ditto. + (sh_elf_cons): Cast *input_line_pointer to unsigned char when + indexing is_end_of_line[]. + (md_assemble): Initialize size to 0. + (md_section_align): Mark parameter seg as unused. + (parse_reg): Parse names case-insensitively. - * stabs.c (generate_asm_file): Escape backslashes in stabs file - entries, matching the way GCC generates them. If not escaped, the - filename is encoded incorrectly. +2000-11-28 Kazu Hirata -2000-01-31 Nick Clifton - * config/tc-arm.c (reg_table): Add support for ATPCS register - naming conventions. + * config/obj-aout.h: Fix formatting. + * config/obj-bout.h: Likewise. + * config/obj-coff.c: Likewise. + * config/obj-coff.h: Likewise. + * config/obj-elf.h: Likewise. + * config/obj-som.h: Likewise. + * config/obj-vms.c: Likewise. + * config/obj-vms.h: Likewise. + * config/tc-h8300.h: Likewise. + * config/tc-ns32k.h: Likewise. + * config/tc-sparc.h: Likewise. + * config/tc-tic54x.h: Likewise. + * config/tc-z8k.h: Likewise. -2000-01-31 Geoff Keating - - * config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Don't define if - already defined. - * config/tc-ppc.h [OBJ_XCOFF] (OBJ_COPY_SYMBOL_ATTRIBUTES): - New macro. - * config/tc-ppc.c (ppc_fix_adjustable): Don't look at the frag - of a symbol when we really care about its value. +2000-11-28 Nick Clifton -2000-01-19 Chandra Chavva + * doc/as.1 (COPYING): Mention that the GNU Free Documentation + License is present in the sources, but not the output, and + also available from the GNU website. + (GNU Free Documentation License): Comment out this section. - * config/tc-mcore.c (md_assemble): Give warning message if - operands passes to instruction are more than the spec. +2000-11-28 Hans-Peter Nilsson -2000-01-27 Thomas de Lellis + * Makefile.am (CPU_OBJ_VALID): Add case to filter out invalid coff + targets. Remove i860 from valid a.out targets. + * Makefile.in: Regenerate. - * config/tc-arm.c (armadjust_symtab): If the assembler is in - Thumb mode but the label seen was not declared as '.thumb_func' - then set the ST_INFO type to STT_ARM_16BIT mode. This allows - correct disassembly of Thumb code bounded by non function labels. + * config/tc-cris.c: Include dwarf2dbg.h. + (md_pseudo_table): Add .file and .loc. + (md_assemble): Call dwarf2_emit_insn if generating ELF. + (s_cris_file, s_cris_loc): New. + * config/tc-cris.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. + * Makefile.am: Regenerate dependencies. + * Makefile.in: Regenerate. -2000-01-27 Alan Modra +2000-11-28 Alan Modra - * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c - Add dependencies for e-i386aout.o. Fix 2 comment lines. + * expr.c (STANDARD_MUL_PRECEDENCE): Correct value. + (MRI_MUL_PRECEDENCE): Likewise. + (op_rank): Fix a comment typo. - * Makefile.in: Same here. - Update copyright. +2000-11-26 Stephane Carrez - * configure.in: Set bfd_gas for i386-aout when primary target - is bfd. Handle i386aout emulation. Don't use te_file=multi, as - we may need the primary te_file. Remove incorrect comment. + * config/tc-m68hc11.c (build_indexed_byte): Print the offset in + the error message. + (get_operand): Fix analysis for movw/movb instructions. +2000-11-24 Nick Clifton + + * configure.in (xscale-elf): Add target. + (xscale-coff): Add target. * configure: Regenerate. - * config/e-i386aout.c: New file. + * config/tc-arm.c (ARM_EXT_V5E): New ARM architecture + extenstion. + (ARM_EXT_XSCALE): New ARM architecture extension. + (ARM_LONGMUL): Rename to ARM_EXT_LONGMUL. + (ARM_HALFWORD): Rename to ARM_EXT_HALFWORD. + (ARM_THUMB): Rename to ARM_EXT_THUMB. + (ARM_ARCH_V4): Remove processor from architecture. + (ARM_ARCH_3M): New architecutre definition. + (ARM_ARCH_V5TE): New architecutre definition. + (ARM_ARCH_XSCALE): New architecutre definition. + (CPU_DEFAULT): Allow to be defaulted to XScale. + (atpcs): New boolean variable. + (ldr_flags): Support 'd' flag for double word loads. + (str_flags): Support 'd' flag for double word stored. + (do_mia): New function. + (do_mar): New function. + (do_mra): New function. + (do_pld): New function. + (do_ldrd): New function. + (do_blx): New function. + (do_bkpt): New function. + (do_clz): New function. + (do_lstc2): New function. + (do_cdp2): New function. + (do_t_blx): New function. + (do_t_bkpt): New function. + (do_smla): New function. + (do_smlal): New function. + (do_smul): New function. + (do_qadd): New function. + (do_co_reg2c): New function. + (LONGEST_INSN): Redefine to 7. + + * doc/c-arm.texi: Document -mxscale, -mmarmv5te and -matpcs + command line switches. + +2000-11-22 Jim Wilson + + * config/tc-ia64.c (pseudo_func): Add missing initializers. + (struct rsrc): Make line unsigned. + (gr_values): Add missing initializer. + (SLOT_NUM_NOT_SET): Add unsigned cast. + (ia64_elf_section_flags, output_vbyte_mem, count_output, dot_radix, + dot_fframe, dot_vframe, dot_vframesp, dot_vframepsp, dot_save, + dot_restore, dot_restorereg, dot_restorereg_p, dot_handlerdata, + dot_unwentry, dot_altrp, dot_saveg, dot_savef, dot_saveb, dot_savegf, + dot_spill, dot_spillreg, dot_spillreg_p, dot_label_state, + dot_copy_state, dot_unwabi, dot_personality, dot_proc, dot_body, + dot_prologue, dot_endp, dot_regstk, dot_psr, dot_alias, dot_ln, + dot_reg_val, dot_entry, dot_mem_offset, ia64_init, mark_resource, + md_undefined_symbol, md_apply_fix3, tc_gen_reloc, ia64_md_do_align): + Add ATTRIBUTE_UNUSED to unused parameters. + (convert_expr_to_ab_reg): Add parens. + (convert_expr_to_xy_reg): Add parens. Comment out >= REG_GR test. + (dot_prologue): Initialize grsave when declared. + (md_pseudo_table): Add missing initializers. + (operand_match): Add casts to bfd_vma. + (emit_one_bundle): Delete unused local prev. Make required_template + unsigned. + (specify_resource): Cast i to unsigned. + (note_register_values): Use fprintf_vma. + (print_dependency): Likewise. + +2000-11-21 Jim Wilson + + * config/tc-ia64.c (generate_unwind_image): Call record_alignment + for unwind info section. + (dot_endp): Likewise for unwind section. + + * config/tc-ia64.c (emit_one_bundle): Pass size of 8 not 4 to + fix_new_exp. + +2000-11-21 Jakub Jelinek + + * config/tc-sparc.c (md_pseudo_table): Add .file and .loc. + (output_insn): Call dwarf2_emit_insn. + * config/tc-sparc.h (DWARF2_LINE_MIN_INSN_LENGTH): New. + +2000-11-17 Richard Henderson + + * ehopt.c (eh_frame_code_alignment): New arg `in_seg', update all + callers. Don't switch segments. Expect CIE == -1 in .debug_frame. + (check_eh_frame): Handle .eh_frame and .debug_frame concurrently. + +2000-11-17 Nick Clifton + + * config/tc-arm.c (md_pseudo_table): Add support for .line and + .file pseudo ops. + +2000-11-17 Richard Henderson + + * config/tc-i386.c (md_pseudo_table): Add .file and .loc. + +2000-11-17 Richard Henderson + + * dwarf2dbg.c (dwarf2_gen_line_info): Early out for no line number. + * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Adjust for + tri-state definition of alpha_flag_mdebug. + * config/tc-alpha.c (alpha_flag_mdebug): Init to -1. + (s_alpha_file): Store first .file directive. + (s_alpha_stab): New. + (md_pseudo_table): Add stabs and stabn. + +2000-11-17 Richard Henderson + + * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn. + +2000-11-17 Richard Henderson + + * as.c (debug_type): Init to DEBUG_UNSPECIFIED. + (main): Call dwarf2_finish. + * as.h (debug_type): Clarify documentation of the meaning + of this variable. + * dwarf2dbg.c (DWARF2_LINE_MIN_INSN_LENGTH): Default to 1. + (print_stats): Fix parenthesis problem. + (now_subseg_size): New. + (dwarf2_finish): Use it. If DEBUG_DWARF2, emit bits for .debug_info. + (dwarf2_directive_file): Don't set debug_type. + (dwarf2_where): Honor DEBUG_DWARF2 first. + (dwarf2_emit_insn): Renamed from dwarf2_generate_asm_lineno; + do nothing if not emitting dwarf2 debug info, or no work. + * dwarf2dbg.h (dwarf2_emit_insn): Update. + * ecoff.c (add_file): Turn on DEBUG_ECOFF only if DEBUG_UNSPECIFIED. + (ecoff_new_file): Likewise. + * read.c (generate_lineno_debug): Kill ecoff hackery. Update + commentary wrt dwarf2. + + * config/tc-alpha.c (alpha_adjust_symtab_relocs): Add + ATTRIBUTE_UNUSED as needed. + (emit_insn): Call dwarf2_emit_insn. + (s_alpha_file): New. + (s_alpha_loc): New. + (s_alpha_coff_wrapper): Don't handle them. + (md_pseudo_table): Update for .file and .loc. + * config/tc-alpha.h (DWARF2_LINE_MIN_INSN_LENGTH): New. + + * config/tc-arm.c (output_inst): Update for dwarf2_emit_insn; + don't protect with debug_type. + * config/tc-hppa.c (md_assemble): Likewise. + * config/tc-m68hc11.c (m68hc11_new_insn): Likewise. + * config/tc-mn10300.c (md_assemble): Likewise. + * config/tc-sh.c (md_assemble): Likewise. + * config/tc-v850.c (md_assemble): Likewise. - * as.c (USE_EMULATIONS): Move to before print_version_id. - (struct emulation): Add i386aout. - (show_usage): Split text strings. Reformat -a text. Add --em - help. - Update copyright. + * config/tc-arm.c (arm_end_of_source): Remove. + * config/tc-hppa.c (pa_end_of_source): Remove. + * config/tc-m68hc11.c (m68hc11_end_of_source): Remove. + * config/tc-mn10300.c (mn10300_finalize): Remove. + * config/tc-sh.c (sh_finalize): Remove. + * config/tc-v850.c (sh_finalize): Remove. - * obj.h (struct format_ops): Add s_get_other and s_get_desc. - (aout_format_ops): New. - Update copyright. + * config/tc-arm.h (md_end): Remove. + * config/tc-hppa.h (md_end): Remove. + (DWARF2_LINE_MIN_INSN_LENGTH): New. + * config/tc-m68hc11.h (md_end): Remove. + * config/tc-mn10300.h (md_end): Remove. + * config/tc-sh.h (md_end): Remove. + * config/tc-v850.h (md_end): Remove. - * read.c (s_lcomm_internal): Rewrite OBJ_AOUT,OBJ_BOUT - preprocessor conditional and add aout USE_EMULATIONS tests. - (read_a_source_file): Don't pass error strings to printf as - format arg. - Update copyright. + * config/tc-ia64.c (emit_one_bundle): Don't protect + dwarf2 bits with debug_type. + (md_assemble): Likewise. + (ia64_end_of_source): Don't call dwarf2_finish. - * gasp.c (exp_get_abs): Don't pass error strings to printf as - format arg. - (do_data): Same here. - (process_file): And here. - Update copyright. +2000-11-16 Jim Wilson - * symbols.c (colon): Rewrite "already defined" fatal message - code for aout with USE_EMULATIONS. - Update copyright. + * config/tc-ia64.c (errata_nop_necessary_p): Abort if general regno + >= 128 instead of > 128. Abort if predicate regno is >= 64 instead of + > 16. - * config/obj-aout.c (OBJ_HEADER): Define. - (obj_pseudo_table): Rename to aout_pseudo_table. Init all - fields of sentinel. - (obj_aout_frob_symbol): Expand S_GET_DESC, S_GET_TYPE, - S_GET_OTHER, S_SET_TYPE macros since we don't need obj-multi - forms here. - (obj_aout_type): Expand S_SET_OTHER here too. - (obj_read_begin_hook): Remove. - (aout_pop_insert): New. - (obj_aout_s_get_other): New. - (obj_aout_s_get_desc): New. - (aout_format_ops): New. - Update copyright. +2000-11-16 H.J. Lu - * config/obj-aout.h (obj_pop_insert): Define so non-multi usage - gets aout_pseudo_table. - (aout_pseudo_table): Declare. - (obj_read_begin_hook): Define. - Update copyright. + * config/obj-elf.c (obj_elf_symver): Don't check the missing + version name. - * config/obj-coff.c (obj_pseudo_table): Rename to - coff_pseudo_table. - (coff_pop_insert): Use coff_pseudo_table. - (coff_sec_sym_ok_for_reloc): Remove. - (coff_format_ops): Add 0 entries for s_get_size, s_set_size, - and comment all zero entries and remove #if 0 code. - Update copyright. +2000-11-15 Kazu Hirata - * config/obj-coff.h (obj_pop_insert): Define. - (coff_pseudo_table): Declare. - Update copyright. + * config/tc-tic30.c: Fix formatting. + * config/tc-tic80.c: Likewise. + * config/tc-v850.c: Likewise. + * config/tc-vax.c: Likewise. + * config/tc-w65.c: Likewise. + * config/tc-z8k.c: Likewise. - * config/obj-ecoff.c (ecoff_format_ops): Add 0 entries for - s_get_size, s_set_size. Comment all zero entries. - Update copyright. +2000-11-14 DJ Delorie - * config/obj-elf.c (elf_s_get_other): New function. - (obj_read_begin_hook): Rename to elf_obj_read_begin_hook. - (obj_symbol_new_hook): Rename to elf_obj_symbol_new_hook. - (elf_format_ops): Add elf_s_get_other, 0 s_get_size entry, and - comment. - (obj_elf_parse_section_letters): Don't pass error strings to - printf as format arg. - Update copyright. + * config/tc-v850.c: Support dwarf2. + * config/tc-v850.h: Ditto. - * config/obj-elf.h (ECOFF_DEBUGGING): Define when - OBJ_MAYBE_ECOFF. - (elf_s_get_other): Declare. - (S_GET_OTHER) Define as elf_s_get_other if not already - defined. - (S_SET_OTHER): Only define when not already defined. - (elf_obj_read_begin_hook): Declare. - (obj_read_begin_hook): Define. - (elf_obj_symbol_new_hook): Declare. - (obj_symbol_new_hook): Define. - Update copyright. + * config/tc-v850.c (cons_fix_new_v850): Don't rely on + parse_cons_expression_v850 to initialize hold_cons_reloc. - * config/obj-multi.h: Add copyright header and protect against - multiple inclusion. Add * to all function pointers. - (OBJ_HEADER): If defined, include it rather than other defines - in this file. - (obj_frob_file_after_relocs): Test for NULL. - (obj_symbol_new_hook): Here too. - (obj_sec_sym_ok_for_reloc): And here. - (S_GET_OTHER): Define. - (S_GET_DESC): Define. - (ECOFF_DEBUGGING): Remove as it's done in obj-elf.h - (OBJ_MAYBE_ELF): Update comment. +2000-11-15 Bernd Schmidt - * config/tc-i386.c (i386_immediate): Add OBJ_MAYBE_AOUT to - OBJ_AOUT preprocessor conditional and handle emulation by - testing OUTPUT_FLAVOR. - (i386_displacement): Here too. - (md_section_align): Similarly here. - (i386_target_format): Conditionally compile when more than one - of OBJ_MAYBE_{ELF,COFF,AOUT} defined. Add aout case. - (i386_immediate): Fix error message for aout BFD_ASSMBLER. - (i386_displacement): Here too. - Update copyright. + * tc-ia64.c (struct md): New entries LAST_GROUPS, GROUP_IDX. + (errata_nops_necessary_p): New function. + (emit_one_bundle): Call it. Update the GROUP_IDX field in struct + md. - * config/tc-i386.h (AOUT_TARGET_FORMAT): Define for each TE_*. - Define TARGET_FORMAT for aout only when not multi. - Update copyright. +2000-11-14 Jim Wilson - * config/te-multi.h: Delete file as it's identical to te-generic.h + * config/tc-ia64.c (ia64_target_format): If EF_IA_64_BE not set, then + return little endian bfd formats. -2000-01-15 Alan Modra +2000-11-14 Kazu Hirata - * config/tc-i386.h (DWORD_MNEM_SUFFIX): Delete. - * config/tc-i386.c (DWORD_MNEM_SUFFIX): Rename all occurrences to - LONG_MNEM_SUFFIX. + * config/aout_gnu.h: Fix formatting. + * config/atof-vax.c: Likewise. + * config/m68k-parse.h: Likewise. + * config/m88k-opcode.h: Likewise. + * config/obj-elf.c: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-cris.c: Likewise. + * config/tc-i386.c: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-mn10300.c: Likewise. + * config/te-386bsd.h: Likewise. + * config/te-hppa.h: Likewise. + * config/te-nbsd.h: Likewise. + * config/te-ppcnw.h: Likewise. + * config/te-sparcaout.h: Likewise. + * config/te-tmips.h: Likewise. + * config/vax-inst.h: Likewise. + * config/vms-conf.h: Likewise. - * config/tc-i386.h (INTEL_DWORD_MNEM_SUFFIX): Rename to - DWORD_MNEM_SUFFIX. - * config/tc-i386.c (INTEL_DWORD_MNEM_SUFFIX): Here too. Fix some - comments. +2000-11-14 Jakub Jelinek -2000-01-13 Clinton Popetz + * config/tc-alpha.c (s_alpha_prologue): Preserve visibility bits. - * config/tc-mips.c (mips_do_align): New function. - * config/tc-mips.h (md_do_align): Define. +2000-11-13 H.J. Lu -2000-01-10 Philip Blundell + * config/obj-elf.c (elf_frob_symbol): Support + ".symver name,name2@@@nodename". + (elf_frob_file_before_adjust): Likewise. - * doc/c-arm.texi (ARM Options): Fix typo. - (ARM-Chars): Correct description of `#'. Mention that `;' is a - line separator for Linux. - * doc/as.texinfo (Comments): Mention the ARM. + * doc/as.texinfo: Updated for ".symver name,name2@@@nodename" + and ".symver name,name2@@@nodename". + Fix a typo. -2000-01-10 Philip Blundell +2000-11-12 H.J. Lu (hjl@gnu.org) - * configure.in (arm*-*-conix*): New target. - (arm*-*-linux-gnu*): Match instead of arm-*-linux* and - armv*-*-linux-gnu. - * configure: Regenerate. + * config/obj-elf.c (obj_elf_symver): Check missing version + name. -2000-01-03 Martin v. Loewis +2000-11-12 H.J. Lu (hjl@gnu.org) - * config/obj-elf.c (elf_pseudo_table): Define visibility pseudos. - (obj_elf_visibility): New function. - - * doc/as.texinfo (Visibility): New node: document visibility - pseudo ops. + * dwarf2dbg.c (dwarf2_generate_asm_lineno): Use addressT + instead of bfd_vma for non-bfd assemblers. -1999-12-27 Alan Modra - - * config/tc-i386.c (MATCH): Relax JumpAbsolute check. Emit a - warning for absolute jump/call without `*' in non-intel mode. No - need to set i.types[0] JumpAbsolute in intel mode. - -1999-12-22 Philip Blundell - - * config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate - hook function when changing sections. - (arm_s_data): Likewise. - -1999-12-14 Nick Clifton - - * config/tc-arm.c (md_parse_option): Add support for -marm720 - command line switch. - -Tue Nov 30 22:59:00 1999 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10300.c (md_pseudo_table): Add ".am33" pseudo-op. - (r_registers, xr_registers): Define. - (r_register_name, xr_register_name): New functions. - (md_assemble): Handle new am33 operand types and instruction - formats. - (mn10300_insert_operand, check_operand): Likewise. - -1999-11-29 Nick Clifton - - * config/tc-arm.c (thumb_mode): Turn into a tristate variable. - (s_force_thumb): Set thumb_mode to 2. - (md_assemble): Do not complain about thumb instructions on a - non-thumb target if thumb_mode is set to 2. - -1999-11-28 Michael Meissner - - * config/tc-alpha.c (toplevel): Include struc-symbol.h. - (alpha_macro_arg): Add MACRO_{LITERAL,BASE,BYTOFF,JSR} cases. - (O_...): Add new machine dependent expressions if we are handling - explicit relocations. - (alpha_reloc_op): New static table holding the explicit relocation - information. - (alpha_literal_hash): New static to hold the hash table for - explicit relocations. - (alpha_macros): Add support for explicit relocations. - (md_begin): If explicit relocations, initialize hash table. - (md_assemble): Don't print a second error if tokenize_arguments - already printed an error message. - (md_apply_fix): Add support for explicit relocations. - (alpha_force_relocation): Ditto. - (alpha_fix_adjustable): Ditto. - (alpha_adjust_symtab): New function to support explicit - relocations. - (alpha_adjust_symtab_relocs): Ditto. - (debug_exp): Debug stub compiled if DEBUG_ALPHA is defined. - (tokenize_arguments): Add debug code if DEBUG_ALPHA is defined. - Add support for explicit relocations. Return -2 if an error - message was already printed. - (find_macro_match): Add support for explicit relocations. Comment - each of the cases. - (emit_insn): Add support for explicit relocations. - (assemble_tokens): Ditto. - (emit_ldgp): Ditto. - (load_expression): Ditto. - (emit_lda): Ditto. - (emit_ldah): Ditto. - (emit_ir_load): Ditto. - (emit_loadstore): Ditto. - (emit_ldXu): Ditto. - (emit_ldil): Ditto. - (emit_sextX): Ditto. - (emit_division): Ditto. - (emit_jsrjmp): Ditto. - (emit_retjcr): Ditto. - - * config/tc-alpha.h (RELOC_OP_P): Enable explicit relocations if - ELF object format. - (tc_adjust_symtab): If explicit relocations, call the function - alpha_adjust_symtab. - (TC_FIX_TYPE): Add fields to be able to move explicit lituse - relocations next to the literal relocation they reference. - (TC_INIT_FIX_DATA): Initialize the new fields. - (TC_FIX_DATA_PRINT): Print the new fields if DEBUG5 is defined. - -Wed Nov 24 20:27:58 1999 Jeffrey A Law (law@cygnus.com) - - * config/tc-hppa.c (pa_ip): Handle PA2.0 unit completers. Handle - 'B' operand for PA2.0 bb instruction. - -1999-11-18 Nick Clifton - - * config/tc-mcore.h (TC_FORCE_RELOCATION): Define for Mcore-pe - target. - - * config/tc-mcore.c (tc_gen_reloc): Support generation of RVA - relocs. - (mcore_force_relocation): Force relocations to be generated for - RVA relocs. +2000-11-09 Kazu Hirata -1999-11-16 Alan Modra + * itbl-ops.c: Fix comment typos. - * config/tc-i386.c (i386_immediate): Disallow O_big immediates. - (i386_displacement): Disallow O_big displacements. +2000-11-08 Jim Wilson -Mon Nov 15 20:12:43 1999 Donald Lindsay + * config/tc-ia64.c (struct unw_rec_list): Add slot_frag field. + (struct unwind): Add next_slot_frag field. + (slot_index): New parameters slot_frag and first_frag. Add code + to add in frag sizes when different. Add comments. + (fixup_unw_records): New locals first_frag and last_frag. Pass new + arguments to slot_index. + (emit_one_bundle): Set slot_frag field. Set next_slot_number after + loop end. Set next_slot_frag field. - * config/tc-arm.c (do_mia,do_mar,do_mra,do_pld,do_ldrl,do_co_reg): Small - improvements in error checking. - (md_assemble): Support for unconditional ARM instructions. - (md_parse_option): Support for -m[arm]v5e flag. +2000-11-07 H.J. Lu -1999-11-12 Nick Clifton + * doc/as.texinfo (.symver): Updated for versioned symbol + reference. - * macro.c (buffer_and_nest): Do not check beyond the end of the - buffer. + * obj.h (format_ops): Add the frob_file_before_adjust field. -1999-11-11 Nick Clifton + * config/obj-aout.c (aout_format_ops): Set the + frob_file_before_adjust field to 0. + * config/obj-coff.c (coff_format_ops): Likewise. + * config/obj-ecoff.c (ecoff_format_ops): Likewise. - * macro.c (buffer_and_nest): Look for seperator after TO and - FROM tokens. + * config/obj-elf.c (obj_elf_symver): Allow duplicated version + name. + (elf_frob_file_before_adjust): New function to remove unneeded + versioned symbols from the symbol table. + (elf_format_ops): Set the frob_file_before_adjust field to + elf_frob_file_before_adjust. -1999-11-08 Andrew Haley + * config/obj-elf.h (obj_frob_file_before_adjust): Defined if + not defined. - * app.c (do_scrub_chars): When in State 10, treat backslash - characters in the same way as as symbol characters. + * config/obj-multi.h (obj_frob_file_before_adjust): Defined. -1999-11-07 Richard Henderson +2000-11-07 Peter Targett - * config/tc-alpha.c (alpha_align): Check, don't assert, that - the previous label was in the current section before playing - with auto-alignment. + * gas/config/tc-arc.h: Avoid warnings for LITTLE_ENDIAN and + BIG_ENDIAN macros. + * gas/config/tc-arc.c: Use S_IS_LOCAL to test local symbols. + Fix compile time warning messages. -1999-11-06 Nick Clifton +2000-11-07 Nick Clifton - * config/tc-v850.c (v850_force_relocation): Force relocation - for weak symbols. - (v850_pcrel_from_selection): Do not compute a pcrel offset if - the symbol is weak. + * stabs.c (generate_asm_file): Increase length of xmalloc'ed + buffer in order to avoid buffer overflows. -1999-11-05 Michael Meissner +2000-11-06 Steve Ellcey - * expr.h (operatorT): Increase machine dependent operators to 16. - * expr.c (op_rank): Ditto. + * config/tc-ia64.c (md_shortopts, md_parse_option, md_show_usage): + Change M to m for -milp32 or -mlp64 to match gcc. + (dot_endp): Use bytes_per_address instead of 8. + (emit_one_bundle): Use number_to_chars_littleendian instead of + md_number_to_chars. + (fix_insn): Likewise. + (ia64_init): New function. + (ia64_target_format): New function. + (md_begin): Set endianness, arch, and machine as appropriate. + * config/tc-ia64.h: (TARGET_BYTES_BIG_ENDIAN, md_number_to_chars): + Make these macros depend on TE_HPUX macro. + (TARGET_FORMAT): Define. + (HOST_SPECIAL_INIT): Define. + * config/te-hpux.h: New file. + * configure.in: Add "ia64-*-hpux*" target to configure. + * configure: Regenerate. -1999-11-03 Ian Lance Taylor +2000-11-06 Kazu Hirata - * read.c (pseudo_set): Reject attempts to set the value of a - section symbol. + * as.c: Fix formatting. + * dwarf2dbg.c: Likewise. + * input-file.c: Likewise. + * input-file.h: Likewise. + * input-scrub.c: Likewise. + * itbl-ops.c: Likewise. + * listing.c: Likewise. + * macro.h: Likewise. + * messages.c: Likewise. + * read.c: Likewise. + * subsegs.c: Likewise. + * subsegs.h: Likewise. + * write.c: Likewise. - * config/obj-elf.c (obj_elf_ident): Call md_flush_pending_output - if it is defined. +2000-11-06 Nick Clifton - * config/obj-elf.c (elf_set_index): Add ATTRIBUTE_UNUSED. + * doc/as.texinfo: Add GNU Free Documentation License. + * doc/gasp.texi: Add GNU Free Documentation License. + * doc/as.1: Add GNU Free Documentation License. - * config/obj-elf.c (elf_frob_file_after_relocs): Don't pass NULL - to bfd_set_section_contents. +2000-11-05 Nick Clifton -1999-11-03 Nick Clifton + * config/tc-arm.c: Add include of "dwarf2dbg.h" - * config/tc-mcore.h (TARGET_BYTES_BIG_ENDIAN): Change to false. +2000-11-02 Per Lundberg -1999-11-01 Gavin Romig-Koch + * configure.in: Recognise i[3456]86-chaosdev-storm-chaos. + * configure: Regenerate. - * config/tc-mips.c (macro_build): Use OPCODE_IS_MEMBER. - (mips_ip): Use OPCODE_IS_MEMBER. +2000-11-01 Nick Clifton -Wed Oct 27 16:50:44 1999 Don Lindsay + * read.c (original_case_string): New global variable. + (read_a_source_file): Copy opcode string into + original_case_string if clobbering the case of the opcode. + * read.h: Export the definition of original_case_string. + * config/tc-arm.c (md_assembler): When parsing a .req + directive use the original opcode string, not the case + clobbered version. - * config/tc-arm.c (reg_required_here): Improve comments. +2000-11-02 Nick Clifton - * config/tc-arm.c (thumb_opcode): Add "variants" field. - (tinsns): Initialize variants field. + * config/tc-mn10300.c (debug_line): Remove this static + variable. + (md_assemble): Call dwarf2_generate_asm_lineno instead of + dwarf2_where and dwarf2_gen_line_info. - * config/tc-arm.c (bad_args, bad_pc): Renamed to BAD_ARGS and - BAD_PC respectively. +2000-11-02 Theo Honohan -1999-10-27 Scott Bambrough + * config/tc-arm.c (do_msr): Improve error message. - * config/tc-arm.c (reloc_map[]): Fix compiler warning. - * config/tc-arm.h: Fix compile time warnings. +2000-10-31 Eric Christopher -Mon Oct 18 18:11:10 MDT 1999 Diego Novillo + * config/tc-mn10300.c (md_apply_fix3): Use valuep if fully resolved + or pc-relative, else use fx_offset. - * tc_d10v.c (find_opcode): Allow ATSIGN to match expressions of the - form @abs16, @(abs16) and @(abs16 + imm). +2000-10-31 Jim Wilson -1999-10-21 Gavin Romig-Koch + * config/tc-ia64.c (struct md): New field tag_fixups. + (ia64_flush_insns): Handle tag_fixups. Error if dangling + qualifying predicate. + (emit_one_bundle): Delete spurious multiplication by one. Handle + tag_fixups. + (ia64_start_line): Error if dangling qualifying predicate. + (defining_tag): New static variable. + (ia64_unrecognized_line, case '['): Parse tags. + (ia64_frob_label): Create tag_fixups. + (md_assemble): Reset md.qp.X_op after using it. - * config/tc-mips.c (ISA_HAS_COPROC_DELAYS) : New. - (ISA_HAS_64_BIT_REGS) New. - (gpr_interlocks,md_begin,reg_needs_delay,append_insn, - mips_emit_delays,macro_build,load_register,load_addresss, - macro,macro2,mips_ip,s_cprestore,s_cpadd): Simplify - and/or use new ISA_xxx macros in expressions involving - ISA, particularly mips_opts.isa. +2000-10-31 Kaz Kojima -1999-10-18 Michael Meissner + * config/tc-sh.c (md_apply_fix [BFD_RELOC_SH_PCDISP12BY2]): Allow 4094. - * expr.h (operatorT): Add machine dependent operators md1..md8. - (expressionS): Make X_op 8 bits instead of 7. Add a X_md field - for the machine dependent operators to use. +2000-10-31 Bernd Schmidt - * expr.c (op_rank): Add machine dependent operators. + * tc-ia64.c (extra_goodness): Only prefer F in slot 1 and B in slot 2. - * config/tc-alpha.c (O_pregister): Define as a machine dependent - operator. - (O_cpregister): Ditto. - (md_begin): Change X_op test that field is wide enough to use - O_max instead of O_alpha_max. - (cpu_types): Fill in missing initializer. - (alpha_num_macros): Make unsigned. - (md_assemble): Make opnamelen be size_t. - (md_apply_fix): Cast alpha_num_operands to int before testing. - (alpha_force_relocation): Ditto. - (alpha_fix_adjustable): Ditto. - (alpha_fix_adjustable): Mark unused arguments ATTRIBUTE_UNUSED. - (tc_gen_reloc): Ditto. - (tc_get_register): Ditto. - (emit_ldgp): Ditto. - (emit_lda): Ditto. - (emit_ldah): Ditto. - (emit_ldil): Ditto. - (s_alpha_ent): Ditto. - (s_alpha_end): Ditto. - (s_alpha_frame): Ditto. - (s_alpha_prologue): Ditto. - (s_alpha_file): Ditto. - (s_alpha_gprel32): Ditto. - (s_alpha_proc): Ditto. - (s_alpha_set): Ditto. - (s_alpha_base): Ditto. - (s_alpha_align): Ditto. - (s_alpha_arch): Ditto. - (alpha_align): Ditto. - (assemble_insn): Suppress unused variable warning. - (emit_insn): Ditto. - (assemble_insn): Don't assume X_op and X_unsigned are in a given - order in the structure. - (s_alpha_coff_wrapper): Avoid int/unsigned comparison. +2000-10-30 Kazu Hirata -Sun Oct 17 17:15:58 1999 Jeffrey A Law (law@cygnus.com) + * expr.c: Fix formatting. + * flonum-copy.c: Likewise. + * flonum.h: Likewise. + * gasp.c: Likewise. + * hash.c: Likewise. - * config/tc-hppa.c (md_apply_fix): Make "fmt" an int. +2000-10-30 Hans-Peter Nilsson -1999-10-12 Alan Modra + * as.h (OPTION_MD_BASE): Bump to 190. + * as.c (parse_args) : Add comment about the need to + check OPTION_MD_BASE in as.h. - * config/tc-i386.c (i386_index_check): Correct #endif location. + * config/tc-sh.c (md_apply_fix): For ELF, do not "adjust back" VAL + for weak symbols. -Mon Oct 11 14:02:40 1999 Geoffrey Keating +2000-10-27 Nick Clifton - * as.c (show_usage): Document new options. - (parse_args): Add --no-warn, --warn, --fatal-warnings, - which become 'W', OPTION_WARN, and OPTION_WARN_FATAL. - (parse_args): Parse the new options. - (main): If there were warnings, and --fatal-warnings - was specified, print an error. - * as.h: New variable, flag_fatal_warnings, for new option. + * configure.in (emulations): Add m68hc12. + * configure: Regenerate. + * po/gas.pot: Regenerate. -Sun Oct 10 01:47:23 1999 Jerry Quinn +2000-10-27 Aldy Hernandez + + * config/tc-arm.c (psrs): Remove lowercase versions of spsr* and + cpsr*. + (arm_psr_parse): Handle lowercase CPSR and SPSR. + +2000-10-25 Nick Clifton + + * dwarf2out.c (dwarf2_generate_asm_lineno): New function: Generate + a DWARF2 line number information sequence. + + *dwarf2out.h: Add prototype for dwarf2_generate_asm_lineno. + + * read.c (generate_lineno_debug): Update comment describing why + DWARF2 line number debug information is not generated + automatically by this function. + + * doc/as.texinfo: Note that --gdwarf2 only works on some targets, + not all. + + * config/tc-arm.h (md_end): Define. + (DWARF2_LINE_MIN_INSN_LENGTH): Define. + + * config/tc-arm.c (output_inst): Call dwarf2_generate_asm_lineno + if generating DWARF2 line numbers. + (arm_end_of_source): New function. Call dwarf2_finish if + necessary. + + * config/tc-hppa.c (md_assemble): Use dwarf2_generate_asm_lineno. + * config/tc-m68hc11.c (m68hc11_new_insn): Use dwarf2_generate_asm_lineno. + * config/tc-sh.c (md_assemble): Use dwarf2_generate_asm_lineno. + +2000-10-25 Diego Novillo + + * tc-i386.c: Fix prototype declarations for functions taking no + arguments. + +2000-10-24 Diego Novillo + + * tc-i386.c (i386_operand_modifier): Remove. + (build_displacement_string): Remove. + (i386_parse_seg): Remove. + (i386_intel_memory_operand): Remove. + (i386_intel_operand): Re-write using recursive descent parser based + on MASM documentation. + (struct intel_parser_s): New structure. + (intel_parser): New static variable. + (struct intel_token): New structure. + (cur_token, prev_token): New static variables. + (T_NIL): Define. + (T_CONST): Define. + (T_REG): Define. + (T_BYTE): Define. + (T_WORD): Define. + (T_DWORD): Define. + (T_QWORD): Define. + (T_XWORD): Define. + (T_SHORT): Define. + (T_OFFSET): Define. + (T_PTR): Define. + (T_ID): Define. + (intel_match_token): New function. + (intel_get_token): New function. + (intel_putback_token): New function. + (intel_expr): New function. + (intel_e05): New function. + (intel_e05_1): New function. + (intel_e06): New function. + (intel_e06_1): New function. + (intel_e09): New function. + (intel_e09_1): New function. + (intel_e10): New function. + (intel_e10_1): New function. + (intel_e11): New function. - * config/tc-hppa.c (pa_ip): Add new codes 'cc', 'cd', 'cC', 'co', - '@'. Change autoincrement completers to fall through to cache control - completers. - - * config/tc-hppa.c (pa_ip): Remove unused args. Add code to '?W' - arg. - (pa_parse_addb_64_cmpltr): New function. - - * config/tc-hppa.c (pa_ip): Change error message. - (pa_ip,pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr) Fix '?N' and - '?Q' args to allow falling through. - - * configtc-hppa.c (pa_ip): Implement conditional codes "?N", "?Q". - Remove unused conditional codes. - (pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr): New. - -Thu Oct 7 00:23:53 MDT 1999 Diego Novillo - - * config/tc-d30v.c (CHAR_BIT): Define. - (check_range): Fix bit operations to support integers bigger than - 32 bits. - -Thu Oct 7 00:11:50 MDT 1999 Diego Novillo - - * config/tc-d10v.c (check_range): Check range for RESTRICTED_NUM3 - operands. +2000-10-20 Jakub Jelinek -Mon Oct 4 17:24:23 1999 Nick Clifton - Doug Evans + * config/tc-sparc.c (sparc_ip): Fix a bug which caused v9_arg_p + instructions to loose any special insn->architecture mask. - Add support for m32rx. - * config/tc-m32r.c (enable_m32rx): New static global. - (enable_special,warn_explicit_parallel_conflicts,optimize): Ditto. - (allow_m32rx): New function. - (M32R_SHORTOPTS): Add `O'. - (md_longopts): Add --m32rx plus several warning options. - (md_parse_option): Handle new options. - (md_show_usage): Print them. - (md_begin): Enable m32rx. - (OPERAND_IS_COND_BIT): New macro. - (first_writes_to_seconds_operands): New function. - (writes_to_pc,can_make_parallel,make_parallel): New functions. - (target_make_parallel,assemble_two_insns): New functions. - (md_assemble): Recognize "insn1 -> insn2" and "insn1 || insn2". - If optimizing and m32rx, try to make consecutive insns parallel. + * config/tc-sparc.c (v9a_asr_table): Add v9b ASRs. + (sparc_md_end, sparc_arch_types, sparc_arch, + sparc_elf_final_processing): Handle v8plusb and v9b architectures. + (sparc_ip): Handle siam mode operands. Support v9b ASRs (and + request v9b architecture if they are used). -Tue Sep 28 14:06:44 1999 Geoffrey Keating +2000-10-18 Michael Sokolov + + * config/tc-m68k.c: Fix the previous misapplied patch. + +2000-10-18 Michael Sokolov + + * config/tc-m68k.h (RELAX_RELOC_*): New definitions for both + BFD_ASSEMBLER and !BFD_ASSEMBLER. + * config/tc-m68k.c (md_convert_frag_1): Use them instead of + BFD_RELOC_*. + +2000-10-17 Kazu Hirata + + * debug.c: Fix formatting. + * depend.c: Likewise. + * dwarf2dbg.c: Likewise. + * dwarf2dbg.h: Likewise. + * ecoff.c: Likewise. + * expr.c: Likewise. + * expr.h: Likewise. + * flonum-konst.c: Likewise. + * frags.h: Likewise. + +2000-10-17 Chandrakala Chavva + + * as.c: New option OPTION_TARGET_HELP. Prints all target specific + options. + * doc/as.texinfo: Added notes about this new option. + +2000-10-16 Hans-Peter Nilsson + + * config/tc-sh.c (JREG): Remove. + (md_convert_frag): Remove #if 0:d code using JREG. + +2000-10-15 Diego Novillo + + * config/tc-i386.c (i386_operand_modifier): Only match + modifiers SHORT and FLAT if they are followed by a space. + (parse_register): When `allow_naked_reg' is set, do not confuse + identifiers that start with a register name with a register. + +2000-10-12 Kazu Hirata + + * app.c: Fix formatting. + * as.c: Likewise. + * as.h: Likewise. + * bit_fix.h: Likewise. + * cgen.c: Likewise. + * cgen.h: Likewise. + * cond.c: Likewise. + +2000-10-11 Alan Modra + + * config/obj-elf.c (elf_frob_symbol): Revert 2000-10-07 change. + +2000-10-07 Alan Modra + + * config/tc-hppa.c (md_apply_fix): Remove plainly wrong assert. + Re-arrange function a little and improve error message. + + * write.c (write_relocs): Fix a comment. + + * config/obj-elf.c (elf_frob_symbol): Make section syms global on + link-once sections. + +2000-10-05 Jim Wilson + + * config/tc-ia64.c (resources_match): Handle IA64_RS_PRr. + +2000-10-05 Alan Modra + + * config/tc-i386.c: Delete some useless comments, reformat others. - * config/tc-mips.c (nopic_need_relax): Allow for the - .sdata.foo sections generated by -fdata-sections, - and for the .gnu.linkonce.s sections generated by C++. + * config/tc-i386.h (TC_FIX_ADJUSTABLE): Add check to cover + non-global syms in linkonce sections. -Thu Sep 23 07:13:45 1999 Jerry Quinn +2000-10-04 Ralf Baechle - * config/tc-hppa.c (pa_ip): Replace 'B', 'M', 'l' and 'g' handling - with cleaner code using completer prefixes. Add 'Y'. + * config/tc-ia64.c (operand_match): Don't use // style comments. + * config/tc-i370.c: Likewise. - * config/tc-hppa.c (pa_ip): Add parens to silence compiler. +2000-09-29 Hans-Peter Nilsson -Wed Sep 22 09:37:19 1999 Jeffrey A Law (law@cygnus.com) + Changes to handle varying register prefix and user symbol prefix. + * config/tc-cris.c (SYNTAX_RELAX_REG_PREFIX, + SYNTAX_ENFORCE_REG_PREFIX, SYNTAX_USER_SYM_LEADING_UNDERSCORE, + SYNTAX_USER_SYM_NO_LEADING_UNDERSCORE, REGISTER_PREFIX_CHAR): New. + (s_syntax, cris_force_reg_prefix, cris_relax_reg_prefix, + cris_sym_leading_underscore, cris_sym_no_leading_underscore): New. + (demand_register_prefix): New variable. + (md_pseudo_table): New pseudo ".syntax". + (md_longopts): New options --no-underscore and --underscore. + (cris_target_format): Return elf32-us-cris or elf32-cris depending + on symbols_have_leading_underscore. + (get_gen_reg): Accept or require REGISTER_PREFIX_CHAR. + (get_spec_reg): Ditto. + (cris_number_to_imm) : Remove FIXME. + Fix formatting. + (md_parse_option) : Deprecate; add reference to + --help. + : New. + (md_show_usage): Be brief and reformat to match continuation of + --help. + * po/gas.pot: Regenerate. - * config/tc-hppa.c (pa_ip): Avoid ANSI specific initialization. - (pa_ip, case 'm'): Failure to get a CBIT specifier just means the - insn does not match and we should try the next insn in the table. +2000-09-28 Alan Modra -1999-09-22 Nick Clifton + * config/tc-hppa.c (hppa_force_relocation): If OBJ_SOM, don't + force relocs for 12 bit branches. + (md_apply_fix): Similarly, adjust logic here. - * config/tc-arm.c (MULTI_SET_PSR): Rename to LDM_TYPE_2_OR_3. +2000-09-28 Alan Modra -Mon Sep 20 04:01:41 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-hppa.c (md_apply_fix): Add fmt assertion. Don't + adjust for external and weak syms as we will use a reloc. Allow + for +8 offset when calculating limits of branches. + (hppa_fix_adjustable): Undo 2000-09-23 change. + (hppa_force_relocation): Likewise. Add fx_addsy assertion. + Correct distance calculation. + (tc_gen_reloc): Print the file name and line number if we can't + handle a fixup. - * config/tc-hppa.c (pa_ip): Fix thinkos in recent cleanup - of PA2.0 support. + From John David Anglin + * config/tc-hppa.c (nonzero_dibits): Define. + (arg_reloc_stub_needed): Check each arg and return value + separately for zero case. + (pa_align): Declare argument `bytes'. -1999-09-19 Alexandre Oliva +2000-09-25 Kazu Hirata - * config/tc-i386.c (md_shortopts): Check OBJ_MAYBE_ELF as well as - OBJ_ELF. If ELF, add "sq". - (md_parse_option): If ELF, ignore -s and -q. - (md_show_usage): Mention ELF options. + * config/tc-cris.c: Fix formatting. + * config/tc-d10v.h: Likewise. + * config/tc-d30v.c: Likewise. + * config/tc-d30v.h: Likewise. + * config/tc-fr30.c: Likewise. + * config/tc-fr30.h: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-m68k.h: Likewise. + * config/tc-pj.h: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-ppc.h: Likewise. + * config/tc-sh.c: Likewise. + * config/tc-sh.h: Likewise. + * config/tc-sparc.c: Likewise. + * config/tc-v850.h: Likewise. + * config/tc-vax.h: Likewise. + * config/tc-w65.h: Likewise. + * config/tc-z8k.h: Likewise. -Sun Sep 19 10:43:31 1999 Jeffrey A Law (law@cygnus.com) +2000-09-23 Alan Modra - * config/tc-hppa.c (pa_ip): Handle 'J', 'K' and 'cc' - operands. + * config/tc-hppa.c (hppa_fix_adjustable): Do the external and weak + checks only for ELF. + (hppa_force_relocation): Likewise. - * config/tc-hppa.c (pa_ip); Handle "fe", and 'cJ'. +2000-09-22 Jim Wilson - * config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'. + * config/tc-ia64.c (dv_sem): Add "stop". + (specify_resource, case IA64_RS_PR): Only handles regs 1 to 15 now. + (specify_resource, case IA64_RS_PRr): New for regs 16 to 62. + (specify_resource, case IA64_RS_PR63): Reorder (note == 7) test to + match above. + (mark_resources): Check IA64_RS_PRr. - * config/tc-hppa.c (struct pa_it): New field "trunc". - (pa_ip): Hadnle 'h', 'm', '=', '{', and '_' operands. - (pa_parse_ftest_gfx_completer): New function - (pa_parse_fp_cnv_format): New function. +2000-09-22 Michael Sokolov - * config/tc-hppa.c (pa_ip): Handle 'X' operand. - (md_apply_fix): Handle 22bit pc-rel branches. + * config/tc-m68k.c (md_relax_table, m68k_ip, md_convert_frag_1, + md_estimate_size_before_relax): Redesign and clean up the + relaxation mechanism. - * config/tc-hppa.c (pa_ip): Handle 'B' operand. +2000-09-21 Kazu Hirata - * config/tc-hppa.c (pa_ip): Handle 'L' and 'M' operands. + * config/tc-ns32k.c: Fix formatting. + * config/tc-ns32k.h: Likewise. - * config/tc-hppa.c (pa_ip): Handle 'l' operand. +2000-09-20 Kazu Hirata - * config/tc-hppa.c (pa_ip): Handle 'g' operand. + * config/tc-m32r.c: Fix formatting. + * config/tc-m32r.h: Likewise. + * config/tc-m68851.h: Likewise. + * config/tc-m68hc11.c: Likewise. + * config/tc-m68hc11.h: Likewise. + * config/tc-m88k.c: Likewise. + * config/tc-mcore.c: Likewise. + * config/tc-mcore.h: Likewise. + * config/tc-mips.c: Likewise. + * config/tc-mips.h: Likewise. + * config/tc-mn10200.h: Likewise. + * config/tc-mn10300.h: Likewise. + * config/tc-tahoe.c: Likewise. + * config/tc-tahoe.h: Likewise. -at Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com) +2000-09-19 Michael Sokolov - * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling. - (pa_ip): Handle 'fX'. + * config/tc-vax.c (synthetic_votstrs): Remove jbssi and jbcci. + Likewise in relaxation description comments. -Sat Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com) +2000-09-18 Alan Modra - * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling. - (pa_ip): Handle 'fX'. + * config/tc-hppa.h (TC_FORCE_RELOCATION_SECTION): Allow + subtraction of two syms without emitting a relocation. -Fri Sep 17 11:57:34 1999 Jeffrey A Law (law@cygnus.com) + From David Huggins-Daines + * config/tc-hppa.c (hppa_force_relocation): Force relocations for + global or weak symbols. - * config/tc-hppa.c (pa_build_unwind_subspace): Do not build - unwinds unless the function is in the text space. - (pa_type_args): Set BSF_FUNCTION for an exproted data symbol. +2000-09-15 Kazu Hirata -Wed Sep 15 05:14:32 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-h8300.h: Fix formatting. + * config/tc-h8500.c: Likewise. + * config/tc-h8500.h: Likewise. + * config/tc-hppa.h: Likewise. + * config/tc-i370.h: Likewise. + * config/tc-i386.h: Likewise. + * config/tc-i860.c: Likewise. + * config/tc-i860.h: Likewise. + * config/tc-i960.h: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-ia64.h: Likewise. - * config/tc-hppa.c (pa_ip): Move dwarf2 stuff from here. - (md_assemble): To here. Tweak address generation. +2000-09-14 Kazu Hirata - * config/tc-hppa.c: Include dwarf2dbg.h if OBJ_ELF. Declare - debug_line. - (md_pseudo_table): Add .file and .line pseudo-ops for OBJ_ELF. - (md_assemble): Call dwarf2_where for OBJ_ELF. - (pa_ip): Call dwarf2_gen_line_info for OBJ_ELF. - (pa_end_of_source): New function. - * tc-hppa.h (md_end): Define for OBJ_ELF. + * config/tc-a29k.c: Fix formatting. + * config/tc-alpha.c: Likewise. + * config/tc-arc.c: Likewise. + * config/tc-arc.h: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-arm.h: Likewise. + * config/tc-avr.c: Likewise. + * config/tc-avr.h: Likewise. + * config/tc-tic30.c: Likewise. + * config/tc-tic30.h: Likewise. + * config/tc-tic54x.c: Likewise. + * config/tc-tic54x.h: Likewise. + * config/tc-tic80.c: Likewise. + * config/tc-tic80.h: Likewise. + +2000-09-14 Timothy Wall + + * config/tc-ia64.c (specify_resource): For PR%/PR63, note types of + parallel comparisons for later use. + (struct rsrc): Add parallel comparison type. + (resources_match): Skip special cases of PR usage (non-conflicting + parallel compares). + +2000-09-13 Kazu Hirata + + * config/obj-ecoff.c: Fix formatting. + * config/obj-elf.c: Likewise. + * config/obj-elf.h: Likewise. + * config/obj-evax.h: Likewise. + * config/obj-generic.h: Likewise. + * config/obj-hp300.c: Likewise. + * config/obj-hp300.h: Likewise. + * config/obj-ieee.h: Likewise. + * config/obj-vms.c: Likewise. + * config/obj-vms.h: Likewise. + +2000-09-13 Anders Norlander + + * config/tc-mips.c (md_begin): Recognize 4Kc, 4Km and 4Kp processors. + (md_parse_option): Ditto. + (md_longopts): Add -mips32 option. + (md_show_usage): Document new options. + (mips_ip): Assemble sdbbp 20 bit 'm' args for MIPS32. + (mips_ip): Assemble mfc0 with a sub-selection code. + (validate_mips_insn): Handle 'H' (OP_*_SEL) and 'm' (OP_*_CODE20). + (mips_cpu_to_str): New function. + (mips_ip): Use mips_cpu_to_str instead of printing numeric cpu value. + Use CPU_* defines instead of hardcoded numbers. + + * doc/as.texinfo: Document new options. + * doc/c-mips.texi: Ditto. + +2000-09-12 Kazu Hirata + + * as.h: Fix formatting. + * asintl.h: Likewise. + * bit_fix.h: Likewise. + * config/obj-aout.c: Likewise. + * config/obj-aout.h: Likewise. + * config/obj-bout.c: Likewise. + * config/obj-bout.h: Likewise. + * config/obj-coff.c: Likewise. + * config/obj-coff.h: Likewise. + * dwarf2dbg.h: Likewise. + * expr.h: Likewise. + * flonum.h: Likewise. + * frags.h: Likewise. + * itbl-ops.h: Likewise. + * macro.h: Likewise. + * read.h: Likewise. + * sb.h: Likewise. + * struc-symbol.h: Likewise. + * subsegs.h: Likewise. + * symbols.h: Likewise. + * tc.h: Likewise. + * write.h: Likewise. + +2000-09-11 Kazu Hirata + + * bignum-copy.c: Fix formatting. + * config/tc-i370.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-m68k.c: Likewise. + * ehopt.c: Likewise. + * flonum-copy.c: Likewise. + * flonum-konst.c: Likewise. + * flonum-mult.c: Likewise. + * literal.c: Likewise. + * read.c: Likewise. + * sb.c: Likewise. + * stabs.c: Likewise. + * subsegs.c: Likewise. + +2000-09-09 Philip Blundell + + * configure.in (arm*-*-uclinux*): New target. + * configure: Regenerate. -1999-09-14 Michael Meissner +2000-09-09 Kazu Hirata - * configure.in (Canonicalization of target names): Remove adding - ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 - generates $ac_config_sub with a ${CONFIG_SHELL} already. - * configure: Regenerate. + * input-file.c: Fix formatting. + * itbl-ops.c: Likewise. + * messages.c: Likewise. -1999-09-14 Donn Terry +2000-09-08 Philip Blundell - * config/te-interix.h (GLOBAL_OFFSET_TABLE_NAME): Define. + * config/tc-arm.c (md_apply_fix3): Correct handling of ADRL when + offset is negative. -1999-09-13 Alan Modra +2000-09-07 H.J. Lu - * config/tc-i386.c (md_assemble): Handle "jmp/call constant" as a - pc-relative jmp/call to an absolute symbol. - (md_apply_fix3): When OBJ_ELF, don't add the values in twice for - absolute section symbols. + * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM. + * configure: Rebuild. - * config/tc-i386.c (md_assemble): Correct frag_var size. Tidy - jump handling code and comments. +2000-09-07 Kazu Hirata -1999-09-12 Ian Lance Taylor + * atof-generic.c: Fix formatting. + * config/tc-mips.c: Likewise. + * config/tc-vax.c: Likewise. + * input-scrub.c: Likewise. - * config/tc-i386.c (md_apply_fix3): Add horrible adjustments to - the value if TE_PE and a global defined symbol. +2000-09-07 Alexandre Oliva -1999-09-11 Ian Lance Taylor + * config/tc-sh.h (TARGET_FORMAT): Use sh-linux targets. + * configure.in (sh-*-linux*): Added. + * configure: Rebuilt. - * write.c (dump_section_relocs): Call print_symbol_value_1 to - print the symbol, rather than printing it here. +2000-09-06 Kazu Hirata -1999-09-11 Donn Terry + * config/tc-hppa.c: Fix formatting. - * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust - BFD_RELOC_RVA relocations. + * ecoff.c: Fix formatting. - * config/tc-i386.c (md_undefined_symbol): Compare the name against - the macro GLOBAL_OFFSET_TABLE_NAME, rather than assuming that it - starts with "_G". +2000-09-06 Alexandre Oliva - * write.c (write_relocs): Call SET_SECTION_RELOCS if it is - defined. - * config/obj-coff.h (SET_SECTION_RELOCS): Define. - * doc/internals.texi (Object format backend): Document - SET_SECTION_RELOCS. + * configure: Rebuilt with new libtool.m4. - * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust - relocations against global symbols if TE_PE. +2000-09-05 Kazu Hirata - * config/obj-coff.c (obj_coff_ident): Add BFD_ASSEMBLER version. - (obj_pseudo_table): Always handle ".ident" with obj-coff_ident. + * cgen.c: Fix formatting. + * config/tc-ia64.c: Likewise. - * config/obj-coff.c (coff_frob_symbol): Prohibit weak common - symbols. +2000-09-05 Nick Clifton - * config/obj-coff.c (obj_coff_endef): Don't merge labels, or - symbols which do not have a constant value, or tags with - non-tags. Remove the symbol from the list before adding it at the - end. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * configure: Regenerate. + * po/gas.pot: Regenerate. - * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef - C_FCN symbol differently if TE_PE. - (obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which - appears in the pseudo-op, rather coff_line_base which is only set - for a .bf symbol. +2000-09-05 Hans-Peter Nilsson + + * config/tc-cris.c: Correct comment typos. + +2000-09-05 Eric Christopher + + * config/tc-mn10300.c: Cleanup. + (md_pcrel_from): Enable. + +2000-09-05 Alan Modra + + * expr.c (operand): Fix a comment typo. + * write.c (write_relocs): Fix a signed/unsigned warning. + + * config/tc-hppa.c (fudge_reg_expressions): New + (hppa_force_reg_syms_absolute): New. + (pa_equ): Allow reg_section expressions. + * config/tc-hppa.c (md_optimize_expr): Define. + (hppa_force_reg_syms_absolute): Prototype. + + * config/tc-hppa.c (pa_11_fp_reg_struct): Delete. + (pa_parse_number): Pass in arg to select fp reg parsing. + Return 1 to indicate format checks pass. If strict, then only + accept a register or register symbol. Return value in... + (pa_number): New static for pa_parse_number. + (FP_REG_BASE): Define. + (FP_REG_RSEL): Define. + (pre_defined_registers): Apply FP_REG_BASE and FP_REG_RSEL as + appropriate. White space changes. + (need_pa11_opcode): Don't bother passing any params, get them from + globals instead. + (pa_ip): Modify all calls to pa_parse_number and need_pa11_opcode. + Remove extraneous check in case 'Q'. + (pa_equ): Modify call to pa_parse_number to do strict parsing. If + reg, set section of resulting symbol to reg_section. + (pa_parse_space_stmt): Modify call to pa_parse_number. + (pa_space): Likewise. + + * config/tc-hppa.c: (md_apply_fix): Handle vtable relocs. + (hppa_force_relocation): Handle vtable relocs. + (pa_vtable_entry): New. + (pa_vtable_inherit): New. + (md_pseudo_table): Add entries for vtable pseudos. + (hppa_fix_adjustable): Reject reduction of R_PARISC_GNU_VTINHERIT + and R_PARISC_GNU_VTENTRY relocs. Reject reduction of relocs + against weak syms. + (tc_gen_reloc): Remove ELF_ARG_RELOC_INSN code. + (pa_type_args): Don't call symbol_get_bfdsym multiple times. + Set STT_PARISC_MILLICODE for OBJ_ELF when encountering a + millicode import. + * config/obj-elf.c (obj_elf_type): Allow md_elf_symbol_type to + specify a symbol type. + + * config/tc-hppa.h: Reorganize file a little, grouping OBJ_ELF + dependent things together. + (md_elf_symbol_type): Define. + + * config/tc-hppa.c (fix_new_hppa): Elide "$PIC_pcrel$0" pseudo + symbol. + * config/tc-hppa.h (tc_frob_symbol): Elide "$PIC_pcrel$0" here too. - * config/obj-coff.c (obj_coff_loc): New static function. - (obj_pseudo_table): Add "loc". + * config/obj-elf.h (obj_elf_vtable_inherit): Declare. + (obj_elf_vtable_entry): Declare. - * config/obj-coff.c (add_lineno): Check that the line number is - positive. + * config/obj-elf.c (obj_elf_vtable_inherit): Return struct fix * + and export function. + (obj_elf_vtable_entry): Similarly. + (elf_pseudo_table): Fix the damage with a cast. - * config/atof-ieee.c (atof_ieee): Change what_kind to int. - * config/atof-vax.c (flonum_gen2vax): Change format_letter to - int. - (md_atof): Return NULL rather than 0. - * config/tc-i386.c (md_atof): Change type to int. - * expr.c (expr): Change first parameter to int. - * config/obj-coff.c: Add declarations for static functions. - (coff_frob_symbol): Use SYM_AUXENT. - * config/tc-i386.h (flag_16bit_code): Don't declare. +2000-09-03 Richard Henderson - * config/obj-coff.c (obj_coff_section): Default to setting - SEC_LOAD. Don't set SEC_DATA for 'w' modifier. + * config/tc-ia64.c (emit_one_bundle): Stop collecting insns + for template selection when a label is needed. - * write.c (adjust_reloc_syms): Print adjusted fixup. +2000-09-02 Kazu Hirata - * expr.c (integer_constant): Correct too_many_digits calculation - in base 10 case. + * config/tc-ia64.c: Fix formatting. -1999-09-09 Andreas Schwab +2000-09-02 Nick Clifton - * doc/c-arm.texi: Fix arguments of @var to not contain - punctuation. + * configure.in: Increase version number to 2.10.91. + * configure: Regenerate. + * aclocal.m4: Regenerate. + * config.in: Regenerate. + * po/gas.pot: Regenerate. + * Makefile.in: Regenerate. -1999-09-08 Philip Blundell +2000-09-01 Alexandre Oliva - * config/tc-arm.c (s_thumb_set): Only support interworking for ELF - and COFF targets. - (md_parse_option): Only support -k flag for ELF and COFF targets. + * config/tc-sh.h [OBJ_ELF] (TC_FIX_ADJUSTABLE): Define. + * config/tc-sh.c (md_apply_fix): Map 32-bit relocations that + become PC-relative to BFD_RELOC_32_PCREL. Reject 16- or 8-bit + similar relocs. + (sh_obj_adjustable): Return 1 for PC-relative offsets used in + branches. -Tue Sep 7 13:28:59 1999 Jeffrey A Law (law@cygnus.com) +2000-09-01 Niibe Yutaka , Kaz Kojima , Alexandre Oliva - * config/tc-hppa.c (pa_ip): Put strict register checks before - call to pa_parse_number. + * config/tc-sh.h (DIFF_EXPR_OK, GLOBAL_OFFSET_TABLE_NAME, + TC_RELOC_GLOBAL_OFFSET_TABLE, TC_RELOC_RTSYM_LOC_FIXUP): Define. + * config/tc-sh.c (sh_elf_cons, sh_elf_suffix): New functions. + [OBJ_ELF] (md_pseudo_table) : Use them. + (GOT_symbol): New variable. + (md_undefined_symbol): Set it. - * config/tc-hppa.c (pa_ip): Support 'Z' argument. +2000-09-01 Richard Henderson -1999-09-06 Ian Lance Taylor + * config/tc-ia64.c (match): Don't inline. + (extra_goodness): New. + (md_begin): Prefer nop.f and nop.b for best_template. - * config/obj-coff.c: Add ATTRIBUTE_UNUSED as needed for - BFD_ASSEMBLER code. +2000-08-31 Kazu Hirata -1999-09-06 Donn Terry + * as.c: Fix formatting. + * cond.c: Likewise. + * frags.c: Likewise. + * macro.c: Likewise. - * as.c (perform_an_assembly_pass): Set SEC_DATA for data_section. +2000-08-31 Eric Christopher -Mon Sep 6 04:26:56 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-mn10300.c: Cleanup and fix warnings. + (md_pseudo_table): Add initializers. + (md_show_usage): Cleanup. + (md_parse_option): Fix warnings. + (md_undefined_symbol): Fix warnings. + (md_conver_frag): Fix warnings. + (tc_gen_reloc): Fix warnings. + (md_apply_fix3): Fix warnings. + (check_operand): Fix warnings. - * config/tc-hppa.c (pa_ip): Get strict/non-strict mode from the - candidate instruction. Require registers for register arguments - when in strict mode. Require assemble-time constants for - constants when in strict mode. - (pa_get_absolute_expression): Require a constant when in strict - mode. - -1999-09-06 Nick Clifton +2000-08-31 Alexandre Oliva - * config/tc-m32r.c (md_longopts): Fix value for -Wnuh. + * acinclude.m4: Include libtool and gettext macros from the + top level. + * aclocal.m4, configure: Rebuilt. -1999-09-04 Steve Chamberlain +2000-08-30 Mark Hatle - * config/tc-pj.c: New file, supports picoJava in ELF. - * config/tc-pj.h: Ditto. - * configure.in (pjl*, pj*): New targets. - * Makefile.am: Rebuild dependencies. - (CPU_TYPES): Add pj. - (TARGET_CPU_CFILES): Add config/tc-pj.c. - (TARGET_CPU_HFILES): Add config/tc-pj.h. - * doc/c-pj.texi: New file. - * doc/as.texinfo: Add some PJ specifics. - * doc/all.texi: Add PJ to the list of all architectures, sort them - all alphabetically. - * doc/Makefile.in (CPU_DOCS): Add c-pj.texi. - * configure, Makefile.in, doc/Makefile.in: Rebuild. + * config/tc-ppc.c (md_parse_option): Recognize -m405. -1999-09-02 Alan Modra +2000-08-31 Kazu Hirata - * config/obj-multi.h: Include obj-elf.h if OBJ_MAYBE_ELF. Reformat. - (obj_frob_file): Test for null pointer. - (OBJ_COPY_SYMBOL_ATTRIBUTES): Here too. - (OBJ_PROCESS_STAB): And here. - (elf_obj_sy): Remove + * listing.c: Fix formatting. - * config/obj-elf.h: #ifndef everything defined in obj-multi.h, - except OBJ_PROCESS_STAB, which we #undef for ecoff. - (elf_obj_sy): Remove #ifndef OBJ_SYMFIELD_TYPE. +2000-08-29 Kazu Hirata - * config/obj-coff.c (no_func): Remove. - (coff_format_ops): Change occurrences of no_func to 0, as we test - for 0 in obj-multi.h. + * app.c: Fix a comment typo. Fix formatting. - * configure.in: Enable bfd for i386-coff when primary target is - bfd. Enable i386 elf,coff emulation support. Don't set - USE_EMULATIONS=1 or te_file=multi unless there is more than one - emulation to support. - *configure: Regenerate. +2000-08-25 J. David Anglin -1999-09-02 Nick Clifton + * tc-vax.c (md_convert_frag): Correctly calculate the pc relative + offset of the target destination for jmp instructions. + (md_assemble): Change mode to VAX_ABSOLUTE_MODE as per comments. - * config/tc-mcore.c (mcore_s_section): Do not dump literals if a - .section .line directive is encountered. +2000-08-24 Hans-Peter Nilsson -1999-09-01 Nick Clifton + * NEWS: Mention support for CRIS. - * config/tc-arm.c (md_section_align): Do not align sections in ELF - format. +Thu Aug 24 20:41:05 2000 Denis Chertykov - * as.c (show_usage): Add --gdwarf2 to list of options displayed. - * as.texinfo: Document --gdwarf2 command line option. - Add additional documentation of ARM command line switches. + * config/tc-avr.h (TC_IMPLICIT_LCOMM_ALIGNMENT): New macros. + Sets `.lcomm' alignment to zero. -1999-08-30 Alan Modra +2000-08-23 Alexandre Oliva - * config/tc-i386.c (i386_intel_memory_operand): Combine - i386_is_reg and parse_register calls. Remove END_STRING_AND_SAVE - and RESTORE_END_STRING around parse_register calls. - (i386_operand): Here too. - (i386_is_reg): Remove. - (parse_register): Move as_bad calls from within this function to - callers. + * config/tc-i386.h + (TC_FIX_ADJUSTABLE): Define. -1999-08-29 Alan Modra +2000-08-23 Jim Wilson - Based on a patch from H.J. Lu - * config/tc-i386.c (parse_register): Handle FP regs specially. - (md_begin): Remove '(' and ')' from register_chars. + * config/tc-ia64.c (output_unw_records): Set U & E flags only if + unwind.personality_routine is set. -1999-08-29 Doug Evans +2000-08-23 H.J. Lu - * config/tc-m32r.c (md_parse_option): Delete unrecognized option - error message (done elsewhere). + * write.c (TC_FIX_ADJUSTABLE): Remove the duplicate. -Sat Aug 28 01:23:11 1999 Jeffrey A Law (law@cygnus.com) +2000-08-23 Alexandre Oliva - * config/tc-hppa.c (pa_ip): Do not allow '*' in 32bit completers. + * config/tc-i386.h (TC_FIX_ADJUSTABLE): Do *NOT* define if target + environment is pe. -Sat Aug 28 00:26:26 1999 Jerry Quinn +2000-08-22 H.J. Lu - * config/tc-hppa.c (pa_ip): Replace 'f' by 'v'. Prefix float register - args by 'f'. + * config.in (STRICTCOFF): New for strict COFF. - * config/tc-hppa.c (pa_ip): Add args q, %, and |. + * configure.in: Define STRICTCOFF for i386-*-msdosdjgpp*, + i386-*-go32* and i386-go32-rtems*. + * configure: Rebuilt. - * config/tc-hppa.c (pa_ip): Absorb white space in instructions - between args. - Add new completers. Fix bug in 64 bit condition handling. + * config/obj-coff.c (obj_coff_endef): Follow the historical + behavior if STRICTCOFF is not defined. - * config/tc-hppa.c (pa_ip): Add completer codes 'a', 'ch', 'cH', - 'cS', and 'c*'. + * doc/internals.texi: Document STRICTCOFF. - * config/tc-hppa.c (pa_ip): Place completers behind prefix 'c'. +2000-08-22 Alexandre Oliva - * config/tc-hppa.c (pa_ip): Add cases for '.', '~'. '$'. and '!' + * write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined. + (fixup_segment) Use it instead of TC_DONT_FIX_NON_ADJUSTABLE. + * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove. + (TC_FIX_ADJUSTABLE): Define. + * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove. + (TC_FIX_ADJUSTABLE): Define. + * config/tc-i960.h, config/tc-m68k.h, config/tc-v850.h: + Likewise. - * config/tc-hppa.c (pa_ip): Add case for 'I'. +2000-08-22 Eric Christopher -1999-08-27 Jim Wilson + * config/tc-mn10300.c: (md_apply_fix): New function. + (mn10300_force_relocation): New function. + (mn10300_fix_adjustable): New function. - * dwarf2dbg.c (MAX_SPECIAL_ADDR_DELTA): Correct typo in comment. - (struct ls): Add frag field. Initialize it to zero. - (out_end_sequence): New local text_frag. Set it while in text section. - Replace address check with frag check. Set ls.frag to text_frag if - out_set_addr called. - (dwarf2_gen_line_info): Add explanatory comment. New local saved_frag. - Set it before switching sections. Replace address check with frag - check. Set ls.frag to saved_frag if out_set_addr called. + * config/tc-mn10300.h: (TC_FORCE_RELOCATION): Define. + (TC_HANDLES_FX_DONE): Define. + (obj_fix_adjustable): Define. + (MD_APPLY_FIX3): Define. + (TC_LINKRELAX_FIXUP): Define. -1999-08-26 David Mosberger + * write.c: (TC_LINKRELAX_FIXUP): Define if not + previously defined. + (fixup_segment): Use TC_LINKRELAX_FIXUP. - * dwarf2dbg.c (out_end_sequence): If address changed, directly - output "advance_pc" opcode instead of calling gen_addr_line(). - The latter has the undesired side-effect of creating a new row - in the debug line info matrix. + * doc/internals.texi: Document TC_LINKRELAX_FIXUP. -1999-08-26 Jim Wilson +2000-08-21 Jason Eckhardt - * dwarf2dbg.c (out_end_sequence): Correct comments. Set last to - ls.last_filename if last is less than zero. Set ls.last_filename - when allocating new entry. - (dwarf2_gen_line_info): Save seg and subseg info before subseg_new - call. + * config/tc-i860.c (md_apply_fix3): Do not insert the immediate + if the fixup resulted in a relocation. -1999-08-20 Alan Modra +2000-08-18 Nick Clifton - * config/tc-i386.c (i386_index_check): Fix the displacement size - when INFER_ADDR_PREFIX. + * config/tc-arm.c (decode_shift): Replace as_tsktsk with as_warn. + Make reference to first element of shift_names explicit. -1999-08-18 Nick Clifton +2000-08-18 Alexandre Oliva - * config/tc-arm.c (md_apply_fix3): If an offset is invalid, - display its value. + * write.c (fixup_segment) [TC_DONT_FIX_NON_ADJUSTABLE]: Use + obj_fix_adjustable() and tc_fix_adjustable() to tell whether to + add a symbol's address. Removed all target-specific #ifdefs that + used to accomplished the same. + * config/tc-v850.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. + * config/tc-m68k.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. + * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. + * config/tc-i960.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. + * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Define. -1999-08-17 Ian Lance Taylor +2000-08-17 Kazu Hirata - * config/tc-ppc.c (md_assemble): Trim @ha constant to 16 bits, to - handle 0xffffNNNN constants correctly. + * dwarf2dbg.c: Fix formatting. -1999-08-16 Nick Clifton +2000-08-17 Nick Clifton - * config/tc-arm.c (do_ldst): Look for register conflicts on stores - as well as loads. + * config/tc-arm.c (decode_shift): Allow illegal shifts by zero + to be recoded as logical shift lefts by zero. -1999-08-13 Nick Clifton +2000-08-16 Jim Wilson - * config/tc-arm.c (validate_offset_imm): Work on unsigned values. - (md_apply_fix3): Always pass positive values to - validate_offset_imm. + * config/tc-ia64.c (specify_resource, case IA64_RS_GR): Handle + postincrement modified registers. Handle IA64_OPND_R3_2 addl + source registers. + (note_register_values): Handle IA64_OPND_R3_2 operands. -1999-08-12 Nick Clifton +2000-08-16 Jason Eckhardt - * config/tc-arm.c (skip_whitespace): New macro. - Formatting tidy ups. - - (md_apply_fix3): Store relocation offset in addend for ELF based - relocs. - (arm_force_relocation): Always generate relocs for Thumb function - calls. - -1999-08-11 Alan Modra + * config/tc-i860.c (md_operand): Silly typo fixed. - * config/tc-i386.c (md_assemble): Remove dead code. intel_syntax - LONG_DOUBLE_MNEM_SUFFIX floating point is done in opcode/i386.h +2000-08-16 Nick Clifton -Tue Aug 10 12:58:31 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-arm.c (struct asm_shift): Delete. + (shift[]): Delete. + (enum asm_shift_index): New. + (struct asm_shift_properties): New. + (struct asm_shift_name): New. + (shift_properties[]); New. + (shift_names[]); New. - * config/tc-hppa.c (pa_build_unwind_subspace): Use sane section - flags for the unwind subspace. + (decode_shift): Use new structures. + Issue a warning is "ROR #0" is used. + Issue a warning if "ASR #0" or "LSR #0" is used. - * config/tc-hppa.c (UNWIND_SECTION_NAME): Define for ELF. - (pa_build_unwind_subspace): Remove #if 0 wrapper. Select a - suitable relocation based on the size of the target's pointer. - Always Use subsegment zero for the unwinders. - (pa_level): Handle "2.0w". + (md_begin): Initialise arm_shift_hsh table from new + asm_shift_name array. -Mon Aug 9 20:02:22 1998 J"orn Rennecke +2000-08-16 Jakub Jelinek - * config/tc-d30v.c (write_2_short): Don't group repeat instructions - with the following instruction unless this was specified. + * config/tc-sparc.c: Kill all warnings. + (md_parse_option): Set -32/-64 for -xarch=, allow all -A archs + in -xarch= as well. + (md_show_usage): Update usage text. -1999-08-09 Ian Lance Taylor +2000-08-16 Nick Clifton - * config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 for - certain sections, to match BFD changes. + * config/tc-arm.c (do_bx): Warn about "bx px" not being very + useful. -1999-08-08 Mumit Khan +2000-08-15 Will Cohen - * Makefile.am (noinst_SCRIPTS): Change .gdbinit to $(GDBINIT). - (EXTRA_SCRIPTS): Define to keep automake happy. - * Makefile.in: Rebuild. + * config/tc-sh.h (DWARF2_LINE_MIN_INSN_LENGTH): Defined. -1999-08-08 Ian Lance Taylor + * config/tc-sh.c (md_assemble): Changed so debug_type + test performed for ppi_assemble + * config/tc-sh.c: Included dwarf2dbg.h. + (debug_line): Defined. + (md_assemble): Generates dwarf2 line info. + (sh_finalize): New function. Finalize dwarf2 info. + (assemble_ppi): Returns size of code generated. + (build_Mytes): Returns size of code generated. + (md_pseudo_table): Added "file" and "loc" psuedo ops. + * config/tc-sh.h (md_end): Defined. + (sh_finalize): Declared. - * Makefile.am: Rename .dep* files to DEP*. - (MKDEP): Rename from DEP. Change all uses. Use $${srcdir} rather - than $(srcdir). Rename TCDEP targets to DEPTC. Rename OBJDEP - targets to DEPOBJ. - * Makefile.in: Rebuild. +2000-08-15 Alexandre Oliva -1999-08-08 Jakub Jelinek + * config/tc-sh.c (md_apply_fix) [BFD_RELOC_32, BFD_RELOC_16]: Use + md_number_to_chars. - * config/tc-sparc.c (sparc_ip): Allow assembly of %lo()+%reg. +2000-08-14 Nick Clifton -1999-08-08 Ian Lance Taylor + * config/tc-arm.c (do_bx): Allow "bx pc". - * Makefile.am: Change all uses of itbl-test-ops to itbl-tops to - avoid problems on DOS filesystems. - * Makefile.in: Rebuild. +2000-08-14 Jim Wilson - * doc/as.texinfo (Section): Document 's' flag for COFF version. + * config/tc-ia64.c (md_longopts): Add -mconstant-gp and -mauto-pic. + (md_parse_option): Add OPTION_MCONSTANT_GP and OPTION_MAUTO_PIC. + (md_begin): Change assignment to md.flag to OR in the new bit. -1999-08-08 Mumit Khan +2000-08-14 Mark Elbrecht - * config/obj-coff.c (obj_coff_section): Handle 's' (shared) - section flag. + * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Set the debug + flag for storage types C_ARG, C_REGPARM, C_FIELD, C_MOS, C_MOE, + C_MOU, and C_EOS. -1999-08-08 Ian Lance Taylor +2000-08-14 Jason Eckhardt - * configure.in: Define and substitute GDBINIT. Change AC_OUTPUT - line to create ${GDBINIT} rather than .gdbinit. - * configure, Makefile.in, doc/Makefile.in: Rebuild. + * NEWS: Mention i860 support. -Fri Aug 6 12:12:44 1999 Jeffrey A Law (law@cygnus.com) +Mon Aug 14 11:49:12 2000 Jeffrey A Law (law@cygnus.com) - * config/tc-hppa.c (pa_ip, case '?'): Add missing break. + * config/tc-mn10300.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. -Fri Aug 6 09:46:35 1999 Jerry Quinn +2000-08-14 Andreas Schwab - * config/tc-hppa.c (pa_ip): Add 64 bit condition completers. + * doc/c-arm.texi (ARM Directives): Fix warnings from makeinfo. -1999-08-06 Jakub Jelinek +2000-08-11 Andreas Schwab - * config/tc-sparc.h (tc_fix_adjustable): Fix check for PIC local - non-adjustable symbols. + * doc/c-i860.texi (Opcodes for i860): Remove braces from @item + argument. -Thu Aug 5 16:52:51 1999 Jerry Quinn +2000-08-11 Kazu Hirata - * config/tc-hppa.c (pa_ip): Change condition args to have '?' prefix. + * expr.c: Fix formatting. + * config/obj-bout.c: Likewise. -Thu Aug 5 23:05:56 1999 J"orn Rennecke +2000-08-10 Jason Eckhardt - * config/tc-sh.c (md_assemble): Call as_bad when there are excess - operands. + * doc/c-i860.texi: Flesh out the i860 section more. -1999-08-05 Donn Terry +2000-08-10 Kazu Hirata - * config/te-interix.h: New file. - * configure.in (i386-*-interix*): New target. - * configure: Rebuild. + * symbols.c: Fix formatting. + * expr.c: Likewise. -Wed Aug 4 13:12:17 1999 Jeffrey A Law (law@cygnus.com) +Wed Aug 9 16:28:21 EDT 2000 Diego Novillo - * config/tc-hppa.c (pa_chk_field_selector): Allow 3 byte - selectors for ELF too. - (selector_table): Add "ltp" and "rtp" selectors. + * tc-i386.c (md_assemble): Skip suffix check if the opcode modifier + has the IgnoreSize bit set. -1999-08-04 Alan Modra +2000-08-09 Alan Modra - * config/tc-i386.c (i386_operand): No need to change - operand_string pointer in segment reg case before goto - do_memory_reference. Initialise displacement_string_start and - displacement_string_end after do_memory_reference label. - (i386_index_check): Add operand_string param, and print error - message on failure here. - (i386_intel_memory_operand): Instead of here. - (i386_operand): And here. - (INFER_ADDR_PREFIX): Enable. + From Rodney Brown + * configure.in: Use elf on Unixware 7 (i586-sco-sysv5uw7.1.0) + * configure: Regenerate. - * doc/c-i386.texi (i386-16bit): Document .code16gcc. +2000-08-09 Kazu Hirata - * config/tc-i386.h (DefaultSize): Define. Renumber following - opcode_modifier defines. + * hash.c: Fix formatting. + * gasp.c: Likewise. - From Etienne Lorrain - * config/tc-i386.c (stackop_size): New variable. - (set_16bit_code_flag): Clear it here. - (set_16bit_gcc_code_flag): New function. - (md_pseudo_table): Add "code16gcc" entry. - (md_assemble): Set i.suffix for insns with DefaultSize modifier. +2000-08-08 Jason Eckhardt -1999-08-03 Ian Lance Taylor + * config/tc-i860.h: Rework completely for BFD_ASSEMBLER. + (i860_fix_info): New enum. + (MD_APPLY_FIX3): Define. + (WORKING_DOT_WORD): Define. + (TC_HANDLES_FX_DONE): Define. + (DIFF_EXPR_OK): Define. + (LISTING_HEADER): Define. + (TARGET_FORMAT): Select target format based on endian flag. + (TARGET_BYTES_BIG_ENDIAN): Default to little endian. + (target_big_endian): Add external declaration. - * config/obj-coff.c (coff_frob_symbol): Always update set_end with - next_set_end even if the end symbol is being discarded. + * config/tc-i860.c: All existing code reworked completely. Other + new code shown below. + (SYNTAX_SVR4): Define. + (target_warn_expand): New variable. + (md_shortopts): Declare and define (-Qy, -Qn, and -V options). + (md_longopts): Declare and define with new options (-EL, -EB, + and -mwarn-expand). + (md_show_usage): New function. + (md_operand): New function. + (obtain_reloc_for_imm16): New function. + (md_apply_fix3): New function. + (tc_gen_reloc): New function. - * gasp.c: Add ATTRIBUTE_UNUSED as needed for non-BFD_ASSEMBLER. - * output-file.c, symbols.c, config/tc-i386.c: Likewise. - * config/obj-coff.c: Likewise. - (seg_info_type): Remove. - (seg_info_off_by_4): Change to array of segT. - (s_get_segment): Adjust accordingly. - (obj_pseudo_table): Fully initialize sentinel entry. +2000-08-08 Stephane Carrez - * config/tc-mips.c (append_insn): Correct INSN_SYNC test. From - Ralf Baechle . + * config/tc-m68hc11.c (build_jump_insn): Make sure the + 2 bytes of the jump address are in the same frag. + (find): Accept 68hc12 register indirect modes. -1999-08-03 Etienne Lorrain + * NEWS: Mention 68HC11 & 68HC12 support. - * config/tc-i386.c (f16_3): New. Fixes 16 bit 3 byte nop. +2000-08-07 Richard Henderson -1999-08-03 Alan Modra + * config/tc-ia64.c (unwind): Add prologue_mask member. + (dot_vframe): Elide psp_gr record if it overlaps prologue_gr. + (dot_save): Likewise for pfs_gr, rp_gr, and preds_gr. + (dot_body): Clear unwind.prologue_mask. + (dot_prologue): Set it. Accept a register second argument. - * config/tc-i386.c: Indentation and white space changes. - (i386_index_check): New function. Add INFER_ADDR_PREFIX code, but - don't enable it by default. - (i386_intel_operand): Remove redundant prototype. - Move check on number of memory operands, and i.mem_operands++ - (i386_intel_memory_operand): To here. - Remove i386_immediate code from here. Remove special case code - for input and output using (%dx). Remove base/index checks and - call i386_index_check instead. Save initial operand_string - argument for error message. - (i386_operand): Remove redundant prototype. Move base/index - checks to i386_index_check. - (i386_displacement): Move intel mode check for non-zero - i.disp_operand - (i386_intel_memory_operand): To here. +2000-08-07 Kazu Hirata -1999-07-30 Jakub Jelinek + * config/atof-ieee.c: Fix formatting. + * config/atof-tahoe.c: Likewise. - * config/tc-sparc.c (md_longopts): Add --no-undeclared-regs option. - (sparc_ip): Warn if %g2 or %g3 register is used and not covered - by .register pseudo-op if -64 and --no-undeclared-regs. - (s_register, sparc_adjust_symtab): New functions. - * config/tc-sparc.h (tc_adjust_symtab, sparc_adjust_symtab): - Declare sparc_adjust_symtab as tc_adjust_symtab. - * doc/c-sparc.texi: Add description of #ignore special literal - for .register pseudo-op. +2000-08-06 Nick Clifton -1999-07-30 Catherine Moore + * config/tc-sparc.c (md_begin): Fix typo in recent formatting + work. - * config/tc-arm.c (tc_gen_reloc): Record the vtable entry in - the relocation's section offset. + * doc/as.texinfo (Pseudo Ops): Update to include descriptions + of .popsection, .previous, .pushsection, .subsection, + .version, .vtable_entry, .vtable_inherit and .weak. -1999-07-29 Alan Modra +2000-08-05 Kazu Hirata - * write.c (fixup_segment): Fix generic error check overflow test. + * config/tc-cris.c: Fix formatting. + * config/tc-i386.c: Likewise. + * config/tc-sparc.c (sparc_ip): Simplify the code. - * config/tc-i386.c (pe): Change %d to %ld, %x to %lx, and cast - X_add_number to long. +2000-08-04 Kazu Hirata -Wed Jul 28 02:04:24 1999 "Jerry Quinn" + * config/tc-cris.c: Rearrange code for readability. + * config/tc-d10v.c: Fix formatting. + * config/tc-m32r.c: Likewise. + * config/tc-sparc.c: Likewise. - * config/tc-hppa.c (pa_ip): Add 'J' and 'K' code - processing. +2000-08-02 Jim Wilson -1999-07-27 Ian Lance Taylor + * config/tc-ia64.c (emit_one_bundle): Call ia64_free_opcode + before ia64_find_opcode. + (md_assemble): Likewise. - * config/tc-sparc.h (tc_fix_adjustable): Don't adjust GOT, PLT, or - VTABLE relocations. +2000-08-01 Nick Clifton -1999-07-21 Mark Elbrecht + * config/tc-arm.c (do_mrs): Fix skip of 'cpsr_all' flag. + Undo some formatting fixes. - * config/te-go32.h (COFF_LONG_SECTION_NAMES): Define. +2000-08-01 Kazu Hirata - * configure.bat: Remove; obsolete. - * config/go32.cfg: Likewise. + * config/obj-som.c: Fix formatting. + * config/obj-ieee.c: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-v850.c: Likewise. -1999-07-21 Brad M. Garcia +2000-08-01 Nick Clifton - * configure.in (i386-*-vxworks*): New target. - * configure: Rebuild. - -1999-07-16 Jakub Jelinek - - * doc/c-sparc.texi: Document .register and .nword pseudo-ops. - -1999-07-16 Jakub Jelinek + * doc/c-m68k.texi (section M680x0 Options): Turn into a table + index by command line option. - * config/tc-sparc.c (sparc_ip): Allow OLO10 relocations - on -64 and not pic. - (output_insn): Put OLO10's secondary addend into tc_fix_data. - (md_apply_fix3): Handle BFD_RELOC_SPARC_OLO10. - (tc_gen_reloc): Return two relocs for OLO10, LO10 and SPARC13. - * config/tc-sparc.h (RELOC_EXPANSION_POSSIBLE, - MAX_RELOC_EXPANSION): Define. - (TC_FIX_TYPE, TC_INIT_FIX_DATA, TC_FIX_DATA_PRINT): Likewise. +2000-08-01 Michael Sokolov -1999-07-16 Alan Modra + * doc/c-m68k.texi (@cindex @samp{--pcrel}): Rewrite option description. + (@node M68K-Branch): Rewrite to match the reality. - * config/tc-i386.c (intel_float_operand): Add prototype, make static. - (md_assemble): Localize *exp variable to if (fake_zero_displacement) - block. Print a warning if an 8-bit or 16-bit constant - displacement or immediate is truncated on output. - (i386_immediate): Ensure Imm16 is always legal for a 16-bit mode - immediate. - (i386_operand): Disallow immediate jump absolute operand. +2000-07-31 Jason Eckhardt -1999-07-15 Ian Lance Taylor + * doc/c-i860.texi: New file. + * doc/Makefile.am (CPU_DOCS): Add c-i860.texi. + * doc/Makefile.in: Regenerate. + * doc/all.texi: Add I860 as relevant architecture. + * doc/as.texinfo: Include i860 dependent file c-i860.texi. - * configure.in: Bump version number to 2.9.5. - * configure: Rebuild. +2000-07-31 Kazu Hirata - * dwarf2dbg.c (dwarf2_gen_line_info): Don't assume that long long - or %llx work. + * config/tc-d30v.c: Fix formatting. -Thu Jul 15 02:45:30 1999 Jeffrey A Law (law@cygnus.com) +2000-07-31 Michael Sokolov - * config/tc-hppa.c (md_pseudo_table): Add ".dword" pseudo-op. - (cons_fix_new_hppa): Derive size of fixup from size of the object. + * config/tc-m68k.c (flag_keep_pcrel, OPTION_PCREL): Add --pcrel option. + (md_convert_frag_1, md_estimate_size_before_relax): When making DBcc + long emit a long branch if available instead of an absolute jump, never + emit absolute jumps for anything with --pcrel. -1999-07-14 Philip Blundell + * doc/c-m68k.texi: Document new command line option. - * symbols.c (dollar_label_name): Prepend LOCAL_LABEL_PREFIX if it - is defined. - * config/tc-arm.h (LOCAL_LABEL_PREFIX): Define to '.' for ELF. +2000-07-29 Marek Michalkiewicz - * config/tc-arm.c (md_begin): Set F_SOFTFLOAT in the output file - if -mno-fpu was given. - (tc_gen_reloc): Fix typo. Delete bogus code related to GOTPC - relocs. - (cons_fix_new_arm): Remove misleading comments. + * config/tc-avr.c: Use PARAMS macro in function declarations. + Don't declare md_pcrel_from_section (already in tc-avr.h). + (avr_operands): Use AVR_UNDEF_P and AVR_SKIP_P macros. + (avr_operand): Don't set (unsigned) op_mask to -1. -1999-07-14 Ian Lance Taylor +2000-07-28 Jason Eckhardt - * write.c (cvt_frag_to_fill): Use frag file and line in rs_org - error message. - (relax_segment): Likewise. After giving a rs_org error, convert - the frag to rs_align to avoid cascading errors. + * configure.in: Add bits for i860-stardent-{sysv4, elf}*. + * configure: Regenerated. + * config/obj-elf.c (obj_elf_type): Recognize a fifth type + of operand to the .type directive (.e.g, "type"). -1999-07-12 Andreas Schwab +2000-07-28 Alan Modra - * config/tc-m68k.c: Add some ATTRIBUTE_UNUSED. + * as.h (warn_comment, found_comment, found_comment_file): Declare. + * app.c (do_scrub_chars): Record where first comment found. + * read.c (read_a_source_file): Init found_comment on entry, and + notify whether comments found on exit. + * config/tc-hppa.c (md_shortopts): Add "c". + (md_longopts): Add warn-comment. + (md_parse_option): Handle it. + (md_show_usage): Show available options. + * config/tc-hppa.h (WARN_COMMENTS): Define if TE_LINUX -1999-07-11 Ian Lance Taylor +Thu Jul 27 11:25:01 2000 Andrew Cagney - * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED - as appropriate. Fill in structure initializations. Add variable - initializations. Add casts. - * dwarf2dbg.c (print_stats): Change i to size_t. - * listing.c (listing_listing): Change list_line to unsigned int. + * config/tc-mn10300.c (md_convert_frag): Fix printfs. + (tc_gen_reloc): Add cast when assigning bfd_abs_symbol to + sym_ptr_ptr + (md_estimate_size_before_relax): Don't fall off end of function. -1999-07-10 Ian Lance Taylor +2000-07-27 Kazu Hirata - * config/tc-ppc.h (tc_fix_adjustable) [OBJ_ELF]: Call S_IS_LOCAL - rather than checking for \001 and \002 in symbol name. - * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: Likewise. + * config/tc-avr.c: Fix formatting. + * config/tc-ns32k.c: Likewise. -Thu Jul 8 12:32:23 1999 John David Anglin +2000-07-27 Alan Modra - * configure.in (hppa*-linux-gnu*): New target. - * configure: Rebuilt. + * config/tc-d10v.c (find_opcode): Remove extraneous `='. -1999-07-08 Nick Clifton +2000-07-27 Kazu Hirata - * doc/c-arm.texi (ARM Directives): Document .thumb_set directive. + * config/tc-d10v.c: Fix formatting. + * config/tc-z8k.c: Likewise. + * config/tc-sparc.c: Likewise. -1999-07-07 Nick Clifton +2000-07-26 Dave Brolley - * config/tc-v850.c (v850_comm): Use symbol_get_obj() rather than - accessing symbolP directly. + * cgen.c (queue_fixup): Declare opinfo. + (gas_cgen_parse_operand): Mark unused parameters with ATTRIBUTE_UNUSED. + (gas_cgen_md_operand): Ditto. + (gas_cgen_md_apply_fix3): Ditto. -Tue Jul 6 10:41:42 1999 Jeffrey A Law (law@cygnus.com) +2000-07-24 Mark Elbrecht - * config/tc-hppa.h (tc_frob_symbol): Always punt "$global$" symbol - for ELF. + * config/obj-coff.c (obj_frob_symbol): Don't merge + labels. Don't merge if the symbol isn't constant. Return + immediately if a symbol is merged. -1999-07-05 Nick Clifton +2000-07-22 Alan Modra - * config/tc-arm.c (ARM_EXT_V5): Define. - (ARM_ARCH_V5, ARM_ARCH_V5T): Define. - (md_begin): Detect ARM v5 architectures. - (md_parse_option): Accept arm v5 specification. - (md_show_usage): Documment -marmv5 switch. + * frags.c (frag_align): Correct absolute section alignment. - * doc/c-arm.texi: Document -marmv5 command line option. - - * config/tc-arm.c (do_adrl): New function. Implement ADRL pseudo - op. - (validate_immediate_twopart): New function. Determine if a - constant can be computed by two ADD instructions. - (output_inst): Remove its command line parameter - it was never - used. - (md_apply_fix3): Support BFD_RELOC_ARM_ADRL_IMMEDIATE, used to - implememt the ADRL pseudo op. - (tc_gen_reloc): Generate a suitable error message if an ADRL - instruction tries to generate a real reloc. +2000-07-20 DJ Delorie - * doc/c-arm.texi: Document NOP, ADR and ADRL pseudo ops. + * config/obj-coff.c (obj_frob_symbol): revert previous change, + it breaks linking against DLLs. -Thu Jul 1 15:33:10 1999 Jeffrey A Law (law@cygnus.com) +2000-07-20 Hans-Peter Nilsson - * config/tc-hppa.c (pa_ip): Convert the opcode and all completers - into lower case. + * configure.in: Add CRIS support. + * configure: Regenerate. + * Makefile.am: (CPU_TYPES): Add cris. + (CPU_OBJ_VALID) [aout]: Add cris. + (MULTI_CPU_TYPES): Add cris. + (MULTI_CPU_OBJ_VALID) [aout]: Add cris. + [coff]: Only i386 and mips are valid. + (TARGET_CPU_CFILES): Add config/tc-cris.c. + (TARGET_CPU_HFILES): Add config/tc-cris.h. + (MULTI_CFILES): Add config/e-crisaout.c and config/e-criself.c. + Regenerate dependencies. + * Makefile.in: Regenerate. + * aclocal.m4: Regenerate. + * as.c: Declare crisaout, criself. + * config/tc-cris.h, config/tc-cris.c: New. + * config/e-criself.c, config/e-crisaout.c: New. + * po/POTFILES.in, po/gas.pot: Regenerate. -1999-06-27 H.J. Lu +2000-07-20 Kazu Hirata - * subsegs.c (subseg_text_p): Use 1/0 instead of true/false for - non BFD_ASSEMBLER case. + * read.c: Fix formatting. + * write.c: Fix formatting. -1999-06-26 Mumit Khan +2000-07-19 H.J. Lu - * config/obj-coff.c (obj_coff_section): Mark writable sections as - data. + * sb.c: Include if exists for abort (). -1999-06-26 David Mosberger +2000-07-19 Alan Modra - * dwarf2dbg.c (dwarf2_gen_line_info): Don't call - out_end_sequence() when the address decreases due to a new frag. - (gen_dir_list): Set ls.file[i].dir to j + 1 (not j) because file - numbering starts with 1. + * config/tc-hppa.c (hppa_fix_adjustable): Correct LR%/RR% comment. + (arg_reloc_stub_needed): #ifdef OBJ_SOM, not #ifdef SOM. + (pa_type_args): Same here. -1999-06-23 Nick Clifton +2000-07-17 Mark Elbrecht - * config/tc-mcore.c (md_pseudo_table): Add .comm for ELF and allow - .section for COFF. - (mcore_s_text): Call obj_elf_text for ELF target. - (mcore_s_data): Call obj_elf_data for ELF target. - (mcore_s_section): No longer ELF specific. Call obj_coff_section - for COFF target. - (mcore_s_bss): New function: Dump literal table before changing - sections. - (mcore_s_comm): New function: Dump literal table before changing - sections. - - * config/obj-elf.c (obj_elf_common, obj_elf_data, obj_elf_text): - No longer static functions. - * config/obj-elf.h (obj_elf_common, obj_elf_data, obj_elf_text): - Provide prototypes for these functions. + * config/obj-coff.c (obj_frob_symbol): Don't merge labels. Don't + merge if the symbol isn't constant. Don't call S_SET_EXTERNAL if + the storage class is already set. -1999-06-22 Ian Lance Taylor +2000-07-17 Kazu Hirata - * subsegs.c (subseg_text_p): Rewrite non BFD_ASSEMBLER case to use - a list of names, to try obj_segment_name, and to try abbreviated - names when using COFF without long section names. + * config/tc-m68hc11.c: Fix formatting. + * config/tc-mn10200.c: Likewise. + * config/tc-mn10300.c: Likewise. + * config/tc-pj.c: Likewise. + * config/tc-tic80.c: Likewise. + * config/tc-w65.c: Likewise. - * config/tc-alpha.c: More use of symbol accessor functions. - * config/tc-arc.c: Likewise. - * config/tc-d30v.c: Likewise. - * config/tc-fr30.c: Likewise. - * config/tc-i860.c: Likewise. - * config/tc-m88k.c: Likewise. - * config/tc-mcore.c: Likewise. - * config/tc-ns32k.c: Likewise. - * config/tc-sparc.c: Likewise. - * config/tc-v850.c: Likewise. +2000-07-17 Frank Ch. Eigler - * config/tc-arc.c (get_arc_exp_reloc_type): Change uses of - sy_value with appropriate accessor functions. - * config/tc-arm.c (md_apply_fix3): Likewise. - * config/tc-d10v.c (AT_WORD_P): Likewise. - * config/tc-v850.c (reg_name_search): Likewise. + * expr.c (operand): Permit %bin literals if LITERAL_PREFIXPERCENT_BIN + is defined. - * config/obj-ecoff.c (obj_ecoff_set_ext): Change uses of bsym to - use symbol_get_bfdsym instead. - * config/tc-ppc.c (md_assemble): Likewise. - * config/tc-v850.c (v850_comm): Likewise. +2000-07-15 Ian Lance Taylor -1999-06-22 Jonathan Larmour + * doc/c-mips.texi (MIPS Opts): Remove erroneous space after + @code. - * config/tc-arc.c (tc_gen_reloc): Use symbol_get_bfdsym to get at - the symbol, rather than accessing the bsym member. - * config/tc-d10v.c (tc_gen_reloc): Likewise. - * config/tc-d30v.c (tc_gen_reloc): Likewise. - * config/tc-mcore.c (tc_gen_reloc): Likewise. - * config/tc-mn10200.c (tc_gen_reloc): Likewise. - * config/tc-mn10300.c (tc_gen_reloc): Likewise. - * config/tc-ns32k.c (tc_gen_reloc): Likewise. - * config/tc-tic30.c (tc_gen_reloc): Likewise. - * config/tc-v850.c (tc_gen_reloc): Likewise. +2000-07-15 Alan Modra -Mon Jun 21 16:45:19 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-hppa.c (hppa_fix_adjustable): Use the same checks for + ELF as are used for SOM (except the 32-bit reloc one) to decide + whether a symbol can be reduced to a section symbol. Expand on + the comment for symbols involved in LR% and RR% expressions. - * tc-hppa.c (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type. - (hppa_gen_reloc_type): Conditionalize on BFD64. - (tc_gen_reloc): Re-enable ELF relocations. - * tc-hppa.h (TARGET_FORMAT): Handle elf64-hppa format. +2000-07-14 Nick Clifton -1999-06-21 Ian Lance Taylor + * config/tc-mips.c (mips_disable_float_construction): New + static variable. Set to true if doubles should not be + constructed by loading two single width fp registers with + halves of the value. + (mips_ip): Test mips_disable_float_construction. + (md_longopts): Add command line switches --construct-floats + and --no-construct-floats. + (md_parse_option): Parse new command line options. + (md_show_usage): Describe new command line options. - * config/tc-arm.c (ldst_extend): Add parentheses to avoid - warning. - (do_ldst): Move assignment out of if condition. - (md_apply_fix3): Add casts to avoid printf format warnings. Add - parentheses to avoid warning. + * doc/c-mips.texi: Document new command line options. -1999-06-21 Nick Clifton +2000-07-13 Koundinya K - * config/tc-arm.c (arm_adjust_symtab): Use symbol_get_bfdsym() - macro to get at the BFD symbol associated with a GAS symbol. + * configure.in: Remove the test /usr/dde for mips-*-sysv4*MP* + * configure: Regenerate. -1999-06-19 Ian Lance Taylor +2000-07-13 Hans-Peter Nilsson - * config/tc-ppc.c: Update for symbol handling changes. - * config/obj-coff.c: Likewise. + * configure.in (DEFAULT_EMULATION setting): Revert part of + 2000-07-01 change that set te_multi=multi unless set to tmips. + * configure: Regenerate. -Fri Jun 18 14:34:18 1999 Jeffrey A Law (law@cygnus.com) - - * tc-hppa.c: General cleanups of ELF support. No more spaces - and subspaces for ELF. - (GDB_DEBUG_SPACE_NAME): Delete definition for ELF. - (GDB_STRINGS_SUBSPACE_NAME): Likewise. - (GDB_SYMBOLS_SUBSPACE_NAME): Likewise - (UNWIND_SECTION_NAME): Likewise. - (space/subspace related structures): Conditionalize definitions - on OBJ_SOM. - (space/subspace directives and support routines): Conditionalize - definitions and references/uses on OBJ_SOM. - (label_symbol_struct): For ELF, track the symbol's segment. For - SOM track its space. - (pa_define_label, pa_undefine_label, pa_get_label): Corresponding - changes. - (USE_ALIASES): Kill for both SOM & ELF. - (pa_def_subspaces, pa_def_spaces): Corresponding changes. - (pa_space, pa_subspace): Corresponding changes. - (pa_spaces_begin): Corresponding chagnes. - (md_begin): Do not muck around with space/subspace stuff for - OBJ_ELF. - (md_apply_fix): Temporarily disable argument relocation stuff - for OBJ_ELF. - (tc_gen_reloc): Temporarily disable relocation generation for - OBJ_ELF - (pa_build_unwind_subspace): Similarly. - -1999-06-16 Nick Clifton - - * config/tc-arm.c (thumb_set): New pseudo op. - (text, data, section): Override these pseudo ops with ARM - specific versions. - (s_thumb_set): New function: Perform the same as a .set pseudo - op, but also mark the alias'ed symbol as being a Thumb - function. - (arm_s_text): New function: Perform the same as the .text - pseudo op, but dump the literal pool before changing - sections. - (arm_s_data): New function: Perform the same as the .data - pseudo op, but dump the literal pool before changing - sections. - (arm_s_section): New function: Perform the same as the - .section pseudo op, but dump the literal pool before changing - sections. - (arm_cleanup): Do not reset the current section before dumping - the literal pool. - -1999-06-17 Nick Clifton - - * config/tc-m32r.c (md_longopts): Fix OPTION_WARN_UNMATCHED and - OPTION_NO_WARN_UNMATCHED entries. - (md_parse_option): Generate a warning message if an unrecognised - option is encountered. - - * config/tc-d10v.c (do_not_ignore_hash): New variable. - (get_operands): When parsing an expression after an '@' symbol - has been detected, do not ignore '#' symbols. - (md_operand): Only ignore '#' symbols if do_not_ignore_hash is - false. - -1999-06-13 Ian Lance Taylor - - From K. Richard Pixley : - * configure.in (ppc-*-vxworks*): New target. - * configure: Rebuild. +2000-07-12 Mark Elbrecht -1999-06-12 Philip Blundell + * config/obj-coff.c (coff_frob_section): Add padding to the last + section when aligning it increases its size. - * config/tc-arm.c (tc_gen_reloc): Fix handling of GOTPC relocs. +2000-07-11 Kazu Hirata -1999-06-13 Ian Lance Taylor + * config/tc-tic54x.c: Fix formatting. - * write.c (adjust_reloc_syms): Rather than never reducing reloc - which refer to symbols in linkonce sections, permit reducing the - relocs if the symbol is local. +2000-07-10 Kazu Hirata -1999-06-12 Ian Lance Taylor + * config/tc-h8500.c: Fix formatting. + * config/tc-tic54x.c: Fix formatting. - * subsegs.c (subseg_text_p): New function. - * as.h (subseg_text_p): Declare. - * read.c (do_align): Use subseg_text_p to set the default fill. - * write.c (subsegs_finish): Likewise. - * config/obj-coff.c (write_object_file): Likewise. - * config/tc-i386.h (md_maybe_text): Don't define. - (md_do_align): Use subseg_text_p to set the default fill. - * config/tc-m32r.c (m32r_do_align): Likewise. - * config/tc-sh.c (sh_do_align): Likewise. - * config/tc-sparc.h (md_do_align): Likewise. +2000-07-10 Alan Modra -1999-06-12 David O'Brien + * config/tc-hppa.c (md_apply_fix): Check fmt 12 and 22 pc-rel + displacements correctly. - * configure.in: (i[3456]86-*-freebsd*): Now defaults to ELF. - * configure: Rebuild. + * read.h (s_abort): Add ATTRIBUTE_NORETURN. -1999-06-12 Ian Lance Taylor +2000-07-10 Ryan Bradetich - * dwarf2dbg.c: Include elf/dwarf2.h with "", not <>. - * Makefile.am: Rebuild dependencies. - * Makefile.in: Rebuild. + * hash.c (hash_insert): Add cast to obstruct_alloc to fix + warning. + (hash_jam): Ditto. - * config/tc-i386.c (i386_immediate): Remove unused label - seg_unimplemented. +2000-07-09 Alan Modra - * struc-symbol.h: Put local_symbol code in ifdef BFD_ASSEMBLER. - * symbols.c: Likewise. - * config/obj-aout.c (obj_crawl_symbol_chain): Refer directly to - sy_next field when taking address, rather than symbol_next. + From David Huggins-Daines + * config/te-hppalinux64.h: Add a new emulation. + * configure.in (emulations): Add configure bits to support the + 64-bit Linux/parisc target. + * configure: Regenerate. - * dwarf2dbg.c: Change bfd_vma to addressT and bfd_signed_vma to - offsetT. - (out_set_addr): Don't use BYTES_PER_ADDRESS. Instead, get the - value from the output file architecture. - (dwarf2_gen_line_info): Ifdef BFD_ASSEMBLER specific code. - * dwarf2dbg.h: Change bfd_vma to addressT. + * config/tc-hppa.c (md_parse_option): Support `-V' for ELF. + (md_shortopts): Add `V' for ELF. + + * config/tc-hppa.c (arg_reloc_stub_needed): Define as zero except + when SOM or ELF_ARG_RELOC are defined. + (pa_type_args): Only set symbol_arg_reloc_info when SOM or + ELF_ARG_RELOC are defined. + (pa_stringer_aux): Don't pa_check_current_space_and_subspace here.. + (pa_stringer): ..Do it here instead. Fix comment typos. + (hppa_force_relocation): Cast enums to int before comparing with + ints. + + From Ryan Bradetich + * config/tc-hppa.c: Removed unneeded libbfd.h to fix macro + redifinition warning. + (md_apply_fix): Added cast from enum to int for fixP->fx_r_type. + (hppa_force_relocation): ditto + (md_apply_fix): Added cast to buf to fix warnings. + + * config/tc-hppa.h (pa_define_label, parse_cons_expression_hppa, + cons_fix_new_hppa, hppa_force_relocation): Prototype. + + * config/tc-hppa.c (reloc_type): It's an enum for OBJ_ELF. + (R_N0SEL, R_N1SEL): Define only for OBJ_SOM. + (tc_gen_reloc): Make `code' a reloc_type and `codes' a + reloc_type** to avoid warnings in switch. + (md_apply_fix): Make insn, val signed. Zap buf_wd and read insn a + little earlier instead. + + * config/tc-hppa.c (symbol_arg_reloc_info): Define for both som + and elf. + (pa_type_args): Use symbol_arg_reloc_info. + (struct pa_it): Make arg_reloc unsigned int. + (struct hppa_fix_struct): Likewise for fx_arg_reloc. + (pa_text, pa_data, pa_comm): Don't compile for TE_LINUX. + (pa_code): Delete. pa_text duplicates this function. + (md_pseudo_table): Call obj_elf_text for ".code" if TE_LINUX. + (fix_new_hppa): Argument offset is offsetT, arg_reloc is unsigned + int. + (cons_fix_new_hppa): Actually change selector to e_fsel when + warning about assuming so. + (tc_gen_reloc): More example elf arg reloc code. + (md_apply_fix): Use arg_reloc_stub_needed for elf too. + (hppa_force_relocation): Likewise. -1999-06-11 Ian Lance Taylor + * config/tc-hppa.h: Use TARGET_ARCH_SIZE to select target include + files. + (pa_end_of_source): Prototype. + (hppa_fix_adjustable): Prototype. + (LABELS_WITHOUT_COLONS): Move it.. + * config/te-hppa.h: To here. - * dwarf2dbg.h: Use PARAMS in function declarations. + * config/te-hppa64.h: New file. -1999-06-11 Martin Dorey + * config/tc-hppa.c: Use TARGET_ARCH_SIZE to select target reloc + type. + (md_apply_fix): Pass stdoutput to bfd_hppa_insn2fmt. Handle + format -10, -16, 16 relocs. + (hppa_elf_mark_end_of_function): Test for null + last_call_info->start_symbol - * write.c (fixup_segment): Don't add symbol value for i960 ELF. - * config/tc-i960.c (s_leafproc): Don't call tc_set_bal_of_cal if - OBJ_ELF. - (md_apply_fix): Simplify BFD_ASSEMBLER handling. + * config/tc-hppa.c (pa_ip): In case 'V', pass `strict' to + CHECK_FIELD, not INSERT_FIELD_AND_CONTINUE. Don't pass opcode to + re_assesmble_* functions. Delete extraneous statements. Fix + typos in comments. + (md_apply_fix): Compare against 1048575 in case 21. Don't pass + insn to re_assemble_*. -1999-06-11 Ian Lance Taylor +2000-07-08 Ulf Carlsson - * config/tc-i386.c (md_apply_fix3): Add default case to switch. + * doc/internals.texi (Expressions): Fix typo. - * config/tc-sparc.c (md_pseudo_table): Remove pushsection and - popsection. +2000-07-08 Kazu Hirata - * config/tc-sparc.c (sparc_ip): Add default case to reloc switch. + * config/tc-sh.c: Fix formatting. + * config/tc-tic54x.c: Fix formatting. + * depend.c: Fix formatting. + * flonum-konst.c: Likewise. + * flonum-mult.c: Likewise. - * read.c (read_a_source_file): Only declare inescape if - QUOTES_IN_INSN. +2000-07-07 Kazu Hirata - * itbl-ops.c (itbl_disassemble): Change sprintf format strings to - match parameters. - (find_entry_byval): Add parens to avoid warning. + * config/tc-sh.c: Fix comments. + * config/obj-vms.c: Fix comments. + * config/tc-a29k.c: Likewise. + * config/tc-alpha.c: Likewise. + * config/tc-h8300.c: Likewise. + * config/tc-h8500.c: Likewise. + * config/tc-i370.c: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-m68hc11.c: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-mips.c: Likewise. + * config/tc-ns32k.c: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-z8k.c: Likewise. - * as.c: If HAVE_ITBL_CPU, include "itbl-ops.h". +2000-07-06 Mark Elbrecht - * symbols.c (resolve_symbol_value): Don't permit subtraction of - undefined symbols. + * config/obj-coff.c (TC_COFF_SECTION_DEFAULT_ATTRIBUTES): New. + Default to '(SEC_LOAD | SEC_DATA)'. + (obj_coff_section) [BFD_ASSEMBLER]: Use it. -1999-06-10 Jakub Jelinek + * doc/internals.texi (CPU Backend): Describe + TC_COFF_SECTION_DEFAULT_ATTRIBUTES. - * config/tc-sparc.c (sparc_ip): Don't use side-effect expression - with isoctal. +Thu Jul 6 17:20:58 2000 Andrew Cagney - * config/tc-sparc.c (synthetize_setuw, synthetize_setsw, - synthetize_setx): New functions. - (md_assemble): Broken the special cases into the above - functions. Make compiler happy if sizeof(bfd_vma)==4. - Fix sethi generated from set/setuw. If instructions have a relloc, - always clear the fields to be relocated in the opcode. - (sparc_ip): Remove special_case global variable. + * as.c (parse_args): NULL terminate the long option list. -1999-06-10 Ian Lance Taylor +Tue Jul 4 14:08:28 2000 Andrew Cagney - Based on patches from John W. Woznack : - * itbl-ops.c (itbl_get_reg_val): Add pval parameter. Return - indication of success rather than a value. - (itbl_get_val): Likewise. - (itbl_get_field): Use strcspn. Change delimiters to include - parens. - * itbl-ops.h (itbl_get_reg_val): Update declaration. - (itbl_get_val): Likewise. - * config/tc-mips.c (mips_ip): Update call to itbl_get_reg_val. + * config/tc-d30v.h: Include "write.h" for fixS. + (d30v_start_line, md_pcrel_from_section): Add function prototypes. - * symbols.c (copy_symbol_attributes): Convert local symbols to - regular symbols. +2000-07-05 Nick Clifton -1999-06-10 Nick Clifton + * config/tc-d30v.c (write_2_short): Further changes to warning + messages produced when combining EITHER_BUT_PREFER_MU attributed + opcodes. - * config/tc-arm.c (md_parse_option): Add support for ARM920 and - ARM920t. +2000-07-05 DJ Delorie + + * MAINTAINERS: new + +2000-07-04 Alexandre Oliva + + * config/tc-arm.c (psrs): Accept combinations of flags. + +2000-07-03 Marek Michalkiewicz + + * config/tc-avr.c: Change _ () to _() around all strings marked + for translation (exception from the usual coding style). + (avr_opt): New struct variable, how the new switches are set. + (OPTION_MMCU): Define as 'm' and actually use. + (md_longopts): Add -mall-opcodes, -mno-skip-bug, -mno-wrap. + (show_mcu_list): New function, display the list of known MCUs. + (md_show_usage): Document the new switches. Call show_mcu_list. + (avr_set_arch): Change 'm' to OPTION_MMCU. + (md_parse_option): Call show_mcu_list if unknown MCU specified. + Handle the new switches. + (avr_operands): Disable warnings for undefined combinations of + operands if -mall-opcodes. Disable warnings for skipping two-word + instructions if enhanced core or -mno-skip-bug. + (avr_operand): Accept all addressing modes on avr1 if -mall-opcodes. + (md_apply_fix3): Reject 8K wrap if >8K or -mno-wrap. + (md_assemble): Accept opcodes not supported by MCU if -mall-opcodes. + (avr_ldi_expression): Warn about implicit lo8(). + * config/tc-avr.h (md_pcrel_from_section): Add prototype. + +2000-07-01 Koundinya K + + * configure.in: Add entry for mips-*-sysv4*MP* + * configure: Rebuild + * config/tc-mips.c (mips_target_format): Return elf32-tradbigmips or + elf32-tradlittlemips for traditional mips targets. + * config/tc-mips.c (md_estimate_size_before_relax): Duplicate the + test for Link Once sections as in adjust_reloc_syms. + * config/te-tmips.h: New file for traditional mips targets. Define + TE_TMIPS. + +2000-06-29 Mark Elbrecht + + * config/obj-coff.c (obj_coff_setcion) [BFD_ASSEMBLER]: If the + flags argument is not present, don't change an existing section's + section's attributes. If the flags argument is present, warn if the + attributes don't match the section's current attributes. When + long section names are supported, set SEC_LINK_ONCE and + SEC_LINK_DUPLICATES_DISCARD for a new .gnu.linkonce section. + +Thu Jun 29 21:30:00 2000 Hans-Peter Nilsson + + * config/obj-aout.c (obj_aout_type): Do not ignore for undefined + symbols; create them. + +2000-06-29 Mark Elbrecht + + * write.c (set_segment_vma): New: Set vma and lma for a segment. + (write_object_file) [BFD_ASSEMBLER && OBJ_COFF && TE_GO32]: Use it. + +2000-06-27 Aldy Hernandez + + * config/tc-mips.c (mips_ip): handle "(foo-.-4)" type of + expressions. Ignore the problem when handling 16 bit signed + immediates, because the assembler will take care of the relocation + later. + +2000-06-27 Nick Clifton + + * config/tc-d30v.c (write_2_short): Do not allow opcodes with + the EITHER_BUT_PREFER_MU attribute to be combined into a reverse + sequential order, and emit warning messages if the input source + code contains constructs like that, or parallel constructs + containing such opcodes. + +2000-06-26 Marek Michalkiewicz + + * config/tc-avr.c (mcu_types): Rename avr4 to avr5, add avr4. + Add more MCU types for avr4 and avr5. Replace at94k{10,20,40} + with just at94k. Change AVR_ISA_85xx back to AVR_ISA_2xxx. + (md_show_usage): Update usage message. + (md_parse_option): Allow redefinition of MCU type within the + same avr[1-5] bfd machine type. Show both old and new MCU type + in the error message. + (md_apply_fix3): Support 8K wrap if AVR_ISA_MEGA is not set. + Simplify 8K wrap code. + +2000-06-25 Kazu Hirata + + * config/obj-aout.c: Remove all uses of DEFUN. + * config/obj-ieee.c: Likewise. + * config/tc-sh.c: Fix comment typos. + * config/tc-tahoe.c: Likewise. + * config/tc-vax.c: Likewise. + * config/tc-w65.c: Likewise. + * config/tc-z8k.c: Likewise. + * config/tc-h8300.c (build_bytes): Assemble ldmac correctly. -1999-06-07 Jakub Jelinek +2000-06-24 DJ Delorie - * config/tc-sparc.c (md_assemble): Fix up setx, support setsw. - Optimize set if sizeof(bfd_vma) == 64. - (sparc_ip): Fix sethi - without %hi() it should generate - R_SPARC_22 reloc, not R_SPARC_HI22. - (tc_gen_reloc): Handle BFD_RELOC_SPARC22. + * config/tc-i386.c (md_estimate_size_before_relax): Revert + more changes from Sept 1999 + (tc_i386_fix_adjustable): ditto + (md_apply_fix3): ditto -1999-06-07 Jakub Jelinek +2000-06-24 Frank Ch. Eigler - * config/tc-sparc.c (md_begin): Handle native wordsize aliases. - (s_ncons): New function. - (native_op_table): New table. - (sparc_ip): Be more strict on %hi() etc.; prepare assembler for - R_SPARC_OLO10 handling. + * cgen.c (expr_jmp_buf_p): New validity flag for expr_jmp_buf. + (gas_cgen_parse_operand): Set it around expression() call. + (gas_cgen_md_operand): Test for it before longjmp(). -Mon Jun 7 10:22:16 1999 Richard Henderson +2000-06-24 Kazu Hirata - * expr.h (struct expressionS): Revert last change; widen X_op. - * config/tc-alpha.c (md_begin): Check the field is wide enough. + * config/tc-h8500.c: Remove all uses of DEFUN. + * config/tc-sh.c: Likewise. + * config/tc-w65.c: Likewise. + * config/tc-z8k.c: Likewise. -Mon Jun 7 11:25:16 1999 Andreas Schwab + * config/tc-h8500.c: Fix typos in comments. - * Makefile.am (TARGET_CPU_CFILES): Add config/tc-fr30.c. - (TARGET_CPU_HFILES): Add config/tc-fr30.h. - (TARG_ENV_HFILES): Add config/te-epoc-pe.h. - * Makefile.in: Regenerated. +2000-06-23 Frank Ch. Eigler - * config/obj-elf.c (obj_elf_common): In MRI mode if called as - `common' pass on to s_mri_common. - (elf_pseudo_table): Pass 1 to obj_elf_common for `common'. + * expr.c (operand): Permit $hex literals if LITERAL_PREFIXDOLLAR_HEX + is defined. -1999-06-06 Richard Henderson +2000-06-23 matthew green - * config/obj-elf.c (obj_elf_section): Don't free the return - value of demand_copy_C_string. + * expr.c (operand): Do not as_bad() if RELAX_PAREN_GROUPING is + defined. Fix error message for `[' grouping. -1999-06-05 Richard Henderson +2000-06-22 Kazu Hirata - * dwarf2dbg.c (dwarf2_gen_line_info): Mirror the section symbol - creation logic from obj_elf_create_section. + * config/tc-h8300.c: Fix formatting and comment typos. - * config/obj-elf.c (elf_pseudo_tab): Add pushsection/popsection. - (section_stack): New. - (special_sections): Make const. - (obj_elf_section): Gut and rewrite parsing. - (obj_elf_change_section): New function broken out of obj_elf_section. - (obj_elf_parse_section_letters): Likewise. - (obj_elf_section_word): Likewise. - (obj_elf_section_type): Likewise. - (obj_elf_previous): Treat as a toggle. - (obj_elf_popsection): New. - * config/tc-ppc.c (ppc_section_word): Take str+len not ptr_str. - (ppc_section_type): Likewise. - * config/tc-ppc.h: Likewise. +2000-06-22 Timothy Wall - * expr.h (struct expressionS): Don't make X_op a bitfield. - * config/tc-alpha.c: Update for symbol handling changes. - (md_apply_fix) [case GPREL]: Use now_seg instead of absolute_section. - (load_expression, emit_ir_load, emit_loadstore, emit_jsrjmp): Likewise. + * config/tc-ia64.c (note_register_values): Move premature QP + notation clearing into the appropriate place. -1999-06-05 Richard Henderson +2000-06-22 Alan Modra - * dwarf2dbg.c (*): Convert to K&R + prototypes. - (dwarf2_gen_line_info): Kill unused variables. - (dwarf2_finish): Likewise. - (dwarf2_where): Likewise. - (dwarf2_directive_file): If we've only got a string, - hand off to s_app_file. - * ecoff.c: Move the include of ecoff.h. - * symbols.h (S_IS_FUNCTION): Prototype. + * dep-in.sed: Escape literal `.'s on patterns. Trim off `../' + first before anything else. Add bin-bugs.h, emul.h and progress.h + Sort list of files as for $(OBJS) in Makefile.am. - * read.c (LEX_HASH): Supply a default. - (lex_type): Use it. - (s_globl): Update `c' after skipping whitespace. - * read.h (LEX_END_NAME, is_name_ender): New. - * expr.c (get_symbol_end): Respect it. + * Makefile.am (DEP): grep for leading `/' in DEPA, and fail if we + find one. Remake dependencies. + ($(OBJS)): Add bin-bugs.h, emul.h, and progress.h Sort the list. + * Makefile.in: Regenerate. + * doc/Makefile.in: Regenerate. -1999-06-04 Mark Klein + * config/tc-i386.c (i386_displacement): Don't assume a constant + displacement is necessarily 16 bits when in 16 bit code mode. + (md_assemble): Instead size the displacement here after we know + for sure that a .code16gcc operand hasn't automatically added + operand size prefixes. - * config/tc-hppa.c (md_begin): Convert local symbol dummy_symbol - to real if OBJ_SOM - (tc_gen_reloc): Still need bfd_abs_symbol in some relocs. +2000-06-21 H.J. Lu - * config/tc-hppa.c: Update for symbol handling changes. + * Makefile.am: Rebuild dependency. + * Makefile.in: Rebuild. -1999-06-03 Ian Lance Taylor +2000-06-21 Kazu Hirata - * cgen.c: Update for symbol handling changes. - * config/tc-m32r.c: Likewise. + * config/tc-h8300.c (parse_reg): Make the function static. + (parse_exp): Likewise. - * config/tc-hppa.h: Update for symbol handling changes. - * config/tc-hppa.c: Likewise. +2000-06-20 DJ Delorie - * config/tc-arm.h: Update for symbol handling changes. - * config/tc-arm.c: Likewise. - (symbol_make_empty): Remove. Just use symbol_create. + * config/tc-i386.c (tc_i386_fix_adjustable): Revert change from + Sept 1999; RVA relocs need to be treated more like DIR32 relocs + for cygwin import libraries to work properly. - * symbols.c (symbol_set_tc): Correct name. +2000-06-20 H.J. Lu - * Makefile.am: Rebuild dependencies. - ($(OBJS)): Don't depend upon struc-symbol.h. - (.dep1, .tcdep, .objdep): Create itbl-parse.h. - * dep-in.sed: Don't remove struc-symbol.h. + * Makefile.am: Rebuild dependency. * Makefile.in: Rebuild. + * configure: Likewise. + * doc/Makefile.in: Likewise. - * doc/internals.texi (Symbols): Describe changes in symbol - handling. - -1999-06-03 Richard Henderson - - * dwarf2dbg.c (dwarf2_gen_line_info): Use section_symbol - instead of doing the work by hand. - -1999-06-03 David Mosberger - - * dwarf2dbg.c (INITIAL_STATE): New macro encapsulating initial - state of line state-machine. - (struct ls): Collect DWARF2 line state-machine state in new member - SM. Add member EMPTY_SEQUENCE to keep track if a code sequence - resulted in any DWARF2 directives. - (reset_state_machine): New function. - (out_end_sequence): Ditto. - (dwarf2_gen_line_info): When switching sections or switching to a - lower text address, call out_end_sequence() first to terminate the - previous code sequence as code sequences MUST have monotonically - increasing addresses. - (dwarf2_finish): Call out_end_sequence() instead of open coding it. - -1999-06-03 David Mosberger - - * as.c (parse_args): Add option -gdwarf2 to allow requesting - DWARF2 debug info (line information only, at this point). - * as.h: Update comment about supported debug formats. - * dwarf2dbg.c, dwarf2dbg.h: New files. - * Makefile.am (GAS_CFILES, HFILES, GENERIC_OBJS): Add them. - - * expr.c (operand): Don't use [ for parens if we want an index op. - (op_encoding): Switch [ into O_index, if desired. - (op_rank): Renumber with O_index on bottom. - (expr): If O_index, match closing bracket. - * expr.h (O_index): New. - - * read.c (read_a_source_file): Conditionally allow matched " - in lines passed to md_assemble. - - * config/obj-elf.c (elf_pseudo_table): Add `common'. - -1999-06-03 Ian Lance Taylor - - Add support for storing local symbols in a small structure to save - memory when assembling large files. - * as.h: Don't include struc-symbol.h. - (symbolS): Add typedef. - * symbols.c: Include struc-symbol.h. - (local_hash): New static variable. - (save_symbol_name): New static function, from symbol_create. - (symbol_create): Call save_symbol_name. - (local_symbol_count): New static variable. - (local_symbol_conversion_count): Likewise. - (LOCAL_SYMBOL_CHECK): Define. - (local_symbol_make): New static function. - (local_symbol_convert): New static function. - (colon): Handle local symbols. Create local symbol for local - label name. - (symbol_table_insert): Handle local symbols. - (symbol_find_or_make): Create local symbol for local label name. - (symbol_find_base): Check for local symbol. - (symbol_append, symbol_insert): Check for local symbols. - (symbol_clear_list_pointers, symbol_remove): Likewise. - (verify_symbol_chain): Likewise. - (copy_symbol_attributes): Likewise. - (resolve_symbol_value): Handle local symbols. - (resolve_local_symbol): New static function. - (resolve_local_symbol_values): New function. - (S_GET_VALUE, S_SET_VALUE): Handle local symbols. - (S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise. - (S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise. - (S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise. - (S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise. - (symbol_previous, symbol_next): New functions. - (symbol_get_value_expression): Likewise. - (symbol_set_value_expression): Likewise. - (symbol_set_frag, symbol_get_frag): Likewise. - (symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise. - (symbol_mark_used_in_reloc): Likewise. - (symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise. - (symbol_mark_mri_common, symbol_clear_mri_common): Likewise. - (symbol_mri_common_p): Likewise. - (symbol_mark_written, symbol_clear_written): Likewise. - (symbol_written_p): Likewise. - (symbol_mark_resolved, symbol_resolved_p): Likewise. - (symbol_section_p, symbol_equated_p): Likewise. - (symbol_constant_p): Likewise. - (symbol_get_bfdsym, symbol_set_bfdsym): Likewise. - (symbol_get_obj, symbol_set_obj): Likewise. - (symbol_get_tc, symbol_set_tc): Likewise. - (symbol_begin): Initialize local_hash. - (print_symbol_value_1): Handle local symbols. - (symbol_print_statistics): Print local symbol statistics. - * symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER. - Declare new symbols.c functions. Move many declarations here from - struc-symbol.h. - (SYMBOLS_NEED_BACKPOINTERS): Define if needed. - * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set. - (struct symbol): Move bsym to make it clearly the first field. - Remove TARGET_SYMBOL_FIELDS. - (symbolS): Don't typedef. - (struct broken_word): Remove. - (N_TYPE_seg, seg_N_TYPE): Move to symbol.h. - (SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise. - (symbol_clear_list_pointers): Likewise. - (symbol_insert, symbol_remove): Likewise. - (symbol_previous, symbol_append): Likewise. - (verify_symbol_chain, verify_symbol_chain_2): Likewise. - (struct local_symbol): Define. - (local_symbol_converted_p, local_symbol_mark_converted): Define. - (local_symbol_resolved_p, local_symbol_mark_resolved): Define. - (local_symbol_get_frag, local_symbol_set_frag): Define. - (local_symbol_get_real_symbol): Define. - (local_symbol_set_real_symbol): Define. - Define. - * write.c (write_object_file): Call resolve_local_symbol_values. - * config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define. - (TARGET_SYMBOL_FIELDS): Don't define. - * config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field. If - ECOFF_DEBUGGING, add ECOFF fields. - (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. - * config/obj-multi.h (struct elf_obj_sy): Add local field. If - ECOFF_DEBUGGING, add ECOFF fields. - (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. - (ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define. - * config/tc-mcore.h: Don't include struc-symbol.h. - (TARGET_SYMBOL_FIELDS): Don't define. - (struct mcore_tc_sy): Define. - (TC_SYMFIELD_TYPE): Define. - * Many files: Use symbolS instead of struct symbol. Use new - accessor functions rather than referring to symbolS fields - directly. - - * read.c (s_mri_common): Don't add in value of line_label. - - * config/tc-mips.c (md_apply_fix): Correct parenthesization when - checking for SEC_LINK_ONCE. - - * config/tc-sh.h (sh_fix_adjustable): Declare. - - * app.c (input_buffer): New static variable. - (app_push): Save saved_input in allocated buffer. - (app_pop): Restored saved_input. - (do_scrub_chars): Change get parameter to take char * and int as - arguments. Change GET macro to pass input_buffer to get - function. Don't save input into allocated buffer. - * as.h (do_scrub_chars): Update declaration. - * input-file.c (input_file_get): Change to take char * and int. - Read data into passed in buffer. Remove static buffer. - * read.c (scrub_from_string): Change to take char * and int. Copy - data into passed in buffer. - - * hash.h: Neaten. Declare hash_traverse. - * hash.c: Complete rewrite based on BFD hashing code. - * gasp.c (chunksize): New variable. - * macro.c (macro_expand_body): Call hash_jam with NULL rather than - hash_delete. - -1999-05-28 Nick Clifton - - * config/tc-arm.c (md_apply_fix3): Add pipeline offset into reloc - addend unless the target uses an old ABI. - -Mon May 24 13:36:55 1999 Doug Evans - - -Wchar-subscripts cleanup - * listing.c (listing_newline): Use unsigned char variable, so - calls to isascii,iscntrl are correct. - * atof-generic.c (atof_generic): Cast arg to isdigit, et. al. with - (unsigned char). - * ecoff.c (ecoff_directive_ent,ecoff_stab): Ditto. - * config/obj-elf.c (obj_elf_vtable_inherit): Ditto. - * config/tc-mips.c (mips_ip,mips16_ip): Ditto. - (my_getSmallExpression,get_number,s_mips_ent): Ditto. - -1999-05-28 Torbjorn Granlund - - * config/tc-m68k.c (m68k_ip): Check for disallowed index register - width for Coldfire. - (arch_coldfire_p): New #define. - (m68k_ip, m68k_init_after_args): Use arch_coldfire_p. - -1999-05-28 Linus Nordberg - - * config/tc-m68k.c (install_operand): Add places `n', `o'. - - * config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'. - (install_operand): Add place `N'. - (init_table): Add registers ACC, MACSR, MASK. - - * config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK. - - * config/tc-m68k.c: Change mcf5200 --> mcf. - (archs): Add mcf5206e, mcf5307. - (m68k_ip): Add format `u'. - (install_operand): Add place `m', `M', `h'. - (init_table): Add upper/lower registers. - - * config/m68k-parse.h (m68k_register): Add upper/lower registers. - -1999-05-28 Martin Dorey - - * config/tc-i960.c: Several minor changes to add ELF and - BFD_ASSEMBLER support. - * config/tc-i960.h: Likewise. - * configure.in (i960-*-elf*): New target. - * aclocal.m4, configure: Rebuild. - -1999-05-25 Alan Modra - - * config/tc-i386.c (md_apply_fix3): Only do 1999-05-17 fx_pcrel - reloc changes when defined(BFD_ASSEMBLER). +2000-06-20 Timothy Wall -1999-05-17 Alan Modra + * doc/internals.texi (CPU backend): Add @itemx for + TC_START_LABEL_WITHOUT_COLON. + * doc/c-tic54x.texi: New. + * doc/as.texinfo: Add tic54x features and include primary tic54x + documentation file. + * doc/all.texi: Add C54X. + * doc/Makefile.am (CPU_DOCS): Add c-tic54x.texi. + * doc/Makefile.in: Regenerate. + * configure.in: Add tic54x and define LIBM for tic54x. + * configure: Regenrate. + * config/tc-tic54x.[ch]: New. + * config/obj-coff.h: Add tic54x. + * Makefile.am: (CPU_TYPES): Add tic54x. + (TARGET_CPU_CFILES): Add 'tc-tic54x.c'. + (TARGET_CPU_HFILES): Add 'tc-tic54x.h'. + (as_new_LDADD): Add $(LIBM). + * Makefile.in: Regenerate. - * config/tc-i386.c (tc_gen_reloc): Remove F and MAP macros. +2000-06-18 Stephane Carrez - * write.c (write_print_statistics): Output to file, not stderr. + * doc/Makefile.am (CPU_DOCS): Added 68hc11 file. + * doc/c-m68hc11.texi: Document 68HC11 and 68HC12 port. + * doc/as.texinfo: Likewise. - * expr.c (generic_bignum_to_int32,64): Prototype. + * configure, Makefile.in: Regenerate. + * configure.in (emulations): Recognize m6811 and m6812. + * Makefile.am (CPU_TYPES, TARGET_CPU_CFILES, TARGET_CPU_HFILES): + Added files for 68hc11 and 68hc12 assembler. + * config/tc-m68hc11.c: Assembler for 68hc11 and 68hc12. + * config/tc-m68hc11.h: Header definition for that assembler. - * read.c (s_lcomm_internal, sizeof_sleb128, sizeof_uleb128, - output_sleb128, output_uleb128, output_big_sleb128, - output_big_uleb128, output_big_leb128): Prototype. - (output_big_sleb128, output_big_uleb128): Make inline. - (output_big_leb128): Remove inline +2000-06-18 Nick Clifton - From Maciej W. Rozycki - * config/tc-i386.c (md_apply_fix3): Convert BFD_RELOC_16 with - fx_pcrel set to BFD_RELOC_16_PCREL. Similarly for BFD_RELOC_8. - Handle BFD_RELOC_16_PCREL and BFD_RELOC_8_PCREL. Return changed - value for correct overflow check in write.c:fixup_segment. - * write.c (fixup_segment): Move bitfield overflow checks to after - the md_apply_fix call. - * config/obj-coff.c (fixup_segment): Likewise. - * doc/internals.texi (CPU backend): Mention md_apply_fix modifying - valueT *val argument. + * symbols.c (resolve_symbol_value): Use bfd_octets_per_byte + instead of OCTETS_PER_BYTE. -Fri May 14 10:52:13 1999 Andreas Schwab + * config/tc-v850.c: Fix compile time warnings. + * config/tc-ppc.c: Fix compile time warnings. - * config/atof-ieee.c (gen_to_words): Correctly round a - denormalized number. Fix off-by-one in range checking for - exponent in a denormal. +2000-06-18 H.J. Lu -1999-05-10 Nick Clifton + * configure.in: Don't emulate i386-pc-pe-coff with i386coff. + * configure: Rebuild. - * config/tc-mcore.c (parse_reg): Accept 'sp' as a valid register - name. +2000-06-17 Mark Elbrecht -Thu May 13 09:46:59 1999 Joel Sherrill (joel@OARcorp.com) + * config/obj-coff.c (obj_coff_weak): Typo fix: Change BFD_ASSEMLER + to BFD_ASSEMBLER. - * configure.in (i386-*-rtemself*, sh-*-rtemself*): New targets. +2000-06-16 Nick Clifton -1999-05-12 Alan Modra + * config/tc-mips.c (md_parse_option): Accept RM5200,RM5230, + RM5231, RM5261, RM5721 and RM7000 as r5000 cpu variants. - * config/tc-i386.h (InvMem): New flag. Add to AnyMem. - (ReverseRegRegmem): Remove. - (ImmExt): New flag. Renumber some of the opcode_modifier bits. - * config/tc-i386.c (md_assemble): Test for PIII SIMD and AMD - 3DNow! via ImmExt opcode_modifier. Remove ReverseRegRegmem - kludge. + * doc/c-mips.texi: Document newly accepted cpu variants. - From Doug Ledford - * config/tc-i386.h (RegXMM): New for P/III. - * config/tc-i386.c: Add support for P/III. +2000-06-15 Ulf Carlsson -Sat May 8 23:28:50 1999 Richard Henderson + * config/tc-mips.h: Remove definition of ONLY_STANDARD_ESCAPES. - * config/tc-ppc.c (md_parse_option): Recognize -mppc64bridge. - (md_begin): Allow ppc32 insns in ppc64bridge mode. - (ppc_insert_operand): Accept SIGNOPT in ppc64 mode. +2000-06-13 Ulf Carlsson -Thu May 6 23:13:39 1999 Richard Henderson + * macro.c (getstring): Make it possible to escape the quote + character. - * config/tc-i386.c (i386_immediate): Skip whitespace before - complaining about junk after expression. - (i386_displacement): Likewise. +Tue Jun 13 20:58:28 2000 Catherine Moore -Thu May 6 19:50:14 1999 Richard Henderson + * config/tc-hppa.c (pa_export): Weak symbols can be global. - * symbols.c (symbol_find_base): Use memcpy instead of strcpy. - Don't copy before downcaseing. +2000-06-13 H.J. Lu -1999-05-05 Catherine Moore - - * tc-m68k.c: Include elf/m68k.h. - (m68k_elf_final_processing): New routine. - * tc-m68k.h (elf_tc_final_processing m68k_elf_final_processing): - Define. - -Mon May 3 10:26:03 1999 Jeffrey A Law (law@cygnus.com) + * configure: Regenerate. - * config/tc-hppa.c (md_apply_fix): Handle 22 bit fmt insn like a - 17 bit fmt insn. +2000-06-09 Alan Modra -1999-04-30 Nick Clifton + * app.c (do_scrub_begin): Don't default lex[';'] as a line + separator. + * doc/internals.texi (line_separator_chars): Semicolon is no + longer a default. Mention null and newline as defaults. - * config/tc-mcore.c (mcore_s_section): Dump literals before - changing section. + * read.c (is_end_of_line): Remove ifdef TC_HPPA. -1999-04-29 Nick Clifton + * config/tc-i386.h (line_separator_chars): Explicitly mention `;' + * config/tc-i860.h (line_separator_chars): Likewise. + * config/tc-h8300.c (line_separator_chars): Likewise. + * config/tc-i960.c (line_separator_chars): Likewise. + * config/tc-m68k.c (line_separator_chars): Likewise. + * config/tc-mips.c (line_separator_chars): Likewise. + * config/tc-ns32k.c (line_separator_chars): Likewise. + * config/tc-sparc.c (line_separator_chars): Likewise. + * config/tc-vax.c (line_separator_chars): Likewise. - * config/tc-mcore.c (md_apply_fix3): Insert reloc addend into insn - for COFF/PE port. + * config/tc-h8300.c (comment_chars): Use string initialiser. + * config/tc-i960.c (line_comment_chars): Likewise. + * config/tc-z8k.c (comment_chars, line_comment_chars, + line_separator_chars): Likewise. -Mon Apr 26 12:34:37 1999 Doug Evans + * config/tc-arm.c (line_separator_chars): Always use `;', not just + for TE_LINUX. - * config/tc-fr30.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h. - (TC_INIT_FIX_DATA): Delete. - * config/tc-m32r.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h. - (TC_INIT_FIX_DATA): Delete. - * write.h (struct fix): New member fx_cgen, ifdef USING_CGEN. - * write.c (fix_new_internal): Initialize fx_cgen member. - * cgen.c (gas_cgen_record_fixup,gas_cgen_record_fixup_exp): Update. - (gas_cgen_md_apply_fix3): Update. - * config/tc-m32r.c (md_cgen_lookup_reloc): Update. - (md_cgen_record_fixup_exp): Update. - (FX_OPINFO_R_TYPE): Update. +2000-06-08 Nick Clifton - * frags.c (frag_var,frag_variant): Initialize fr_cgen here. - * config/tc-fr30.h (TC_FRAG_INIT): Delete. - * config/tc-m32r.h (TC_FRAG_INIT): Delete. - * frags.h (struct frag): Make opindex, opinfo ints. + * config/tc-arm.c (cons_fix_new_arm): Assign correct reloc value + for size 1 fixes. - * config/tc-fr30.c (FX_OPINFO_R_TYPE): Delete, unused. +2000-06-08 David O'Brien -1999-04-26 Tom Tromey + * configure.in (VERSION): Update to show this is the CVS mainline. - * aclocal.m4, configure: Updated for new version of libtool. +2000-06-08 Matthew Jacob -1999-04-22 Nick Clifton + * config/tc-alpha.c (md_undefined_symbol): Properly understand that + $at is the integer register $r28, vs. both $r28 and the floating + point register $f28. - * config/tc-mcore.c (md_apply_fix3): Renamed function from - md_apply_fix. - (md_apply_fix3): Do not fix up absolute relocations against - symbolic values. +2000-06-08 James E. Wilson - * config/tc-mcore.h (MD_APPLY_FIX3): Define. + * config/tc-ia64.c (generate_unwind_image): Call ia64_flush_insns. + (dot_endp): Don't call ia64_flush_insns. + (emit_one_bundle): Don't delete prologue/body records from + unwind_record list in first loop. Rewrite second loop to account for + this. -1999-04-20 Nick Clifton +2000-06-07 David Mosberger - * config/tc-mcore.c (md_pseudo_table): Add intercepts for section - changes and data-in-text directives. - (mcore_cons): New function: intercept cons() operations. - (mcore_float_cons): New function: intercept float_cons() - operations. - (mcore_stringer): New function: intercept stringer() operations. + * config/tc-ia64.c: Add missing prototypes. + (generate_unwind_image): Cast argument to output_unw_records call. -1999-04-18 Ian Lance Taylor +Wed Jun 7 22:44:14 2000 Denis Chertykov - * obj.h (struct format_ops): Change generate_asm_lineno field to - take no parameters. - * config/obj-ecoff.h (OBJ_GENERATE_ASM_LINENO): Don't define. + * config/tc-avr.c (avr_operand): fix the formatting of the comment. - * config/tc-alpha.c (find_opcode_match): Add default case to - switch. - (find_macro_match): Likewise. - (load_expression): Parenthesize && within ||. +Wed Jun 7 21:26:15 2000 Denis Chertykov - * config/tc-alpha.h (TC_RELOC_RTSYM_LOC_FIXUP): Define. + * config/tc-avr.c (AVR_ISA_???): moved to include/opcode/avr.h + (REGISTER_P): likewise. + (avr_opcodes): uses include/opcode/avr.h + (avr_operand): enable ld r,Z or st r,Z for at90s1200. -1999-04-17 Nick Clifton +2000-06-04 Alan Modra - * config/tc-mcore.c (md_pseudo_table): Add overrides for .bss - .text .data .section pseudo ops. - (mcore_s_section): New function. Dump lits before changing secs. - (mcore_s_text): New function. Dump lits before changing secs. - (mcore_s_data): New function. Dump lits before changing secs. + * read.c (is_end_of_line): No ';' for TC_HPPA. Add missing + initializers too. -1999-04-16 Gavin Romig-Koch +2000-06-03 H.J. Lu - * config/tc-mips.c (mips_32bitmode): New. - (md_begin): Set mips_32bitmode if needed. - (mips_elf_final_processing): Don't set EF_MIPS_ARCH. - Set EF_MIPS_32BITMODE. + * read.c (is_end_of_line): Put back `;'. -Fri Apr 16 12:26:39 1999 Bob Manson +2000-06-03 Alan Modra - * config/obj-coff.c (c_section_symbol): Fix typo in previous - change. + * config/tc-i386.c (md_shortopts): Remove 'm', add 'q' to non-elf. -1999-04-16 Nick Clifton +2000-06-01 Alan Modra - * config/tc-mcore.h (LOCAL_LABELS_FB): Define to 1. + * expr.c (operand): Test is_end_of_line outside switch to catch + line separator chars that are also operators. + (operator): Return O_illegal for line separator chars. -Thu Apr 15 16:52:09 1999 Jeffrey A Law (law@cygnus.com) + * read.c (is_end_of_line): Use 1 instead of 99. Don't set `;' + entry (or `!' entry for TC_HPPA). - * tc-hppa.c (pa_get_absolute_exression): Try to handle "5 %r3" - expressions correctly. + * config/tc-arm.c (my_get_float_expression): Cast to unsigned char + before indexing is_end_of_line. Remove redundant check for '\0'. + (fp_op2): Likewise. + * config/tc-h8500.c (md_assemble): Likewise. + * config/tc-mcore.c (md_assemble): Likewise. + * config/tc-tic30.c (tic30_find_parallel_insn): Likewise. + (md_atof): Likewise + * config/tc-m88k.c (s_bss): Cast to unsigned char before indexing + is_end_of_line. + * config/tc-mcore.c (mcore_cons): Likewise. + (mcore_float_cons): Likewise. + (mcore_stringer): Likewise. + * config/tc-tic30.c (tic30_find_parallel_insn): Likewise. -1999-04-15 Gavin Romig-Koch +2000-06-01 Scott Bambrough - * config/tc-mips.c (mips_elf_final_processing): Set EF_MIPS_ARCH. + * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly. -Mon Apr 12 23:45:07 1999 Jeffrey A Law (law@cygnus.com) +2000-05-29 Nick Clifton - * tc-hppa.c (pa_ip, case '3'): New case for PA2.0 fmpyfadd - and fmpynfadd instructions. + * config/tc-sh.c: Fix compile time warning messages. -1999-04-11 Richard Henderson + * config/tc-mips.c: Fix compile time warning messages. - * as.h (environ): Declare it, if needed. - * as.c (dump_statistics): Don't declare environ. - * configure.in (environ): Detect declaration. - * configure, config.in: Rebuild +2000-05-29 Philip Blundell - * config/tc-i386.c (i386_immediate): Accept @GOT relocations. - (i386_displacement): Allocate enough space for replacement buffer. - Clean up replacement buffer initialization. + * doc/as.texinfo: Update copyright dates. + (Local Labels): Delete misplaced mention of ARM. + * NEWS: Mention ARM ELF support. -1999-04-11 Bob Manson : +2000-05-27 Alexandre Oliva - * subsegs.c (section_symbol): Don't create a new symbol if one - already exists; instead, use the existing one, but set its segment - and frag data if it hasn't already been defined. - * config/obj-coff.c (c_section_symbol): Likewise. + * config/tc-mn10300.c (md_assemble): Copy size to real_size before + it is modified, and use the real_size to compute the frag address + for dwarf2 line info. -Sat Apr 10 20:10:02 1999 Richard Henderson +2000-05-27 Alan Modra - * tc-alpha.c (load_expression): Call as_bad instead of abort. + * Makefile.am (DEP, DEP1, dep, dep-in, dep-am): Use a better sed + line-matching scheme to cope with automake moving variables around. + ($(TARG_CPU_O)): Remove dependency on TARG_CPU_DEP_@target_cpu_type@ + * Makefile.in: Regenerate. -1999-04-08 Nick Clifton +2000-05-26 Jakub Jelinek + + * config/tc-sparc.c (sparc_relax): New. + (md_longopts): Add -relax and -no-relax options. + (md_parse_options, md_show_usage): Likewise. + (md_apply_fix3): Optimize tail call into branch always if possible. + +Thu May 4 15:27:07 2000 Donald Lindsay + + * config/tc-d10v.c (write_2_short, parallel_ok, md_assemble, + d10v_cleanup) implement Mitsubishi's newly explained branch-packing + rules, with warning when a GAS statement specifies a packing that + will result in an instruction being squashed. + Added typdef packing_type and enumerals, changed various integer + literals to use the enumerals. + +2000-05-24 David Mosberger + + * config/tc-ia64.c (dot_restorereg_p): New function. + (md_pseudo_table): Add restorereg.p. + (output_X3_format): Fix typo: record type should be UNW_X3, not UNW_X1. + (output_X4_format): Fix typo: record type should be UNW_X4, not UNW_X2. + + * config/tc-ia64.h (unw_record_type): Add unwabi. + (unw_r_record): Rename member MASK to GRMASK. Add sub-structure + called MASK with members for imask, and the masks produced by + fr_mem, gr_mem, br_mem, and frgr_mem. + (unw_p_record): Add members ABI and CONTEXT. + (unw_x_record): Add member AB. + * config/tc-ia64.c (enum reg_symbol): Add REG_PSP and REG_PRIUNAT + as pseudo-register for use during unwind info generation. + (AR_PFS, AR_LC): New macros. + (enum pseudo_type): Add PSEUDO_FUNC_REG to permit declaring registers + whose names start with an at sign (as in "@priunat"). + (pseudo_func): Add "svr4", "hpux", "nt" constants and "priunat" + register. + (unwind_list, unwind_tail, current_unwind_entry, proc_start, + proc_end, unwind_info, personality_routine): Consolidate into + "unwind" structure to reduce offset-table use. Add member + NEXT_SLOT_NUMBER to track the slot number for the next instruction + to be emitted. + (output_R1_format, output_R3_format, output_P3_format, + output_P6_format): Initialize R with zero to reduce compiler warnings. + (output_P7_format): Ditto. Add `default' branch to switch + statement to reduce compiler warnings. + (output_P8_format, output_B1_format, output_B4_format): Ditto. + (output_P4_format): Rename 2nd & 3rd arg to IMASK and IMASK_SIZE. + (format_ab_reg): Rename from format_a_b_reg. Merge A and B args + into single argument. + (output_X1_format, output_X3_format): Initialize R with zero to reduce + compiler warnings. Merge A and B args into single argument. + (output_X2_format, output_X4_format): Remove unused variable R. Merge + A and B args into single argument. + (free_record): Removed (wasn't used). + (free_list_records): Also free imasks in prologue records. + (output_prologue, output_prologue_gr): Initialize mask bits to zero. + (output_spill_mask): Remove. + (output_unwabi): New function. + (output_epilogue, output_label_state, output_copy_state): Call + alloc_record. + (output_spill_psprel, output_spill_sprel, output_spill_psprel_p, + output_spill_sprel_p, output_spill_reg, output_spill_reg_p): Add AB + argument. + (process_one_record): New locals FR_MASK and GR_MASK. Ignore + gr_mem, fr_mem, br_mem, and frgr_mem records and instead emit them + as part of handling the prologue records. Emit region's imask if + we have one. Handle unwabi, epilogue, label_state, copy_state, + spill_psprel, spill_sprel, spill_reg, spill_psprel_p, + spill_sprel_p, and spill_reg_p records. + (set_imask, count_bits, slot_index): New function. + (fixup_unw_records): Fix region size computation. Handle + epilogue, spill_reg, spill_sprel, spill_psprel, spill_reg_p, + spill_sprel_p, and spill_psprel_p records. Merge mask bits of + frgr_mem, fr_mem, gr_mem, br_mem on a per-region basis and + set_imask accordingly. Update imask for gr_gr, and br_gr records. + (convert_expr_to_ab_reg, convert_expr_to_xy_reg): New function. + (dot_save): Use manifest constants for applicaton registers. + Handle REG_PR and REG_PRIUNAT. + (dot_restore): Don't just ignore it. + (dot_restorereg): New function.. + (generate_unwind_image): Ensure unwind info is a multiple of eight + bytes, not just four bytes. + (dot_handlerdata, dot_unwentry): Demand empty rest of line. + (dot_altrp): Don't just ignore it. + (dot_savemem): New function. Replaces dot_savesp() and + dot_savepsp(). Use manifest constants for applicaton registers. + Handle REG_PR and REG_PRIUNAT. + (dot_savef): Simplify. + (dot_saveb): Support generation of br_gr. + (dot_spillreg, dot_spillmem, dot_spillreg_p, dot_spillmem_p, + dot_label_state, dot_copy_state): New function. + (dot_unwabi): Don't just ignore it. + (md_pseudo_table): Add restorereg, spillreg, spillsp, spillpsp, + spillreg.p, spillsp.p, spillpsp, label_state, copy_state, + unwabi, vframesp, and vframepsp. Fix typo alprp->altrp. + (emit_one_bundle): Set slot number for prologue/body records + *before* emitting the first insn. + (emit_one_bundle): Set UNWIND.NEXT_SLOT_NUMBER. + (md_begin): Declare "psp" pseudo-register. + (md_operand): Handle PSEUDO_FUNC_REG. Fix printing of error message + so we don't get segfault. + (output_psp_sprel): Output sp/psp relative offsets as 4-byte word + counts as required per SW Conventions manual + (output_rp_psprel, output_rp_sprel, output_pfs_psprel,output_pfs_sprel, + output_preds_psprel, output_preds_sprel, output_spill_base, + output_unat_psprel, output_unat_sprel, output_lc_psprel, + output_lc_sprel, output_fpsr_psprel, output_fpsr_sprel, + output_priunat_psprel, output_priunat_sprel, output_bsp_psprel, + output_bsp_sprel, output_bspstore_psprel, output_bspstore_sprel, + output_rnat_psprel, output_rnat_sprel, output_spill_psprel, + output_spill_sprel, output_spill_psprel_p, output_spill_sprel_p):Ditto. + (dot_vframe): Implement. + (dot_vframesp, dot_vframepsp): New function. - * config/tc-mcore.c: New File: Support routines for MCore - assembler. - * config/tc-mcore.h: New File: Definitions for MCore assembler. - * config/obj-coff.c: Add support for mcore-pe target. +Tue May 23 00:57:05 2000 Hans-Peter Nilsson - * Makefile.am: Add support for MCore targets. - * Makefile.in: Regenerate. - * configure.in: Add support for MCore targets. + * configure.in (i386-*-freebsd a.out entry): Quote properly. * configure: Regenerate. - * doc/all.texi: Set MCORE. - * doc/as.texinfo: Document MCore specific command line options. - - * write.h: Prevent multiple inclusion. +2000-05-23 Alan Modra -1999-04-06 Ian Lance Taylor + * config/tc-i386.c (md_assemble): Pass jump reloc in fr_var... + (md_estimate_size_before_relax): so we can use it here instead of + old kludges. Localise vars to blocks. Comment. - * asintl.h (LC_MESSAGES): Never define. - * as.c (main): Don't pass LC_MESSAGES to setlocale if the system - does not define it. - * gasp.c (main): Don't pass LC_MESSAGES to setlocale if the system - does not define it. + * frags.c (frag_new): Update fr_var comments. + * frags.h (struct frag): Ditto. - * Makefile.am (m68k-parse.c): If configuring in the source - directory, copy m68k-parse.y into the local directory before - running ylwrap, to remove spurious differences when generating - snapshots. - * Makefile.in: Rebuild. +2000-05-22 Richard Henderson + + * config/tc-ia64.c (FUNC_PC_RELATIVE): New. + (pseudo_func): Add pcrel. + (operand_match): Handle IA64_OPND_TGT64. + (build_insn): Likewise. + (md_begin): Initialize pseudo_func[FUNC_PC_RELATIVE]. + (ia64_gen_real_reloc_type): Handle FUNC_PC_RELATIVE. + (fix_insn): Handle all three 64-bit relocation types. + +Mon May 22 22:43:32 2000 Hans-Peter Nilsson + + * obj.h (struct format_ops): New members begin, app_file, + s_set_other, s_set_desc, s_get_type, s_set_type, + separate_stab_sections, init_stab_section. + + * config/obj-multi.h: Update GPL notice to v2. + (obj_begin): New. + (obj_app_file): New. + (S_SET_SIZE): Test s_set_size for NULL before calling. + (S_SET_ALIGN): Similar for s_set_align. + (S_SET_OTHER): New. + (S_SET_DESC): New. + (S_GET_TYPE): New. + (S_SET_TYPE): New. + (SEPARATE_STAB_SECTIONS): New. + (INIT_STAB_SECTION): New. + (EMIT_SECTION_SYMBOLS): New. + (AOUT_STABS) [OBJ_MAYBE_AOUT]: Define. + + * config/obj-elf.h: Update GPL notice to v2. + Mention that this file is included from obj-multi.h. + (obj_begin): Wrap definition in ifndef. + (elf_file_symbol): Constify declaration. + (obj_app_file): Ditto. + (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB): + Wrap in ifndef SEPARATE_STAB_SECTIONS. + + * config/obj-elf.c (elf_s_set_other): New. + (elf_file_symbol): Constify argument. + (elf_separate_stab_sections): New. + (elf_init_stab_section): New. + (elf_format_ops): Add new members. Remove comma at end. + + * config/obj-ecoff.c (ecoff_separate_stab_sections): New. + (ecoff_format_ops): Add new fields. Remove comma at end. + Mention inconsistency for emit_section_symbols. + + * config/obj-coff.h (c_dot_file_symbol): Constify declaration. + + * config/obj-coff.c (c_dot_file_symbol): Constify argument. + (coff_separate_stab_sections): New. + (coff_format_ops): Add new members. + + * config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New. + (obj_aout_s_set_other): New. + (obj_aout_s_set_desc): New. + (obj_aout_s_get_type): New. + (obj_aout_s_set_type): New. + (obj_aout_separate_stab_sections): New. + (aout_format_ops): New members added. Use obj_aout_process_stab, + not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0. + (obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as + appropriate. + (obj_aout_line, obj_aout_weak, obj_aout_type): Ditto. - * config/tc-sparc.h (md_do_align): Just allocate the number of - bytes necessary, rather than always allocating 1024. +2000-05-22 Alan Modra -1999-04-04 Ian Lance Taylor + * config/tc-i386.c (tc_i386_fix_adjustable): Prevent adjustment + for OBJ_MAYBE_ELF too. Use S_IS_EXTERNAL instead of S_IS_EXTERN. + (md_estimate_size_before_relax): Ensure jumps to weak and + externally visible symbols are relocatable. - * listing.c (listing_newline): Add cast to avoid warning. - * read.c (generate_lineno_debug): Add cases to switch. Reindent. - * config/tc-i386.c (i386_scale): Add return value. - (build_displacement_string): Remove unused local temp_disp2. - (i386_intel_memory_operand): Add parentheses to avoid warning. - (i386_intel_operand): Remove unused local end_of_operand_string. - (i386_operand): Remove unused local operand_modifier. - (i386_operand): Add parens to avoid warning. +Sat May 20 16:41:55 2000 Hans-Peter Nilsson -1999-04-04 Don Bowman + * stabs.c (aout_process_stab): Make global. + (s_desc): Add ATTRIBUTE_UNUSED to args as appropriate. + * read.h (aout_process_stab): Declare. - * configure.in: Add mips*-*-vxworks* target; have it define - MIPS_STABS_ELF. - * configure, config.in: Rebuild. + * configure.in (EMULATIONS) [i386aout, i386coff, i386elf]: + Generalize to *aout, *coff *elf. + * configure: Regenerated. -1999-03-31 Nick Clifton + * doc/internals.texi (Object format backend): Say + SEPARATE_STAB_SECTIONS needs to be nonzero, not just defined. - * configure.in (emulations): Add support for arm-epoc-pe. - * configure: Regenerate. - * config/te-epoc-pe.h: New file. Define macros specific to - arm-epoc-pe target. - * config/tc-arm.h: Select epoc-pe-arm target format if configured - for arm-epoc-pe target. + * Makefile.am (TARG_ENV_HFILES): Delete te-multi.h. + * Makefile.in: Regenerated. -Mon Mar 29 10:15:40 CST 1999 Catherine Moore +2000-05-19 Catherine Moore - * tc-mips.c (md_apply_fix): Adjust value for linkonce sections. + * cgen.h (GAS_CGEN_MAX_FIXUPS): Check if already defined. -Wed Mar 24 14:11:10 1999 Jeffrey A Law (law@cygnus.com) +2000-05-18 Alan Modra - * tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Clean up code to - detect ",n" without a condition. - (pa_parse_neg_cmpsub_cmpltr): Likewise. + * config/tc-hppa.c (md_apply_fix): Mask out immediate bits of + instruction to reflect change in re_assemble_*. +Thu May 18 10:52:14 2000 Jeffrey A Law (law@cygnus.com) -Tue Mar 23 11:28:23 1999 Jeffrey A Law (law@cygnus.com) + * configure.in (hppa-*-hpux11*): If the cpu is hppa*64*, then + build PA64 ELF tools. + * configure: Rebuilt. - * tc-hppa.c (pa_ip, case '~'): The condition for a branch on bit - instruction is encoded with one bit. +2000-05-17 Alan Modra + * Makefile.am: Regenerate dependencies. + * Makefile.in: Regenerate. -1999-03-23 Ian Lance Taylor +2000-05-15 Nick Clifton - * doc/internals.texi (CPU backend): Mention that - line_separator_chars should not include newline. From thi - . + * config/tc-arm.c (struct asm_psr): Add boolean field + distinguishing between CSPR and SPSR. Rename 'number' field + to 'field'. + (psrs): Rearrange contents to match new asm_psr structure. + (arm_psr_parse): Move next to psr_required_here. Make it + return an asm_psr structure. + (psr_required_here): Use asm_psr structure returned by + arm_psr_parse. + (do_msr): Reorganise to allow psr_required_here to be called + only once. + (md_undefined_name): Mark 'name' parameter as unused, since + the COFF target does not use it. -1999-03-22 Doug Evans +2000-05-14 David O'Brien - * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open. - * config/tc-m32r.c (md_begin): Update call to m32r_cgen_cpu_open. + * config/te-386bsd.h: Clean up comments to adhere to the GNU coding + standards. + * config/te-aux.h: Likewise. + * config/te-dpx2.h: Likewise. + * config/te-go32.h: Likewise. + * config/te-hp300.h: Likewise. + * config/te-hppa.h: Likewise. + * config/te-i386aix.h: Likewise. + * config/te-ic960.h: Likewise. + * config/te-interix.h: Likewise. + * config/te-nbsd532.h: Likewise. + * config/te-pc532mach.h: Likewise. + * config/te-ppcnw.h: Likewise. + * config/te-psos.h: Likewise. + * config/te-sparcaout.h: Likewise. + * config/te-sun3.h: Likewise. + * config/te-sysv32.h: Likewise. + +2000-05-14 Alan Modra + + * config/tc-h8300.c (do_a_fix_imm): Don't rely on `short' being 16 + bits. Instead explicitly mask and sign extend. Do the 8 bit mask + and sign extend without an if statement. + (build_bytes): Likewise. + +2000-05-14 Kazu Hirata + + * config/tc-h8300.c (do_a_fix_imm): Output a reloc for no + X_add_symbol L_32 case. -Sun Mar 21 18:08:18 1999 Richard Henderson +2000-05-14 David O'Brien - * tc-alpha.c (md_assemble): Allow '6' in an opcode. + * config/te-freebsd.h: New file. -Thu Mar 18 10:55:30 1999 Jeffrey A Law (law@cygnus.com) +2000-05-13 Alan Modra - * tc-hppa.c (pa_ip, case 'a'): Do not call pa_parse_..._cmpsub_cmpltr. + * asintl.h (gettext, dgettext, dcgettext, textdomain, + bindtextdomain): Replace defines with those from intl/libgettext.h + to quieten gcc warnings. + * NEWS: Mention x86 .arch and -q. -Thu Mar 18 02:30:07 1999 Jeffrey A Law (law@cygnus.com) + * config/tc-i386.c (quiet_warnings): New. + (md_assemble): Use quiet_warnings. + (md_parse_option): Set quiet_warnings from -q. + (md_show_usage): Mention -q, delete -m. + (flag_do_long_jump): Delete. + (md_parse_option): Remove -m. + (md_show_usage): Remove -m. + (md_create_long_jump): Remove useless flag_do_long_jump code. - * tc-hppa.c (pa_ip, case 'd'): Do not allow ",n". - -1999-03-15 Martin Hunt + * as.c (parse_args): In case OPTION_DEFSYM, use a valueT to hold + the symbol value, and use bfd_scan_vma if BFD_ASSEMBLER. - * app.c (do_scrub_begin): Change '-' back to a symbol char - so we can use multiple opcodes on a line again. +2000-05-13 Alan Modra + Alexander Sokolov - * config/tc-d30v.c: By default, warn if a symbol has - the same name as a register. Plus some minor - updates from the branch. + * doc/c-i386.texi (i386-Arch): New section. + (i386-Syntax): Mention .intel_syntax and .att_syntax. -1999-03-13 Nick Clifton + * config/tc-i386.c (cpu_arch_name, cpu_arch_flags): New. + (smallest_imm_type): Use smallest opcode for shift by one if cpu + architecture has been given and is not 486. + (set_cpu_arch): New. + (md_pseudo_table): Add .arch. + (md_assemble): Warn if cpu architecture has been given and an + unsupported instruction. - * config/tc-d30v.c (md_apply_fix3): Handle BFD_RELOC_8, - BFD_RELOC_16 and BFD_RELOC_64. + * config/tc-i386.h (SMALLEST_DISP_TYPE): Delete. + Move operand_types bit defines after relevant template field. + (template): Add cpu_flags. + (Cpu*): Define. + (arch_entry): New. -1999-03-12 Andreas Schwab +2000-05-12 Alexandre Oliva - * expr.c (expr): Add missing else. + * config/tc-mn10300.h (md_end): Define. + (mn10300_finalize): Declare. + * config/tc-mn10300.c: Include dwarf2dbg.h. + (debug_line): Define. + (md_assemble): Generate dwarf2 line info. + (mn10300_finalize): New function. Finalize dwarf2 info. -1999-03-12 Nick Clifton +2000-05-11 Ulf Carlsson - * config/tc-arm.c (md_apply_fix3): Improve error message. + * config/tc-mips.c (md_estimate_size_before_relax): Use the + external version of the relocation for weak symbols. -1999-03-11 Doug Evans +2000-05-08 David Mosberger - * Makefile.am (CPU_TYPES): Add fr30. - (cgen.o): Add $(CGEN_CPU_PREFIX)-desc.h dependency. - (fr30,m32r dependencies): Update. - * Makefile.in: Rebuild. + * config/tc-ia64.c (output_P7_format, case mem_stack_f): Output fixed + frame size in units of 16 bytes, as required per SW Conventions manual. + (output_unw_records): Output info-block header as a dword to get + byte-order right. - * cgen.c (gas_cgen_record_fixup): Update use of operand->type. - (gas_cgen_record_fixup_exp): Ditto. - (gas_cgen_finish_insn): Call cgen_operand_lookup_by_num. - (gas_cgen_md_apply_fix3): Ditto. Update call to set_vma_operand. - * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open. - (md_cgen_lookup_reloc): Update use of operand->type. - * config/tc-m32r.c (md_begin): Update call to fr30_cgen_cpu_open. - (md_convert_frag): Call cgen_operand_lookup_by_num. - (md_cgen_lookup_reloc): Update use of operand->type. - (m32r_cgen_record_fixup_exp): Ditto. - -1999-03-09 Jim Blandy - - * config/tc-mips.c (md_show_usage): Fix message. - -1999-03-03 Nick Clifton - - * doc/c-arm.texi (ARM Syntax): Document new command line switches - and LDR reg,= instruction. - - * config/tc-arm.c: Add support for -mcpu=arm810, -mcpu=arm9 and - -mcpu=arm9tdmi. - -Fri Feb 19 09:36:30 1999 Ian Lance Taylor - - * doc/c-arm.texi (ARM-Chars): Fix typo in use of '@'. - -1999-02-17 Nick Clifton - - This patch was created by: Scott Bambrough - - - * app.c: - Special cased '@' character. The '@' character is used as the - ARM assembler comment character, as a special character - and in ELF .symver pseudo-op's, and as a special character in - .type and .section pseudo-ops. - (symver_pseudo): New static variable. - (symver_state): New static variable. - (struct app_save): Add field 'symver_state'. - (app_push): Save global symver_state int struct app_save. - (app_pop): Restore global symver_state from struct app_save. - (do_scrub_chars): Special case handling of '@' character in - .symver pseudo-ops. - - * configure.in: Modified to recognize armv* uname syntax from ARM - Linux kernel. - * configure: Regenerated. - - * config/obj-elf.c (obj_elf_section): Allow '%' as well as '@' as - a prefix to the section's type. - (obj_elf_type): Allow '%' as well as '@' and '#' as prefixes to - the type's typename. - - * config/tc-arm.h: Add support for PIC generation: - (pic_code): New boolean. - (obj_relocate_extern): Define. - (TC_RELOC_RTSYM_LOC_FIXUP): Define - (TC_CONS_FIX_NEW): Define. - (tc_fix_adjustable): Define. - (GLOBAL_OFFSET_TABLE_NAME): Define. - - * config/tc-arm.c: Add support for PIC generation: - (line_seperator_chars): Allow ';' as a seperator for Linux. - (is_immediate_prefix): New macro. - (arm_parse_reloc): New function. - (s_arm_elf_cons): New function. - (do_branch): Special case for BFD_RELOC_ARM_PLT32. - (md_undefined_symbol): Special case handling for the Global Offset - Table's symbol. - (md_apply_fix3): Handle PIC relocs. - (tc_gen_reloc): Handle PIC relocs. - (md_parse_option): Add support for '-k' command line switch to - enable PIC generation. - (cons_fix_new_arm): New function. - (s_arm_elf_cons): New function. - -Tue Feb 16 16:31:53 1999 Ian Lance Taylor - - * configure.in: Add comments for uses of AC_DEFINE. - * acinclude.m4: Likewise. - * acconfig.h: Remove. - * aclocal.m4: Rebuild. - * configure: Rebuild. - * Makefile.in: Rebuild. - * config.in: Rebuild. +2000-05-08 Alan Modra -1999-02-15 Jim Lemke + * as.h: #include "file", not on files from ../include. + (as_abort, as_fatal): Add ATTRIBUTE_NORETURN. + * config/tc-m68k.c (m68k_ip): Fix signed/unsigned warnings. + (md_convert_frag): Add ATTRIBUTE_UNUSED. + (tc_coff_symbol_emit_hook): Ditto. + (OPTCOUNT): Cast to int to avoid compiler warning. + (md_begin): Fix signed/unsigned warnings. - * config/tc-mips.c (mips_ip: case 'o'): Fix assertion failure for - non-constant offset from a base register. +2000-05-08 Michael Sokolov -1999-02-14 Ken Raeburn + * config/tc-m68k.c (md_convert_frag_1): Abort if we end up in the + ABRANCH LONG case for a conditional branch on a 68000. + (md_estimate_size_before_relax): Likewise. Also handle + flag_short_refs correctly for ABRANCH, BCC68000, and DBCC. + (m68k-ip: case ABSL): Relax absolute references to 16-bit + PC-relative on all CPUs. + (md_estimate_size_before_relax): Likewise. - * config/tc-alpha.c (md_show_usage): Put \ before newline in - strings always. +2000-05-04 Alan Modra -Sat Feb 13 14:10:10 1999 Richard Henderson + * as.c (parse_args): Just mention current year in printed + copyright message. - * config/tc-alpha.c (cpu_types): Enable EV6 PALcode with -m21264. - (emit_insn): Look for pc-relative and no-overflow specifiers on - internal relocation types. +2000-05-03 J.T. Conklin -1999-02-13 Jim Blandy + * config/tc-ppc.c (pre_defined_registers): Add entries for vector + unit registers. + (md_parse_option): Recognize -m7400. - * doc/c-mips.texi (MIPS Opts): Updated list of -mNNNN and - -mcpu=NNNN flags. +2000-05-03 Ian Lance Taylor - * config/tc-mips.c: Remove all the mips_NNNN variables; just use - mips_cpu instead. - (mips_4650, mips_4010, mips_4100): Variables removed. - (hilo_interlocks, gpr_interlocks, append_insn, macro_build, macro, - macro2, mips16_macro, mips_ip): Test mips_cpu, not the mips_NNNN - variables. - (md_begin): Don't bother initializing the mips_NNNN variables; - mips_cpu is set, and that's good enough now. - (md_parse_option): Have the -mNNNN options set mips_cpu instead of - the mips_NNNN variable. The -no-mNNNN flags are now no-ops. - (show): New function, to handle wrapping in the CPU lists. - (md_show_usage): Update lists of -mcpu and -mNNNN switches. + * config/atof-ieee.c (gen_to_words): When adding carry back in, + don't permit lp to become less than the words array. -Sat Feb 13 00:17:26 1999 Richard Henderson +2000-05-03 Rodney Brown - * config/tc-i386.c (i386_intel_operand): Ignore `SHORT' rather - than treat as an immediate specifier. + config/tc-mcore.c (md_apply_fix3): BFD_RELOC_MCORE_PCREL_IMM11BY2 + Fix little-endian case. -Thu Feb 11 16:18:31 1999 Richard Henderson +2000-05-03 David O'Brien - * config/tc-i386.c: Prototype many functions. - (set_intel_syntax): Accept `prefix'/`noprefix' specifiers. - (i386_immediate): Remove unused second argument. - (i386_intel_operand): Fix i386_is_reg typo. - (i386_operand): Use allow_naked_reg. - (output_invalid): Make operand int for K&R. + * as.c (parse_args): Update copyright. -Thu Feb 11 11:21:02 1999 Ian Lance Taylor +2000-05-03 Mark Elbrecht - * Makefile.am (EXTRA_as_new_SOURCES): Uncomment--fixed by automake - patch. - * Makefile.in: Rebuild. + * gas/config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 + for the .bss section too. -1999-02-09 Doug Evans +2000-05-02 Alan Modra - * Makefile.am (DISTCLEANFILES): Change cgen-opc.h to cgen-desc.h. - (cgen.o): Ditto. - (EXTRA_as_new_SOURCES): Comment out. - (.tcdep): -opc.h renamed to -desc.h. - * Makefile.in: Rebuild. - * doc/Makefile.in: Rebuild. - * configure.in: Require autoconf 2.13. Redo using_cgen handling. - Delete call to AM_CYGWIN32. Replace AM_EXEEXT with AC_EXEEXT. - (AC_OUTPUT): -opc.h renamed to -desc.h. - * configure: Rebuild. - * aclocal.m4: Rebuild. - * config.in: Rebuild. - * cgen.c: Include cgen-desc.h, not cgen-opc.h. - (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC. - (gas_cgen_cpu_desc): Renamed from gas_cgen_opcode_desc. - CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE. - CGEN_OPERAND_ATTR renamed to CGEN_OPERAND_ATTR_VALUE. - (gas_cgen_record_fixup): Remove unnecessary != 0 test. - (gas_cgen_record_fixup_exp): Ditto. - (gas_cgen_finish_insn): Ditto. Refer to operand table via cpu - descriptor, not global variable. - (gas_cgen_md_apply_fix3): Refer to operand_table via cpu - descriptor, not global variable. Refer to insert_operand handler - via cpu descriptor, not global function. - * cgen.h (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC. - * config/tc-fr30.c: Include opcodes/fr30-desc.h. - (*): gas_cgen_opcode_desc renamed to gas_cgen_cpu_desc. - CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE. - Update call to CGEN_OPERAND_TYPE,CGEN_INSN_OPERANDS. - * config/tc-m32r.c: Ditto. - (assemble_two_insns): Update calls to cgen_lookup_get_insn_operands. - (md_assemble): Ditto. - (md_convert_frag): Update call to CGEN_OPERAND_ENTRY. - -1999-02-09 Nick Clifton - - * config/tc-arm.c (md_apply_fix3): Fix handling of label1 - label2 - relocations for ELF targets. - -1999-02-08 Nick Clifton - - * configure.in: Add support for StrongARM target. + * configure.in: Set em=linux for hppa-*-linux. * configure: Regenerate. + * doc/Makefile.in: Regenerate with correct automake. + + * frags.c (frag_grow): Sanity check chunk_size. + + * config/obj-elf.h: #include "bfd.h" not + * config/obj-som.h: Likewise. + * config/obj-ieee.h: Likewise. + + * config/tc-hppa.h: Test BFD_ARCH_SIZE, not BFD64. + + * config/tc-hppa.c (log2): Only compile when OBJ_SOM. + (md_pseudo_table): Fully initialise OBJ_ELF cases. + (fix_new_hppa): Add ATTRIBUTE_UNUSED to args as appropriate. + (pa_ip): low_sign_unext now returns via function value. Use + re_assemble_* instead of dis_assemble_* and + INSERT_FIELD_AND_CONTINUE combination. Don't call sign_unext + unnecessarily. + (md_convert_frag): Add ATTRIBUTE_UNUSED to args as appropriate. + (md_section_align, md_parse_option, md_show_usage, + md_undefined_symbol, pa_align, pa_block, pa_brtab, pa_try, + pa_callinfo, pa_code, pa_comm, pa_end, pa_enter, pa_entry, + pa_exit, pa_export, pa_import, pa_label, pa_leave, pa_level, + pa_origin, pa_param, pa_proc, pa_procend, pa_space, pa_spnum, + pa_version, pa_compiler, pa_copyright, pa_data, pa_fill, pa_lsym, + pa_text): Likewise. + (md_apply_fix): Change type of new_val to offsetT. Delete w1, w2, + w, resulti. Add insn, val. Move bfd_get_32 and bfd_put_32 + outside of switch. Correct mask and shifting errors in case 10 + and case -11. In case 21, compare against signed range to suit + hppa_field_adjust changes. In case 12, use re_assemble_12. In + case 17 and case 22, use offsetT variable to properly check range. + Use re_assemble_* here too. + (evaluate_absolute): Change type of value to offsetT. Call + hppa_field_adjust to do the work for us. + (pa_parse_cmpb_64_cmpltr): Delete save_s. + (pa_parse_cmpib_64_cmpltr): Ditto. + (pa_build_unwind_subspace): Delete unused var subseg. Change type + of i to unsigned int. + (pa_type_args): Conditionally declare symbol if OBJ_SOM. + (pa_end_of_source): Return type is void. + +Mon May 1 08:54:23 2000 Catherine Moore + + * macro.c (macro_expand_body): Don't prepend macro number with zeroes. + +Mon May 1 14:19:39 2000 Denis Chertykov + + * config/tc-avr.c: ATTRIBUTE_UNUSED added to the necessary places. + More comments added. + (md_begin): Removed "construct symbols for each register name". + Because register names conflicts with GCC generated function + names. + (avr_operand): Now constant numbers can be used as a register + identifiers (0 as r0, 31 as r31). + (md_assemble): use skip_space () before parsing instruction + operands. -1999-02-05 Nick Clifton - - * config/tc-arm.h: Tidy OBJ_ELF and OBJ_COFF definitions. - - * config/tc-arm.c (md_apply_fix3): Fix BFD_RELOC_ARM_PCREL_BRANCH - for COFF ports. - -Wed Feb 3 11:35:47 1999 Richard Henderson - - * config/tc-alpha.c (md_show_usage): Document pca56 and ev6 options. - -Mon Feb 1 20:37:30 1999 Catherine Moore - - * config/tc-i386.h (LONG_DOUBLE_MNEM_SUFFIX): Define. - (INTEL_DWORD_MNEM_SUFFIX): Define. - (BYTE_PTR): Define. - (WORD_PTR): Define. - (DWORD_PTR): Define. - (XWORD_PTR): Define. - (SHORT): Define. - (OFFSET_FLAT): Define. - (FLAT): Define. - (NONE_FOUND): Define. - (No_dSuf): Define. - (No_xSuf): Define. - * config/tc-i386.c (set_intel_syntax): New routine. - (intel_syntax): Declare. - (allow_naked_reg): Declare. - (md_pseudo_table): Support .intel_syntax and .att_syntax. - (intel_float_operand): New routine. - (md_assemble): Handle INTEL_DWORD_MNEM_SUFFIX. - Handle brackets as well as parens. Call i386_intel_operand for - intel syntax. Reverse operands if appropriate. Handle new - suffixes. Handle movzx and movsx. - (i386_is_reg): New routine. - (i386_immediate): New routine. - (i386_scale): New routine. - (i386_displacement): New routine. - (i386_operand_modifier): New routine. - (build_displacement_string): New routine. - (i386_parse_seg): New routine. - (i386_intel_memory_operand): New routine. - (i386_intel_operand): New routine. - (i386_operand): Call i386_displacement, i386_immediate, - i386_scale, etc. instead of handling inline. - (parse_register): Handle registers without prefix. - -Mon Feb 1 12:24:58 1999 Catherine Moore - - * configure: Regenerate. - * configure.in (arm-*-oabi): New. - (thumb-*-oabi): New. - * config/tc-arm.c (target_oabi): Declare. - (md_apply_fix3): Support REL relocs. - (md_parse_option): Handle -oabi. - (elf32_arm_target_format): New routine. - (md_longopts): Add OPTION_OABI. - * config/tc-arm.h: Redefine TARGET_FORMAT. - - -1999-01-28 Nick Clifton - - * write.c (write_relocs): Handle out of range error. - - * config/tc-fr30.c (fr30_fix_adjustable): New function. - (fr30_force_relocation): Default to 0. - - * config/tc-fr30.h (obj_fix_adjustable): Define. - (TC_FORCE_RELOCATION): Define. - - * cgen.c (gas_cgen_md_apply_fix3): Do not apply fixes to VTABLE - relocs. - -1999-01-16 Nick Clifton - - * config/tc-d30v.c (write_2_short): Do not generate a sequential - merge of two instructions if the left instruciton kills the right. - -1999-01-11 Doug Evans +2000-05-01 Alan Modra - * Makefile.in: Regenerate. - * configure.in: Redo test for using cgen. + * configure.in: Set bfd_gas=yes on i386-*-pe and i386-*-nt* to + ensure all pe targets use bfd. Remove unnecessary bfd_gas=yes on + arm-*-netbsd* and arm-*-wince as this is set for all arm*. * configure: Regenerate. -1999-01-09 Nick Clifton +2000-04-29 Andreas Jaeger - * config/obj-coff.h (obj_adjust_symtab): Prevent accidental - redefinition of this macro. + * as.h: Correctly check GCC version. -Tue Jan 5 21:58:03 1999 Doug Evans +2000-04-26 David O'Brien - * config/tc-mips.c (mips_frob_file): Disable "Unmatched %hi reloc" - warning. + * doc/as.1: Fix unbalanced brackets. -1998-12-29 Gavin Romig-Koch + * config/tc-i386.c (comment_chars): Don't use '/' as comment start if + TE_FreeBSD. + (line_comment_chars): Set to '/' if TE_FreeBSD. - * config/tc-mips.c (append_insn): For mips16, insert a nop between - a read of HI or LO and an immediatly following branch. +Tue Apr 25 11:02:02 2000 Jeffrey A Law (law@cygnus.com) -1998-12-29 Gavin Romig-Koch + * configure.in: Configury support for PA64 (currently disabled). + * configure: Rebuilt. - * config/tc-mips.c (md_begin): Another correction to the setting of - mips_eabi64. +2000-04-25 Machida Hiroyuki -1998-12-23 Gavin Romig-Koch + * config/tc-mips.c (s_change_sec): Use record_alignment, not + bfd_set_section_alignment. - * config/tc-mips.c (md_begin): Correct type-o in setting of mips_eabi64. +2000-04-25 Alan Modra -1998-12-21 Nick Clifton + * config/tc-i386.c (offset_in_range): Ensure shift counts are less + than 32. - * config/tc-m32r.c (md_assemble): Emit a NOP after a relaxable 16 - bit insn when optimizing, so that parallelised instructions will - start on a 32 bit boundary. +2000-04-24 Nick Clifton -1998-12-19 Gavin Romig-Koch + * doc/c-arm.texi (ARM Directives): Document behaviour of .align 0. + * doc/as.texinfo (Align): Include arm and strongarm in list of + targets that have the second form of the behaviour of the .align + directive. - * config/tc-mips.c (mips_eabi64): New. - (md_begin): Set mips_eabi64. - (mips_elf_final_processing): Use it. +2000-04-24 Mark Klein -1998-12-18 Gavin Romig-Koch + * obj-som.c: Terminate obj_pseudo_table. - * config/tc-mips.c (mips_elf_final_processing): - Correct setting of ABI in e_flags. +Mon Apr 24 15:21:11 2000 Clinton Popetz -Wed Dec 16 16:17:22 1998 Dave Brolley + * as.c (parse_args): Allow md_parse_option to override -a listing + option. + * config/obj-coff.c (add_lineno): Change type of offset parameter + from "int" to "bfd_vma." + * config/tc-ppc.c (md_pseudo_table): Add "llong" and "machine." + (ppc_mach, ppc_subseg_align, ppc_target_format): New. + (ppc_change_csect): Align correctly for XCOFF64. + (ppc_machine): New function, which discards "ppc_machine" line. + (ppc_tc): Cons for 8 when code is 64 bit. + (md_apply_fix3): Don't check operand->insert. Handle 64 bit + relocations. + (md_parse_option): Handle -a64 and -a32. + (ppc_xcoff64): New. + * config/tc-ppc.h (TARGET_MACH): Define. + (TARGET_FORMAT): Move to function. + (SUB_SEGMENT_ALIGN): Use ppc_subseg_align. + +Sun Apr 23 16:45:45 2000 Denis Chertykov + + * config/tc-avr.c: New AVR_ISA_ defined. + (md_assemble): Handle opcodes with optional operands (lpm,elpm). + (avr_operand): Handle 'a', 'v' and 'z' constraint letters needed + for `fmul', `movw' and `lpm R,Z' instructions. + (avr_operands): Warn if current opcode is a two-word instruction + and previous opcode was cpse/sbic/sbis/sbrc/sbrs. + (avr_opcodes): New commands added. + (REGISTER_P): Check 'a' and 'v' constraint letters. + (mcu_types): New MCU added. + +2000-04-22 Timothy Wall + + * config/tc-ia64.c (pseudo_func[]): Add new "nat" entry equivalent + to "natval". + (operand_match): Conditionally insert default bit values for IMMU9. - * config/tc-fr30.c (md_assemble): Warn about invalid instructions in delay slots. +2000-04-14 Matthew Green -1998-12-16 Gavin Romig-Koch + * configure.in: Add NetBSD/sparc ELF and NetBSD/sparc64 support. + * configure: Rebuilt. - * config/tc-mips.c (md_begin,md_parse_option): Handle vr4111. - -1998-12-15 Doug Evans +Fri Apr 21 14:29:43 2000 Jeffrey A Law (law@cygnus.com) + Jason Eckhardt - * cgen.c (gas_cgen_md_apply_fix3): Mark as an error, rather than a - warning, values that don't fit in the field. + * config/tc-hppa.c (md_apply_fix): Handle new PA2.0 formats. -1998-12-15 Gavin Romig-Koch + * config/tc-hppa.c (CHECK_ALIGN): New macro. + Added handling of new operand types l,y,&,fe,fE,fx. - * config/tc-mips.c (mips_abi_string): New. - (md_parse_option,md_longopts): Add mabi. - (mips_elf_final_processing): Set e_flags based on mabi flag. +Fri Apr 21 13:20:53 2000 Richard Henderson + David Mosberger + Timothy Wall + Andrew MacLeod + Jim Wilson -1998-12-15 Gavin Romig-Koch + * Makefile.am (CPU_TYPES): Add ia64. + (TARGET_CPU_CFILES): Add config/tc-ia64.c. + (TARGET_CPU_HFILES): Add config/tc-ia64.h. + * Makefile.in: Rebuild. + * app.c (do_scrub_chars): Handle DOUBLESLASH_COMMENTS. + * configure: Rebuild. + * configure.in: Recognize ia64 as cpu type. Set bfd_gas. + (ia64-*-elf*, ia64-*-linux-gnu*): New targets. + * expr.c (expr): Handle md_optimize_expr. + * read.c (LEX_HASH): Add comment. + * config/tc-ia64.c, config/tc-ia64.h: New files. - * config/tc-mips.c (md_parse_option): Handle vr4111. +2000-04-21 Richard Henderson -98-12-11 Ken Raeburn + * config/tc-d30v.c (write_2_short): Disregard opcode1->ecc when + bundling a non-delayed branch type instruction. - * config/tc-h8300.c (build_bytes): Change message given if the - instruction requires H8/300H mode and we're not in Hmode, to - suggest that it may be the operand modes that are the problem, not - necessarily the opcode. +2000-04-20 Alexandre Oliva -1998-12-10 Nick Clifton + * config/tc-mn10300.c (HAVE_AM30): Define. + (md_assemble): Use it. - * config/tc-fr30.c: Add line separator character. +2000-04-19 Alan Modra -Tue Dec 8 19:51:50 1998 Mark Klein + * config/obj-elf.c (obj_elf_change_section): Check for changed + section attributes. - * configure.in (hppa-*-mpeix*): New target. - * config/obj-som.h (obj_som_compiler): Declare. - * config/obj-som.c (compiler_seen): New static variable. - (obj_som_compiler): New function. - * config/tc-hppa.c: Update tc_data uses for change to bfd/som.h. - (md_pseudo_table): Add "compiler" if OBJ_SOM. - (pa_type_args): Set hppa_priv_level. - (pa_compiler): New static function if OBJ_SOM. - * configure: Rebuild. + * Makefile.am: (CPU_MULTI_VALID): Remove. + (MULTI_CPU_TYPES): Define. + (MULTI_CPU_OBJ_VALID): Define. + (DEPTC): Use the above. + (DEPOBJ): Same here. + (DEP2): And here. + Regenerate dependencies. + * Makefile.in: Regenerate. -Tue Dec 8 15:00:50 1998 Ian Lance Taylor +2000-04-19 Michael Sokolov - * read.c (output_leb128): Don't mark as inline. + * Makefile.am (YACC, LEX): Get them from configure. -1998-12-08 Andrew MacLeod +2000-04-18 H.J. Lu (hjl@gnu.org) - * config/tc-ppc.c (ppc_vbyte): Prototype and new function for - AIX .vbyte unaligned data support. - (md_pseudo_table): Add 'vbyte' to list of valid pseudos. - (ppc_elf_validate_fix): Add eh_frame to list of ELF relocatable - sections. + * config/tc-i386.c (offset_in_range): Use addressT instead of + bfd_vma for non-bfd assemblers. -1998-12-07 Nick Clifton +2000-04-17 Alan Modra - * config/tc-d30v.c (md_assemble, do_assemble): Improve erroneous - input handling. + * config/tc-i386.c (offset_in_range): Sign extend val so BFD64 + doesn't give spurious errors. -Mon Dec 7 09:48:34 1998 Catherine Moore +2000-04-14 Michael Sokolov - * config/tc-arm.c (elf32_arm_force_relocation): Check for - BFD_RELOC_ARM_PCREL_BRANCH. + * as.h (SEEK_SET): Define if undefined. -Sun Dec 6 12:46:36 1998 Ian Lance Taylor +2000-04-13 Alan Modra - * configure.in: Define TARGET_BYTES_{BIG,LITTLE}_ENDIAN after - checking the target type. - (mips-dec-bsd*): Set endian to little. - * configure: Rebuild. + * config/tc-arm.c (md_apply_fix3): Don't use UL suffix on + constants, and don't assume offsetT is 32 bits. - COFF weak symbol support, based on patches from Mark Elbrecht - : - * config/obj-coff.h (S_IS_WEAK): Define if not BFD_ASSEMBLER. - * config/obj-coff.c (obj_coff_weak): New static function. - (obj_coff_endef) [both versions]: Handle weak symbols. - (coff_frob_symbol): Likewise. - (yank_symbols): Likewise. - (obj_pseudo_table): Add "weak". - - * configure.in (m68k-*-gnu*): New target. From Aymeric Vincent - . - * aclocal.m4: Rebuild with current tools. - * configure: Rebuild. +2000-04-12 Andrew Cagney - * config/tc-alpha.c (emit_ldgp): Give an error message rather than - an assertion failure for a case we can't handle when OBJ_ECOFF. + * config/tc-d10v.h: Include "write.h" to get definition of fixS. + (md_pcrel_from_section): Add prototype. + (d10v_fix_adjustable): Add prototype. + (d10v_force_relocation): Replace 'struct fix' with 'fixS'. - * expr.c (operator): And with 0xff to avoid problems with signed - char. + * config/tc-d10v.c (md_apply_fix3): Add paren around &&. -1998-12-03 Nick Clifton +2000-04-12 Nick Clifton - * config/tc-fr30.c (md_cgen_lookup_reloc): Generate - BFD_RELOC_FR30_48 instead of BFD_RELOC_FR30_32. + * config/tc-d10v.c (find_opcode): Correctly calculate position of + symbol in frag chain. -1998-12-02 Nick Clifton +2000-04-10 Alan Modra - * config/tc-fr30.c (md_cgen_lookup_reloc): Enable relocs for - LDI:20 insn. + * config/tc-i386.c (fits_in_signed_byte): Change arg to offsetT. + (fits_in_unsigned_byte, fits_in_unsigned_word): Ditto. + (fits_in_signed_word, smallest_imm_type): Ditto. + (md_assemble): Use an offsetT var to hold offsetT values, not a + long. + (offset_in_range): New. + (md_assemble): Use it. + (md_convert_frag): Change type of target_address, opcode_address, + and displacement_from_opcode_start to offsetT. + (md_create_short_jump): Change type of offset to offsetT. + (md_create_long_jump): Ditto. + (md_apply_fix3): Use -4, not 0xfffffffc for BFD_RELOC_386_PLT32. + (md_chars_to_number): Remove. + (output_invalid): Remove duplicate prototype. -Thu Nov 26 11:23:48 1998 Dave Brolley +2000-04-09 Nick Clifton - * config/tc-fr30.c (md_pcrel_from_section): Restore previous calculation - of pcrel point. + * Makefile.am (CPU_TYPES): Add 'avr'. + (TARGET_CPU_CFILES): Add 'tc-avr.c'. + (TARGET_CPU_HFILES): Add 'tc-avr.h'. -Tue Nov 24 17:21:52 1998 Nick Clifton + * Makefile.in: Regenerate. - * config/tc-fr30.c (md_pcrel_from_section): Fix calculation of - pcrel point. + * doc/as.texinfo: Add M32R documentation. -Tue Nov 24 14:54:38 1998 Nick Clifton +Fri Apr 7 15:56:57 2000 Andrew Cagney - * config/tc-d10v.c (md_assemble): Make static 'etype' have file - scope. - (d10v_cleanup): Only generate previous insn if a multiline insn is - not pending. + * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add + --enable-build-warnings option. + * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions. + * Makefile.in, configure: Re-generate. -Fri Nov 20 11:41:13 1998 Nick Clifton +2000-04-07 Nick Clifton - * config/tc-fr30.c (md_cgen_lookup_reloc): Add support for - FR30_OPERAND_I32. + * config/tc-arm.c (md_apply_fix3): Treat BFD_RELOC_ARM_PCREL_BLX + in the same way as BFD_RELOC_ARM_PCREL_BRANCH, and + BFD_RELOC_THUMB_PCREL_BLX lie BFD_RELOC_THUMB_PCREL_BRANCH. + (tc_gen_reloc): Accept BFD_RELOC_{ARM|THUMB}_PCREL_BLX. + (arm_force_relocation): Force relocations for + BFD_RELOC_{ARM|THUMB}_PCREL_BLX as well. -Thu Nov 19 15:01:29 1998 Nick Clifton +Wed Apr 5 22:26:32 2000 J"orn Rennecke - * config/tc-arm.c (md_parse_option): Add support for -marm7xxx and - -marm6xxx command line switches. + * config/tc-sh.c (get_operands): There's no third operand if the + first operand is an immediate. -1998-11-18 Doug Evans +Wed Apr 5 22:07:19 2000 J"orn Rennecke - * Makefile.am (DEP): Use $(srcdir)/../mkdep. - (itbl-ops.o): Delete duplicate dependencies. - Rebuild dependencies. - Add fr30 dependencies. - * Makefile.in: Rebuild. + * config/tc-sh.c (immediate): Delete. + (sh_operand_info): Add immediate member. + (parse_reg): Use A_PC for pc. + (parse_exp): Add second argument 'op'. All callers changed. + (parse_at): Expect pc to be coded as A_PC. + Use immediate field in *op. + (insert): Add fourth argument 'op'. All callers changed. + (build_relax): Add second argument 'op'. All callers changed. + (insert_loop_bounds): New function. + (build_Mytes): Remove DISP_4. + Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}. Add REPEAT. + (assemble_ppi): Use immediate field in *operand. + (sh_force_relocation): Handle BFD_RELOC_SH_LOOP_{START,END}. + (md_apply_fix): Likewise. + (tc_gen_reloc): Likewise. Check for a pcrel BFD_RELOC_SH_LABEL. -Tue Nov 17 13:42:42 1998 Nick Clifton +Wed Apr 5 06:35:45 2000 Alexandre Oliva - * config/tc-fr30.c (md_cgen_lookup_reloc): Updated to match latest - opcode list. - * listing.c: Ignore line terminator characters found inside - strings. + * config/tc-sparc.c (sparc_ip): Avoid string pasting. -Thu Nov 12 19:21:24 1998 Dave Brolley +Tue Apr 4 19:27:50 2000 Hans-Peter Nilsson - * po/gas.pot: Regenerated. + * internals.texi (CPU backend): Document + TC_CHECK_ADJUSTED_BROKEN_DOT_WORD. -Thu Nov 12 10:54:16 1998 Nick Clifton +2000-04-04 Alan Modra - * config/tc-fr30.c (fr30_is_colon_insn): New name for - fr30_is_label_start(). Also checks for delay slot insns. + * po/gas.pot: Regenerate. - * config/tc-fr30.c (fr30_is_label_start): New function: Handle - FR30 instructions which contain a colon in the mnemonic. + * as.c (show_usage): Restore translated part of bug string. + * gasp.c (show_usage): Likewise. - * config/tc-fr30.h (TC_START_LABEL): Define this macro. + * Makefile.am (MKDEP): Use gcc -MM rather than ../mkdep. + (DEP): Quote when passing vars to sub-make. Use "mv -f" rather + than move-if-change. + (DEP1): Modify for "gcc -MM". + (DEPTC): Likewise. + (DEPOBJ): Likewise. + (DEP2): Likewise. + (CLEANFILES): Add DEPTCA, DEPOBJA, DEP2a, DEPA. + Update dependencies. + * Makefile.in: Regenerate. -Wed Nov 11 09:58:21 1998 Nick Clifton +2000-04-03 Alexandre Oliva - * config/tc-fr30.c: Removed currently superflous code. + * config/tc-mn10300.c (md_pseudo_table): Use constant names. + (md_begin): Likewise. + (HAVE_AM33): New macro. + (md_assemble): Use it. Match r_regs and xr_regs only if + HAVE_AM33. -Tue Nov 10 13:13:05 1998 Nick Clifton +2000-04-03 Alan Modra - * config/tc-fr30.h: New file. - * config/tc-fr30.c: Tweaking so that it will compile. + * as.h: #include "bin-bugs.h" + * as.c (show_usage): Use REPORT_BUGS_TO. + * gasp.c: #include "bin-bugs.h" + (show_usage): Use REPORT_BUGS_TO. -Tue Nov 10 14:41:33 1998 Catherine Moore + * config/tc-sparc.c (md_show_usage): Add a trailing newline. - * config/tc-d10v.h (obj_fix_adjustable): Define. - (TC_FORCE_RELOCATION): Define. - (d10v_force_relocation): Declare. - * config/tc-d10v.c (tc_gen_reloc): Handle Vtable relocs. - (md_apply_fix3): Handle Vtable relocs. - (d10v_fix_adjustable): New. - (d10v_force_relocation): New. +Mon Apr 3 13:56:03 2000 Hans-Peter Nilsson -Mon Nov 9 14:25:06 1998 Nick Clifton + * write.c (write_object_file) [! WORKING_DOT_WORD]: If defined, + call TC_CHECK_ADJUSTED_BROKEN_DOT_WORD for each word after + adjustments. - * config/tc-d30v.c: Change default behaviour to ignore potential - conflicts between register name and symbol names. +2000-04-03 Alan Modra -Wed Nov 4 18:42:00 1998 Dave Brolley + * config/tc-i386.c (i386_immediate): Don't assume a constant + immediate is necessarily 16 bits when in 16 bit code mode. + (md_assemble): Instead set guess_suffix here after we have checked + registers. - * configure.in: Add fr30-*-*. - * config/tc-fr30.c: New file. - * Makefile.in: Regenerated. - * config.in: Regenerated. - * configure: Regenerated. - * doc/Makefile.in: Regenerated. - * po/gas.pot: Regenerated. +2000-04-02 Richard Henderson -Mon Nov 2 20:54:16 1998 Doug Evans + * config/tc-d30v.c (check_range): Allow signed or unsigned 32-bit + quantities. Correct right shift sign extension. + (build_insn): Make `number' unsigned long. Mask top 6 bits of + 32-bit value when shifting into place. - * config/tc-m32r.c (assemble_two_insns): Ensure both insns - are 16 bit insns. +2000-04-01 Ian Lance Taylor -Mon Nov 2 20:10:18 1998 Martin von Loewis + * app.c: Add ATTRIBUTE_UNUSED as needed. + * config/tc-ppc.c: Likewise. + (ppc_size): Make unsigned long. + (ppc_insert_operand): Add casts to avoid warnings. - * app.c (do_scrub_begin): Set characters above 127 to be symbol - characters. - (do_scrub_chars): Add some casts to unsigned char to avoid - unwanted sign extension. - * read.c (lex_type): Set characters about 127 to be symbol - characters. - * config/tc-i386.c (md_begin): Set identifier_chars and - operand_chars for values above 127. +2000-03-31 Nick Clifton -Mon Nov 2 15:05:33 1998 Geoffrey Noer + * config/tc-d10v.h (md_flush_pending_output): Define. - * configure.in: detect cygwin* instead of cygwin32* - * configure: regenerate +2000-03-29 Nick Clifton -Tue Oct 27 13:18:40 1998 Nick Clifton + * config/tc-sh.h (SEG_NAME): New macro: return the name of a + segment. Works for both BFD_ASSEMBLER and others. + (SUB_SEGMENT_ALIGN): Use SEG_NAME. - * listing.c: Add support for producing a listing from piped - input. +2000-03-29 Nick Clifton + * config/tc-arm.c (tinsns): Add "bal" instruction pattern. - * config/tc-mips.c (hilo_interlocks): Remove mips_3900. - (append_insn): Account for the tx39's multiply behavior. +2000-03-28 Alan Modra -1998-10-26 Michael Meissner - - * config/tc-m32r.c (assemble_two_insns): Rename assemble_two_insns - from assemble_parallel_insns. Add support for '->' to indicate - explicitly serializing the instructions. - (md_assemble): Ditto. - -Sat Oct 24 15:12:19 1998 Catherine Moore + * listing.c (LISTING_LHS_WIDTH): Default depends on + LISTING_WORD_SIZE. + (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH. - * config/tc-sh.c (sh_fix_adjustable): Adjust EXTERN and - WEAK handling. +2000-03-27 Ian Lance Taylor -Thu Oct 22 12:41:33 1998 Catherine Moore + * config/tc-sh.c (md_show_usage): Use backslash before newline in + string literal. - * cgen.c (gas_cgen_md_apply_fix3): Revert last change. +2000-03-27 Alan Modra -Thu Oct 22 10:03:15 1998 Ron Unrau + * config/tc-avr.h (TC_HANDLES_FX_DONE): Define. - * config/tc-mips.c : support frame and regmask/fregmask when - MIPS_STABS_ELF is specified. + * config/tc-avr.c (mcu_types): Add missing initialiser. + (md_pcrel_from_section): Add prototype. + (avr_operand): Remove redundant test of unsigned < 0. + (avr_cons_fix_new): Ensure exp_mod_pm zero on function exit. -Wed Oct 21 11;34:51 1998 Catherine Moore +2000-03-27 Denis Chertykov - * config/tc-sh.c (sh_fix_adjustable): Only include if OBJ_ELF. - (md_apply_fix): Don't return 1 for VTABLE relocs. - * config/tc-sh.h (obj_fix_adjustable): Define only if OBJ_ELF. + * config/tc-avr.c: New file for AVR support. + * config/tc-avr.h: Likewise. + * configure.in: Add AVR support. + * configure: Regenerate. -Tue Oct 20 11:18:28 1998 Alan Modra +2000-03-26 Timothy Wall - * doc/c-i386.texi: Replace occurences of "opcode" with - "instruction mnemonic", "instruction", or "mnemonic" when - referring to the name of an instruction. Use "opcode" when - referring to the sequence of machine bytes. + * gasp.c (macro_op): Add new argument to check_macro call. + Macro structure definitions moved to macro.h + * sb.h: Add argument to prototype for input_scrub_include_sb. + * input-scrub.c (input_scrub_include_sb): Allow disabling of sb + nesting checks with an additional flag. + (struct input_save): Add flag to indicate whether current sb + should be checked for proper macro/conditional nesting. + (input_scrub_push/pop): Save/restore nest check flag. + (input_scrub_next_buffer): Ditto. Also call end of macro hook if + defined. + * macro.c (check_macro): Allow caller to retrieve parsed macro + information if a pointer is provided. This information may be + used by the new macro hooks. + * macro.h: Update prototype for check_macro. Macro struct + definitions moved here from macro.c/gasp.c. + * read.c (read_a_source_file): Add parameter to check_macro call, + and pass macro info to the macro hook, if defined. + (input_scrub_insert_line): New. Allow insertion of a line of + characters into the input stream. + (input_scrub_insert_file): New. Allow insertion of an arbitrary + file into the input stream. + (s_include): Use input_scrub_insert_file. + * internals.texi: Document new macro hooks. + * as.h: New prototypes added. - * config/tc-i386.c (opcode_chars): Rename to mnemonic_chars. - (is_opcode_char): Rename to is_mnemonic_char. - (md_assemble and i386_operand): Correct error messages from - "opcode" to "instruction mnemonic" - Rename throughout opcode[] -> mnemonic[], opp -> mnem_p, - MAX_OPCODE_SIZE -> MAX_MNEM_SIZE, - DWORD_OPCODE_SUFFIX -> DWORD_MNEM_SUFFIX, - WORD_OPCODE_SUFFIX -> WORD_MNEM_SUFFIX, - BYTE_OPCODE_SUFFIX -> BYTE_MNEM_SUFFIX, - SHORT_OPCODE_SUFFIX -> SHORT_MNEM_SUFFIX - LONG_OPCODE_SUFFIX -> LONG_MNEM_SUFFIX +2000-03-26 Alan Modra - * config/tc-i386.h (*_MNEM_SUFFIX): Rename from *_OPCODE_SUFFIX. + * config/tc-i386.c: Don't start any as_bad or as_warn message with + an initial capital letter. + (i386_index_check): Reindent. - * config/tc-i386.c (i386_operand): Check for garbage after - register name. +2000-03-19 Nick Clifton -Tue Oct 20 10:49:42 1998 Ian Lance Taylor + * config/tc-arm.c (md_apply_fix3): Fix bug detecting overflow of pc + relative branches. - * config/tc-i386.c (md_apply_fix3): Change handling of PCREL reloc - for BFD_ASSEMBLER to only change value when COFF if TE_PE. +2000-03-17 Thomas de Lellis -Mon Oct 19 20:20:42 1998 Catherine Moore + * config/tc-arm.c (do_t_adr): Flag "adr Rd,label" + instruction operand bad if Rd > 7 when generating + thumb instructions. Prevents for example, + "adr r12,label" from silently failing and generating + the wrong instruction. - * config/tc-sh.h (obj_fix_adjustable): Define. - * config/tc-sh.c (sh_force_relocation): Handle VT relocs. - (md_apply_fix): Likewise. - (tc_gen_reloc): Likewise. - (sh_fix_adjustable): New. +2000-03-17 Nick Clifton -Mon Oct 19 12:35:43 1998 Doug Evans + * config/tc-arm.c (md_apply_fix3): Handle same-section relocations + that have a destingation >= 0x400000. + Fix compile time warning messages. - * cgen.c (gas_cgen_finish_insn): Update handling of CGEN_INT_INSN_P. - * cgen.h (gas_cgen_finish_insn): Update prototype. - * config/tc-m32r.c (m32r_insn): CGEN_INT_INSN -> CGEN_INT_INSN_P. - cgen_insn_t -> CGEN_INSN_INT. - (make_parallel): Update handling of CGEN_INT_INSN_P. - (assemble_parallel_insn): Ditto. - (target_make_parallel): New function. - (md_assemble): Use it. +Thu Mar 16 23:45:16 2000 J"orn Rennecke -Mon Oct 19 13:16:12 1998 Catherine Moore + * config/tc-sh.c (md_begin): When encountering insn that are + not supported by the current arch, only change the name if + its contents are the same as prev_name. + (get_specific): If the the architecture doesn't match, fail. - * config/tc-m32r.c (m32r_force_relocation): Fix typo. +Thu Mar 16 21:18:13 2000 J"orn Rennecke -Sun Oct 18 18:48:57 1998 Jeffrey A Law (law@cygnus.com) + * config/tc-sh.c (IDENT_CHAR): Define. + (parse_reg): Use it instead of isalnum. Put r[0..7]_bank operand + matching back where it came from. - * config/tc-sh.c (md_assemble): Make sure the entire opcode is - converted into lower case. +Thu Mar 16 20:58:10 2000 J"orn Rennecke -Fri Oct 16 13:36:34 CDT Catherine Moore + * config/tc-sh.c (md_show_usage): Add description of -dsp. - * cgen.c (gas_cgen_md_apply_fix3): Handle VTABLE relocs. - (gas_cgen_tc_gen_reloc): Likewise. - * config/tc-m32r.h (obj_fix_adjustable): Define. - * config/tc-m32r.c (m32r_fix_adjustable): New. - (m32r_force_relocation): Handle VTABLE relocs. +2000-03-15 Jonathan Larmour -Wed Oct 14 11:33:38 1998 Nick Clifton + * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before + normal operands. - * doc/c-arm.texi (ARM Directives): Document .ltorn directive. +2000-03-15 Kazu Hirata -Mon Oct 12 11:07:21 1998 Nick Clifton + * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate. - * config/tc-m32r.c (assemble_parallel_insn): Convert second opcode - to lower case before parsing. +Mon Mar 13 22:02:59 2000 Hans-Peter Nilsson - * config/tc-d30v.c (parallel_ok): Ignore conflicts when explicitly - parallel insns modift buts in the PSW as a side effect. + * expr.c (operand) [case 'f']: When testing if '0f' can start a + floating-point-number, make sure 'f' is in FLT_CHARS. -Thu Oct 8 10:18:33 1998 Nick Clifton +Sat Mar 11 00:01:39 2000 Hans-Peter Nilsson - * config/tc-d30v.c (find_format): Test for missing flag and - control registers. - - (md_apply_fix3): Fix error messages to avoid - assumption about presence of a symbol. + * read.c (TC_IMPLICIT_LCOMM_ALIGNMENT): New default-definition. + (s_lcomm_internal): Use it. + * doc/internals.texi (CPU backend): Document it. + * config/obj-evax.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Set to 2**3 + bytes. - (parallel_ok): Disallow parallel instructions that both modify the - same flag register. +2000-03-10 Geoffrey Keating - (find_format): Generate a warning if an odd numbered register is - used as the first register in a mutli-register instruction. + * config/tc-mips.c (mips_ip): Don't put stuff in .rodata + when embedded-pic. -Wed Oct 7 14:09:14 1998 Nick Clifton + * config/tc-mips.c (SWITCH_TABLE): The ELF embedded-pic + implementation doesn't have special handling for switch + statements. + (macro_build): Allow for code in sections other than .text. + (macro): Likewise. + (mips_ip): Likewise. + (md_apply_fix): Do pc-relative relocation madness for MIPS ELF. + Don't perform relocs if we will be outputting them. + (tc_gen_reloc): For ELF, just use fx_addnumber for pc-relative + relocations. Allow BFD_RELOC_16_PCREL_S2 relocs when + embedded-pic. - * config/tc-d30v.c (md_apply_fix3): Do not assume that bad - relocations are always associated with a symbol. +2000-03-09 Catherine Moore -Tue Oct 6 09:31:15 1998 Catherine Moore + * config/tc-m32r.c (m32r_fix_adjustable): Look up the + relocation type based on the entry in the fixup structure. + Put S_IS_EXTERN processing back in. - * tc-sparc.h (TC_FORCE_RELOCATION): Define. - (elf32_sparc_force_relocation): Declare. - * tc-sparc.c (md_apply_fix3): Handle vtable relocs. - (tc_gen_reloc): Handle vtable relocs. - (elf32_sparc_force_relocation): New. +2000-03-08 H.J. Lu (hjl@gnu.org) -Mon Oct 5 09:25:32 1998 Catherine Moore + * Makefile.am (install-exec-tooldir): Depend on + install-exec-bindir for parallel make. + * Makefile.in: Regenerated. - * symbols.c (S_IS_FUNCTION): New. - * config/tc-v850.h (obj_fix_adjustable): Define. - (TC_FORCE_RELOCATION): Define. - (v850_force_relocation): Declare. - * config/tc-v850.c (tc_gen_reloc): Use offset instead - of fx_addnumber for VTABLE reloc addends. - (md_apply_fix3): Handle VTABLE relocs. - (v850_fix_adjustable): New. - (v850_force_relocation): New. +2000-03-06 Nick Clifton -Mon Oct 5 00:48:52 1998 Jeffrey A Law (law@cygnus.com) + * config/tc-m32r.c (struct md_longopts): Add -m32r command line + switch. + (md_parse_option): Parse -m32r command line switch - disable m32rx + compatability. + (md_show_usage): Document new option. - * tc-hppa.c (fp_operand_format): Add some additional formats. - (pa_ip): Do not automatically promote into pa2.0 mode. - (pa_level): Handle ".level 2.0". + * doc/Makefile.am (CPU_DOCS): Add c-m32r.texi. + * doc/Makefile.in: Regenerate. + * doc/c-m32r.texi (M32R-Opts): Document new command line switch. -Sun Oct 4 20:57:43 1998 Alan Modra +2000-03-02 Michael Meissner - * config/tc-i386.c (md_assemble): Handle AMD_3DNOW_OPCODE. - * config/tc-i386.h (template.extension_opcode): Change to - unsigned int to allow full range of 8-bit opcode suffixes. - (None): Redefine as 0xffff. + * config/tc-d30v.c (check_range): Remove code that incorrectly + sign extended values where bits < 32. - From Jeff B Epler - * doc/c-i386.texi (i386-SIMD): New section. +2000-03-02 H.J. Lu (hjl@gnu.org) -Thu Oct 1 15:37:54 1998 Richard Henderson + * configure.in: Support --enable-targets=all on ia32. + * configure: Regenerated. - * read.c (discard_rest_of_line): New function. - * read.h: Declare it. - * config/tc-alpha.c (s_alpha_mask, s_alpha_frame): Use it. +2000-03-01 Nick Clifton -Thu Oct 1 10:33:53 1998 Nick Clifton + * gasp.c (do_align): Remove bogus check of alignment value. - * config/tc-d10v.c (find_symbol_matching_register): New function. - (find_opcode): Cope with the case where a register name matches - a symbol name. +2000-02-27 Thomas de Lellis -Wed Sep 30 10:52:32 1998 Nick Clifton + * config/obj-elf.c (elf_frob_symbol): Remove code which when + TC_PPC was defined forced the type of a symbol with no other type + to be BSF_OBJECT. - * config/tc-v850.c (md_pcrel_from): Rename to - v850_pcrel_from_section. - (v850_pcrel_from_section): Do not resolves symbols in other - sections. +2000-02-27 Hans-Peter Nilsson - * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define. + * doc/internals.texi (CPU backend): Mention that + line_separator_chars do not break up comments. Fix typos for + LEX_AT and LEX_NAME descriptions. Document operands for + TC_EQUAL_IN_INSN, md_operand and md_section_align. Correct + description of md_create_short_jump usage. Document argument for + md_undefined_symbol. -Mon Sep 28 11:01:20 1998 Nick Clifton +2000-02-27 Jakub Jelinek - * config/tc-d10v.c (find_opcode): Generate an error if a register - is supplied for an operand that should not be a register. + * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option. + (md_parse_option): Handle it. + (md_show_usage): Document it. -Fri Sep 25 10:04:21 1998 Nick Clifton +2000-02-27 Ian Lance Taylor - * config/tc-d30v.c (write_2_short): But do allow delayed branch - instructions to have another instruction in the right bin. + * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an + opcode, for the instruction `pal19'. From Andrea Arcangeli + . -Thu Sep 24 09:28:34 1998 Nick Clifton +2000-02-26 Alan Modra - * config/tc-d30v.c (write_2_short): Do not allow instructions in - the right container if the left container holds a branch - instruction. + * config/tc-i386.c (i386_immediate): Move constant operand sizing + from here.. + (md_assemble): To here, before template operands are matched. + Also ensure a constant immediate is sign extended when we know the + size is at most 16 bits. This is to catch cases like "add + $0xffc0,%ax" where we don't know the size, and thus that the + immediate can be represented as Imm8S until after parsing the + register operand. + (i386_displacement): Similarly sign extend 16 bit constant + displacements. + (md_assemble): Relax 16-bit jump constant range check to suit sign + extended displacements. -Wed Sep 23 10:54:29 1998 Nick Clifton +2000-02-26 Andreas Jaeger - * config/tc-d30v.c (reg_name_search): Only warn if a name matches - both a register name and symbol name. - (find_format): Allow correct parsing of MVTSYS and MVFSYS insns. + * doc/c-mips.texi (MIPS Opts): Fix typo in last patch. -Tue Sep 22 17:49:16 1998 Nick Clifton +2000-02-25 Alan Modra - * config/tc-d30v.c (write_2_short): Implement EITHER_BUT_PREFER_MU - execution unit class. + * config/tc-i386.c (md_assemble): Don't swap intersegment jmp and + call operands when intel_syntax. + (intel_float_operand): Return 2 for "fi...". + (i386_operand_modifier): Change "DWORD PTR" test to suit above. + Return SHORT_MNEM_SUFFIX for "WORD PTR" when "fi...". Revert + earlier "SHORT" change. + (md_assemble): When determining suffix from Regs, exclude + InOutPortReg. - (reg_name_search): If a name matches a register and a symbol, - prefer the register. - (find_format): Disallow flag registers when a general purpose - register is required. - If a number is required, but a register has been given, check to - see if a symbol with the same name as the register exists, and if - so, use that symbol. +2000-02-24 Nick Clifton -Tue Sep 22 16:40:52 1998 Jim Wilson + * configure: Add arm-wince, mips-pe and sh-pe targets. + * configure: Regenerate. - * config/obj-elf.h (ECOFF_DEBUGGING): Add missing parens. + * config/obj-coff.h (COFF_WITH_PE): Define for mips-pe and + sh-pe targets. + (TARGET_FORMAT): Set to "pe-shl" for the sh-pe target and to + "pe-mips" for the mips-pe target. -Tue Sep 22 15:44:21 1998 Nick Clifton + * config/tc-arm.c (insns): Change displacement encoded in BL + and B instructions if the target port is arm-wince. + (do_ldst): Do not bias the relocation offset if the target + port is arm-wince. + (md_pcrel_from): Add in missing relocation offset bias if the + target os arm-wince. - * config/tc-d30v.c (find_format): Do not accept flag registers as - general purpose registers. - (find_format): If an immediate value is expected at a given place - in a format, but a register name has been provided instead, check - to see if that register name matches the name of a predefined - symbol and if it does, then use the symbol instead. - (reg_name_search): If a register name matches a symbol name, - prefer the register name to the symbol name. + * config/tc-mips.c (mips_target_format): Support COFF flavour. + (md_begin): Disable -G support for mips-pe target. + (md_apply_fix): Treat BFD_RELOC_RVA reloc as BFD_RELOC_32. + * config/tc-mips.h (USE_GLOBAL_POINTER_OPT): Add support for + COFF flavour. -Mon Sep 21 10:42:57 1998 Nick Clifton + * config/tc-sh.c (md_begin): sh-pe target is little endian. + * config/tc-sh.h (SUB_SEGMENT_ALIGN): If using a BFD + assembler, just set the alignment to 4. - * config/tc-m32r.c (m32r_do_align): After inserting NOPs, reset - the previous insn to empty. + * config/te-wince-pe.h: New file for WinCE targets. Define + TE_WINCE. -1998-09-20 Michael Meissner +2000-02-25 Alan Modra - * config/tc-ppc.c (md_apply_fix3): Do not break string into two - pieces, forcing the use of an ANSI compiler. + * config/tc-i386.c (md_assemble): Swap segments too for intel mode + string instructions. + (i386_operand_modifier): Set i.suffix = WORD_MNEM_SUFFIX for SHORT. + (i386_intel_memory_operand): After finding a segment override, + check again for no `[' before looking for a displacement. Bomb if + more than one displacement rather than silently discarding the + second and subsequent ones. Free strings malloc'd by + build_displacement_string. -Sun Sep 20 00:58:12 1998 Andreas Schwab +2000-02-24 Catherine Moore - * config/tc-m68k.h (TC_FORCE_RELOCATION): New macro. Force vtable - relocs. - * config/tc-m68k.c (md_apply_fix_2): Do nothing for vtable relocs. + * config/obj-som.c (obj_pseudo_table): Add "weak". + (obj_som_weak): New routine. -Tue Sep 15 08:51:07 1998 Catherine Moore - - * config/obj-elf.c (obj_elf_vtable_inherit): Handle arm - assembler syntax. - (obj_elf_vtable_entry): Likewise. - * config/tc-arm.h: Define TC_FORCE_RELOCATION for OBJ_ELF. - * config/tc-arm.c (md_apply_fix3): Handle VTABLE relocations. - (tc_gen_reloc): Likewise. - (arm_fix_adjustable): Likewise. - (elf32_arm_force_relocation): New. - (armelf_frob_symbol): Remove coff-style symbol support. +2000-02-24 Alan Modra -Wed Sep 9 11:27:16 1998 Richard Henderson + * config/tc-i386.c (union i386_op): New. + (struct _i386_insn): Delete disps[], imms[], regs[]. Add op[]. + Throughout file replace occurences of disps[n], imms[n], regs[n] + with equivalent op[n].disps, op[n].imms, op[n].regs. Simplify + intel mode operand swapping. Add assert in regKludge and + fake_zero_displacement code. Test i.types[n] when outputting + displacements and immediates. Combine output of Disp16 with + Disp32. + (md_assemble): Don't try to fix broken UNIXWARE_COMPAT opcodes + when in intel mode by (not) reversing fsub and fdiv operands + before the template search. This fails for single operand + shorthand forms of the instruction, and if UNIXWARE_COMPAT is + undefined. Instead fix the base_opcode after we've found the + template. Move base_opcode xor with found_reverse_match from + opcode output code to before this fix so we test for the correct + opcodes. + (md_assemble): Don't use strcmp when deciding to ignore the suffix + check in intel mode. Instead compare opcodes. - * config/tc-i386.c (i386_operand): Fix typo in last patch. + * config/tc-i386.h (TC_RELOC): Delete. + * config/tc-i386.c (TC_RELOC): Delete. Replace usage of TC_RELOC + with equivalent call to reloc. -Tue Sep 8 18:10:01 1998 Catherine Moore - - * config/tc-arm.c (arm_adjust_symtab): Move #ifdef - OBJ_COFF so that routine is defined for a.out format. + * as.h (flag_m68k_mri): Move declaration after target include, and + only declare when TC_M68K defined. Define as zero otherwise. + (LABELS_WITHOUT_COLONS, NO_PSEUDO_DOT): If undefined, define as 0. + * app.c (scrub_m68k_mri): Declare only when TC_M68K defined. + Define as zero otherwise. + (do_scrub_begin): Use m68k_mri parameter only when TC_M68K defined. + (struct app_save): Declare scrub_m68k_mri only when TC_M68K. + (app_push, app_pop): Save scrub_m68k_mri only when TC_M68K. + (do_scrub_chars): Use LABELS_WITHOUT_COLONS directly rather than + testing whether defined. + * cond.c (ignore_input): Use NO_PSEUDO_DOT directly. + * expr.c (operand): #ifdef unused case labels when TC_M68K undefined. + * read.c: Use LABELS_WITHOUT_COLONS and NO_PSEUDO_DOT directly + rather than testing whether defined. + (s_mri): Set flag_m68k_mri only when TC_M68K defined. + (parse_mri_cons): Declare and use only when TC_M68K. + * config/tc-hppa.h (LABELS_WITHOUT_COLONS): Define as 1. + * config/tc-m68k.h (NO_PSEUDO_DOT): Define as 1. + * config/tc-m88k.h (NO_PSEUDO_DOT): Define as 1. -Tue Sep 8 15:56:19 1998 Richard Henderson + * NEWS: Mention IBM 370 support. - * config/tc-i386.c (i386_operand): Detect non-segment registers - used as segment prefixes. +2000-02-23 Richard Henderson -Sat Sep 5 19:00:38 1998 Ian Lance Taylor + * config/tc-i386.c (md_assemble): When swapping operands for + intel_syntax, assume everything that's not Imm or Disp is a + register. - * ehopt.c (check_eh_frame): Check the size of the FDE, and don't - optimize across FDE boundaries. +2000-02-23 Linas Vepstas - * config/obj-coff.c (obj_coff_section): Preserve any link once - flags when setting the section flags. + * config/tc-i370.c, config/tc-i370.h: New files. + * Makefile.am: Add support for Linux/IBM 370. + * configure.in: Likewise. + * app.c (do_scrub_begin): Don't lex single quote when TC_I370. + * config/obj-elf.c: Include elf/i370.h + (obj_elf_section): Don't do anything special for flag_mri if TC_I370. -Fri Sep 4 17:07:14 1998 Nick Clifton + * Makefile.in: Regenerate. + * configure: Regenerate. - * config/tc-arm.h (obj_adjust_symtab): Fixed typo. - * config/tc-arm.c (armelf_adjust_symtab): Reformatted. + * doc/c-i370.texi: New file. + * doc/all.texi: Include it. + * doc/as.texinfo: And here. + * doc/Makefile.am(CPU_DOCS): Add c-i370.texi. + * doc/Makefile.in: Regenerate. -Fri Sep 4 13:57:43 1998 Jakub Jelinek +2000-02-19 Michael Meissner - * config/tc-sparc.c (in_signed_range): Sign extend 32-bit words - to the host width. + * config/tc-d30v.c (parallel_ok): Use FLAG_NOT_WITH_ADDSUBppp to + determine if an instruction can be used in parallel with an ADDppp + or SUBppp instruction. -Wed Sep 2 11:31:14 1998 Richard Henderson +2000-02-22 Andrew Haley - * frags.c (frag_grow): Include the size of the frag struct in the - obstack chunk size. + * doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64. - * subsegs.c (subseg_set_rest): Adjust the seginfo frchain start - if the new subseg comes before the old. +2000-02-22 Andrew Haley -Tue Sep 1 15:01:33 1998 Jakub Jelinek - - * config/tc-sparc.c (sparc_ip): Allow all digits in an instruction - to handle edge8 and edge16. + * config/tc-mips.c (mips_gp32): New variable. + (macro_build) Use mips_gp32. + (mips_ip): Ditto. + (md_longopts): Add "-mgp32" and "-mgp64". + (md_parse_option): Add OPTION_GP32 and OPTION_GP64. -Mon Aug 31 09:51:14 1998 Richard Henderson + (OPTION_M7900): Change offset + (OPTION_NO_M7900): Ditto. - * config/obj-elf.c (obj_elf_vtable_inherit): Print error message - before we clobber the symbol involved. +2000-02-22 Alexandre Oliva -Mon Aug 31 10:58:06 1998 Catherine Moore + * config/obj-coff.c (add_lineno): Accept non-positive lineno with + warning, and bump it to 1. - * config/tc-arm.c: Remove OBJ_ELF definitions for - S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. Only - use arm_adjust_symtab for OBJ_COFF. - (armelf_adjust_symtab): New Routine. - * config/tc-arm.h: Define obj_adjust_symtab to - armelf_adjust_symtab for OBJ_ELF. - -Sat Aug 29 22:18:51 1998 Richard Henderson +2000-02-22 Ian Lance Taylor - * configure.in: Make all i386-elf targets use bfd_gas. - * config/tc-i386.c (tc_i386_force_relocation): New. - (tc_i386_fix_adjustable): Don't fix vtable relocs. - (md_apply_fix3): Likewise. - (tc_gen_reloc): Handle them. - * config/tc-i386.h (TC_FORCE_RELOCATION): Always define, calling - tc_i386_force_relocation. + From Brad Lucier : + * dwarf2dbg.c (print_stats): Add cast to force printf argument to + match format. -Mon Aug 24 13:40:21 1998 Nick Clifton +2000-02-21 Catherine Moore - * config/tc-arm.c (md_show_usage): Improve formatting of --help output. + * config/tc-mips.c (MF_HILO_INSN): Define. + (mips_7000_hilo_fix): Declare. + (append_insn): Conditionally insert nops after an mfhi/mflo insn. + (md_parse_option): Check for 7000_HILO_FIX options. + (OPTION_M7000_HILO_FIX): Define. + (OPTION_NO_M7000_HILO_FIX): Define. + * doc/c-mips.texi (-mfix7000): Describe. -Fri Aug 21 18:43:48 1998 Nick Clifton +2000-02-21 Alan Modra - * config/tc-d30v.c (md_assemble): Copy previous opcode over - current opcode after writing the first insturction of a reverse - sequential pair. - -Fri Aug 21 07:30:35 1998 Doug Evans + * listing.c (print_lines): Remove unused variable `end'. - * read.h (generate_lineno_debug): Add prototype. - * read.c (generate_lineno_debug): Make non-static. + * config/tc-i386.c (md_assemble): Use `reloc()' to select reloc + type for JumpInterSegment output. Use enum bfd_reloc_code_real for + reloc_type when BFD_ASSEMBLER. + (md_estimate_size_before_relax): Use enum bfd_reloc_code_real for + reloc_type when BFD_ASSEMBLER. Move common code out of switch + statement and quell signed vs. unsigned comparison warning. -Thu Aug 20 23:17:04 1998 Alan Modra +2000-02-18 Nick Clifton - * config/tc-i386.c (md_assemble): Only warn for address/data size - prefixes. + * config/tc-d10v.c (find_opcode): Add a symbol's value to + the computed frag offset, rather than overwriting it. -Thu Aug 20 14:45:08 1998 Nick Clifton +Thu Feb 17 00:11:08 2000 J"orn Rennecke - * config/tc-arm.c (arm_fix_adjustable): Do not adjust relocations - against Thumb function names, as the linker needs this information. + * config/tc-sh.c ("elf/sh.h"): Include. + (sh_dsp, valid_arch, reg_x, reg_y, reg_efg): New static variables. + (md.begin): Initialize target_arch. + Only include opcodes in has table that match selected architecture. + (parse_reg): Recognize register names for sh-dsp. + (parse_at): Recognize post-modify addressing. + (get_operands): The leading space is now optional. + (get_specific): Remove FDREG_N support. Add support for sh-dsp + arguments. Update valid_arch. + (build_Mytes): Add support for SDT_REG_N. + (find_cooked_opcode): New function, broken out of md_assemble. + (assemble_ppi, sh_elf_final_processing): New functions. + (md_assemble): Use find_cooked_opcode and assemble_ppi. + (md_longopts, md_parse_option): New option: -dsp. + * config/tc-sh.h (elf_tc_final_processing): Define. + (sh_elf_final_processing): Declare. -1998-08-20 Vladimir N. Makarov +Fri Feb 11 14:21:51 2000 Jeffrey A Law (law@cygnus.com) - * expr.c (operand): Check also that there is no advance in operand - after atof_generic in order to decide "is it label 0f or floating - point number?". + * config/tc-hppa.c (pa_build_unwind_subspace): Use subseg_new to create + the unwinder subspace. Save the current seg/subseg before creating + the new seg/subseg. -Wed Aug 19 09:30:16 1998 Nick Clifton +2000-02-10 Nick Clifton - * config/tc-m32r.c: Replace double dash prefix to M32R specific - command line options with a single dash. - * doc/c-m32r.texi: Replace double dash prefix with a single dash. + * config/tc-mcore.c (INST_BYTE0): Redefine to handle big and + little endian targets. + (INST_BYTE1): Redefine to handle big and little endian + targets. + (cpu_type): New type: Select between M340 and M210. + (parse_psrmod): New function: Parse the PSRCLR and PSRSET + instructions of the M340. + (md_assemble): Add support for the MULSH and OPSR classes of + instructions. + (md_atof): Add support for little endian targets. + (md_parse_option): Add support for -EL, -EB and -mcpu command + line switches. + (md_convert_frag): Add support for little endian targets. + (md_apply_fix3): Add support for little endian targets. + (md_number_to_chars): Add support for little endian targets. -Tue Aug 18 11:59:43 1998 Catherine Moore +2000-02-10 Timothy Wall - * tc-arm.h: Define obj_fix_adjustable for OBJ_ELF. - * tc-arm.c (arm_fix_adjustable): New routine. + * read.c (read_a_source_file): If TC_START_LABEL_WITHOUT_COLON is + defined, use it to verify the symbol just read should be a label. -1998-08-13 Vladimir N. Makarov +2000-02-10 Timothy Wall - * read.c (s_align, s_comm, s_mri_common, s_fail, s_globl, s_space, - s_float_space, s_struct, cons_worker): Move ignore_rest_of_line or - demand_empty_rest_of_line before mri_comment_end. - (equals): Check garbage after expression before - mri_comment_end in MRI mode. + * app.c (do_scrub_chars): Handle "||" for parallel instructions + when DOUBLEBAR_PARALLEL is defined. Avoid stripping whitespace + around colons when KEEP_WHITE_AROUND_COLON is defined. + * doc/internals.texi (CPU backend): Document DOUBLEBAR_PARALLEL + and KEEP_WHITE_AROUND_COLON. -Thu Aug 13 15:08:42 1998 Ian Lance Taylor +2000-02-08 Timothy Wall - * config/tc-mips.c (macro): Correct M_SGE_I/M_SGEUI_I case for a - small immediate constant to use the constant itself rather than - always using 1. + * read.c (s_rept): Call do_repeat, which abstracts the repeat + logic. + (do_repeat): New. Abstract repeat logic so that a "break" can be + implemented. + (end_repeat): New. Provide support for a "break" out of the + repeat loop. + * read.h: Add prototypes for new functions. -Wed Aug 12 18:47:38 1998 Ian Lance Taylor +2000-02-08 Timothy Wall - * config/tc-hppa.c (pa_enter): Call as_bad rather than abort. - (pa_leave): Likewise. + * doc/internals.texi: Document NUMBERS_WITH_SUFFIX macro. + * as.h: Provide a default NUMBERS_WITH_SUFFIX definition (zero). + * expr.c: Handle numbers with suffixes if NUMBERS_WITH_SUFFIX is + non-zero. -Wed Aug 12 13:25:03 1998 Alan Modra +2000-02-08 Timothy Wall - * config/tc-i386.c (md_assemble): Emit a warning for stand-alone - prefixes. - (i386_operand): Fix an error message. + * read.c: Added elseif to directives table. + * read.h: Added prototype for s_elseif. + * doc/as.texinfo: Added description for elseif. + * cond.c (s_elseif): New function -Tue Aug 11 14:44:32 1998 Nick Clifton +2000-02-04 Timothy Wall - * doc/c-arm.texi (ARM Directives): Document .req directive. + * listing.c (print_lines): Remove conditionals causing bug in + listings. - * config/tc-arm.c (reg_required_here): Display erroneous string if - the register name could not be decoded. - Do not set inst.instruction if the sift is -1. +2000-02-03 Timothy Wall -Mon Aug 10 15:39:56 1998 Richard Henderson + * as.h: Define OCTETS_PER_BYTE and OCTETS_PER_BYTE_POWER + default values. + * frags.c (frag_new): Calculate fr_fix in octets + (frag_now_fix) Return offset as target address offset (bytes). + (frag_now_fix_octets) New - Return offset in octets (8-bit + quantities). + * frags.h: Added prototype for frag_now_fix_octets(). + Distinguish between octets and bytes in field descriptions. + * listing.c (calc_hex): Account for octets vs bytes when + printing addresses/offsets. + (print_lines) Ditto. Also, if LISTING_WORD_SIZE is not 1, and + target is little-endian, print the octets in a word in big-endian + order so that the display looks like a proper hexadecimal number, + instead of having the octets reversed. + * read.c (do_align): When recording alignment, alignment power + should be in terms of target bytes (minimum addressible unit) + instead of octets. + (do_org) Convert ORG target address (byte) argument into an + octet offset when generating a variable fragment. + * symbols.c (resolve_symbol_value): Symbol final value + converted to a target address offset (bytes) from its octet offset. + * config/obj-coff.c (coff_frob_symbol): Symbol target address + offset (bytes) is adjusted by the frag offset (octets) converted + to bytes. + (coff_frob_section) Section alignment power is in terms of bytes; + convert it to an octet alignment power when calculating size (and + size mask) in octets. Don't modify the section size in order to + "align" it for TI COFF, since that format has a different method + for storing alignment information. - * config/tc-alpha.c (tc_gen_reloc): Bias WEAK symbols just as - we do for EXTERN. +2000-02-01 Timothy Wall -Mon Aug 10 15:06:18 1998 Nick Clifton + * stabs.c (generate_asm_file): Escape backslashes in stabs file + entries, matching the way GCC generates them. If not escaped, the + filename is encoded incorrectly. - * config/tc-d30v.c (d30v_align): Always perform alignment request, - even if it is belived to be unnecessary. - -Mon Aug 10 17:48:09 1998 Alan Modra - - config/tc-i386.c (i386_operand): Size immediate constants by - suffix (erroneously removed as part of July 7 change). +2000-01-31 Nick Clifton -Sun Aug 9 20:45:32 1998 Catherine Moore + * config/tc-arm.c (reg_table): Add support for ATPCS register + naming conventions. - * config/obj-elf.h: Check for redefinition of obj_frob_symbol. - * config/tc-arm.c: Define S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. - (armelf_frob_symbol): New Routine. - * config/tc-arm.h: Define obj_frob_symbol if OBJ_ELF. +2000-01-31 Geoff Keating -Sat Aug 8 15:21:28 1998 Richard Henderson + * config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Don't define if + already defined. + * config/tc-ppc.h [OBJ_XCOFF] (OBJ_COPY_SYMBOL_ATTRIBUTES): + New macro. + * config/tc-ppc.c (ppc_fix_adjustable): Don't look at the frag + of a symbol when we really care about its value. - * config/tc-alpha.c (alpha_fix_adjustable): Don't adjust weak syms. +2000-01-19 Chandra Chavva -Wed Aug 5 15:54:14 1998 Nick Clifton + * config/tc-mcore.c (md_assemble): Give warning message if + operands passes to instruction are more than the spec. - * config/tc-arm.c (md_begin): Set BFD private flags depending upon - command line switches passed to assembler. +2000-01-27 Thomas de Lellis -Mon Aug 3 14:02:52 1998 Doug Evans + * config/tc-arm.c (armadjust_symtab): If the assembler is in + Thumb mode but the label seen was not declared as '.thumb_func' + then set the ST_INFO type to STT_ARM_16BIT mode. This allows + correct disassembly of Thumb code bounded by non function labels. - * cgen.h (GAS_CGEN_MAX_FIXUPS): GAS_ prepended, all uses updated. - (gas_cgen_opcode_desc): Declare. - (gas_cgen_parse_operand): Declare. - (*): Prepend gas_ to gas specific fns to denote them as such. - All uses updated. - * cgen.c (gas_cgen_opcode_desc): New global - (gas_cgen_init_parse): Renamed from cgen_asm_init_parse. - (queue_fixup): Renamed from cgen_queue_fixup. - (*): Prepend gas_ to gas specific fns to denote them as such. - All uses updated. - (gas_cgen_md_apply_fix3): Update call to insert_operand. - (gas_cgen_finish_insn): Renamed from cgen_asm_finish_insn. - * config/tc-m32r.c (md_begin): Remove use of CGEN_SYM. - Open opcode table and initialize it. - (make_parallel): Use gas_cgen_opcode_desc. - (assemble_parallel_insn): Ditto. Remove use of CGEN_SYM. - (md_assemble): Ditto. - -Sat Aug 1 19:27:30 1998 Richard Henderson - - * as.h (debug_info_type): Add entries for unspecified and dwarf*. - * ecoff.c (ecoff_generate_asm_lineno): Take no arguments; call - as_where ourselves. Provide a stub for !ECOFF_DEBUGGING. - * ecoff.h: Move ECOFF_DEBUGGING protection inside GAS_ECOFF_H. - Move ecoff_generate_asm_lineno outside ECOFF_DEBUGGING protection. - * read.c (generate_lineno_debug): Tidy ECOFF bits. Use - DEBUG_UNSPECIFIED rather than DEBUG_NONE for initial test. - * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Define to a variable. - (SEPARATE_STAB_SECTIONS): Conditionalize on value of ECOFF_DEBUGGING. - (INIT_STAB_SECTION): Likewise. - (OBJ_PROCESS_STAB): Likewise. - - * config/tc-alpha.c (md_longopts): New options -mdebug/-no-mdebug. - (md_parse_option): Watch for them. - (alpha_cur_ent_sym, alpha_flag_mdebug): New variables. - (md_begin): Kill neverdef code. - (s_alpha_ent, s_alpha_end, s_alpha_mask, s_alpha_frame): New. - (s_alpha_prologue): Watch alpha_cur_ent_sym. - (s_alpha_coff_wrapper): New. - (md_pseudo_table): Trap all ECOFF pseudos. - -Fri Jul 31 16:45:54 1998 Ron Unrau - - Start of changes to remove mdebug section from mips*-elf - Based on MIPS_STAB_ELF definition - * acconfig.h: undef if not configured - * config.in: undef if not configured - * config/mips-elf.h: only set ECOFF debugging if not stabs-in-elf - * config/tc-mips.c (s_ent): set BSF_FUNCTION - * stabs.c (s_stab_generic): flush frag - -Fri Jul 31 16:14:45 1998 Catherine Moore - - * configure.in: (arm-*-elf): Handle. - (thumb-*-elf): Handle. - * configure: Regenerate. - * read.c (stringer): Fix typo in comment. - * write.c (fixup_segment): Don't add symbol value to addend if - TC_ARM and OBJ_ELF. - * config/tc-arm.c (md_section_align): Don't align dwarf debug - sections. - (tc_gen_reloc): Always set the reloc addend to fixp->fx_offset - for OBJ_ELF. - -Thu Jul 30 21:38:43 1998 Frank Ch. Eigler - - * config/tc-d30v.c ({cur,prev}_left_kills_right_p): New variables. - (write_2_short): Emit warning if new flag is set. - (do_assemble): Set flags if left instruction is one of special - "right-instruction-killer" type. - -Tue Jun 28 18:12:28 1998 Stan Cox - - * config/tc-sparc.c (md_number_to_chars, cons_fix_new_sparc): - Always output words in debug_info section as big endian. - (sparc_target_format): Choose correct bfd target. - (md_apply_fix3): Rename BFD_RELOC_SPARC_32LE to BFD_RELOC_SPARC_REV32. - -Tue Jul 28 11:01:21 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10300.c (md_assemble): Fix "errmsg" initialization - to work with internationalization code. Issue an error when two - operands match that are not allowed to match. - -Mon Jul 27 16:25:58 1998 Doug Evans - - * configure.in (install_tooldir): Allow target to specify whether - it wants to be installed in $(tooldir)/bin. - * configure: Regenerate. - * Makefile.am (install-exec-local): Set install-exec-tooldir - dependency via configure. - * Makefile.in: Regenerate. +2000-01-27 Alan Modra -Fri Jul 24 19:58:59 1998 Doug Evans + * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c + Add dependencies for e-i386aout.o. Fix 2 comment lines. - * Makefile.am (install-exec-local): Split into two ... - (install-exec-bindir,install-exec-tooldir): New rules. - * Makefile.in: Regenerate. + * Makefile.in: Same here. + Update copyright. -Fri Jul 24 16:31:49 1998 Ian Lance Taylor + * configure.in: Set bfd_gas for i386-aout when primary target + is bfd. Handle i386aout emulation. Don't use te_file=multi, as + we may need the primary te_file. Remove incorrect comment. - * Makefile.am (install-exec-local): Don't remove the file before - checking whether $(bindir) == $(tooldir)/bin. From Maciej - W. Rozycki . - * Makefile.in: Rebuild. + * configure: Regenerate. -Fri Jul 24 09:13:46 1998 Doug Evans + * config/e-i386aout.c: New file. - * cgen.c: Include libiberty.h. - (cgen_md_apply_fix3): Update call to md_cgen_lookup_reloc. - (cgen_tc_gen_reloc): Use xmalloc, not bfd_alloc. - * cgen.h (cgen_md_apply_fix3,cgen_tc_gen_reloc): Declare. - (md_cgen_lookup_reloc)): Declare. - (md_cgen_record_fixup_exp): Declare. - * config/tc-m32r.h (md_pcrel_from_section): Declare. - (m32r_relax_frag): Declare. - (cgen_md_apply_fix3): Decls moved to cgen.h. - (cgen_record_fixup_exp,cgen_tc_gen_reloc): Ditto. - (m32r_cgen_record_fixup_exp): Delete decl. - * config/tc-m32r.c (m32r_cpu_desc): #if 0 out. - (assemble_nop): Delete. - (expand_debug_syms): Delete unused `exp'. - (md_cgen_lookup_reloc): Renamed from CGEN_SYM (lookup_reloc). - Add default case for -Wall. - (m32r_cgen_record_fixup_exp): Add default case for -Wall. - (md_atof): Delete unused wordP. + * as.c (USE_EMULATIONS): Move to before print_version_id. + (struct emulation): Add i386aout. + (show_usage): Split text strings. Reformat -a text. Add --em + help. + Update copyright. -Thu Jul 23 13:19:50 1998 Jeffrey A Law (law@cygnus.com) + * obj.h (struct format_ops): Add s_get_other and s_get_desc. + (aout_format_ops): New. + Update copyright. - * config/tc-mn10300.c (md_assemble): Make sure "errmsg" has a non-NULL - value. + * read.c (s_lcomm_internal): Rewrite OBJ_AOUT,OBJ_BOUT + preprocessor conditional and add aout USE_EMULATIONS tests. + (read_a_source_file): Don't pass error strings to printf as + format arg. + Update copyright. -Wed Jul 22 14:36:56 1998 Ian Lance Taylor + * gasp.c (exp_get_abs): Don't pass error strings to printf as + format arg. + (do_data): Same here. + (process_file): And here. + Update copyright. - * doc/as.texinfo: Add documentation for .end, .exitm, .fail, - .ifc, .ifeqs, .ifge, .ifgt, .ifle, .iflt, .ifnc, .ifne, .ifnes, - .print, .purgem, and .struct. Remove documentation for - .app-file. + * symbols.c (colon): Rewrite "already defined" fatal message + code for aout with USE_EMULATIONS. + Update copyright. -Tue Jul 21 16:50:52 1998 Doug Evans + * config/obj-aout.c (OBJ_HEADER): Define. + (obj_pseudo_table): Rename to aout_pseudo_table. Init all + fields of sentinel. + (obj_aout_frob_symbol): Expand S_GET_DESC, S_GET_TYPE, + S_GET_OTHER, S_SET_TYPE macros since we don't need obj-multi + forms here. + (obj_aout_type): Expand S_SET_OTHER here too. + (obj_read_begin_hook): Remove. + (aout_pop_insert): New. + (obj_aout_s_get_other): New. + (obj_aout_s_get_desc): New. + (aout_format_ops): New. + Update copyright. - * cgen.c (cgen_md_apply_fix3): set_operand renamed to set_vma_operand. - Update call to insert_operand. + * config/obj-aout.h (obj_pop_insert): Define so non-multi usage + gets aout_pseudo_table. + (aout_pseudo_table): Declare. + (obj_read_begin_hook): Define. + Update copyright. -Fri Jul 17 11:42:20 1998 Nick Clifton + * config/obj-coff.c (obj_pseudo_table): Rename to + coff_pseudo_table. + (coff_pop_insert): Use coff_pseudo_table. + (coff_sec_sym_ok_for_reloc): Remove. + (coff_format_ops): Add 0 entries for s_get_size, s_set_size, + and comment all zero entries and remove #if 0 code. + Update copyright. - * config/tc-m32r.c (ms_show_usage): Formatting changes. + * config/obj-coff.h (obj_pop_insert): Define. + (coff_pseudo_table): Declare. + Update copyright. -Wed Jul 15 15:38:28 1998 Ian Lance Taylor + * config/obj-ecoff.c (ecoff_format_ops): Add 0 entries for + s_get_size, s_set_size. Comment all zero entries. + Update copyright. - * config/tc-i386.c (md_assemble): Don't get confused by trailing - whitespace after a prefix operator. + * config/obj-elf.c (elf_s_get_other): New function. + (obj_read_begin_hook): Rename to elf_obj_read_begin_hook. + (obj_symbol_new_hook): Rename to elf_obj_symbol_new_hook. + (elf_format_ops): Add elf_s_get_other, 0 s_get_size entry, and + comment. + (obj_elf_parse_section_letters): Don't pass error strings to + printf as format arg. + Update copyright. -Tue Jul 14 15:32:56 1998 Richard Henderson + * config/obj-elf.h (ECOFF_DEBUGGING): Define when + OBJ_MAYBE_ECOFF. + (elf_s_get_other): Declare. + (S_GET_OTHER) Define as elf_s_get_other if not already + defined. + (S_SET_OTHER): Only define when not already defined. + (elf_obj_read_begin_hook): Declare. + (obj_read_begin_hook): Define. + (elf_obj_symbol_new_hook): Declare. + (obj_symbol_new_hook): Define. + Update copyright. - * configure.in (i386-*-beos{pe,elf,}*): Recognize. + * config/obj-multi.h: Add copyright header and protect against + multiple inclusion. Add * to all function pointers. + (OBJ_HEADER): If defined, include it rather than other defines + in this file. + (obj_frob_file_after_relocs): Test for NULL. + (obj_symbol_new_hook): Here too. + (obj_sec_sym_ok_for_reloc): And here. + (S_GET_OTHER): Define. + (S_GET_DESC): Define. + (ECOFF_DEBUGGING): Remove as it's done in obj-elf.h + (OBJ_MAYBE_ELF): Update comment. -Tue Jul 14 12:33:44 1998 Chris Torek + * config/tc-i386.c (i386_immediate): Add OBJ_MAYBE_AOUT to + OBJ_AOUT preprocessor conditional and handle emulation by + testing OUTPUT_FLAVOR. + (i386_displacement): Here too. + (md_section_align): Similarly here. + (i386_target_format): Conditionally compile when more than one + of OBJ_MAYBE_{ELF,COFF,AOUT} defined. Add aout case. + (i386_immediate): Fix error message for aout BFD_ASSMBLER. + (i386_displacement): Here too. + Update copyright. - * config/tc-sparc.c (log2): New static function. - (s_reserve): Use log2 to convert alignment before calling - record_alignment. - (s_common): Use log2 to convert alignment before calling - record_alignment and frag_align. - (sparc_cons_align): Use log2. + * config/tc-i386.h (AOUT_TARGET_FORMAT): Define for each TE_*. + Define TARGET_FORMAT for aout only when not multi. + Update copyright. -Tue Jul 14 11:58:40 1998 Ian Lance Taylor + * config/te-multi.h: Delete file as it's identical to te-generic.h - * config/tc-sparc.c (s_reserve): Set symbol size if OBJ_ELF. - (s_common): Likewise. +2000-01-15 Alan Modra - * config/tc-sparc.c (sparc_handle_align): Reindent a bit. Correct - initialization of waddr. - (sparc_elf_final_processing): Add default case to switch. + * config/tc-i386.h (DWORD_MNEM_SUFFIX): Delete. + * config/tc-i386.c (DWORD_MNEM_SUFFIX): Rename all occurrences to + LONG_MNEM_SUFFIX. -Tue Jul 14 11:00:16 1998 Alan Modra + * config/tc-i386.h (INTEL_DWORD_MNEM_SUFFIX): Rename to + DWORD_MNEM_SUFFIX. + * config/tc-i386.c (INTEL_DWORD_MNEM_SUFFIX): Here too. Fix some + comments. - * doc/c-i386.texi: Fix a typo. Use the term 80-bit real rather - than temporary real. +2000-01-13 Clinton Popetz -Mon Jul 13 13:55:42 1998 Ian Lance Taylor + * config/tc-mips.c (mips_do_align): New function. + * config/tc-mips.h (md_do_align): Define. - * write.c (subsegs_finish): Don't align the segments if there were - any errors. +2000-01-10 Philip Blundell - * config/obj-coff.c (c_symbol_merge): Correct number of bytes when - copying aux information. - - * expr.c (make_expr_symbol): Catch attempts to turn an O_big - expression into a symbol. - -Mon Jul 13 13:29:04 1998 Alan Modra - - * config/tc-i386.c (mode_from_disp_size): Change arg and return - type to unsigned int. - (md_assemble): Change type used to store offsets from unsigned - long to long. - (i386_operand): Switch error check to only call RESTORE_END_STRING - once after parse_register. - -Fri Jul 10 16:00:04 1998 Nick Clifton - - * config/tc-v850.c (md_show_usage): Changed format to match that - of gcc, ld, etc. - - * as.c (show_usage): Changed format to match that of gcc, ld, etc. + * doc/c-arm.texi (ARM Options): Fix typo. + (ARM-Chars): Correct description of `#'. Mention that `;' is a + line separator for Linux. + * doc/as.texinfo (Comments): Mention the ARM. -Thu Jul 9 12:09:57 1998 Andreas Schwab +2000-01-10 Philip Blundell - * config/tc-m68k.c (tc_m68k_fix_adjustable): Don't adjust vtable - relocs. - (md_apply_fix_2): Force the symbol of the vtable reloc to be - weak. - -Thu Jul 9 11:31:54 1998 Ian Lance Taylor - - * doc/Makefile.am (MAINTAINERCLEANFILES): Define. - * doc/Makefile.in: Rebuild. - -Wed Jul 8 12:18:56 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mips.c (mips_ip, case 'i' and 'j'): Mask off high bits - for %lo expressions. - (mips_ip, case 'u'): Move range check after code to mask - off bits in %hi/%lo expressions. Mask off high bits for - %lo expressions. - -Tue Jul 7 17:57:38 1998 Ian Lance Taylor - - * doc/Makefile.am (gasver.texi): New target. - (as.info, as.dvi): Depends upon gasver.texi. - * doc/as.texinfo: Include gasver.texi. Mention version number on - title page and in top node. - * doc/Makefile.in: Rebuild. - -Tue Jul 7 11:42:16 1998 Richard Henderson - - * listing.c (listing_listing): For EDICT_LIST, skip all lines up to - but not including the line containing the edict. - * listing.h (LISTING_EOF): New. - * input-scrub.c (input_scrub_next_buffer): Call it. - -Tue Jul 7 13:00:37 1998 Alan Modra - - * config/tc-i386.c (i386_operand): Don't set the size of an - immediate address based solely on the suffix and the mode. - - * config/tc-i386.c (md_assemble): Add assertion to make sure - overlap2 does not set Imm. - - * config/tc-i386.c (space_chars): Remove. The scrubber converts - sequences of whitespace to a single space. - (is_space_chars): Just compare with space. - (md_begin): Don't initialize space_chars. - (md_assemble): Just skip a single whitespace character. - (i386_operand): Rewrite base-index parsing to use new - parse_register, and to skip white space. Skip white space in a - number of other places too. Don't give error message if - parse_register fails. - (parse_register): Change reg_string parameter to be non-const. - Add end_op parameter. Skip white space after the `%', and return - end of register string. Give error message here rather than - caller. - -Fri Jul 3 15:34:34 1998 Ian Lance Taylor - - Based on patch from Matt Semersky : - * expr.c (op_encoding): Make const. - (expr_set_precedence): New function. - (expr_begin): Don't set operator rankings, just call - expr_set_precedence. - * expr.h (expr_set_precedence): Declare. - * read.c (s_mri): Call expr_set_precedence. - -Thu Jul 2 16:24:58 1998 Ian Lance Taylor - - * doc/as.texinfo (Statements): Remove paragraph discussing - continuing lines with a backslash. This hasn't worked for years, - if it ever did. - -Thu Jul 2 14:06:22 1998 Klaus Kaempf - - * obj-vms.c: Add C++ support with ctors/dtors sections. Add weak - symbol definitions. - (Ctors_Symbols, Dtors_Symbols): New symbol chains. - (ps_CTORS, ps_DTORS): New section types. - (vms_fixup_xtors_section): New function - (Ctors_Psect, Dtors_Psect): Define. - (IS_GXX_XTOR): Define - (global_symbol_directory): Change check of gxx_bug_fixed to 0. - Filter static constructors/destructors and add to - Ctors_Symbols/Dtors_Symbols chain. - (vms_write_object_file): Write Ctors_Symbols/Dtors_Symbols to - appropriate section. - - * tc-alpha.h (TARGET_FORMAT): Rename "evax-alpha" to "vms-alpha". - * makefile.vms: Merge vax/vms support. - -Wed Jul 1 20:06:20 1998 Richard Henderson - - * config/obj-elf.c (obj_elf_vtable_inherit, obj_elf_vtable_entry): New. - (elf_pseudo_table): Add them. - * config/tc-mips.c (mips_force_relocation): Force vtable relocs. - (md_apply_fix): Accept them. - (mips_fix_adjustable): Don't adjust them. - (tc_gen_reloc): Mung BFD_RELOC_VTABLE_ENTRY for Rel. - * config/tc-ppc.c (md_apply_fix3): Accept vtable relocs. - * config/tc-ppc.h (TC_FORCE_RELOCATION_SECTION): Force vtable relocs. - (tc_fix_adjustable): Don't adjust them. - -Wed Jul 1 16:35:32 1998 Doug Evans - - * Makefile.am (CGEN_CPU_PREFIX): New variable. - (cgen.o): Use it. - * Makefile.in: Regenerate. - * configure.in: AC_SUBST cgen_cpu_prefix. + * configure.in (arm*-*-conix*): New target. + (arm*-*-linux-gnu*): Match instead of arm-*-linux* and + armv*-*-linux-gnu. * configure: Regenerate. -Wed Jul 1 21:38:56 1998 J"orn Rennecke - - * config/tc-sh (COND_JUMP_DELAY, COND12_DELAY_LENGTH): Define. - Changed all users of COND12_DELAY. - -Fri Jun 26 11:21:11 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10300.c (set_arch_mach): New function. - (md_pseudo_table): Add pseudo-ops to set the current machine type. - (md_begin): Default to mn10300 mode. - (md_assemble): Only accept instructions for the core mn10300 - chip and the active machine type. - -Wed Jun 24 19:06:04 1998 Ian Lance Taylor - - * subsegs.h (segment_info_type): Give the struct a name. - * config/tc-h8300.h (tc_reloc_mangle): Add prototype. - * config/tc-h8500.h (tc_reloc_mangle): Declare. - * config/tc-sh.h (sh_coff_reloc_mangle): Add prototype. - * config/tc-w65.h (tc_reloc_mangle): Declare. - * config/tc-z8k.h (tc_reloc_mangle): Declare. - -Wed Jun 24 13:45:00 1998 Catherine Moore - - * config/tc-v850.c (v850_comm): Restore old section - after common processing. - -Wed Jun 24 11:50:54 1998 Klaus Kaempf - - * config/obj-vms.c (Create_VMS_Object_File): Force binary file. - -Tue Jun 23 17:47:31 1998 Jim Wilson - - * config/tc-h8300.c (do_a_fix_imm, build_bytes): Replace cast to - char with code that explicitly sign-extends. - -Tue Jun 23 13:54:57 1998 Nick Clifton - - * config/tc-v850.c (md_begin): Restore text section as the current - section after creating call table sections. - * config/obj-coff.h (SYM_AUXINFO): New macro to conceal ugly - code. - - * config/obj-coff.c (c_symbol_merge): Replace complex expresion - with call to macro SYM_AUXINFO. - -Tue Jun 23 15:09:27 1998 Mike Stump - - * Makefile.am (install-exec-local): Don't let EXEEXT interfere - with the program transform name. - * Makefile.in: Rebuild. - -Mon Jun 22 19:52:42 1998 Ian Lance Taylor - - * config/obj-coff.c (c_symbol_merge): Fix copying of auxiliary - information. - -Mon Jun 22 15:18:58 1998 Ian Lance Taylor - - * config/tc-i386.c (i386_operand): Be prepared for a space between - the open parenthesis and the start of the register operand, - because of the June 16 change. - -Sun Jun 21 21:27:03 1998 Ian Lance Taylor - - * config/tc-sh.c (md_apply_fix): Handle weak symbols correctly if - BFD_ASSEMBLER. - -Sun Jun 21 12:26:36 1998 Nick Clifton - - * config/tc-d30v.c (d30v_align): Always perform alignment request, - even if it is belived to be unnecessary. - -Fri Jun 19 13:57:06 1998 Ian Lance Taylor - - * write.c (adjust_reloc_syms): Never adjust relocs against weak - symbols. - * config/tc-mips.c (md_apply_fix): Adjust accordingly. - -Fri Jun 19 09:50:17 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10300.c (mn10300_insert_operand): Do not hardcode the - shift amount for a repeated operand. The shift amount for the - repeated copy comes from the size of the operand. - -Fri Jun 19 00:44:19 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-h8300.c (get_operand): Fix typos in ldm/stm support. - -Wed Jun 17 13:07:05 1998 Ian Lance Taylor - - * config/tc-mips.c (md_show_usage): Fix -mipsN usage. - -Tue Jun 16 13:06:21 1998 Alan Modra - - * app.c (do_scrub_begin): If tc_symbol_chars is defined, treat all - characters in it as LEX_IS_SYMBOL_COMPONENT. - * config/tc-i386.h (tc_symbol_chars): Define. - (extra_symbol_chars): Declare. - * config/tc-i386.c (extra_symbol_chars): Define. - (comment_chars): Don't use '/' as comment start if TE_LINUX. - (line_comment_chars): Set to '/' if TE_LINUX. - * doc/c-i386.texi (i386-prefixes): Update. - * doc/internals.texi (CPU backend): Document tc_symbol_chars. - -Fri Jun 12 13:36:54 1998 Tom Tromey - - * po/Make-in (all-yes): If maintainer mode, depend on .pot file. - ($(PACKAGE).pot): Unconditionally depend on POTFILES. - -1998-06-12 Vladimir N. Makarov - - * config/tc-d10v.c (md_apply_fix3): Checking displacement - constraint in instructions REP & REPI. - -Thu Jun 11 08:56:46 1998 Nick Clifton - - * config/tc-d30v.c (md_apply_fix3): Catch BFD_RELOC_8, - BFD_RELOC_16, BFD_RELOC_64 and issue appropriate error messages. - - (check_range): If the operand is shifted, then shift the number - before checking its range. - - * write.c (adjust_reloc_syms): Add more checks for NULL pointers. - - * config/tc-v850.c (v850_comm): Set SEC_COMMON bit on special - common sections. - -Wed Jun 10 17:26:35 1998 Nick Clifton - - * config/tc-v850.c (v850_comm): Create special sections as needed. - -1998-06-10 Vladimir N. Makarov - - * config/tc-d10v.c (write_2_short): Addition of swapping - instructions for sequential and reverse sequential order when - given order is not possible. - -Tue Jun 9 13:52:53 1998 Ian Lance Taylor - - * Makefile.am: Rebuild dependencies. - (DEP_INCLUDES): Fix reference to intl build directory. - * Makefile.in: Rebuild. - -Tue Jun 9 12:20:05 1998 Alan Modra - - * doc/c-i386.texi: Update 16 bit documentation. - - * config/tc-i386.h: Change Data16 to Size16, Data32 to Size32, - IgnoreDataSize to IgnoreSize as they are used for address size as - well as data size. - * config/tc-i386.c: Likewise. Add code to reject addr32/data32 in - 32-bit mode, similarly addr16/data16 and variants. - -Mon Jun 8 18:32:01 1998 Nick Clifton - - * config/tc-d30v.c (md_assemble): Fix handling of reverse - sequential word multiply instructions. - - (do_assemble): Add extra command line argument, to allow mul32 - attribute to be preserved across parallel insns. - (md_assemble): Insert NOPs between explicitly parallel insns which - contain an 32 bit multiply and a 16 multiply. - -Mon Jun 8 12:20:30 1998 Alan Modra - - * config/tc-i386.c: REPNE renamed to REPNE_PREFIX_OPCODE, and - likewise for REPE. - - * config/tc-i386.c (reloc): Add braces. - - * config/tc-i386.c (struct _i386_insn): Rename bi to sib to be - consistent with Intel naming. - * config/tc-i386.h (base_index_byte): Rename to sib_byte. Don't - use bitfields in sib_byte. - (modrm_byte): Don't use bitfields here either. - - * config/tc-i386.c (current_templates): Add const. - (parse_register): Add const to return, param, and char *s. - (i386_operand): Add const to reg_entry *r. - * config/tc-i386.h (templates): Add const to start, end. - - Inspired by code for 16 bit gas support from Martynas Kunigelis - : - * config/tc-i386.c (md_assemble): Add full support for 16 bit - modrm, and Jump, JumpByte, JumpDword, JumpInterSegment insns. - (uses_mem_addrmode): Remove. - (md_estimate_size_before_relax): Add support here too. - (md_relax_table): Rewrite interface to md_relax for 16 bit - support. - (BYTE, WORD, DWORD, UNKNOWN_SIZE): Remove. - (opcode_suffix_to_type): Remove. - (CODE16, SMALL, SMALL16, BIG, BIG16): Define. - (SIZE_FROM_RELAX_STATE): Modify to suit above. - (md_convert_frag): Likewise. - (i386_operand): Add support for 16 bit base/index regs, - immediates, and displacements. Remove some unnecessary casts, and - localise end_of_operand_string, displacement_string_start, - displacement_string_end variables. Add GCC_ASM_O_HACK. - * config/tc-i386.h (NO_BASE_REGISTER_16): Define. - - * config/tc-i386.c (prefix_hash): Remove. - (md_begin): Rewrite without obstacks. Remove prefix hash table - handling. Rewrite lexical table handling. - (i386_print_statistics): Don't print prefix statistics. - (md_assemble): Rewrite instruction parser so that line is not - converted to lower case. Don't do a hash_find for prefixes, - instead recognise them via opcode modifier. - (expecting_operand, paren_not_balanced): Localise variables. - * config/tc-i386.h (IsPrefix): Define. - (prefix_entry): Remove. - - * config/tc-i386.h (PREFIX_SEPERATOR): Don't define. - * config/tc-i386.c (PREFIX_SEPARATOR): Define here instead, using - '\\' in case where comment_chars contains '/'. - - * config/tc-i386.c (MATCH): Ensure given operand and template - match for JumpAbsolute. Makes e.g. `ljmp table(%ebx)' invalid; - you must write `ljmp *table(%ebx)'. - - From H.J. Lu : - * config/tc-i386.c (BFD_RELOC_16, BFD_RELOC_16_PCREL): Define - as 0 ifndef BFD_ASSEMBLER. - (md_assemble): Allow immediate operands without suffix or - other reg operand to default in size to the current code size. - -Mon Jun 8 09:45:00 1998 Catherine Moore - - * config/tc-v850.c (md_begin): Restore creation of - .call_table_text and .call_table_data sections. - -Sat Jun 6 00:02:41 1998 Nick Clifton - - * config/tc-d30v.c (md_assemble): Set execution type to unknown - after emitting a word of noops. - -Fri Jun 5 23:27:04 1998 Alan Modra - - * config/tc-i386.c (mode_from_disp_size): Disp16 is mode 2. - (i386_operand): Simplify checks for valid base/index combinations. - Disallow `in 4(%dx),%al'. - - * config/tc-i386.c (struct _i386_insn): Make regs, base_reg, and - index_reg const. - (add_prefix): Change parameter from char to int. - - * config/tc-i386.h (Ugh): Define opcode modifier. - * config/tc-i386.c (md_assemble): Print warnings for Ugh insns. - - * config/tc-i386.c (md_assemble): Rewrite MATCH and - CONSISTENT_REGISTER_MATCH macros to check register types more - thoroughly. Check for illegal suffix/operand combinations - when matching insns with operands. Handle new `s' suffix, and - associated FloatMF opcode modifier for float insns with memory - operands. - * config/tc-i386.h (FloatMF): Define new opcode modifier. - (No_sSuf, No_bSuf, No_wSuf, No_lSuf): Likewise. - (SHORT_OPCODE_SUFFIX, LONG_OPCODE_SUFFIX): Define. - * config/tc-i386.c: Rename WORD_PREFIX_OPCODE to - DATA_PREFIX_OPCODE throughout. - - * config/tc-i386.c (REGISTER_WARNINGS): Define. - (md_assemble): Rewrite suffix/register operand checking code to be - more thorough. Remove Abs8,16,32. Change occurrences of Mem to - AnyMem, the better to grep. - (pi): Remove Abs. - (i386_operand): Don't set Mem bits in i.types[this_operand] when - given a memory operand. Don't set Abs bits either. - (type_names): Remove Mem*, Abs*. - * config/tc-i386.h (Mem8, Mem16, Mem32, Abs8, Abs16, Abs32): Don't - define opcode_modifiers as these cases are handled by Disp8, - Disp16, Disp32 and suffix checks. - (COMES_IN_BOTH_DIRECTIONS): Remove. - (FloatR): Define. It's OK to share the bit with ReverseRegRegmem. - - * config/tc-i386.c (md_assemble): Don't emit operand size prefix - if IgnoreDataSize modifier given. Remove ShortformW modifier - test. Add test for ShortForm in W base_opcode modification. - Merge Seg2ShortForm and Seg3ShortForm code. - * config/tc-i386.h (ShortFormW): Remove. - (IgnoreDataSize): Define. - -Fri Jun 5 10:50:53 1998 Nick Clifton - - * config/tc-d30v.c (md_assemble): Store previous segment state - with previous instruction. - -Wed Jun 3 18:21:56 1998 Alan Modra - - * config/tc-i386.c (SCALE1_WHEN_NO_INDEX): Define. - (ebp, esp): Remove static variables. - (MATCH): Remove test for InOutPortReg. - (i386_operand): Properly handle InOutPortReg here instead. - Disallows `inb (%dx,2)', `inb %es:(%dx)' and `mov (%dx),%ax' - (md_assemble): Simplify and correct modrm and sib generation. - (i386_operand): Add warning for scale without index. - Rewrite checks for valid base/index combinations. - - * config/tc-i386.c (END_STRING_AND_SAVE): Protect arguments of - macros and enclose in do while(0). - (RESTORE_END_STRING): Likewise. - (md_assemble): Add one to printed operand number so we start - from 1 not 0. Add some more gettext invocations. - (i386_operand): Fix `%%s' -> `%%%s'. Inc printed operand - number here too. - - * config/tc-i386.h (WAIT_PREFIX, LOCKREP_PREFIX, ADDR_PREFIX, - DATA_PREFIX, SEG_PREFIX): Define. - * config/tc-i386.c (struct _i386_insn): Remove wait_prefix field. - (check_prefix): Remove function. - (add_prefix): New function. Add prefix to i.prefix as well as - doing checks. - (md_assemble): Changes for add_prefix. Remove hack for wait - prefix, instead always output prefixes in fixed order. Test - for jcxz/loop when selecting between word & dword operations, - and add address size prefix rather than operand size prefix. - Remove operand -> address size hack when emitting jcxz/loop. - (i386_operand): Remove O_Absent check as it's done in expr. - -Wed Jun 3 15:09:10 1998 Ian Lance Taylor - - * configure.in: Recognize m5200 as a cpu_type of m68k. - * aclocal.m4: Rebuild with current libtool. - * configure: Rebuild. - -Wed Jun 3 14:11:59 1998 Andreas Schwab - - * config/tc-m68k.c (md_estimate_size_before_relax): Add more calls - to relaxable_symbol to prevent references to external symbol from - being relaxed. - -Wed Jun 3 14:10:36 1998 Ian Lance Taylor - - * config/tc-m68k.c (relaxable_symbol): If TARGET_OS is "elf", all - symbols are relaxable. - -Wed Jun 3 09:16:00 1998 Catherine Moore - - * config/tc-v850.c (md_begin): Don't create special - sections by default. - -Tue Jun 2 14:52:56 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mips.c (macro): For div and udiv, close the - reorder block as soon as possible. - -Tue Jun 2 15:36:13 1998 Ian Lance Taylor - - From Matt Semersky : - * macro.c (macro_mri_mode): New function. - * macro.h (macro_mri_mode): Declare. - * read.c (s_mri): Call macro_mri_mode when switching in and out of - MRI mode. - -Tue Jun 2 13:32:22 1998 Klaus Kaempf - - * config/tc-alpha.c (s_alpha_comm): Allow alignment parameter in - OBJ_EVAX case. - - * config/tc-alpha.c (s_alpha_comm): Defer restoring character - until after xstrdup in OBJ_EVAX case. - -Tue Jun 2 13:11:13 1998 Pat Rankin - - * config/tc-vax.c (md_create_short_jump): Fix off by two bug in - offset calculation. Also, use VAX_BRW from vax-inst.h instead - of hardcoded magic number. - (md_create_long_jump): Use VAX_JMP and VAX_ABSOLUTE_MODE macros. - -Tue Jun 2 09:25:34 1998 Doug Evans - - * read.c (do_s_func): New function. - (s_func): Call it. - * read.h (do_s_func): Add prototype. - -Mon Jun 1 12:47:30 1998 Doug Evans - - * config/tc-m32r.c (m32r_do_align): Only fill code sections with - nops if fill pattern not specified. - -Mon Jun 1 14:08:35 1998 Ian Lance Taylor - - From Andrew Crabtree : - * config/te-go32.h (TE_GO32): Define. - * config/tc-i386.h (LOCAL_LABEL): Don't define if TE_GO32. - -Sun May 31 15:43:06 1998 Doug Evans - - Implement .func/.endfunc pseudo-ops. - * read.h (stabs_generate_asm_func,stabs_generate_asm_endfunc): Declare. - (s_func): Declare. - * read.c (potable): Add .func,.endfunc. - (s_func): New function. - * stabs.c (stabs_generate_asm_func,stabs_generate_asm_endfunc): New - functions. - (in_doc_func_p,current_function_label): New static globals. - (stabs_generate_asm_lineno): Emit function relative stabs if in .func. - -Fri May 29 18:13:12 1998 Ian Lance Taylor - - * config/tc-a29k.h (WORKING_DOT_WORD): Define. - * config/tc-alpha.h (WORKING_DOT_WORD): Define. - * config/tc-arm.h (WORKING_DOT_WORD): Define. - * config/tc-h8300.h (WORKING_DOT_WORD): Define. - * config/tc-h8500.h (WORKING_DOT_WORD): Define. - * config/tc-hppa.h (WORKING_DOT_WORD): Define. - * config/tc-i860.h (WORKING_DOT_WORD): Define. - * config/tc-i960.h (WORKING_DOT_WORD): Define. - * config/tc-tic30.h (WORKING_DOT_WORD): Define. - * config/tc-w65.h (WORKING_DOT_WORD): Define. - * config/tc-z8k.h (WORKING_DOT_WORD): Define. - * config/tc-a29k.c: Don't define md_short_jump_size, - md_long_jump_size, md_create_short_jump or md_create_long_jump. - * config/tc-alpha.c: Likewise. - * config/tc-alpha.h: Likewise. - * config/tc-arm.c: Likewise. - * config/tc-h8300.c: Likewise. - * config/tc-h8500.c: Likewise. - * config/tc-hppa.c: Likewise. - * config/tc-i860.c: Likewise. - * config/tc-i960.c: Likewise. - * config/tc-ppc.c: Likewise. - * config/tc-sh.c: Likewise. - * config/tc-sparc.h: Likewise. - * config/tc-tic30.c: Likewise. - * config/tc-w65.c: Likewise. - * config/tc-z8k.c: Likewise. - -Fri May 29 16:03:26 1998 Pat Rankin - - * config/tc-vax.c (_): Delete this macro used for placeholder - values in vax_operand_width_size; it conflicts with the _() macro - used for internationalization. - -Fri May 29 13:46:07 1998 Ian Lance Taylor - - * symbols.c (symbol_find_base): Fix case insensitive symbol name - code. From Chris Moller . - - Based on patch from Klaus Kaempf : - * struc-symbol.h (struct broken_word): Add seg and subseg fields. - * read.c (emit_expr): Initialize seg and subseg fields of a new - broken word. - * write.c (write_object_file): Switch to the appropriate segment - and subsegment when processing a broken word. - - * config/tc-m68k.c (mri_assemble): New static function. - (build_mri_control_operand): Call mri_assemble rather than - md_assemble. - (s_mri_else, s_mri_break, s_mri_next, s_mri_for): Likewise. - (s_mri_endf, s_mri_endw): Likewise. - -Wed May 27 11:16:25 1998 Ian Lance Taylor - - * read.c (s_org): Call md_flush_pending_output if it is defined. - - * config/tc-sparc.c (md_show_usage): Add \n\ to new string. - -Tue May 26 19:27:52 1998 Stan Cox - - * config/tc-sparc.c (OPTION_LITTLE_ENDIAN_DATA): New. - (md_parse_option): Add for same. - (sparc_md_end): Set bfd_mach_sparc_sparclite_le. - (md_apply_fix3, tc_gen_reloc): Allow BFD_RELOC_SPARC_32LE. - (cons_fix_new_sparc): Added to create BFD_RELOC_SPARC_32LE. - - * config/tc-sparc.h (cons_fix_new_sparc): Added. - -Thu May 21 15:02:41 1998 Nick Clifton - - * config/tc-arm.c (find_real_start): Relax definition of local - labels. - -Tue May 19 16:59:44 1998 Nick Clifton - - * config/tc-d30v.c (d30v_align): Apply address adjustment to all - symbols at the given address, not just the last one specified. - -Tue May 19 08:25:19 1998 Catherine Moore - - * config/tc-sparc.c (sparc_handle_align): Use number_to_chars_bigendian - or number_to_chars_littleendian to write data. - -Mon May 18 17:09:30 1998 Nick Clifton - - * config/tc-v850.c (md_assemble): Remove artificially created - register name symbols. - -Mon May 18 13:47:06 1998 Doug Evans - - * write.c (fixup_segment): Change "segment" to "section" in - error message. - -Mon May 18 16:55:40 1998 Michael Meissner - - * write.c (fixup_segment): Change sym1-sym2 message again. - -Mon May 18 09:31:43 1998 Michael Meissner - - * write.c (fixup_segment): Improve error message for sym1-sym2 - errors when sym1 is in a different segment from sym2. - -Wed May 13 10:16:37 1998 Doug Evans - - * config/tc-m32r.c (warn_unmatched_high): New static local. - (OPTION_WARN_PARALLEL): Rename from OPTION_WARN. - (OPTION_NO_WARN_PARALLEL): Rename from OPTION_NO_WARN. - (md_longopts): Recognize --{no-,}warn-unmatched-high. - (md_parse_option): Likewise. - (md_show_usage): Likewise. - (m32r_frob_file): Likewise. - - * read.c (generate_file_debug,generate_lineno_debug): New functions. - (read_a_source_file): Call them. - * read.h (stabs_generate_asm_file): Declare. - * stabs.c (stabs_generate_asm_file): New function. - (generate_asm_file): New function. - (stabs_generate_asm_lineno): Move file name handling into - generate_asm_file. - -Tue May 12 12:03:44 1998 Richard Henderson - - * config/tc-d30v.c (cur_mul32_p, prev_mul32_p): Make static. - (d30v_current_align, d30v_current_align_seg): New variables. - (d30v_last_label): New variable. - (d30v_align, s_d30v_align, s_d30v_text): New functions. - (s_d30v_data, s_d30v_section): Likewise. - (md_pseudo_table): Call them. - (md_begin): Initialize d30v_current_align_seg. - (md_assemble): Call d30v_align when needed by known current alignment. - (d30v_frob_label, d30v_cons_align): New functions. - * config/tc-d30v.h (md_do_align): Remove. - (tc_frob_label): Call d30v_frob_label. - (md_cons_align): New. - - * config/tc-d30v.c (find_format): Convert complex expressions to - expression symbols before processing. Clean up code formatting. - -Sun May 10 22:35:02 1998 Jeffrey A Law (law@cygnus.com) - - * po/Make-in (install-info): New target. - -Thu May 7 15:49:07 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10200.c (md_assemble): Handle "bra" just like "jmp" - instructions. - * config/tc-mn10300.c (md_assemble): Likewise. - -Thu May 7 11:47:22 1998 Doug Evans - - * Makefile.am: Update with `make dep-am'. - (HFILES): Add cgen.h. - (cgen.o): Depend on cgen.h. - * Makefile.in: Regenerate. - - * cgen.c (cgen_md_apply_fix3): Don't pass newline to as_warn_where. - -Thu May 7 13:20:56 1998 Anders Blomdell - - * gasp.c (grab_label): Permit a label to be a preprocessor - variable by permitting a label to start with a backslash. - -Thu May 7 12:50:33 1998 Frank Ch. Eigler - - * config/tc-mips.c (validate_mips_insn): Removed hack - for previously inaccessible bitfields in some INSN_TRAP - instructions. - -Thu May 7 11:13:00 1998 Frank Ch. Eigler - - * config/tc-d30v.c (do_assemble): Abort with error message - if opcode operands do not match. - -Thu May 7 09:36:06 1998 Frank Ch. Eigler - - * config/tc-mips.c (macro_build, validate_mips_insn): Implement - 'q' operand format for 20-bit "break"/"sdbbp" instructions. - (mips_ip): Truncate overflowed "break" 'c' operand. Implement - similar new 'q' operand. - -Thu May 7 07:47:14 1998 Michael Meissner - - * cgen.c (cgen_asm_finish_insn): Fix typo. - -Thu May 7 02:19:14 1998 Doug Evans - - * cgen.h: New file. - * cgen.c: Include it. - (MAX_FIXUPS): Renamed to CGEN_MAX_FIXUPS. - (cgen_asm_finish_insn): Result is now void. New arg `result'. - All callers updated. - * config/tc-m32r.c: Include cgen.h. - (m23r_insn): New members num_fixups,fixups. - -Wed May 6 16:29:19 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-hppa.c (md_apply_fix): Slightly rework some code - to avoid compiler warning. - -Wed May 6 15:26:34 1998 Klaus Kaempf - - * makefile.vms: Run dec c with /nodebug. Pass CC value when - calling make. - - * makefile.vms (OBJS): Add ehopt.obj - -Wed May 6 15:11:12 1998 Klaus Kaempf - - * doc/c-vax.texi: Correct and extend vax/vms documentation. - -Wed May 6 11:51:51 1998 Richard Henderson - - * config/tc-d30v.c (do_assemble): Accept a new parameter requesting - a short format insn. - (md_assemble): Set it for explicitly packed insns. - -Tue May 5 13:23:13 1998 Nick Clifton - - * config/obj-coff.c (c_symbol_merge): Do not take address of - native fields when performing the memcpy. - -Tue May 5 13:10:41 1998 Gavin Koch - - * config/tc-mips.c (macro,macro2): Implement - M_DMULO_I, M_MULO_I, M_DMULOU_I, and M_MULOU_I. - -Mon May 4 17:49:14 1998 Andreas Schwab - - * config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Changed to keep - relocations against globally visible symbols. - * config/tc-m68k.c (relaxable_symbol): New macro. - (m68k_ip, md_estimate_size_before_relax): Use it. - (tc_m68k_fix_adjustable): Also handle weak symbols. - -Mon May 4 16:12:23 1998 Ian Lance Taylor - - * config/tc-i386.h (TC_RELOC_RTSYM_LOC_FIXUP): Keep relocs for all - references to externally visible symbols. - * config/tc-i386.c (md_apply_fix3): When OBJ_ELF, don't add the - values in twice for a PC relative reloc if the symbol is - externally defined. - - * config/tc-sparc.h (tc_fix_adjustable) [OBJ_AOUT]: When PIC, - don't adjust a PC relative reloc against an externally visible - symbol. - * config/tc-sparc.c (md_apply_fix3): When generating a.out PIC, - for a PC relative fixup against an externally visible defined - symbol, arrange to store object file and addend values as though - the symbol were not defined. - (tc_gen_reloc): Likewise. - -Thu Apr 30 13:09:39 1998 Fred Fish - - * read.c (sizeof_leb128): Referenced externally by write.c so - don't inline. - -Wed Apr 29 15:45:57 1998 Michael Meissner - - * config/tc-m32r.c ({,expand_}debug_sym): New functions to record - and expand a 'debug' symbol associated with the next instruction - that does not cause a short instruction to be filled with a NOP. - (md_pseudo_table): Add support for .debugsym. - (assemble_parallel_insn): Add calls to expand_debug_sym as - appropriate. - (md_assemble): Ditto. - -Tue Apr 28 19:16:26 1998 Tom Tromey - - * as.c (main): Conditionally call setlocale. - * gasp.c (main): Likewise. - * asintl.h: Include if HAVE_LOCALE_H. - (LC_MESSAGES): Now can be defined even when ENABLE_NLS. - -Tue Apr 28 18:33:23 1998 Frank Ch. Eigler - - * config/tc-d30v.c (md_show_usage): Correct gettext typo. - -Tue Apr 28 12:16:30 1998 Ian Lance Taylor - - * config/tc-hppa.c: Change all calls to bzero to use memset. - (pa_ip): Add cast to avoid warning. - (tc_gen_reloc, md_apply_fix): Likewise. - (pa_find_space_by_number): Likewise. - (hppa_force_relocation): Likewise. - (pa_block): Change i to unsigned int. - * config/obj-som.h (obj_som_copyright): Declare. - -Tue Apr 28 11:35:56 1998 Frank Ch. Eigler - - * ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno - for line numbers for assembly source. - -Mon Apr 27 15:58:46 1998 Ian Lance Taylor - - * configure.in: Change version number to 2.9.4 - * configure: Rebuild. - -Mon Apr 27 12:07:33 1998 Doug Evans - - * cgen.c (cgen_asm_finish_insn): New arg relax_p. All callers updated. - -Mon Apr 27 15:16:12 1998 Ian Lance Taylor - - * ecoff.h: Change symbolS in function declaration to struct - symbol. - -Sun Apr 26 13:44:22 1998 Ian Lance Taylor - - * config/tc-sh.c (parse_reg): Add casts to avoid warnings. - (md_convert_frag): Fix i18n typo. - -Sat Apr 25 20:12:02 1998 Richard Henderson - - * ecoff.c (ecoff_get_cur_proc_sym): New function. - * ecoff.h: Protoype it. - * config/tc-alpha.c [ELF] (s_alpha_prologue): New function. - [EVAX] (s_alpha_prologue): Delete. - (md_pseudo_table): Update. - -Sat Apr 25 14:00:52 1998 Ian Lance Taylor - - * config/tc-i960.c (md_assemble): Change bp_error_msg from static - array to local pointer. - (get_args, parse_expr): Add casts to avoid warnings. - -Fri Apr 24 12:47:42 1998 Philippe De Muyter - - * read.c (s_set): Cast xmalloc return value to fragS *. - * config/tc-m68k.c (m68k_ip): Function made static to match - previous forward declaration. - (insert_reg, init_regtable, md_convert_frag_1): Likewise. - -Fri Apr 24 09:26:46 1998 Nick Clifton - - * config/tc-v850.c: Add internationalisation macros to error - strings. - - * config/tc-m32r.c (can_make_parallel): Add internationalisation - macros to error strings. - -Thu Apr 23 19:23:23 1998 Ian Lance Taylor - - * config/tc-ppc.c (ppc_fix_adjustable): Correct test of whether a - reloc is in the TOC csect. - (md_apply_fix3): Correct gettext typo. - -Thu Apr 23 14:58:31 1998 Nick Clifton - - * config/tc-arm.c (find_real_start): Ignore symbols starting with - .L - they are local labels and the branches are not really - function calls but rather far jumps. - -Wed Apr 22 15:57:21 1998 Tom Tromey - - * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). - -Wed Apr 22 14:52:36 1998 Ian Lance Taylor - - * config/tc-i386.c (md_assemble): Print operand number rather than - using ordinal_names. - (i386_operand): Likewise. - -Tue Apr 21 22:34:25 1998 Tom Tromey - - * Makefile.am (INTLLIBS): Define to work around apparent automake - bug. - All Makefiles: Regenerated. - - * Many files: Added gettext invocations around user-visible - strings. - * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, - HAVE_LC_MESSAGES): Define. - * dep-in.sed: Added asintl.h. - * po/Make-in: New file. - * gasp.c (main): Call setlocale, bindtextdomain, and textdomain. - Include "asintl.h". - * read.c (Z_): Renamed from `_'. - * Makefile.am (SUBDIRS): Added po. - (POTFILES): new macro. - (po/POTFILES.in): New target. - ($(OBJS)): Added asintl.h. - (HFILES): Likewise. - (INCLUDES): Added -DLOCALEDIR, -I$(top_srcdir)/../intl. - (as_new_LDADD): Added $(INTLLIBS). - (as_new_DEPENDENCIES): Added $(INTLDEPS). - (gasp_new_LDADD): Added $(INTLLIBS). - (gasp_new_DEPENDENCIES): New macro. - * configure, aclocal.m4: Rebuilt. - * configure.in: Call CY_GNU_GETTEXT. Generate po/Makefile.in and - po/Makefile. - (ALL_LINGUAS): Define. - * macro.c: Include "asintl.h". - * as.c (main): Call setlocale, bindtextdomain, and textdomain. - * as.h: Include "asintl.h". - * config/tc-i386.c (ordinal_names): Removed. - (md_assemble): Changed error text to avoid ordinal_names. - (i386_operand): Likewise. - (reloc): Added as_bad to avoid i18n problems. - (tc_gen_reloc): Likewise. - * config/tc-arm.c (bad_args): Now a #define. - (bad_pc): Likewise. - * config/obj-vms.c (VMS_stab_parse): Changed type of - `long_const_msg'. - (global_symbol_directory): Unified strings to avoid i18n - problems. - * config/tc-m68k.c (get_reloc_code): Added some as_bad calls to - avoid i18n problems. - * config/tc-ns32k.c (reloc): Added as_bad to avoid i18n problems. - * config/tc-ppc.c (md_apply_fix3): Added as_bad_where to avoid - i18n problems. - * config/tc-sh.c (md_convert_frag): Added as_bad to avoid i18n - problems. - * config/tc-v850.c (md_assemble): Changed C++ comment into C - comment. - * config/tc-vax.c (md_assemble): Added as_warn to avoid i18n - problems. - * as.c (print_version_id): Added an fprintf to avoid i18n - problems. - * cond.c (cond_finish_check): Added as_bad call to avoid i18n - problems. - * expr.c (expr): Added as_warn call to avoid i18n problems. - * messages.c (as_assert): Changed code to avoid i18n problems. - (as_abort): Likewise. - * read.c (pseudo_set): Added as_bad call to avoid i18n problems. - (s_space): Likewise. - * po/Make-in, po/POTFILES.in, po/gas.pot: New files. - -Tue Apr 21 17:01:22 1998 Alan Modra - - * config/tc-i386.c (check_prefix): New static function, split out - from md_assemble. - (struct _i386_insn): Add wait_prefix field. - (md_assemble): Remove wait_prefix local variable. Use - check_prefix when adding a prefix. - - * config/tc-i386.c (current_templates): New static variable. - (md_assemble): Remove current_templates local variable. - (md_assemble, i386_operand): Improve error and warning messages in - many places. Add RESTORE_END_STRING in many places before error - return. Clarify some comments. - - * config/tc-i386.c (struct _i386_insn): Change seg field to a two - element array. - (md_assemble): Parse string instruction operands, looking for - segment override prefixes. Check for invalid segment prefixes on - string instruction. - (i386_operand): i.seg[] and max mem_operand changes for string - insns. - * config/tc-i386.h (EsSeg): Define. - - * config/tc-i386.h (regKludge): Define. - (iclrKludge, imulKludge): Don't define. - * config/tc-i386.c (md_assemble): Merge imulKludge and iclrKludge - code. Move ReverseRegRegmem fudges into Modrm case. Reorder - opcode_modifier checks to look for more common cases first. Add - default_seg for IsString case. - -Tue Apr 21 16:18:12 1998 Ian Lance Taylor - - * configure.in: Call AM_PROG_LEX rather than AC_PROG_LEX and - AC_DECL_YYTEXT. - * configure: Rebuild with new automake and libtool. - * aclocal.m4, Makefile.in: Likewise. - - * doc/Makefile.am (as.dvi): New target. - * doc/Makefile.in: Rebuild. - -Sat Apr 18 01:21:04 1998 Stan Cox - - * configure.in: Added sparc86x support. - - * configure: Rebuild. - - * config/tc-sparc.c (lookup_arch): Added arch_type to struct - sparc_arch. - (md_parse_option): Warn if -EL is not supported for this architecture. - - * config/tc-sparc.h (SPARC_BIENDIAN) Always define. - -Sat Apr 18 01:19:01 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mips.c (mips_ip): Note when we use get match on - the full instruction name. - -Wed Apr 15 15:17:27 1998 Richard Henderson - - * symbols.c (resolve_symbol_value) [O_symbol]: Also store the symbol - back into the expression to handle add/sub simplification correctly. - -Wed Apr 15 07:06:04 1998 Catherine Moore - - * config/tc-mips.c (hilo_interlocks): Remove 4300. - -Mon Apr 13 16:51:04 1998 Nick Clifton - - * config/tc-arm.c (do_msr): Support undocumented 'msr cpsr_flg, - #' instruction. - -Thu Apr 9 10:29:42 1998 Doug Evans - - * symbols.c (max_indent_level): New global. - (print_symbol_value_1): Use it. - * expr.h (expr_build_dot): Declare. - * expr.c (expr_build_dot): New function. - -Wed Apr 8 16:16:11 1998 Doug Evans - - * symbols.c (print_binary): New function. - (print_expr_1): Call it. - -Mon Apr 6 12:06:39 1998 Andreas Schwab - - * config/tc-m68k.c (m68k_ip, case "#B"): Install the offset of the - operand in the opcode. - -Fri Apr 3 11:58:19 1998 Alan Modra - - * config/tc-i386.h: Reorder operand flags and opcode modifier - flags for clarity. Remove unused definitions: Unknown, - ImmUnknown, DispUnknown, NoModrm. - * config/tc-i386.c (type_names): Add missing Debug type. - (md_assemble): Better duplicate prefix checking. Quicker string - instruction check via new opcode_modifier flag. - -Fri Apr 3 11:44:34 1998 Ian Lance Taylor - - * doc/as.texinfo (Invoking): Clarify -Wa example. - -Fri Apr 3 09:12:23 1998 Gavin Koch - - * config/tc-mips.c (mips_pseudo_table): Add weakext entry. - (s_mips_weakext): Define. - * ecoff.c (ecoff_directive_weakext): Don't define if defined(TC_MIPS). - * config/obj-ecoff.c (obj_pseudo_table): Don't add weakext if - defined(TC_MIPS). - -Thu Apr 2 22:42:02 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mn10200.c (tc_gen_reloc): The difference of two symbols - is an error if the value can not be computed at assembly time. - * config/tc-mn10300.c (tc_gen-reloc): Likewise. - -Thu Apr 2 16:36:47 1998 Ian Lance Taylor - - * gasp.c (main): Set next field of new include_path structure to - NULL. From Avery Pennarun . - - * read.c (s_mri_sect): Call as_bad rather than abort for an - unsupported MRI target. - -Wed Apr 1 11:08:27 1998 Nick Clifton - - * config/tc-arm.c (arm_validate_fix): New function. Determine if - the destination of a branch instruction should be altered. - (find_real_start): New function: Locate the real, Thumb coded - start of a Thumb function. - (do_t_branch23): Alter the destination of branches to Thumb - functions. - - * config/tc-arm.h: Define TC_VALIDATE_FIX. - -Tue Mar 31 13:27:33 1998 Dean M. Deaver - - * config/tc-arm.c (decode_shift): Handle addressing mode 2 w/rrx - also. - -Wed Apr 1 13:13:20 1998 Andreas Schwab - - * doc/as.texinfo: Use @itemx for a secondary item in a table. - * doc/c-hppa.texi: Likewise. - -Tue Mar 31 17:52:40 1998 Ian Lance Taylor - - * Makefile.am: Rebuild dependencies. - * Makefile.in: Rebuild. - - * Makefile.am (DEP_INCLUDES): New variable. - (.dep1): Change to work when srcdir is not an absolute path. - (.tcdep, .objdep, .dep2, dep.sed): Likewise. - * Makefile.in: Rebuild. - -Mon Mar 30 12:46:48 1998 Ian Lance Taylor - - * config/tc-i386.h, config/tc-i386.c: Revert March 24 - LinearAddress patch. - - * configure.in: Set version to 2.9.1. - * configure: Rebuild. - - * Branched binutils 2.9. - -Mon Mar 30 11:22:08 1998 Alan Modra - - * config/tc-i386.h (FWait): Define. - * config/tc-i386.c (md_assemble): Emit fwait prefix before any - other prefixes. Check FWait flag in opcode table to see which - instructions require an fwait prefix. - -Mon Mar 30 10:12:00 1998 Andreas Schwab - - * stabs.c (get_stab_string_offset): Always create a stab string - section. - -Sat Mar 28 22:28:02 1998 Ian Lance Taylor - - Fix some gcc -Wall warnings: - * atof-generic.c (atof_generic): Add casts to avoid warnings. - * ehopt.c (eh_frame_code_alignment): Likewise. - * expr.c (integer_constant, operand): Likewise. - * frags.c (frag_align): Likewise. - * gasp.c (level_0, change_base, doinstr): Likewise. - * hash.c (hash_ask): Likewise. - * listing.c (listing_page, calc_hex, print_lines): Likewise. - (debugging_pseudo): Likewise. - * macro.c (define_macro, check_macro): Likewise. - * read.c (read_a_source_file, s_align, s_float_space): Likewise. - (ignore_rest_of_line, float_cons): Likewise. - * symbols.c (decode_local_label_name): Likewise. - * write.c (record_alignment, cvs_frag_to_fill): Likewise. - (fixup_segment, number_to_chars_bigendian): Likewise. - (number_to_chars_littleendian): Likewise. - * config/atof-ieee.c (gen_to_words): Likewise. - * config/tc-sparc.c (md_begin, md_assemble): Likewise. - (sparc_ip, parse_keyword_arg, s_common): Likewise. - * read.c (output_big_sleb128): Initialize locals to avoid - warnings. - (output_big_uleb128, equals): Likewise. - * atof-generic.c (atof_generic): Change number_of_digits_* locals - to unsigned int. Change zeros to unsigned int. - * cond.c (s_if): Add return to default case. - * frags.c (frag_now_fix): Change return type to addressT. - * frags.h (frag_now_fix): Update declaration. - * listing.c (file_info_struct): Change linenum to unsigned int. - (struct list_info_struct): Change hll_line to unsigned int. - (print_source): Update format string. - * read.c (emit_expr): Change scan to unsigned int, and don't - bother to initialize it. - * symbols.c (dollar_label_count): Change to unsigned long. - * write.c (adjust_reloc_syms): Remove unused label reduce_fixup. - * config/tc-sparc.c (sparc_memory_model): Only define if OBJ_ELF. - * config/tc-sparc.c (tc_gen_reloc): Add return to default case. - -Fri Mar 27 12:46:47 1998 Ian Lance Taylor - - * config/tc-m68k.c (m68k_ip): Check legal addressing modes for - mcf5200 just as we do for m68000. - (m68k_init_after_args): Likewise. - (md_estimate_size_before_relax): Likewise. - -Fri Mar 27 10:30:01 1998 Catherine Moore - - * config/tc-v850.c (md_assemble): Store relocation addend in - fixup instead of instruction. - -Thu Mar 26 23:07:18 1998 Alan Modra - - * config/tc-i386.c (md_assemble): Swap template arguments to - CONSISTENT_REGISTER_MATCH macro in reverse direction test. - This macro is currently symmetric, so passing them the wrong - way didn't cause any problem, but may if the macro is changed - in the future. - After copying template to i.tm, use i.tm. rather than t-> to - access fields, and make t a const* - Move i.tm.operand_types[] swap to immediately after the copy. - -Wed Mar 25 13:44:18 1998 Doug Evans - - * expr.h (expr_build_uconstant): Add prototype. - (expr_build_unary,expr_build_binary): Add prototypes. - * expr.c (expr_build_uconstant): New function. - (expr_build_unary,expr_build_binary): New functions. - -Wed Mar 25 13:10:42 1998 Bruno Haible - - * gasp.c (IS*): Cast argument to unsigned char, not unsigned int. - * macro.c (macro_expand_body): Increase buffer size. - * messages.c (as_warn): Likewise. - (as_warn_where, as_bad, as_bad_where): Likewise. - -Wed Mar 25 12:59:07 1998 Ian Lance Taylor - - Based on patch from H.J. Lu : - * Makefile.am (DISTSTUFF): New variable. - (diststuff): New target. - * Makefile.in: Rebuild. - -Tue Mar 24 16:51:29 1998 Nick Clifton - - * config/tc-m32r.h (md_cleanup, md_elf_section_change_hook): Call - m32r_elf_section_change_hook. - - * config/tc-m32r.c (m32r_elf_section_change_hook): New function to - emit a nop if a section ends with a 16 bit instruction. - -Tue Mar 24 19:48:09 1998 Ian Lance Taylor - - * config/obj-coff.c (obj_coff_bss): Compile unconditionally. Call - s_lcomm rather than obj_coff_lcomm. - (obj_pseudo_table): Compile .bss pseudo-op unconditionally. - -Tue Mar 24 18:30:58 1998 H.J. Lu - - * config/tc-i386.h (LinearAddress): Define. - * config/tc-i386.c (md_assemble): If LinearAddress is set for the - instruction, don't use a default segment. - -Mon Mar 23 18:53:40 1998 Joel Sherrill - - * configure.in: (sh*-*-rtems*): Switched from ELF to COFF. - * configure: Rebuild. - -Fri Mar 20 19:15:44 1998 Ian Lance Taylor - - * aclocal.m4, configure: Rebuild with libtool 1.2. - -Thu Mar 19 16:03:12 1998 Nick Clifton - - * config/tc-arm.c (md_apply_fix3): fix code to test the range of - PC relative branches. Patch courtesy of Jonathan Walton. - - -Wed Mar 18 09:29:51 1998 Nick Clifton - - * configure.in (emulations): Add thumb-pe target. - - * configure (emulations): Add thumb-pe target. - -1998-03-17 Ken Raeburn - - * itbl-lex.l (yywrap): Don't define if already defined as a - macro. - -Fri Mar 13 16:31:38 1998 Tom Tromey - - * depend.c (quote_string_for_make): New function. - (wrap_output): Use it. - -Thu Mar 12 18:28:22 1998 Nick Clifton - - * config/obj-elf.c (obj_elf_section): Set bss flag in seg_info - structure if type is SHT_NOBITS. [Bug fix courtesy of rth] - -Sat Feb 28 17:28:55 1998 Richard Henderson - - * config/tc-alpha.c (md_shortopts, md_longopts, md_parse_option): - Recognize -GN and -relax. - (md_begin): Initialize gp size from -G switch. - (alpha_force_relocation): Always force if -relax. - (alpha_align): Take a new argument that will specify when to - emit an R_ALPHA_ALIGN relocation (though we don't do that now). - Change all callers. Emit nop alignment padding as nop+unop pair. - -Sat Feb 28 17:06:22 1998 Richard Henderson - - * config/obj-elf.c [TC_ALPHA]: Include . - * config/tc-alpha.h (ELF_TC_SPECIAL_SECTIONS): New. - -Thu Feb 26 15:49:04 1998 Michael Meissner - - * config/tc-d30v.c (write_2_short): Delayed jsr instructions don't - require padding to the next long word boundary. - -Mon Feb 23 11:29:06 1998 Doug Evans - - * cgen.c: #include symcat.h. - * config/tc-m32r.c: Likewise. - -Mon Feb 23 10:27:40 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mips.c (mips_ip, case 'P'): Make 'P' arguments be - absolute expressions instead of '$' prefixed register names. - -Sat Feb 21 22:36:52 1998 Richard Henderson - - * read.c (s_set): Record file and line info for symbols when -as. - (pseudo_set): Don't overwrite that dummy fragment. - -Fri Feb 20 15:03:13 1998 Ian Lance Taylor - - * config/tc-ppc.c (md_pseudo_table): Add "section". - (ppc_named_section): New static function. - -Thu Feb 19 22:25:42 1998 Richard Henderson - - * tc-ppc.c (ppc_biei): Cache the last symbol we inserted - so we don't have to scan the entire list. - -Tue Feb 17 17:02:15 1998 Fred Fish - - * config/tc-d30v.c (parallel_ok): For the explicitly parallel - case, allow the parallel instructions to modify the same flag - bits. - -Thu Feb 19 16:08:15 1998 Richard Henderson - - * listing.c (list_symbol_table): Categorize symbols by - undefined_section rather than sy_frag->line == NULL. - -Wed Feb 18 23:39:46 1998 Richard Henderson - - * Makefile.am (install-exec-local): Install properly when ln - fails or tooldir == prefix. - -Tue Feb 17 18:58:51 1998 Doug Evans - - * cgen.c (cgen_md_apply_fix3): Delete call to validate_operand. - Test result of insert_operand for error. - -Fri Feb 13 16:41:42 1998 Ian Lance Taylor - - * Makefile.am (AUTOMAKE_OPTIONS): Add cygnus. - * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. - * doc/Makefile.am (AUTOMAKE_OPTIONS): Define. - * doc/Makefile.in: Rebuild. - -Fri Feb 13 00:47:44 1998 Ian Lance Taylor - - * config/tc-mips.c (macro_build): Handle operand type 'C'. - (macro): Fix handling of M_COP[0-3]. - -Thu Feb 12 14:06:59 1998 Ian Lance Taylor - - Based on patches from Ross Harvey : - * macro.c (ISSEP): Only treat '<' and '>' as separator characters - if macro_alternate or macro_mri. - (getstring): Remove support for byte constants between < and >. - (get_any_string): '<' only starts a string if macro_alternate or - macro_mri. - (macro_expand_body): Permit keyword parameters following - positional parameters. - - NetBSD patches from Gordon W. Ross : - * configure.in (alpha*-*-netbsd*): New target. - * config/te-nbsd.h (LOCAL_LABELS_FB): Define. - * configure: Rebuild. - - * as.h (flag_warn_suppress_instructionswap): Move from here... - * config/tc-d10v.c (flag_warn_suppress_instructionswap): ...to - here, and make static. - - * ehopt.c (eh_frame_code_alignment): Only use seg_info if - BFD_ASSEMBLER or MANY_SEGMENTS. - - * as.c (show_usage): Update bug-gnu-utils address. - * gasp.c (show_usage): Likewise. - * doc/as.texinfo (Bug Reporting): Likewise. - -Wed Feb 11 23:26:28 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mips.c (load_address): Don't use mips III or mips IV - insns regardless of the size of a pointer if we're in mips I or - MIPS II mode. - (macro, macro2, s_cprestore, s_cpadd): Likewise. - -Thu Feb 12 03:41:00 1998 J"orn Rennecke - -Fix rac to accept only a0: - * tc-d10v.c (parallel_ok, find_opcode): - Split OPERAND_ACC into OPERAND_ACC0 and OPERAND_ACC1. - Introduce OPERAND_GPR. - -Wed Feb 11 16:28:13 1998 Richard Henderson - - * read.c (s_fill): Handle non-constant repeat counts by creating - an rs_space fragment. - -Tue Feb 10 18:31:31 1998 Ian Lance Taylor - - * config/tc-i386.c (i386_operand): Change error added Jan 2 1998 - from as_bad to as_warn. - -Tue Feb 10 18:04:00 1998 Jim Lemke - - * as.c: (perform_an_assembly_pass): Use [TEXT|DATA|BSS]_SECTION_NAME - * as.h: Define default values of [TEXT|DATA|BSS]_SECTION_NAME - * config/obj-elf.c (elf_begin): Use [TEXT|DATA|BSS]_SECTION_NAME - -Tue Feb 10 17:58:18 1998 Ian Lance Taylor - - * ehopt.c (eh_frame_code_alignment): If not BFD_ASSEMBLER, use - seg_fix_rotP rather than fix_root from seg_info. - -Tue Feb 10 15:32:22 1998 Ian Carmichael - - * expr.c: Add support for 0x1_2_3_4 bignums. - -Tue Feb 10 14:43:40 1998 Ian Lance Taylor - - * configure.in: Change -linux* to -linux-gnu*. - * configure: Rebuild. - - * app.c (do_scrub_begin): Treat \r as whitespace. - -Mon Feb 9 14:16:11 1998 Ian Lance Taylor - - * Makefile.am: Update dependencies. - * Makefile.in: Rebuild. - -Sat Feb 7 15:33:51 1998 Ian Lance Taylor - - * configure, aclocal.m4: Rebuild with new libtool. - -Fri Feb 6 16:08:30 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mips.c (md_begin): If mips_cpu is set, then use it as - the argument to bfd_set_arch_mach. - (load_address): Use bfd_arch_bits_per_address to determine the - bit size of an address instead of looking at the isa level. - (macro, macro2, s_cprestore, s_cpadd): Likewise. - -Fri Feb 6 14:44:34 1998 Nick Clifton - - * config/tc-v850.c (md_parse_option): Add -mv850any command line option. - -Thu Feb 5 12:39:08 1998 Ian Lance Taylor - - * ehopt.c: New file. - * as.h (enum _relax_state): Add rs_cfa. - (check_eh_frame, eh_frame_estimate_size_before_relax): Declare. - (eh_frame_relax_frag, eh_frame_convert_frag): Declare. - * read.c (emit_expr): Call check_eh_frame. - * write.c (cvt_frag_to_fill): Handle rs_cfa. - (relax_segment): Likewise. - * Makefile.am: Rebuild dependencies. - (GAS_CFILES): Add ehopt.c. - (GENERIC_OBJS): Add ehopt.o. - * doc/internals.texi (Frags): Document rs_cfa. - - * as.c (show_usage): Mention --traditional-format. - (parse_args): Accept --traditional-format. - * as.h (flag_traditional_format): Declare. - * output-file.c (output_file_create): If flag_traditional_format, - set BFD_TRADITIONAL_FORMAT on stdoutput. - * doc/as.texinfo, doc/as.1: Document --traditional-format. - - * config/tc-mips.c (append_insn): Make sure that if we have a - fixup for an unmatched %hi reloc, it does not associated with a - variant frag. - - * configure, Makefile.in, aclocal.m4: Rebuild with new libtool. - * doc/Makefile.in: Likewise. - -Wed Feb 4 15:41:54 1998 Nick Clifton - - * config/tc-m32r.c (check_for_side_effects): New function. - (can_make_parallel): Add checks for instruction side effects - clashing with the other instruction. - (assemble_parallel_insn): Improve warning messages. Return error - message from non-swapped instruction order. - -Wed Feb 4 20:00:26 1998 James G. Smith - - * config/tc-arm.c: Rename arm_after_pass_hook() to arm_cleanup(). - - * config/tc-arm.h: Replace md_after_pass_hook definition with a - md_cleanup definition. This moves the forced literal output to - the end of the source pass, and avoids macro's inserting literals - into the code immediately after the macro expansion. - -Wed Feb 4 13:17:19 1998 Ian Lance Taylor - - * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: A reloc against - a gas internal symbol is adjustable. - * config/tc-ppc.h (tc_fix_adjustable): Likewise. - - * as.h: If gcc version greater than 2.6, use `__format__' and - `__printf__' in function attributes, rather than `format' and - `printf'. - -Mon Feb 2 18:38:18 1998 Ian Lance Taylor - - * config/tc-sparc.c: Only include elf/sparc.h if OBJ_ELF. - -Mon Feb 2 18:30:34 1998 Steve Haworth - - Add tms320c30 support: - * config/tc-tic30.h: New file. - * config/tc-tic30.c: New file. - * config/obj-coff.h: If TC_TIC30, include coff/tic30.h and define - TARGET_FORMAT as "coff-tic30". - * configure.in (tic30-*-*aout*, tic30-*-*coff*): New targets. - * Makefile.am: Rebuild dependencies. - (CPU_TYPES): Add tic30. - (CPU_OBJ_VALID): tic30-aout is valid. - (TARGET_CPU_CFILES): Add config/tc-tic30.c. - (TARGET_CPU_HFILES): Add config/tc-tic30.h. - * configure, Makefile.in: Rebuild. - -Mon Feb 2 10:20:37 1998 Nick Clifton - - * config/tc-v850.c (md_assemble): Improvements to error messages. - -Mon Feb 2 12:39:05 1998 Geoff Keating - - * config/tc-ppc.c (md_apply_fix3): Change BFD_RELOC_HI16 and - BFD_RELOC_HI16_S to store the high bits of any value. - - * config/tc-ppc.h (tc_fix_adjustable): Undo change of Fri Jun 27. - (TC_RELOC_RTSYM_LOC_FIXUP): Don't let the - assembler calculate relocations to any external symbol at all. - * config/tc-ppc.c (md_apply_fix3) [OBJ_ELF]: Correct bugs - involving generation of pc-relative relocs. - (md_pcrel_from_section) [OBJ_ELF]: The job this code used to do - has been moved to md_apply_fix3. - - * config/tc-ppc.c (md_apply_fix3): Fix test for too-far branch. - (ppc_elf_suffix): Warn about 'identifier+constant@got' syntax, - which actually means (the address of identifier's GOT entry) + - constant, which is not particularly useful. - -Fri Jan 30 11:02:35 1998 Doug Evans - - * read.h (include_dirs): Declare. - (include_dir_count,include_dir_maxlen): Declare. - -Fri Jan 30 11:47:02 1998 Ian Lance Taylor - - * configure.in: Correct check for shared opcodes library. - * configure: Rebuild. - - * listing.c (buffer_line): If we can't open the file, set at_end. - (listing_print): Remove unused local variable fi. - - * config/m68k-parse.y (reglistpair): Handle register list in - either order. - - * config/vms-conf.h: Don't undef VERSION. - -Thu Jan 29 14:42:44 1998 Pat Rankin - - * Makefile.am (CONFIG_OBJS): New variable, containing part of old - OBJS variable. - (GENERIC_OBJS): New variable, with the rest of the old OBJS - variable. - (OBJS): Now just $(CONFIG_OBJS) and $(GENERIC_OBJS). - ($(srcdir)/make-gas.com): Rename from make-gas.com. - (stamp-mk.com): Replace $(OBJS) with $(GENERIC_OBJS). - (EXTRA_DIST): Define. - * vmsconf.sh: Handle {targ-cpu, obj-format, atof-targ} modules - explicitly rather than via the list of object files. - (gcc-as.opt): New file created when make-gas.com is run. - * config-gas.com: Create {targ-cpu.h, obj-format.h, targ-env.h, - itbl-cpu.h} to #include appropriate file rather than copying that - file. - * config/vms-conf.h: Synchronize with current config.in. - * Makefile.in: Rebuild. - -Thu Jan 29 18:48:19 1998 Bill Moyer - - * config/tc-d30v.c (do_assemble): Added flag_explicitly_parallel. - (parallel_ok): Relaxed parallel subinstruction dependency check. - -Wed Jan 28 14:35:00 1998 Bill Moyer - - * as.h (flag_warn_suppress_instructionswap): added new flag. - * tc-d10v.c (md_parse_option,md_longopts): added "--nowarnswap" - command line argument. - * tc-d10v.c (write_2_short): emit "Swapping instructions" - warning only if flag_warn_suppress_instructionswap is false. - -Wed Jan 28 16:41:19 1998 J.J. van der Heijden - - * configure.in (i386-*-mingw32*): New target. - * configure: Rebuild. - -Wed Jan 28 14:51:18 1998 Ian Lance Taylor - - * symbols.c (resolve_symbol_value): Don't set the segment if it - hasn't changed, and this is OBJ_AOUT without BFD_ASSEMBLER. - - * config/obj-aout.h (S_IS_LOCAL): Correct typo--pass argument to - S_GET_SEGMENT. - -Wed Jan 28 13:54:50 1998 Pat Rankin - - as.h (unlink): Reverse 13-Feb-97 change; use of unlink vs remove - depends upon HAVE_{UNLINK,REMOVE} values rather than host - compiler. - -Wed Jan 28 13:48:08 1998 Ian Lance Taylor - - * config/obj-coff.h (RESOLVE_SYMBOL_REDEFINITION): Define. - -Wed Jan 28 09:52:00 1998 Nick Clifton - - * config/tc-v850.c (v850_insert_operand): Display instruction when - an error is encountered. - -Tue Jan 27 13:32:01 1998 Robert Lipe - - * configure.in (i386-*-sco3.2v5*): Defaults to ELF now. - (i386-*-sco3.2v5*coff): New target. - (i386-*-sco3.2*): New target. - * configure: Rebuild. - -Tue Jan 27 11:06:52 1998 Nick Clifton - - * config/tc-v850.c: Tidy error message production. - -Tue Jan 27 12:24:32 1998 Ian Lance Taylor - - * config/tc-arm.c (md_apply_fix3): Add new variable newimm to hold - validate_immediate return value in the right type for comparisons - to FAIL. - -Tue Jan 27 06:51:59 1998 Richard Henderson - - * listing.c (MAX_BYTES): Use listing variables not constants. - (data_buffer): No longer an array, but a pointer. - (calc_hex): sizeof(data_buffer) -> MAX_BYTES. - (listing_listing): Allocate data_buffer. - -Tue Jan 27 06:38:35 1998 Richard Henderson - - * as.c (parse_args): Add --listing-lhs-width, --listing-lhs-width2, - --listing-rhs-width, --listing-cont-lines. - (show_usage): Update. - * listing.c (listing_lhs_width, listing_lhs_width_second): New vars. - (listing_lhs_cont_lines, listing_rhs_width): New vars. - (print_lines): Use the variables instead of the constants. - (listing_listing): Likewise. - * listing.h: Declare the new vars. - -Tue Jan 27 05:32:05 1998 Richard Henderson - - * as.c (parse_args): Add --keep-locals alias for -L. - Add --strip-local-absolute. - (show_usage): Update. - * as.h (flag_strip_local_absolute): New flag. - * symbols.c (S_IS_LOCAL): Use it. - * config/obj-aout.h (S_IS_LOCAL): Likewise. - * config/obj-bout.h (S_IS_LOCAL): Likewise. - * config/obj-coff.h (S_IS_LOCAL): Likewise. - -Mon Jan 26 13:07:41 1998 Nick Clifton - - * config/tc-m32r.c: Detect if explicitly parallel instructions - might have an io conflict and issue a warning message. - -Thu Jan 22 17:51:44 1998 Nick Clifton - - * cgen.c (cgen_save_fixups, cgen_restore_fixups, - cgen_swap_fixups): Functions to save, restore and swap the fixup - chain with a backup copy. - (cgen_asm_finish_insn): Returns address of constructed insn. - -Wed Jan 21 16:49:10 1998 Richard Henderson - - * listing.c (file_info_struct): Remove FILE, add POS. - (last_open_file_info, last_open_file): New; a one entry FILE* cache. - (file_info): Don't open the file. - (buffer_line): Check for the file in the last_open cache, updating - as necessary. - (print_source): Don't reference file_info->file. - (listing_listing): Likewise. - (listing_print): Close the file in the cache, if any. - -Fri Jan 16 14:51:48 1998 Ian Lance Taylor - - * read.c (dwarf_file_string): New file static variable. - (emit_expr): Look for constant sequence that leads up to a file - name in DWARF debugging output. - (stringer): Use dwarf_file_string to decide whether to accept a - string as a file name. - -Fri Jan 16 11:30:37 1998 Richard Henderson - - * tc-m68k.c (m68k_ip): Remove absl->reglst MRI hack. - (crack_operand): Add reg->reglst MRI hack. - (r_seg): Put reglst symbols in reg_section. - (m68k_frob_symbol): Frob reglst symbols into absolute_section. - -Thu Jan 15 14:19:01 1998 Richard Henderson - - * tc-sh.c (get_specific): Handle SGR & DBR. - -Thu Jan 15 13:46:48 1998 Richard Henderson - - * tc-h8300.c (parse_reg): Take the length of the symbol into - account when attempting to match a register name. - * tc-h8500.c (parse_reg): Likewise. - -Wed Jan 14 17:52:33 1998 Nick Clifton - - * cgen.c: Formatting changes to improve readability. - -Wed Jan 14 15:41:41 1998 Jeffrey A Law (law@cygnus.com) - - * config/tc-mips.c (macro): Rework division code to avoid unfilled - delay slot. - -Wed Jan 14 18:04:20 1998 Michael Meissner - - Based on a patch from Jim Wilson - * config/tc-d30v.c (do_assemble): Remove non-ansi default case. - (tc_gen_reloc): Handle cross section PC relative relocs - correctly. - -Wed Jan 14 15:02:19 1998 Doug Evans - - * config/tc-mips.c (mips_ip): Don't test pinfo flags if INSN_MACRO. - -Mon Jan 12 13:04:57 1998 Doug Evans - - * cgen.c: #include setjmp.h. Clean up pass over `struct foo' usage. - (expr_jmp_buf): New static local. - (cgen_parse_operand): Allow use of longjmp in parsing to handle errors. - (cgen_md_operand): New function. - * tc-m32r.c: Clean up pass over `struct foo' usage. - (md_estimate_size_before_relax): Use CGEN_INSN_MNEMONIC. - -Tue Jan 6 15:36:02 1998 Richard Henderson - - * symbols.c (S_SET_SEGMENT): Don't set the segment for section syms. - (S_IS_EXTERNAL, S_IS_LOCAL): Correct parenthetication. +2000-01-03 Martin v. Loewis -Fri Jan 2 16:08:54 1998 Ian Lance Taylor + * config/obj-elf.c (elf_pseudo_table): Define visibility pseudos. + (obj_elf_visibility): New function. - * config/tc-i386.c (i386_operand): Give an error if there are - unrecognized characters after an expression. + * doc/as.texinfo (Visibility): New node: document visibility + pseudo ops. -For older changes see ChangeLog-9697 +For older changes see ChangeLog-9899 diff --git a/contrib/binutils/gas/ChangeLog-9697 b/contrib/binutils/gas/ChangeLog-9697 index dd2af82..7b93733 100644 --- a/contrib/binutils/gas/ChangeLog-9697 +++ b/contrib/binutils/gas/ChangeLog-9697 @@ -98,7 +98,6 @@ Mon Dec 15 15:20:32 1997 Nick Clifton * doc/c-m32r.texi: New file, documenting m32r specific features. - Mon Dec 15 10:32:28 1997 Jeffrey A Law (law@cygnus.com) * config/tc-mips.c (mips_ip): Correctly insert 'P' operands into diff --git a/contrib/binutils/gas/ChangeLog-9899 b/contrib/binutils/gas/ChangeLog-9899 new file mode 100644 index 0000000..a853b88 --- /dev/null +++ b/contrib/binutils/gas/ChangeLog-9899 @@ -0,0 +1,4854 @@ +1999-12-22 Philip Blundell + + * config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate + hook function when changing sections. + (arm_s_data): Likewise. + +1999-12-14 Nick Clifton + + * config/tc-arm.c (md_parse_option): Add support for -marm720 + command line switch. + +Tue Nov 30 22:59:00 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (md_pseudo_table): Add ".am33" pseudo-op. + (r_registers, xr_registers): Define. + (r_register_name, xr_register_name): New functions. + (md_assemble): Handle new am33 operand types and instruction + formats. + (mn10300_insert_operand, check_operand): Likewise. + +1999-11-29 Nick Clifton + + * config/tc-arm.c (thumb_mode): Turn into a tristate variable. + (s_force_thumb): Set thumb_mode to 2. + (md_assemble): Do not complain about thumb instructions on a + non-thumb target if thumb_mode is set to 2. + +1999-11-28 Michael Meissner + + * config/tc-alpha.c (toplevel): Include struc-symbol.h. + (alpha_macro_arg): Add MACRO_{LITERAL,BASE,BYTOFF,JSR} cases. + (O_...): Add new machine dependent expressions if we are handling + explicit relocations. + (alpha_reloc_op): New static table holding the explicit relocation + information. + (alpha_literal_hash): New static to hold the hash table for + explicit relocations. + (alpha_macros): Add support for explicit relocations. + (md_begin): If explicit relocations, initialize hash table. + (md_assemble): Don't print a second error if tokenize_arguments + already printed an error message. + (md_apply_fix): Add support for explicit relocations. + (alpha_force_relocation): Ditto. + (alpha_fix_adjustable): Ditto. + (alpha_adjust_symtab): New function to support explicit + relocations. + (alpha_adjust_symtab_relocs): Ditto. + (debug_exp): Debug stub compiled if DEBUG_ALPHA is defined. + (tokenize_arguments): Add debug code if DEBUG_ALPHA is defined. + Add support for explicit relocations. Return -2 if an error + message was already printed. + (find_macro_match): Add support for explicit relocations. Comment + each of the cases. + (emit_insn): Add support for explicit relocations. + (assemble_tokens): Ditto. + (emit_ldgp): Ditto. + (load_expression): Ditto. + (emit_lda): Ditto. + (emit_ldah): Ditto. + (emit_ir_load): Ditto. + (emit_loadstore): Ditto. + (emit_ldXu): Ditto. + (emit_ldil): Ditto. + (emit_sextX): Ditto. + (emit_division): Ditto. + (emit_jsrjmp): Ditto. + (emit_retjcr): Ditto. + + * config/tc-alpha.h (RELOC_OP_P): Enable explicit relocations if + ELF object format. + (tc_adjust_symtab): If explicit relocations, call the function + alpha_adjust_symtab. + (TC_FIX_TYPE): Add fields to be able to move explicit lituse + relocations next to the literal relocation they reference. + (TC_INIT_FIX_DATA): Initialize the new fields. + (TC_FIX_DATA_PRINT): Print the new fields if DEBUG5 is defined. + +Wed Nov 24 20:27:58 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Handle PA2.0 unit completers. Handle + 'B' operand for PA2.0 bb instruction. + +1999-11-18 Nick Clifton + + * config/tc-mcore.h (TC_FORCE_RELOCATION): Define for Mcore-pe + target. + + * config/tc-mcore.c (tc_gen_reloc): Support generation of RVA + relocs. + (mcore_force_relocation): Force relocations to be generated for + RVA relocs. + +1999-11-16 Alan Modra + + * config/tc-i386.c (i386_immediate): Disallow O_big immediates. + (i386_displacement): Disallow O_big displacements. + +Mon Nov 15 20:12:43 1999 Donald Lindsay + + * config/tc-arm.c (do_mia,do_mar,do_mra,do_pld,do_ldrl,do_co_reg): + Small improvements in error checking. + (md_assemble): Support for unconditional ARM instructions. + (md_parse_option): Support for -m[arm]v5e flag. + +1999-11-12 Nick Clifton + + * macro.c (buffer_and_nest): Do not check beyond the end of the + buffer. + +1999-11-11 Nick Clifton + + * macro.c (buffer_and_nest): Look for seperator after TO and + FROM tokens. + +1999-11-08 Andrew Haley + + * app.c (do_scrub_chars): When in State 10, treat backslash + characters in the same way as as symbol characters. + +1999-11-07 Richard Henderson + + * config/tc-alpha.c (alpha_align): Check, don't assert, that + the previous label was in the current section before playing + with auto-alignment. + +1999-11-06 Nick Clifton + + * config/tc-v850.c (v850_force_relocation): Force relocation + for weak symbols. + (v850_pcrel_from_selection): Do not compute a pcrel offset if + the symbol is weak. + +1999-11-05 Michael Meissner + + * expr.h (operatorT): Increase machine dependent operators to 16. + * expr.c (op_rank): Ditto. + +1999-11-03 Ian Lance Taylor + + * read.c (pseudo_set): Reject attempts to set the value of a + section symbol. + + * config/obj-elf.c (obj_elf_ident): Call md_flush_pending_output + if it is defined. + + * config/obj-elf.c (elf_set_index): Add ATTRIBUTE_UNUSED. + + * config/obj-elf.c (elf_frob_file_after_relocs): Don't pass NULL + to bfd_set_section_contents. + +1999-11-03 Nick Clifton + + * config/tc-mcore.h (TARGET_BYTES_BIG_ENDIAN): Change to false. + +1999-11-01 Gavin Romig-Koch + + * config/tc-mips.c (macro_build): Use OPCODE_IS_MEMBER. + (mips_ip): Use OPCODE_IS_MEMBER. + +Wed Oct 27 16:50:44 1999 Don Lindsay + + * config/tc-arm.c (reg_required_here): Improve comments. + + * config/tc-arm.c (thumb_opcode): Add "variants" field. + (tinsns): Initialize variants field. + + * config/tc-arm.c (bad_args, bad_pc): Renamed to BAD_ARGS and + BAD_PC respectively. + +1999-10-27 Scott Bambrough + + * config/tc-arm.c (reloc_map[]): Fix compiler warning. + * config/tc-arm.h: Fix compile time warnings. + +Mon Oct 18 18:11:10 MDT 1999 Diego Novillo + + * tc_d10v.c (find_opcode): Allow ATSIGN to match expressions of the + form @abs16, @(abs16) and @(abs16 + imm). + +1999-10-21 Gavin Romig-Koch + + * config/tc-mips.c (ISA_HAS_COPROC_DELAYS) : New. + (ISA_HAS_64_BIT_REGS) New. + (gpr_interlocks,md_begin,reg_needs_delay,append_insn, + mips_emit_delays,macro_build,load_register,load_addresss, + macro,macro2,mips_ip,s_cprestore,s_cpadd): Simplify + and/or use new ISA_xxx macros in expressions involving + ISA, particularly mips_opts.isa. + +1999-10-18 Michael Meissner + + * expr.h (operatorT): Add machine dependent operators md1..md8. + (expressionS): Make X_op 8 bits instead of 7. Add a X_md field + for the machine dependent operators to use. + + * expr.c (op_rank): Add machine dependent operators. + + * config/tc-alpha.c (O_pregister): Define as a machine dependent + operator. + (O_cpregister): Ditto. + (md_begin): Change X_op test that field is wide enough to use + O_max instead of O_alpha_max. + (cpu_types): Fill in missing initializer. + (alpha_num_macros): Make unsigned. + (md_assemble): Make opnamelen be size_t. + (md_apply_fix): Cast alpha_num_operands to int before testing. + (alpha_force_relocation): Ditto. + (alpha_fix_adjustable): Ditto. + (alpha_fix_adjustable): Mark unused arguments ATTRIBUTE_UNUSED. + (tc_gen_reloc): Ditto. + (tc_get_register): Ditto. + (emit_ldgp): Ditto. + (emit_lda): Ditto. + (emit_ldah): Ditto. + (emit_ldil): Ditto. + (s_alpha_ent): Ditto. + (s_alpha_end): Ditto. + (s_alpha_frame): Ditto. + (s_alpha_prologue): Ditto. + (s_alpha_file): Ditto. + (s_alpha_gprel32): Ditto. + (s_alpha_proc): Ditto. + (s_alpha_set): Ditto. + (s_alpha_base): Ditto. + (s_alpha_align): Ditto. + (s_alpha_arch): Ditto. + (alpha_align): Ditto. + (assemble_insn): Suppress unused variable warning. + (emit_insn): Ditto. + (assemble_insn): Don't assume X_op and X_unsigned are in a given + order in the structure. + (s_alpha_coff_wrapper): Avoid int/unsigned comparison. + +Sun Oct 17 17:15:58 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_apply_fix): Make "fmt" an int. + +1999-10-12 Alan Modra + + * config/tc-i386.c (i386_index_check): Correct #endif location. + +Mon Oct 11 14:02:40 1999 Geoffrey Keating + + * as.c (show_usage): Document new options. + (parse_args): Add --no-warn, --warn, --fatal-warnings, + which become 'W', OPTION_WARN, and OPTION_WARN_FATAL. + (parse_args): Parse the new options. + (main): If there were warnings, and --fatal-warnings + was specified, print an error. + * as.h: New variable, flag_fatal_warnings, for new option. + +Sun Oct 10 01:47:23 1999 Jerry Quinn + + * config/tc-hppa.c (pa_ip): Add new codes 'cc', 'cd', 'cC', 'co', + '@'. Change autoincrement completers to fall through to cache control + completers. + + * config/tc-hppa.c (pa_ip): Remove unused args. Add code to '?W' + arg. + (pa_parse_addb_64_cmpltr): New function. + + * config/tc-hppa.c (pa_ip): Change error message. + (pa_ip,pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr) Fix '?N' and + '?Q' args to allow falling through. + + * config/tc-hppa.c (pa_ip): Implement conditional codes "?N", "?Q". + Remove unused conditional codes. + (pa_parse_cmpb_64_cmpltr,pa_parse_cmpib_64_cmpltr): New. + +Thu Oct 7 00:23:53 MDT 1999 Diego Novillo + + * config/tc-d30v.c (CHAR_BIT): Define. + (check_range): Fix bit operations to support integers bigger than + 32 bits. + +Thu Oct 7 00:11:50 MDT 1999 Diego Novillo + + * config/tc-d10v.c (check_range): Check range for RESTRICTED_NUM3 + operands. + +Mon Oct 4 17:24:23 1999 Nick Clifton + Doug Evans + + Add support for m32rx. + * config/tc-m32r.c (enable_m32rx): New static global. + (enable_special,warn_explicit_parallel_conflicts,optimize): Ditto. + (allow_m32rx): New function. + (M32R_SHORTOPTS): Add `O'. + (md_longopts): Add --m32rx plus several warning options. + (md_parse_option): Handle new options. + (md_show_usage): Print them. + (md_begin): Enable m32rx. + (OPERAND_IS_COND_BIT): New macro. + (first_writes_to_seconds_operands): New function. + (writes_to_pc,can_make_parallel,make_parallel): New functions. + (target_make_parallel,assemble_two_insns): New functions. + (md_assemble): Recognize "insn1 -> insn2" and "insn1 || insn2". + If optimizing and m32rx, try to make consecutive insns parallel. + +Tue Sep 28 14:06:44 1999 Geoffrey Keating + + * config/tc-mips.c (nopic_need_relax): Allow for the + .sdata.foo sections generated by -fdata-sections, + and for the .gnu.linkonce.s sections generated by C++. + +Thu Sep 23 07:13:45 1999 Jerry Quinn + + * config/tc-hppa.c (pa_ip): Replace 'B', 'M', 'l' and 'g' handling + with cleaner code using completer prefixes. Add 'Y'. + + * config/tc-hppa.c (pa_ip): Add parens to silence compiler. + +Wed Sep 22 09:37:19 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Avoid ANSI specific initialization. + (pa_ip, case 'm'): Failure to get a CBIT specifier just means the + insn does not match and we should try the next insn in the table. + +1999-09-22 Nick Clifton + + * config/tc-arm.c (MULTI_SET_PSR): Rename to LDM_TYPE_2_OR_3. + +Mon Sep 20 04:01:41 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Fix thinkos in recent cleanup + of PA2.0 support. + +1999-09-19 Alexandre Oliva + + * config/tc-i386.c (md_shortopts): Check OBJ_MAYBE_ELF as well as + OBJ_ELF. If ELF, add "sq". + (md_parse_option): If ELF, ignore -s and -q. + (md_show_usage): Mention ELF options. + +Sun Sep 19 10:43:31 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Handle 'J', 'K' and 'cc' + operands. + + * config/tc-hppa.c (pa_ip): Handle "fe", and 'cJ'. + + * config/tc-hppa.c (pa_ip): Handle 'd', '#' and 'cq'. + + * config/tc-hppa.c (struct pa_it): New field "trunc". + (pa_ip): Handle 'h', 'm', '=', '{', and '_' operands. + (pa_parse_ftest_gfx_completer): New function + (pa_parse_fp_cnv_format): New function. + + * config/tc-hppa.c (pa_ip): Handle 'X' operand. + (md_apply_fix): Handle 22bit pc-rel branches. + + * config/tc-hppa.c (pa_ip): Handle 'B' operand. + + * config/tc-hppa.c (pa_ip): Handle 'L' and 'M' operands. + + * config/tc-hppa.c (pa_ip): Handle 'l' operand. + + * config/tc-hppa.c (pa_ip): Handle 'g' operand. + +Sat Sep 18 12:13:28 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_assemble): Fix dwarf2 line handling. + (pa_ip): Handle 'fX'. + +Fri Sep 17 11:57:34 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_build_unwind_subspace): Do not build + unwinds unless the function is in the text space. + (pa_type_args): Set BSF_FUNCTION for an exproted data symbol. + +Wed Sep 15 05:14:32 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Move dwarf2 stuff from here. + (md_assemble): To here. Tweak address generation. + + * config/tc-hppa.c: Include dwarf2dbg.h if OBJ_ELF. Declare + debug_line. + (md_pseudo_table): Add .file and .line pseudo-ops for OBJ_ELF. + (md_assemble): Call dwarf2_where for OBJ_ELF. + (pa_ip): Call dwarf2_gen_line_info for OBJ_ELF. + (pa_end_of_source): New function. + * tc-hppa.h (md_end): Define for OBJ_ELF. + +1999-09-14 Michael Meissner + + * configure.in (Canonicalization of target names): Remove adding + ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14 + generates $ac_config_sub with a ${CONFIG_SHELL} already. + * configure: Regenerate. + +1999-09-14 Donn Terry + + * config/te-interix.h (GLOBAL_OFFSET_TABLE_NAME): Define. + +1999-09-13 Alan Modra + + * config/tc-i386.c (md_assemble): Handle "jmp/call constant" as a + pc-relative jmp/call to an absolute symbol. + (md_apply_fix3): When OBJ_ELF, don't add the values in twice for + absolute section symbols. + + * config/tc-i386.c (md_assemble): Correct frag_var size. Tidy + jump handling code and comments. + +1999-09-12 Ian Lance Taylor + + * config/tc-i386.c (md_apply_fix3): Add horrible adjustments to + the value if TE_PE and a global defined symbol. + +1999-09-11 Ian Lance Taylor + + * write.c (dump_section_relocs): Call print_symbol_value_1 to + print the symbol, rather than printing it here. + +1999-09-11 Donn Terry + + * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust + BFD_RELOC_RVA relocations. + + * config/tc-i386.c (md_undefined_symbol): Compare the name against + the macro GLOBAL_OFFSET_TABLE_NAME, rather than assuming that it + starts with "_G". + + * write.c (write_relocs): Call SET_SECTION_RELOCS if it is + defined. + * config/obj-coff.h (SET_SECTION_RELOCS): Define. + * doc/internals.texi (Object format backend): Document + SET_SECTION_RELOCS. + + * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust + relocations against global symbols if TE_PE. + + * config/obj-coff.c (obj_coff_ident): Add BFD_ASSEMBLER version. + (obj_pseudo_table): Always handle ".ident" with obj-coff_ident. + + * config/obj-coff.c (coff_frob_symbol): Prohibit weak common + symbols. + + * config/obj-coff.c (obj_coff_endef): Don't merge labels, or + symbols which do not have a constant value, or tags with + non-tags. Remove the symbol from the list before adding it at the + end. + + * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef + C_FCN symbol differently if TE_PE. + (obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which + appears in the pseudo-op, rather coff_line_base which is only set + for a .bf symbol. + + * config/obj-coff.c (obj_coff_loc): New static function. + (obj_pseudo_table): Add "loc". + + * config/obj-coff.c (add_lineno): Check that the line number is + positive. + + * config/atof-ieee.c (atof_ieee): Change what_kind to int. + * config/atof-vax.c (flonum_gen2vax): Change format_letter to + int. + (md_atof): Return NULL rather than 0. + * config/tc-i386.c (md_atof): Change type to int. + * expr.c (expr): Change first parameter to int. + * config/obj-coff.c: Add declarations for static functions. + (coff_frob_symbol): Use SYM_AUXENT. + * config/tc-i386.h (flag_16bit_code): Don't declare. + + * config/obj-coff.c (obj_coff_section): Default to setting + SEC_LOAD. Don't set SEC_DATA for 'w' modifier. + + * write.c (adjust_reloc_syms): Print adjusted fixup. + + * expr.c (integer_constant): Correct too_many_digits calculation + in base 10 case. + +1999-09-09 Andreas Schwab + + * doc/c-arm.texi: Fix arguments of @var to not contain + punctuation. + +1999-09-08 Philip Blundell + + * config/tc-arm.c (s_thumb_set): Only support interworking for ELF + and COFF targets. + (md_parse_option): Only support -k flag for ELF and COFF targets. + +Tue Sep 7 13:28:59 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Put strict register checks before + call to pa_parse_number. + + * config/tc-hppa.c (pa_ip): Support 'Z' argument. + +1999-09-06 Ian Lance Taylor + + * config/obj-coff.c: Add ATTRIBUTE_UNUSED as needed for + BFD_ASSEMBLER code. + +1999-09-06 Donn Terry + + * as.c (perform_an_assembly_pass): Set SEC_DATA for data_section. + +Mon Sep 6 04:26:56 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Get strict/non-strict mode from the + candidate instruction. Require registers for register arguments + when in strict mode. Require assemble-time constants for + constants when in strict mode. + (pa_get_absolute_expression): Require a constant when in strict + mode. + +1999-09-06 Nick Clifton + + * config/tc-m32r.c (md_longopts): Fix value for -Wnuh. + +1999-09-04 Steve Chamberlain + + * config/tc-pj.c: New file, supports picoJava in ELF. + * config/tc-pj.h: Ditto. + * configure.in (pjl*, pj*): New targets. + * Makefile.am: Rebuild dependencies. + (CPU_TYPES): Add pj. + (TARGET_CPU_CFILES): Add config/tc-pj.c. + (TARGET_CPU_HFILES): Add config/tc-pj.h. + * doc/c-pj.texi: New file. + * doc/as.texinfo: Add some PJ specifics. + * doc/all.texi: Add PJ to the list of all architectures, sort them + all alphabetically. + * doc/Makefile.in (CPU_DOCS): Add c-pj.texi. + * configure, Makefile.in, doc/Makefile.in: Rebuild. + +1999-09-02 Alan Modra + + * config/obj-multi.h: Include obj-elf.h if OBJ_MAYBE_ELF. Reformat. + (obj_frob_file): Test for null pointer. + (OBJ_COPY_SYMBOL_ATTRIBUTES): Here too. + (OBJ_PROCESS_STAB): And here. + (elf_obj_sy): Remove + + * config/obj-elf.h: #ifndef everything defined in obj-multi.h, + except OBJ_PROCESS_STAB, which we #undef for ecoff. + (elf_obj_sy): Remove #ifndef OBJ_SYMFIELD_TYPE. + + * config/obj-coff.c (no_func): Remove. + (coff_format_ops): Change occurrences of no_func to 0, as we test + for 0 in obj-multi.h. + + * configure.in: Enable bfd for i386-coff when primary target is + bfd. Enable i386 elf,coff emulation support. Don't set + USE_EMULATIONS=1 or te_file=multi unless there is more than one + emulation to support. + *configure: Regenerate. + +1999-09-02 Nick Clifton + + * config/tc-mcore.c (mcore_s_section): Do not dump literals if a + .section .line directive is encountered. + +1999-09-01 Nick Clifton + + * config/tc-arm.c (md_section_align): Do not align sections in ELF + format. + + * as.c (show_usage): Add --gdwarf2 to list of options displayed. + * as.texinfo: Document --gdwarf2 command line option. + Add additional documentation of ARM command line switches. + +1999-08-30 Alan Modra + + * config/tc-i386.c (i386_intel_memory_operand): Combine + i386_is_reg and parse_register calls. Remove END_STRING_AND_SAVE + and RESTORE_END_STRING around parse_register calls. + (i386_operand): Here too. + (i386_is_reg): Remove. + (parse_register): Move as_bad calls from within this function to + callers. + +1999-08-29 Alan Modra + + Based on a patch from H.J. Lu + * config/tc-i386.c (parse_register): Handle FP regs specially. + (md_begin): Remove '(' and ')' from register_chars. + +1999-08-29 Doug Evans + + * config/tc-m32r.c (md_parse_option): Delete unrecognized option + error message (done elsewhere). + +Sat Aug 28 01:23:11 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Do not allow '*' in 32bit completers. + +Sat Aug 28 00:26:26 1999 Jerry Quinn + + * config/tc-hppa.c (pa_ip): Replace 'f' by 'v'. Prefix float register + args by 'f'. + + * config/tc-hppa.c (pa_ip): Add args q, %, and |. + + * config/tc-hppa.c (pa_ip): Absorb white space in instructions + between args. + Add new completers. Fix bug in 64 bit condition handling. + + * config/tc-hppa.c (pa_ip): Add completer codes 'a', 'ch', 'cH', + 'cS', and 'c*'. + + * config/tc-hppa.c (pa_ip): Place completers behind prefix 'c'. + + * config/tc-hppa.c (pa_ip): Add cases for '.', '~'. '$'. and '!' + + * config/tc-hppa.c (pa_ip): Add case for 'I'. + +1999-08-27 Jim Wilson + + * dwarf2dbg.c (MAX_SPECIAL_ADDR_DELTA): Correct typo in comment. + (struct ls): Add frag field. Initialize it to zero. + (out_end_sequence): New local text_frag. Set it while in text section. + Replace address check with frag check. Set ls.frag to text_frag if + out_set_addr called. + (dwarf2_gen_line_info): Add explanatory comment. New local saved_frag. + Set it before switching sections. Replace address check with frag + check. Set ls.frag to saved_frag if out_set_addr called. + +1999-08-26 David Mosberger + + * dwarf2dbg.c (out_end_sequence): If address changed, directly + output "advance_pc" opcode instead of calling gen_addr_line(). + The latter has the undesired side-effect of creating a new row + in the debug line info matrix. + +1999-08-26 Jim Wilson + + * dwarf2dbg.c (out_end_sequence): Correct comments. Set last to + ls.last_filename if last is less than zero. Set ls.last_filename + when allocating new entry. + (dwarf2_gen_line_info): Save seg and subseg info before subseg_new + call. + +1999-08-20 Alan Modra + + * config/tc-i386.c (i386_index_check): Fix the displacement size + when INFER_ADDR_PREFIX. + +1999-08-18 Nick Clifton + + * config/tc-arm.c (md_apply_fix3): If an offset is invalid, + display its value. + +1999-08-17 Ian Lance Taylor + + * config/tc-ppc.c (md_assemble): Trim @ha constant to 16 bits, to + handle 0xffffNNNN constants correctly. + +1999-08-16 Nick Clifton + + * config/tc-arm.c (do_ldst): Look for register conflicts on stores + as well as loads. + +1999-08-13 Nick Clifton + + * config/tc-arm.c (validate_offset_imm): Work on unsigned values. + (md_apply_fix3): Always pass positive values to + validate_offset_imm. + +1999-08-12 Nick Clifton + + * config/tc-arm.c (skip_whitespace): New macro. + Formatting tidy ups. + + (md_apply_fix3): Store relocation offset in addend for ELF based + relocs. + (arm_force_relocation): Always generate relocs for Thumb function + calls. + +1999-08-11 Alan Modra + + * config/tc-i386.c (md_assemble): Remove dead code. intel_syntax + LONG_DOUBLE_MNEM_SUFFIX floating point is done in opcode/i386.h + +Tue Aug 10 12:58:31 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_build_unwind_subspace): Use sane section + flags for the unwind subspace. + + * config/tc-hppa.c (UNWIND_SECTION_NAME): Define for ELF. + (pa_build_unwind_subspace): Remove #if 0 wrapper. Select a + suitable relocation based on the size of the target's pointer. + Always Use subsegment zero for the unwinders. + (pa_level): Handle "2.0w". + +Mon Aug 9 20:02:22 1999 J"orn Rennecke + + * config/tc-d30v.c (write_2_short): Don't group repeat instructions + with the following instruction unless this was specified. + +1999-08-09 Ian Lance Taylor + + * config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4 for + certain sections, to match BFD changes. + +1999-08-08 Mumit Khan + + * Makefile.am (noinst_SCRIPTS): Change .gdbinit to $(GDBINIT). + (EXTRA_SCRIPTS): Define to keep automake happy. + * Makefile.in: Rebuild. + +1999-08-08 Ian Lance Taylor + + * Makefile.am: Rename .dep* files to DEP*. + (MKDEP): Rename from DEP. Change all uses. Use $${srcdir} rather + than $(srcdir). Rename TCDEP targets to DEPTC. Rename OBJDEP + targets to DEPOBJ. + * Makefile.in: Rebuild. + +1999-08-08 Jakub Jelinek + + * config/tc-sparc.c (sparc_ip): Allow assembly of %lo()+%reg. + +1999-08-08 Ian Lance Taylor + + * Makefile.am: Change all uses of itbl-test-ops to itbl-tops to + avoid problems on DOS filesystems. + * Makefile.in: Rebuild. + + * doc/as.texinfo (Section): Document 's' flag for COFF version. + +1999-08-08 Mumit Khan + + * config/obj-coff.c (obj_coff_section): Handle 's' (shared) + section flag. + +1999-08-08 Ian Lance Taylor + + * configure.in: Define and substitute GDBINIT. Change AC_OUTPUT + line to create ${GDBINIT} rather than .gdbinit. + * configure, Makefile.in, doc/Makefile.in: Rebuild. + +Fri Aug 6 12:12:44 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip, case '?'): Add missing break. + +Fri Aug 6 09:46:35 1999 Jerry Quinn + + * config/tc-hppa.c (pa_ip): Add 64 bit condition completers. + +1999-08-06 Jakub Jelinek + + * config/tc-sparc.h (tc_fix_adjustable): Fix check for PIC local + non-adjustable symbols. + +Thu Aug 5 16:52:51 1999 Jerry Quinn + + * config/tc-hppa.c (pa_ip): Change condition args to have '?' prefix. + +Thu Aug 5 23:05:56 1999 J"orn Rennecke + + * config/tc-sh.c (md_assemble): Call as_bad when there are excess + operands. + +1999-08-05 Donn Terry + + * config/te-interix.h: New file. + * configure.in (i386-*-interix*): New target. + * configure: Rebuild. + +Wed Aug 4 13:12:17 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_chk_field_selector): Allow 3 byte + selectors for ELF too. + (selector_table): Add "ltp" and "rtp" selectors. + +1999-08-04 Alan Modra + + * config/tc-i386.c (i386_operand): No need to change + operand_string pointer in segment reg case before goto + do_memory_reference. Initialise displacement_string_start and + displacement_string_end after do_memory_reference label. + (i386_index_check): Add operand_string param, and print error + message on failure here. + (i386_intel_memory_operand): Instead of here. + (i386_operand): And here. + (INFER_ADDR_PREFIX): Enable. + + * doc/c-i386.texi (i386-16bit): Document .code16gcc. + + * config/tc-i386.h (DefaultSize): Define. Renumber following + opcode_modifier defines. + + From Etienne Lorrain + * config/tc-i386.c (stackop_size): New variable. + (set_16bit_code_flag): Clear it here. + (set_16bit_gcc_code_flag): New function. + (md_pseudo_table): Add "code16gcc" entry. + (md_assemble): Set i.suffix for insns with DefaultSize modifier. + +1999-08-03 Ian Lance Taylor + + * config/obj-coff.c (coff_frob_symbol): Always update set_end with + next_set_end even if the end symbol is being discarded. + + * gasp.c: Add ATTRIBUTE_UNUSED as needed for non-BFD_ASSEMBLER. + * output-file.c, symbols.c, config/tc-i386.c: Likewise. + * config/obj-coff.c: Likewise. + (seg_info_type): Remove. + (seg_info_off_by_4): Change to array of segT. + (s_get_segment): Adjust accordingly. + (obj_pseudo_table): Fully initialize sentinel entry. + + * config/tc-mips.c (append_insn): Correct INSN_SYNC test. From + Ralf Baechle . + +1999-08-03 Etienne Lorrain + + * config/tc-i386.c (f16_3): New. Fixes 16 bit 3 byte nop. + +1999-08-03 Alan Modra + + * config/tc-i386.c: Indentation and white space changes. + (i386_index_check): New function. Add INFER_ADDR_PREFIX code, but + don't enable it by default. + (i386_intel_operand): Remove redundant prototype. + Move check on number of memory operands, and i.mem_operands++ + (i386_intel_memory_operand): To here. + Remove i386_immediate code from here. Remove special case code + for input and output using (%dx). Remove base/index checks and + call i386_index_check instead. Save initial operand_string + argument for error message. + (i386_operand): Remove redundant prototype. Move base/index + checks to i386_index_check. + (i386_displacement): Move intel mode check for non-zero + i.disp_operand + (i386_intel_memory_operand): To here. + +1999-07-30 Jakub Jelinek + + * config/tc-sparc.c (md_longopts): Add --no-undeclared-regs option. + (sparc_ip): Warn if %g2 or %g3 register is used and not covered + by .register pseudo-op if -64 and --no-undeclared-regs. + (s_register, sparc_adjust_symtab): New functions. + * config/tc-sparc.h (tc_adjust_symtab, sparc_adjust_symtab): + Declare sparc_adjust_symtab as tc_adjust_symtab. + * doc/c-sparc.texi: Add description of #ignore special literal + for .register pseudo-op. + +1999-07-30 Catherine Moore + + * config/tc-arm.c (tc_gen_reloc): Record the vtable entry in + the relocation's section offset. + +1999-07-29 Alan Modra + + * write.c (fixup_segment): Fix generic error check overflow test. + + * config/tc-i386.c (pe): Change %d to %ld, %x to %lx, and cast + X_add_number to long. + +Wed Jul 28 02:04:24 1999 "Jerry Quinn" + + * config/tc-hppa.c (pa_ip): Add 'J' and 'K' code + processing. + +1999-07-27 Ian Lance Taylor + + * config/tc-sparc.h (tc_fix_adjustable): Don't adjust GOT, PLT, or + VTABLE relocations. + +1999-07-21 Mark Elbrecht + + * config/te-go32.h (COFF_LONG_SECTION_NAMES): Define. + + * configure.bat: Remove; obsolete. + * config/go32.cfg: Likewise. + +1999-07-21 Brad M. Garcia + + * configure.in (i386-*-vxworks*): New target. + * configure: Rebuild. + +1999-07-16 Jakub Jelinek + + * doc/c-sparc.texi: Document .register and .nword pseudo-ops. + +1999-07-16 Jakub Jelinek + + * config/tc-sparc.c (sparc_ip): Allow OLO10 relocations + on -64 and not pic. + (output_insn): Put OLO10's secondary addend into tc_fix_data. + (md_apply_fix3): Handle BFD_RELOC_SPARC_OLO10. + (tc_gen_reloc): Return two relocs for OLO10, LO10 and SPARC13. + * config/tc-sparc.h (RELOC_EXPANSION_POSSIBLE, + MAX_RELOC_EXPANSION): Define. + (TC_FIX_TYPE, TC_INIT_FIX_DATA, TC_FIX_DATA_PRINT): Likewise. + +1999-07-16 Alan Modra + + * config/tc-i386.c (intel_float_operand): Add prototype, make static. + (md_assemble): Localize *exp variable to if (fake_zero_displacement) + block. Print a warning if an 8-bit or 16-bit constant + displacement or immediate is truncated on output. + (i386_immediate): Ensure Imm16 is always legal for a 16-bit mode + immediate. + (i386_operand): Disallow immediate jump absolute operand. + +1999-07-15 Ian Lance Taylor + + * configure.in: Bump version number to 2.9.5. + * configure: Rebuild. + + * dwarf2dbg.c (dwarf2_gen_line_info): Don't assume that long long + or %llx work. + +Thu Jul 15 02:45:30 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_pseudo_table): Add ".dword" pseudo-op. + (cons_fix_new_hppa): Derive size of fixup from size of the object. + +1999-07-14 Philip Blundell + + * symbols.c (dollar_label_name): Prepend LOCAL_LABEL_PREFIX if it + is defined. + * config/tc-arm.h (LOCAL_LABEL_PREFIX): Define to '.' for ELF. + + * config/tc-arm.c (md_begin): Set F_SOFTFLOAT in the output file + if -mno-fpu was given. + (tc_gen_reloc): Fix typo. Delete bogus code related to GOTPC + relocs. + (cons_fix_new_arm): Remove misleading comments. + +1999-07-14 Ian Lance Taylor + + * write.c (cvt_frag_to_fill): Use frag file and line in rs_org + error message. + (relax_segment): Likewise. After giving a rs_org error, convert + the frag to rs_align to avoid cascading errors. + +1999-07-12 Andreas Schwab + + * config/tc-m68k.c: Add some ATTRIBUTE_UNUSED. + +1999-07-11 Ian Lance Taylor + + * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED + as appropriate. Fill in structure initializations. Add variable + initializations. Add casts. + * dwarf2dbg.c (print_stats): Change i to size_t. + * listing.c (listing_listing): Change list_line to unsigned int. + +1999-07-10 Ian Lance Taylor + + * config/tc-ppc.h (tc_fix_adjustable) [OBJ_ELF]: Call S_IS_LOCAL + rather than checking for \001 and \002 in symbol name. + * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: Likewise. + +Thu Jul 8 12:32:23 1999 John David Anglin + + * configure.in (hppa*-linux-gnu*): New target. + * configure: Rebuilt. + +1999-07-08 Nick Clifton + + * doc/c-arm.texi (ARM Directives): Document .thumb_set directive. + +1999-07-07 Nick Clifton + + * config/tc-v850.c (v850_comm): Use symbol_get_obj() rather than + accessing symbolP directly. + +Tue Jul 6 10:41:42 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.h (tc_frob_symbol): Always punt "$global$" symbol + for ELF. + +1999-07-05 Nick Clifton + + * config/tc-arm.c (ARM_EXT_V5): Define. + (ARM_ARCH_V5, ARM_ARCH_V5T): Define. + (md_begin): Detect ARM v5 architectures. + (md_parse_option): Accept arm v5 specification. + (md_show_usage): Documment -marmv5 switch. + + * doc/c-arm.texi: Document -marmv5 command line option. + + * config/tc-arm.c (do_adrl): New function. Implement ADRL pseudo + op. + (validate_immediate_twopart): New function. Determine if a + constant can be computed by two ADD instructions. + (output_inst): Remove its command line parameter - it was never + used. + (md_apply_fix3): Support BFD_RELOC_ARM_ADRL_IMMEDIATE, used to + implememt the ADRL pseudo op. + (tc_gen_reloc): Generate a suitable error message if an ADRL + instruction tries to generate a real reloc. + + * doc/c-arm.texi: Document NOP, ADR and ADRL pseudo ops. + +Thu Jul 1 15:33:10 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (pa_ip): Convert the opcode and all completers + into lower case. + +1999-06-27 H.J. Lu + + * subsegs.c (subseg_text_p): Use 1/0 instead of true/false for + non BFD_ASSEMBLER case. + +1999-06-26 Mumit Khan + + * config/obj-coff.c (obj_coff_section): Mark writable sections as + data. + +1999-06-26 David Mosberger + + * dwarf2dbg.c (dwarf2_gen_line_info): Don't call + out_end_sequence() when the address decreases due to a new frag. + (gen_dir_list): Set ls.file[i].dir to j + 1 (not j) because file + numbering starts with 1. + +1999-06-23 Nick Clifton + + * config/tc-mcore.c (md_pseudo_table): Add .comm for ELF and allow + .section for COFF. + (mcore_s_text): Call obj_elf_text for ELF target. + (mcore_s_data): Call obj_elf_data for ELF target. + (mcore_s_section): No longer ELF specific. Call obj_coff_section + for COFF target. + (mcore_s_bss): New function: Dump literal table before changing + sections. + (mcore_s_comm): New function: Dump literal table before changing + sections. + + * config/obj-elf.c (obj_elf_common, obj_elf_data, obj_elf_text): + No longer static functions. + * config/obj-elf.h (obj_elf_common, obj_elf_data, obj_elf_text): + Provide prototypes for these functions. + +1999-06-22 Ian Lance Taylor + + * subsegs.c (subseg_text_p): Rewrite non BFD_ASSEMBLER case to use + a list of names, to try obj_segment_name, and to try abbreviated + names when using COFF without long section names. + + * config/tc-alpha.c: More use of symbol accessor functions. + * config/tc-arc.c: Likewise. + * config/tc-d30v.c: Likewise. + * config/tc-fr30.c: Likewise. + * config/tc-i860.c: Likewise. + * config/tc-m88k.c: Likewise. + * config/tc-mcore.c: Likewise. + * config/tc-ns32k.c: Likewise. + * config/tc-sparc.c: Likewise. + * config/tc-v850.c: Likewise. + + * config/tc-arc.c (get_arc_exp_reloc_type): Change uses of + sy_value with appropriate accessor functions. + * config/tc-arm.c (md_apply_fix3): Likewise. + * config/tc-d10v.c (AT_WORD_P): Likewise. + * config/tc-v850.c (reg_name_search): Likewise. + + * config/obj-ecoff.c (obj_ecoff_set_ext): Change uses of bsym to + use symbol_get_bfdsym instead. + * config/tc-ppc.c (md_assemble): Likewise. + * config/tc-v850.c (v850_comm): Likewise. + +1999-06-22 Jonathan Larmour + + * config/tc-arc.c (tc_gen_reloc): Use symbol_get_bfdsym to get at + the symbol, rather than accessing the bsym member. + * config/tc-d10v.c (tc_gen_reloc): Likewise. + * config/tc-d30v.c (tc_gen_reloc): Likewise. + * config/tc-mcore.c (tc_gen_reloc): Likewise. + * config/tc-mn10200.c (tc_gen_reloc): Likewise. + * config/tc-mn10300.c (tc_gen_reloc): Likewise. + * config/tc-ns32k.c (tc_gen_reloc): Likewise. + * config/tc-tic30.c (tc_gen_reloc): Likewise. + * config/tc-v850.c (tc_gen_reloc): Likewise. + +Mon Jun 21 16:45:19 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type. + (hppa_gen_reloc_type): Conditionalize on BFD64. + (tc_gen_reloc): Re-enable ELF relocations. + * tc-hppa.h (TARGET_FORMAT): Handle elf64-hppa format. + +1999-06-21 Ian Lance Taylor + + * config/tc-arm.c (ldst_extend): Add parentheses to avoid + warning. + (do_ldst): Move assignment out of if condition. + (md_apply_fix3): Add casts to avoid printf format warnings. Add + parentheses to avoid warning. + +1999-06-21 Nick Clifton + + * config/tc-arm.c (arm_adjust_symtab): Use symbol_get_bfdsym() + macro to get at the BFD symbol associated with a GAS symbol. + +1999-06-19 Ian Lance Taylor + + * config/tc-ppc.c: Update for symbol handling changes. + * config/obj-coff.c: Likewise. + +Fri Jun 18 14:34:18 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c: General cleanups of ELF support. No more spaces + and subspaces for ELF. + (GDB_DEBUG_SPACE_NAME): Delete definition for ELF. + (GDB_STRINGS_SUBSPACE_NAME): Likewise. + (GDB_SYMBOLS_SUBSPACE_NAME): Likewise + (UNWIND_SECTION_NAME): Likewise. + (space/subspace related structures): Conditionalize definitions + on OBJ_SOM. + (space/subspace directives and support routines): Conditionalize + definitions and references/uses on OBJ_SOM. + (label_symbol_struct): For ELF, track the symbol's segment. For + SOM track its space. + (pa_define_label, pa_undefine_label, pa_get_label): Corresponding + changes. + (USE_ALIASES): Kill for both SOM & ELF. + (pa_def_subspaces, pa_def_spaces): Corresponding changes. + (pa_space, pa_subspace): Corresponding changes. + (pa_spaces_begin): Corresponding chagnes. + (md_begin): Do not muck around with space/subspace stuff for + OBJ_ELF. + (md_apply_fix): Temporarily disable argument relocation stuff + for OBJ_ELF. + (tc_gen_reloc): Temporarily disable relocation generation for + OBJ_ELF + (pa_build_unwind_subspace): Similarly. + +1999-06-16 Nick Clifton + + * config/tc-arm.c (thumb_set): New pseudo op. + (text, data, section): Override these pseudo ops with ARM + specific versions. + (s_thumb_set): New function: Perform the same as a .set pseudo + op, but also mark the alias'ed symbol as being a Thumb + function. + (arm_s_text): New function: Perform the same as the .text + pseudo op, but dump the literal pool before changing + sections. + (arm_s_data): New function: Perform the same as the .data + pseudo op, but dump the literal pool before changing + sections. + (arm_s_section): New function: Perform the same as the + .section pseudo op, but dump the literal pool before changing + sections. + (arm_cleanup): Do not reset the current section before dumping + the literal pool. + +1999-06-17 Nick Clifton + + * config/tc-m32r.c (md_longopts): Fix OPTION_WARN_UNMATCHED and + OPTION_NO_WARN_UNMATCHED entries. + (md_parse_option): Generate a warning message if an unrecognised + option is encountered. + + * config/tc-d10v.c (do_not_ignore_hash): New variable. + (get_operands): When parsing an expression after an '@' symbol + has been detected, do not ignore '#' symbols. + (md_operand): Only ignore '#' symbols if do_not_ignore_hash is + false. + +1999-06-13 Ian Lance Taylor + + From K. Richard Pixley : + * configure.in (ppc-*-vxworks*): New target. + * configure: Rebuild. + +1999-06-12 Philip Blundell + + * config/tc-arm.c (tc_gen_reloc): Fix handling of GOTPC relocs. + +1999-06-13 Ian Lance Taylor + + * write.c (adjust_reloc_syms): Rather than never reducing reloc + which refer to symbols in linkonce sections, permit reducing the + relocs if the symbol is local. + +1999-06-12 Ian Lance Taylor + + * subsegs.c (subseg_text_p): New function. + * as.h (subseg_text_p): Declare. + * read.c (do_align): Use subseg_text_p to set the default fill. + * write.c (subsegs_finish): Likewise. + * config/obj-coff.c (write_object_file): Likewise. + * config/tc-i386.h (md_maybe_text): Don't define. + (md_do_align): Use subseg_text_p to set the default fill. + * config/tc-m32r.c (m32r_do_align): Likewise. + * config/tc-sh.c (sh_do_align): Likewise. + * config/tc-sparc.h (md_do_align): Likewise. + +1999-06-12 David O'Brien + + * configure.in: (i[3456]86-*-freebsd*): Now defaults to ELF. + * configure: Rebuild. + +1999-06-12 Ian Lance Taylor + + * dwarf2dbg.c: Include elf/dwarf2.h with "", not <>. + * Makefile.am: Rebuild dependencies. + * Makefile.in: Rebuild. + + * config/tc-i386.c (i386_immediate): Remove unused label + seg_unimplemented. + + * struc-symbol.h: Put local_symbol code in ifdef BFD_ASSEMBLER. + * symbols.c: Likewise. + * config/obj-aout.c (obj_crawl_symbol_chain): Refer directly to + sy_next field when taking address, rather than symbol_next. + + * dwarf2dbg.c: Change bfd_vma to addressT and bfd_signed_vma to + offsetT. + (out_set_addr): Don't use BYTES_PER_ADDRESS. Instead, get the + value from the output file architecture. + (dwarf2_gen_line_info): Ifdef BFD_ASSEMBLER specific code. + * dwarf2dbg.h: Change bfd_vma to addressT. + +1999-06-11 Ian Lance Taylor + + * dwarf2dbg.h: Use PARAMS in function declarations. + +1999-06-11 Martin Dorey + + * write.c (fixup_segment): Don't add symbol value for i960 ELF. + * config/tc-i960.c (s_leafproc): Don't call tc_set_bal_of_cal if + OBJ_ELF. + (md_apply_fix): Simplify BFD_ASSEMBLER handling. + +1999-06-11 Ian Lance Taylor + + * config/tc-i386.c (md_apply_fix3): Add default case to switch. + + * config/tc-sparc.c (md_pseudo_table): Remove pushsection and + popsection. + + * config/tc-sparc.c (sparc_ip): Add default case to reloc switch. + + * read.c (read_a_source_file): Only declare inescape if + QUOTES_IN_INSN. + + * itbl-ops.c (itbl_disassemble): Change sprintf format strings to + match parameters. + (find_entry_byval): Add parens to avoid warning. + + * as.c: If HAVE_ITBL_CPU, include "itbl-ops.h". + + * symbols.c (resolve_symbol_value): Don't permit subtraction of + undefined symbols. + +1999-06-10 Jakub Jelinek + + * config/tc-sparc.c (sparc_ip): Don't use side-effect expression + with isoctal. + + * config/tc-sparc.c (synthetize_setuw, synthetize_setsw, + synthetize_setx): New functions. + (md_assemble): Broken the special cases into the above + functions. Make compiler happy if sizeof(bfd_vma)==4. + Fix sethi generated from set/setuw. If instructions have a relloc, + always clear the fields to be relocated in the opcode. + (sparc_ip): Remove special_case global variable. + +1999-06-10 Ian Lance Taylor + + Based on patches from John W. Woznack : + * itbl-ops.c (itbl_get_reg_val): Add pval parameter. Return + indication of success rather than a value. + (itbl_get_val): Likewise. + (itbl_get_field): Use strcspn. Change delimiters to include + parens. + * itbl-ops.h (itbl_get_reg_val): Update declaration. + (itbl_get_val): Likewise. + * config/tc-mips.c (mips_ip): Update call to itbl_get_reg_val. + + * symbols.c (copy_symbol_attributes): Convert local symbols to + regular symbols. + +1999-06-10 Nick Clifton + + * config/tc-arm.c (md_parse_option): Add support for ARM920 and + ARM920t. + +1999-06-07 Jakub Jelinek + + * config/tc-sparc.c (md_assemble): Fix up setx, support setsw. + Optimize set if sizeof(bfd_vma) == 64. + (sparc_ip): Fix sethi - without %hi() it should generate + R_SPARC_22 reloc, not R_SPARC_HI22. + (tc_gen_reloc): Handle BFD_RELOC_SPARC22. + +1999-06-07 Jakub Jelinek + + * config/tc-sparc.c (md_begin): Handle native wordsize aliases. + (s_ncons): New function. + (native_op_table): New table. + (sparc_ip): Be more strict on %hi() etc.; prepare assembler for + R_SPARC_OLO10 handling. + +Mon Jun 7 10:22:16 1999 Richard Henderson + + * expr.h (struct expressionS): Revert last change; widen X_op. + * config/tc-alpha.c (md_begin): Check the field is wide enough. + +Mon Jun 7 11:25:16 1999 Andreas Schwab + + * Makefile.am (TARGET_CPU_CFILES): Add config/tc-fr30.c. + (TARGET_CPU_HFILES): Add config/tc-fr30.h. + (TARG_ENV_HFILES): Add config/te-epoc-pe.h. + * Makefile.in: Regenerated. + + * config/obj-elf.c (obj_elf_common): In MRI mode if called as + `common' pass on to s_mri_common. + (elf_pseudo_table): Pass 1 to obj_elf_common for `common'. + +1999-06-06 Richard Henderson + + * config/obj-elf.c (obj_elf_section): Don't free the return + value of demand_copy_C_string. + +1999-06-05 Richard Henderson + + * dwarf2dbg.c (dwarf2_gen_line_info): Mirror the section symbol + creation logic from obj_elf_create_section. + + * config/obj-elf.c (elf_pseudo_tab): Add pushsection/popsection. + (section_stack): New. + (special_sections): Make const. + (obj_elf_section): Gut and rewrite parsing. + (obj_elf_change_section): New function broken out of obj_elf_section. + (obj_elf_parse_section_letters): Likewise. + (obj_elf_section_word): Likewise. + (obj_elf_section_type): Likewise. + (obj_elf_previous): Treat as a toggle. + (obj_elf_popsection): New. + * config/tc-ppc.c (ppc_section_word): Take str+len not ptr_str. + (ppc_section_type): Likewise. + * config/tc-ppc.h: Likewise. + + * expr.h (struct expressionS): Don't make X_op a bitfield. + * config/tc-alpha.c: Update for symbol handling changes. + (md_apply_fix) [case GPREL]: Use now_seg instead of absolute_section. + (load_expression, emit_ir_load, emit_loadstore, emit_jsrjmp): Likewise. + +1999-06-05 Richard Henderson + + * dwarf2dbg.c (*): Convert to K&R + prototypes. + (dwarf2_gen_line_info): Kill unused variables. + (dwarf2_finish): Likewise. + (dwarf2_where): Likewise. + (dwarf2_directive_file): If we've only got a string, + hand off to s_app_file. + * ecoff.c: Move the include of ecoff.h. + * symbols.h (S_IS_FUNCTION): Prototype. + + * read.c (LEX_HASH): Supply a default. + (lex_type): Use it. + (s_globl): Update `c' after skipping whitespace. + * read.h (LEX_END_NAME, is_name_ender): New. + * expr.c (get_symbol_end): Respect it. + +1999-06-04 Mark Klein + + * config/tc-hppa.c (md_begin): Convert local symbol dummy_symbol + to real if OBJ_SOM + (tc_gen_reloc): Still need bfd_abs_symbol in some relocs. + + * config/tc-hppa.c: Update for symbol handling changes. + +1999-06-03 Ian Lance Taylor + + * cgen.c: Update for symbol handling changes. + * config/tc-m32r.c: Likewise. + + * config/tc-hppa.h: Update for symbol handling changes. + * config/tc-hppa.c: Likewise. + + * config/tc-arm.h: Update for symbol handling changes. + * config/tc-arm.c: Likewise. + (symbol_make_empty): Remove. Just use symbol_create. + + * symbols.c (symbol_set_tc): Correct name. + + * Makefile.am: Rebuild dependencies. + ($(OBJS)): Don't depend upon struc-symbol.h. + (.dep1, .tcdep, .objdep): Create itbl-parse.h. + * dep-in.sed: Don't remove struc-symbol.h. + * Makefile.in: Rebuild. + + * doc/internals.texi (Symbols): Describe changes in symbol + handling. + +1999-06-03 Richard Henderson + + * dwarf2dbg.c (dwarf2_gen_line_info): Use section_symbol + instead of doing the work by hand. + +1999-06-03 David Mosberger + + * dwarf2dbg.c (INITIAL_STATE): New macro encapsulating initial + state of line state-machine. + (struct ls): Collect DWARF2 line state-machine state in new member + SM. Add member EMPTY_SEQUENCE to keep track if a code sequence + resulted in any DWARF2 directives. + (reset_state_machine): New function. + (out_end_sequence): Ditto. + (dwarf2_gen_line_info): When switching sections or switching to a + lower text address, call out_end_sequence() first to terminate the + previous code sequence as code sequences MUST have monotonically + increasing addresses. + (dwarf2_finish): Call out_end_sequence() instead of open coding it. + +1999-06-03 David Mosberger + + * as.c (parse_args): Add option -gdwarf2 to allow requesting + DWARF2 debug info (line information only, at this point). + * as.h: Update comment about supported debug formats. + * dwarf2dbg.c, dwarf2dbg.h: New files. + * Makefile.am (GAS_CFILES, HFILES, GENERIC_OBJS): Add them. + + * expr.c (operand): Don't use [ for parens if we want an index op. + (op_encoding): Switch [ into O_index, if desired. + (op_rank): Renumber with O_index on bottom. + (expr): If O_index, match closing bracket. + * expr.h (O_index): New. + + * read.c (read_a_source_file): Conditionally allow matched " + in lines passed to md_assemble. + + * config/obj-elf.c (elf_pseudo_table): Add `common'. + +1999-06-03 Ian Lance Taylor + + Add support for storing local symbols in a small structure to save + memory when assembling large files. + * as.h: Don't include struc-symbol.h. + (symbolS): Add typedef. + * symbols.c: Include struc-symbol.h. + (local_hash): New static variable. + (save_symbol_name): New static function, from symbol_create. + (symbol_create): Call save_symbol_name. + (local_symbol_count): New static variable. + (local_symbol_conversion_count): Likewise. + (LOCAL_SYMBOL_CHECK): Define. + (local_symbol_make): New static function. + (local_symbol_convert): New static function. + (colon): Handle local symbols. Create local symbol for local + label name. + (symbol_table_insert): Handle local symbols. + (symbol_find_or_make): Create local symbol for local label name. + (symbol_find_base): Check for local symbol. + (symbol_append, symbol_insert): Check for local symbols. + (symbol_clear_list_pointers, symbol_remove): Likewise. + (verify_symbol_chain): Likewise. + (copy_symbol_attributes): Likewise. + (resolve_symbol_value): Handle local symbols. + (resolve_local_symbol): New static function. + (resolve_local_symbol_values): New function. + (S_GET_VALUE, S_SET_VALUE): Handle local symbols. + (S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise. + (S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise. + (S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise. + (S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise. + (symbol_previous, symbol_next): New functions. + (symbol_get_value_expression): Likewise. + (symbol_set_value_expression): Likewise. + (symbol_set_frag, symbol_get_frag): Likewise. + (symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise. + (symbol_mark_used_in_reloc): Likewise. + (symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise. + (symbol_mark_mri_common, symbol_clear_mri_common): Likewise. + (symbol_mri_common_p): Likewise. + (symbol_mark_written, symbol_clear_written): Likewise. + (symbol_written_p): Likewise. + (symbol_mark_resolved, symbol_resolved_p): Likewise. + (symbol_section_p, symbol_equated_p): Likewise. + (symbol_constant_p): Likewise. + (symbol_get_bfdsym, symbol_set_bfdsym): Likewise. + (symbol_get_obj, symbol_set_obj): Likewise. + (symbol_get_tc, symbol_set_tc): Likewise. + (symbol_begin): Initialize local_hash. + (print_symbol_value_1): Handle local symbols. + (symbol_print_statistics): Print local symbol statistics. + * symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER. + Declare new symbols.c functions. Move many declarations here from + struc-symbol.h. + (SYMBOLS_NEED_BACKPOINTERS): Define if needed. + * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set. + (struct symbol): Move bsym to make it clearly the first field. + Remove TARGET_SYMBOL_FIELDS. + (symbolS): Don't typedef. + (struct broken_word): Remove. + (N_TYPE_seg, seg_N_TYPE): Move to symbol.h. + (SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise. + (symbol_clear_list_pointers): Likewise. + (symbol_insert, symbol_remove): Likewise. + (symbol_previous, symbol_append): Likewise. + (verify_symbol_chain, verify_symbol_chain_2): Likewise. + (struct local_symbol): Define. + (local_symbol_converted_p, local_symbol_mark_converted): Define. + (local_symbol_resolved_p, local_symbol_mark_resolved): Define. + (local_symbol_get_frag, local_symbol_set_frag): Define. + (local_symbol_get_real_symbol): Define. + (local_symbol_set_real_symbol): Define. + Define. + * write.c (write_object_file): Call resolve_local_symbol_values. + * config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define. + (TARGET_SYMBOL_FIELDS): Don't define. + * config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field. If + ECOFF_DEBUGGING, add ECOFF fields. + (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. + * config/obj-multi.h (struct elf_obj_sy): Add local field. If + ECOFF_DEBUGGING, add ECOFF fields. + (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. + (ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define. + * config/tc-mcore.h: Don't include struc-symbol.h. + (TARGET_SYMBOL_FIELDS): Don't define. + (struct mcore_tc_sy): Define. + (TC_SYMFIELD_TYPE): Define. + * Many files: Use symbolS instead of struct symbol. Use new + accessor functions rather than referring to symbolS fields + directly. + + * read.c (s_mri_common): Don't add in value of line_label. + + * config/tc-mips.c (md_apply_fix): Correct parenthesization when + checking for SEC_LINK_ONCE. + + * config/tc-sh.h (sh_fix_adjustable): Declare. + + * app.c (input_buffer): New static variable. + (app_push): Save saved_input in allocated buffer. + (app_pop): Restored saved_input. + (do_scrub_chars): Change get parameter to take char * and int as + arguments. Change GET macro to pass input_buffer to get + function. Don't save input into allocated buffer. + * as.h (do_scrub_chars): Update declaration. + * input-file.c (input_file_get): Change to take char * and int. + Read data into passed in buffer. Remove static buffer. + * read.c (scrub_from_string): Change to take char * and int. Copy + data into passed in buffer. + + * hash.h: Neaten. Declare hash_traverse. + * hash.c: Complete rewrite based on BFD hashing code. + * gasp.c (chunksize): New variable. + * macro.c (macro_expand_body): Call hash_jam with NULL rather than + hash_delete. + +1999-05-28 Nick Clifton + + * config/tc-arm.c (md_apply_fix3): Add pipeline offset into reloc + addend unless the target uses an old ABI. + +Mon May 24 13:36:55 1999 Doug Evans + + -Wchar-subscripts cleanup + * listing.c (listing_newline): Use unsigned char variable, so + calls to isascii,iscntrl are correct. + * atof-generic.c (atof_generic): Cast arg to isdigit, et. al. with + (unsigned char). + * ecoff.c (ecoff_directive_ent,ecoff_stab): Ditto. + * config/obj-elf.c (obj_elf_vtable_inherit): Ditto. + * config/tc-mips.c (mips_ip,mips16_ip): Ditto. + (my_getSmallExpression,get_number,s_mips_ent): Ditto. + +1999-05-28 Torbjorn Granlund + + * config/tc-m68k.c (m68k_ip): Check for disallowed index register + width for Coldfire. + (arch_coldfire_p): New #define. + (m68k_ip, m68k_init_after_args): Use arch_coldfire_p. + +1999-05-28 Linus Nordberg + + * config/tc-m68k.c (install_operand): Add places `n', `o'. + + * config/tc-m68k.c (m68k_ip): Add formats `E', `G', `H'. + (install_operand): Add place `N'. + (init_table): Add registers ACC, MACSR, MASK. + + * config/m68k-parse.h (m68k_register): Add ACC, MACSR, MASK. + + * config/tc-m68k.c: Change mcf5200 --> mcf. + (archs): Add mcf5206e, mcf5307. + (m68k_ip): Add format `u'. + (install_operand): Add place `m', `M', `h'. + (init_table): Add upper/lower registers. + + * config/m68k-parse.h (m68k_register): Add upper/lower registers. + +1999-05-28 Martin Dorey + + * config/tc-i960.c: Several minor changes to add ELF and + BFD_ASSEMBLER support. + * config/tc-i960.h: Likewise. + * configure.in (i960-*-elf*): New target. + * aclocal.m4, configure: Rebuild. + +1999-05-25 Alan Modra + + * config/tc-i386.c (md_apply_fix3): Only do 1999-05-17 fx_pcrel + reloc changes when defined(BFD_ASSEMBLER). + +1999-05-17 Alan Modra + + * config/tc-i386.c (tc_gen_reloc): Remove F and MAP macros. + + * write.c (write_print_statistics): Output to file, not stderr. + + * expr.c (generic_bignum_to_int32,64): Prototype. + + * read.c (s_lcomm_internal, sizeof_sleb128, sizeof_uleb128, + output_sleb128, output_uleb128, output_big_sleb128, + output_big_uleb128, output_big_leb128): Prototype. + (output_big_sleb128, output_big_uleb128): Make inline. + (output_big_leb128): Remove inline + + From Maciej W. Rozycki + * config/tc-i386.c (md_apply_fix3): Convert BFD_RELOC_16 with + fx_pcrel set to BFD_RELOC_16_PCREL. Similarly for BFD_RELOC_8. + Handle BFD_RELOC_16_PCREL and BFD_RELOC_8_PCREL. Return changed + value for correct overflow check in write.c:fixup_segment. + * write.c (fixup_segment): Move bitfield overflow checks to after + the md_apply_fix call. + * config/obj-coff.c (fixup_segment): Likewise. + * doc/internals.texi (CPU backend): Mention md_apply_fix modifying + valueT *val argument. + +Fri May 14 10:52:13 1999 Andreas Schwab + + * config/atof-ieee.c (gen_to_words): Correctly round a + denormalized number. Fix off-by-one in range checking for + exponent in a denormal. + +1999-05-10 Nick Clifton + + * config/tc-mcore.c (parse_reg): Accept 'sp' as a valid register + name. + +Thu May 13 09:46:59 1999 Joel Sherrill (joel@OARcorp.com) + + * configure.in (i386-*-rtemself*, sh-*-rtemself*): New targets. + +1999-05-12 Alan Modra + + * config/tc-i386.h (InvMem): New flag. Add to AnyMem. + (ReverseRegRegmem): Remove. + (ImmExt): New flag. Renumber some of the opcode_modifier bits. + * config/tc-i386.c (md_assemble): Test for PIII SIMD and AMD + 3DNow! via ImmExt opcode_modifier. Remove ReverseRegRegmem + kludge. + + From Doug Ledford + * config/tc-i386.h (RegXMM): New for P/III. + * config/tc-i386.c: Add support for P/III. + +Sat May 8 23:28:50 1999 Richard Henderson + + * config/tc-ppc.c (md_parse_option): Recognize -mppc64bridge. + (md_begin): Allow ppc32 insns in ppc64bridge mode. + (ppc_insert_operand): Accept SIGNOPT in ppc64 mode. + +Thu May 6 23:13:39 1999 Richard Henderson + + * config/tc-i386.c (i386_immediate): Skip whitespace before + complaining about junk after expression. + (i386_displacement): Likewise. + +Thu May 6 19:50:14 1999 Richard Henderson + + * symbols.c (symbol_find_base): Use memcpy instead of strcpy. + Don't copy before downcaseing. + +1999-05-05 Catherine Moore + + * tc-m68k.c: Include elf/m68k.h. + (m68k_elf_final_processing): New routine. + * tc-m68k.h (elf_tc_final_processing m68k_elf_final_processing): + Define. + +Mon May 3 10:26:03 1999 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_apply_fix): Handle 22 bit fmt insn like a + 17 bit fmt insn. + +1999-04-30 Nick Clifton + + * config/tc-mcore.c (mcore_s_section): Dump literals before + changing section. + +1999-04-29 Nick Clifton + + * config/tc-mcore.c (md_apply_fix3): Insert reloc addend into insn + for COFF/PE port. + +Mon Apr 26 12:34:37 1999 Doug Evans + + * config/tc-fr30.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h. + (TC_INIT_FIX_DATA): Delete. + * config/tc-m32r.h (TC_FIX_TYPE): Delete, cgen fields moved to write.h. + (TC_INIT_FIX_DATA): Delete. + * write.h (struct fix): New member fx_cgen, ifdef USING_CGEN. + * write.c (fix_new_internal): Initialize fx_cgen member. + * cgen.c (gas_cgen_record_fixup,gas_cgen_record_fixup_exp): Update. + (gas_cgen_md_apply_fix3): Update. + * config/tc-m32r.c (md_cgen_lookup_reloc): Update. + (md_cgen_record_fixup_exp): Update. + (FX_OPINFO_R_TYPE): Update. + + * frags.c (frag_var,frag_variant): Initialize fr_cgen here. + * config/tc-fr30.h (TC_FRAG_INIT): Delete. + * config/tc-m32r.h (TC_FRAG_INIT): Delete. + * frags.h (struct frag): Make opindex, opinfo ints. + + * config/tc-fr30.c (FX_OPINFO_R_TYPE): Delete, unused. + +1999-04-26 Tom Tromey + + * aclocal.m4, configure: Updated for new version of libtool. + +1999-04-22 Nick Clifton + + * config/tc-mcore.c (md_apply_fix3): Renamed function from + md_apply_fix. + (md_apply_fix3): Do not fix up absolute relocations against + symbolic values. + + * config/tc-mcore.h (MD_APPLY_FIX3): Define. + +1999-04-20 Nick Clifton + + * config/tc-mcore.c (md_pseudo_table): Add intercepts for section + changes and data-in-text directives. + (mcore_cons): New function: intercept cons() operations. + (mcore_float_cons): New function: intercept float_cons() + operations. + (mcore_stringer): New function: intercept stringer() operations. + +1999-04-18 Ian Lance Taylor + + * obj.h (struct format_ops): Change generate_asm_lineno field to + take no parameters. + * config/obj-ecoff.h (OBJ_GENERATE_ASM_LINENO): Don't define. + + * config/tc-alpha.c (find_opcode_match): Add default case to + switch. + (find_macro_match): Likewise. + (load_expression): Parenthesize && within ||. + + * config/tc-alpha.h (TC_RELOC_RTSYM_LOC_FIXUP): Define. + +1999-04-17 Nick Clifton + + * config/tc-mcore.c (md_pseudo_table): Add overrides for .bss + .text .data .section pseudo ops. + (mcore_s_section): New function. Dump lits before changing secs. + (mcore_s_text): New function. Dump lits before changing secs. + (mcore_s_data): New function. Dump lits before changing secs. + +1999-04-16 Gavin Romig-Koch + + * config/tc-mips.c (mips_32bitmode): New. + (md_begin): Set mips_32bitmode if needed. + (mips_elf_final_processing): Don't set EF_MIPS_ARCH. + Set EF_MIPS_32BITMODE. + +Fri Apr 16 12:26:39 1999 Bob Manson + + * config/obj-coff.c (c_section_symbol): Fix typo in previous + change. + +1999-04-16 Nick Clifton + + * config/tc-mcore.h (LOCAL_LABELS_FB): Define to 1. + +Thu Apr 15 16:52:09 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_get_absolute_exression): Try to handle "5 %r3" + expressions correctly. + + +1999-04-15 Gavin Romig-Koch + + * config/tc-mips.c (mips_elf_final_processing): Set EF_MIPS_ARCH. + +Mon Apr 12 23:45:07 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_ip, case '3'): New case for PA2.0 fmpyfadd + and fmpynfadd instructions. + +1999-04-11 Richard Henderson + + * as.h (environ): Declare it, if needed. + * as.c (dump_statistics): Don't declare environ. + * configure.in (environ): Detect declaration. + * configure, config.in: Rebuild + + * config/tc-i386.c (i386_immediate): Accept @GOT relocations. + (i386_displacement): Allocate enough space for replacement buffer. + Clean up replacement buffer initialization. + +1999-04-11 Bob Manson : + + * subsegs.c (section_symbol): Don't create a new symbol if one + already exists; instead, use the existing one, but set its segment + and frag data if it hasn't already been defined. + * config/obj-coff.c (c_section_symbol): Likewise. + +Sat Apr 10 20:10:02 1999 Richard Henderson + + * tc-alpha.c (load_expression): Call as_bad instead of abort. + +1999-04-08 Nick Clifton + + * config/tc-mcore.c: New File: Support routines for MCore + assembler. + * config/tc-mcore.h: New File: Definitions for MCore assembler. + * config/obj-coff.c: Add support for mcore-pe target. + + * Makefile.am: Add support for MCore targets. + * Makefile.in: Regenerate. + * configure.in: Add support for MCore targets. + * configure: Regenerate. + + * doc/all.texi: Set MCORE. + * doc/as.texinfo: Document MCore specific command line options. + + * write.h: Prevent multiple inclusion. + +1999-04-06 Ian Lance Taylor + + * asintl.h (LC_MESSAGES): Never define. + * as.c (main): Don't pass LC_MESSAGES to setlocale if the system + does not define it. + * gasp.c (main): Don't pass LC_MESSAGES to setlocale if the system + does not define it. + + * Makefile.am (m68k-parse.c): If configuring in the source + directory, copy m68k-parse.y into the local directory before + running ylwrap, to remove spurious differences when generating + snapshots. + * Makefile.in: Rebuild. + + * config/tc-sparc.h (md_do_align): Just allocate the number of + bytes necessary, rather than always allocating 1024. + +1999-04-04 Ian Lance Taylor + + * listing.c (listing_newline): Add cast to avoid warning. + * read.c (generate_lineno_debug): Add cases to switch. Reindent. + * config/tc-i386.c (i386_scale): Add return value. + (build_displacement_string): Remove unused local temp_disp2. + (i386_intel_memory_operand): Add parentheses to avoid warning. + (i386_intel_operand): Remove unused local end_of_operand_string. + (i386_operand): Remove unused local operand_modifier. + (i386_operand): Add parens to avoid warning. + +1999-04-04 Don Bowman + + * configure.in: Add mips*-*-vxworks* target; have it define + MIPS_STABS_ELF. + * configure, config.in: Rebuild. + +1999-03-31 Nick Clifton + + * configure.in (emulations): Add support for arm-epoc-pe. + * configure: Regenerate. + * config/te-epoc-pe.h: New file. Define macros specific to + arm-epoc-pe target. + * config/tc-arm.h: Select epoc-pe-arm target format if configured + for arm-epoc-pe target. + +Mon Mar 29 10:15:40 CST 1999 Catherine Moore + + * tc-mips.c (md_apply_fix): Adjust value for linkonce sections. + +Wed Mar 24 14:11:10 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Clean up code to + detect ",n" without a condition. + (pa_parse_neg_cmpsub_cmpltr): Likewise. + + +Tue Mar 23 11:28:23 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_ip, case '~'): The condition for a branch on bit + instruction is encoded with one bit. + + +1999-03-23 Ian Lance Taylor + + * doc/internals.texi (CPU backend): Mention that + line_separator_chars should not include newline. From thi + . + +1999-03-22 Doug Evans + + * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open. + * config/tc-m32r.c (md_begin): Update call to m32r_cgen_cpu_open. + +Sun Mar 21 18:08:18 1999 Richard Henderson + + * tc-alpha.c (md_assemble): Allow '6' in an opcode. + +Thu Mar 18 10:55:30 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_ip, case 'a'): Do not call pa_parse_..._cmpsub_cmpltr. + + +Thu Mar 18 02:30:07 1999 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (pa_ip, case 'd'): Do not allow ",n". + +1999-03-15 Martin Hunt + + * app.c (do_scrub_begin): Change '-' back to a symbol char + so we can use multiple opcodes on a line again. + + * config/tc-d30v.c: By default, warn if a symbol has + the same name as a register. Plus some minor + updates from the branch. + +1999-03-13 Nick Clifton + + * config/tc-d30v.c (md_apply_fix3): Handle BFD_RELOC_8, + BFD_RELOC_16 and BFD_RELOC_64. + +1999-03-12 Andreas Schwab + + * expr.c (expr): Add missing else. + +1999-03-12 Nick Clifton + + * config/tc-arm.c (md_apply_fix3): Improve error message. + +1999-03-11 Doug Evans + + * Makefile.am (CPU_TYPES): Add fr30. + (cgen.o): Add $(CGEN_CPU_PREFIX)-desc.h dependency. + (fr30,m32r dependencies): Update. + * Makefile.in: Rebuild. + + * cgen.c (gas_cgen_record_fixup): Update use of operand->type. + (gas_cgen_record_fixup_exp): Ditto. + (gas_cgen_finish_insn): Call cgen_operand_lookup_by_num. + (gas_cgen_md_apply_fix3): Ditto. Update call to set_vma_operand. + * config/tc-fr30.c (md_begin): Update call to fr30_cgen_cpu_open. + (md_cgen_lookup_reloc): Update use of operand->type. + * config/tc-m32r.c (md_begin): Update call to fr30_cgen_cpu_open. + (md_convert_frag): Call cgen_operand_lookup_by_num. + (md_cgen_lookup_reloc): Update use of operand->type. + (m32r_cgen_record_fixup_exp): Ditto. + +1999-03-09 Jim Blandy + + * config/tc-mips.c (md_show_usage): Fix message. + +1999-03-03 Nick Clifton + + * doc/c-arm.texi (ARM Syntax): Document new command line switches + and LDR reg,= instruction. + + * config/tc-arm.c: Add support for -mcpu=arm810, -mcpu=arm9 and + -mcpu=arm9tdmi. + +Fri Feb 19 09:36:30 1999 Ian Lance Taylor + + * doc/c-arm.texi (ARM-Chars): Fix typo in use of '@'. + +1999-02-17 Nick Clifton + + This patch was created by: Scott Bambrough + + + * app.c: + Special cased '@' character. The '@' character is used as the + ARM assembler comment character, as a special character + and in ELF .symver pseudo-op's, and as a special character in + .type and .section pseudo-ops. + (symver_pseudo): New static variable. + (symver_state): New static variable. + (struct app_save): Add field 'symver_state'. + (app_push): Save global symver_state int struct app_save. + (app_pop): Restore global symver_state from struct app_save. + (do_scrub_chars): Special case handling of '@' character in + .symver pseudo-ops. + + * configure.in: Modified to recognize armv* uname syntax from ARM + Linux kernel. + * configure: Regenerated. + + * config/obj-elf.c (obj_elf_section): Allow '%' as well as '@' as + a prefix to the section's type. + (obj_elf_type): Allow '%' as well as '@' and '#' as prefixes to + the type's typename. + + * config/tc-arm.h: Add support for PIC generation: + (pic_code): New boolean. + (obj_relocate_extern): Define. + (TC_RELOC_RTSYM_LOC_FIXUP): Define + (TC_CONS_FIX_NEW): Define. + (tc_fix_adjustable): Define. + (GLOBAL_OFFSET_TABLE_NAME): Define. + + * config/tc-arm.c: Add support for PIC generation: + (line_seperator_chars): Allow ';' as a seperator for Linux. + (is_immediate_prefix): New macro. + (arm_parse_reloc): New function. + (s_arm_elf_cons): New function. + (do_branch): Special case for BFD_RELOC_ARM_PLT32. + (md_undefined_symbol): Special case handling for the Global Offset + Table's symbol. + (md_apply_fix3): Handle PIC relocs. + (tc_gen_reloc): Handle PIC relocs. + (md_parse_option): Add support for '-k' command line switch to + enable PIC generation. + (cons_fix_new_arm): New function. + (s_arm_elf_cons): New function. + +Tue Feb 16 16:31:53 1999 Ian Lance Taylor + + * configure.in: Add comments for uses of AC_DEFINE. + * acinclude.m4: Likewise. + * acconfig.h: Remove. + * aclocal.m4: Rebuild. + * configure: Rebuild. + * Makefile.in: Rebuild. + * config.in: Rebuild. + +1999-02-15 Jim Lemke + + * config/tc-mips.c (mips_ip: case 'o'): Fix assertion failure for + non-constant offset from a base register. + +1999-02-14 Ken Raeburn + + * config/tc-alpha.c (md_show_usage): Put \ before newline in + strings always. + +Sat Feb 13 14:10:10 1999 Richard Henderson + + * config/tc-alpha.c (cpu_types): Enable EV6 PALcode with -m21264. + (emit_insn): Look for pc-relative and no-overflow specifiers on + internal relocation types. + +1999-02-13 Jim Blandy + + * doc/c-mips.texi (MIPS Opts): Updated list of -mNNNN and + -mcpu=NNNN flags. + + * config/tc-mips.c: Remove all the mips_NNNN variables; just use + mips_cpu instead. + (mips_4650, mips_4010, mips_4100): Variables removed. + (hilo_interlocks, gpr_interlocks, append_insn, macro_build, macro, + macro2, mips16_macro, mips_ip): Test mips_cpu, not the mips_NNNN + variables. + (md_begin): Don't bother initializing the mips_NNNN variables; + mips_cpu is set, and that's good enough now. + (md_parse_option): Have the -mNNNN options set mips_cpu instead of + the mips_NNNN variable. The -no-mNNNN flags are now no-ops. + (show): New function, to handle wrapping in the CPU lists. + (md_show_usage): Update lists of -mcpu and -mNNNN switches. + +Sat Feb 13 00:17:26 1999 Richard Henderson + + * config/tc-i386.c (i386_intel_operand): Ignore `SHORT' rather + than treat as an immediate specifier. + +Thu Feb 11 16:18:31 1999 Richard Henderson + + * config/tc-i386.c: Prototype many functions. + (set_intel_syntax): Accept `prefix'/`noprefix' specifiers. + (i386_immediate): Remove unused second argument. + (i386_intel_operand): Fix i386_is_reg typo. + (i386_operand): Use allow_naked_reg. + (output_invalid): Make operand int for K&R. + +Thu Feb 11 11:21:02 1999 Ian Lance Taylor + + * Makefile.am (EXTRA_as_new_SOURCES): Uncomment--fixed by automake + patch. + * Makefile.in: Rebuild. + +1999-02-09 Doug Evans + + * Makefile.am (DISTCLEANFILES): Change cgen-opc.h to cgen-desc.h. + (cgen.o): Ditto. + (EXTRA_as_new_SOURCES): Comment out. + (.tcdep): -opc.h renamed to -desc.h. + * Makefile.in: Rebuild. + * doc/Makefile.in: Rebuild. + * configure.in: Require autoconf 2.13. Redo using_cgen handling. + Delete call to AM_CYGWIN32. Replace AM_EXEEXT with AC_EXEEXT. + (AC_OUTPUT): -opc.h renamed to -desc.h. + * configure: Rebuild. + * aclocal.m4: Rebuild. + * config.in: Rebuild. + * cgen.c: Include cgen-desc.h, not cgen-opc.h. + (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC. + (gas_cgen_cpu_desc): Renamed from gas_cgen_opcode_desc. + CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE. + CGEN_OPERAND_ATTR renamed to CGEN_OPERAND_ATTR_VALUE. + (gas_cgen_record_fixup): Remove unnecessary != 0 test. + (gas_cgen_record_fixup_exp): Ditto. + (gas_cgen_finish_insn): Ditto. Refer to operand table via cpu + descriptor, not global variable. + (gas_cgen_md_apply_fix3): Refer to operand_table via cpu + descriptor, not global variable. Refer to insert_operand handler + via cpu descriptor, not global function. + * cgen.h (*): CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC. + * config/tc-fr30.c: Include opcodes/fr30-desc.h. + (*): gas_cgen_opcode_desc renamed to gas_cgen_cpu_desc. + CGEN_INSN_ATTR renamed to CGEN_INSN_ATTR_VALUE. + Update call to CGEN_OPERAND_TYPE,CGEN_INSN_OPERANDS. + * config/tc-m32r.c: Ditto. + (assemble_two_insns): Update calls to cgen_lookup_get_insn_operands. + (md_assemble): Ditto. + (md_convert_frag): Update call to CGEN_OPERAND_ENTRY. + +1999-02-09 Nick Clifton + + * config/tc-arm.c (md_apply_fix3): Fix handling of label1 - label2 + relocations for ELF targets. + +1999-02-08 Nick Clifton + + * configure.in: Add support for StrongARM target. + * configure: Regenerate. + +1999-02-05 Nick Clifton + + * config/tc-arm.h: Tidy OBJ_ELF and OBJ_COFF definitions. + + * config/tc-arm.c (md_apply_fix3): Fix BFD_RELOC_ARM_PCREL_BRANCH + for COFF ports. + +Wed Feb 3 11:35:47 1999 Richard Henderson + + * config/tc-alpha.c (md_show_usage): Document pca56 and ev6 options. + +Mon Feb 1 20:37:30 1999 Catherine Moore + + * config/tc-i386.h (LONG_DOUBLE_MNEM_SUFFIX): Define. + (INTEL_DWORD_MNEM_SUFFIX): Define. + (BYTE_PTR): Define. + (WORD_PTR): Define. + (DWORD_PTR): Define. + (XWORD_PTR): Define. + (SHORT): Define. + (OFFSET_FLAT): Define. + (FLAT): Define. + (NONE_FOUND): Define. + (No_dSuf): Define. + (No_xSuf): Define. + * config/tc-i386.c (set_intel_syntax): New routine. + (intel_syntax): Declare. + (allow_naked_reg): Declare. + (md_pseudo_table): Support .intel_syntax and .att_syntax. + (intel_float_operand): New routine. + (md_assemble): Handle INTEL_DWORD_MNEM_SUFFIX. + Handle brackets as well as parens. Call i386_intel_operand for + intel syntax. Reverse operands if appropriate. Handle new + suffixes. Handle movzx and movsx. + (i386_is_reg): New routine. + (i386_immediate): New routine. + (i386_scale): New routine. + (i386_displacement): New routine. + (i386_operand_modifier): New routine. + (build_displacement_string): New routine. + (i386_parse_seg): New routine. + (i386_intel_memory_operand): New routine. + (i386_intel_operand): New routine. + (i386_operand): Call i386_displacement, i386_immediate, + i386_scale, etc. instead of handling inline. + (parse_register): Handle registers without prefix. + +Mon Feb 1 12:24:58 1999 Catherine Moore + + * configure: Regenerate. + * configure.in (arm-*-oabi): New. + (thumb-*-oabi): New. + * config/tc-arm.c (target_oabi): Declare. + (md_apply_fix3): Support REL relocs. + (md_parse_option): Handle -oabi. + (elf32_arm_target_format): New routine. + (md_longopts): Add OPTION_OABI. + * config/tc-arm.h: Redefine TARGET_FORMAT. + + +1999-01-28 Nick Clifton + + * write.c (write_relocs): Handle out of range error. + + * config/tc-fr30.c (fr30_fix_adjustable): New function. + (fr30_force_relocation): Default to 0. + + * config/tc-fr30.h (obj_fix_adjustable): Define. + (TC_FORCE_RELOCATION): Define. + + * cgen.c (gas_cgen_md_apply_fix3): Do not apply fixes to VTABLE + relocs. + +1999-01-16 Nick Clifton + + * config/tc-d30v.c (write_2_short): Do not generate a sequential + merge of two instructions if the left instruciton kills the right. + +1999-01-11 Doug Evans + + * Makefile.in: Regenerate. + * configure.in: Redo test for using cgen. + * configure: Regenerate. + +1999-01-09 Nick Clifton + + * config/obj-coff.h (obj_adjust_symtab): Prevent accidental + redefinition of this macro. + +Tue Jan 5 21:58:03 1999 Doug Evans + + * config/tc-mips.c (mips_frob_file): Disable "Unmatched %hi reloc" + warning. + +1998-12-29 Gavin Romig-Koch + + * config/tc-mips.c (append_insn): For mips16, insert a nop between + a read of HI or LO and an immediatly following branch. + +1998-12-29 Gavin Romig-Koch + + * config/tc-mips.c (md_begin): Another correction to the setting of + mips_eabi64. + +1998-12-23 Gavin Romig-Koch + + * config/tc-mips.c (md_begin): Correct type-o in setting of + mips_eabi64. + +1998-12-21 Nick Clifton + + * config/tc-m32r.c (md_assemble): Emit a NOP after a relaxable 16 + bit insn when optimizing, so that parallelised instructions will + start on a 32 bit boundary. + +1998-12-19 Gavin Romig-Koch + + * config/tc-mips.c (mips_eabi64): New. + (md_begin): Set mips_eabi64. + (mips_elf_final_processing): Use it. + +1998-12-18 Gavin Romig-Koch + + * config/tc-mips.c (mips_elf_final_processing): + Correct setting of ABI in e_flags. + +Wed Dec 16 16:17:22 1998 Dave Brolley + + * config/tc-fr30.c (md_assemble): Warn about invalid instructions + in delay slots. + +1998-12-16 Gavin Romig-Koch + + * config/tc-mips.c (md_begin,md_parse_option): Handle vr4111. + +1998-12-15 Doug Evans + + * cgen.c (gas_cgen_md_apply_fix3): Mark as an error, rather than a + warning, values that don't fit in the field. + +1998-12-15 Gavin Romig-Koch + + * config/tc-mips.c (mips_abi_string): New. + (md_parse_option,md_longopts): Add mabi. + (mips_elf_final_processing): Set e_flags based on mabi flag. + +1998-12-15 Gavin Romig-Koch + + * config/tc-mips.c (md_parse_option): Handle vr4111. + +98-12-11 Ken Raeburn + + * config/tc-h8300.c (build_bytes): Change message given if the + instruction requires H8/300H mode and we're not in Hmode, to + suggest that it may be the operand modes that are the problem, not + necessarily the opcode. + +1998-12-10 Nick Clifton + + * config/tc-fr30.c: Add line separator character. + +Tue Dec 8 19:51:50 1998 Mark Klein + + * configure.in (hppa-*-mpeix*): New target. + * config/obj-som.h (obj_som_compiler): Declare. + * config/obj-som.c (compiler_seen): New static variable. + (obj_som_compiler): New function. + * config/tc-hppa.c: Update tc_data uses for change to bfd/som.h. + (md_pseudo_table): Add "compiler" if OBJ_SOM. + (pa_type_args): Set hppa_priv_level. + (pa_compiler): New static function if OBJ_SOM. + * configure: Rebuild. + +Tue Dec 8 15:00:50 1998 Ian Lance Taylor + + * read.c (output_leb128): Don't mark as inline. + +1998-12-08 Andrew MacLeod + + * config/tc-ppc.c (ppc_vbyte): Prototype and new function for + AIX .vbyte unaligned data support. + (md_pseudo_table): Add 'vbyte' to list of valid pseudos. + (ppc_elf_validate_fix): Add eh_frame to list of ELF relocatable + sections. + +1998-12-07 Nick Clifton + + * config/tc-d30v.c (md_assemble, do_assemble): Improve erroneous + input handling. + +Mon Dec 7 09:48:34 1998 Catherine Moore + + * config/tc-arm.c (elf32_arm_force_relocation): Check for + BFD_RELOC_ARM_PCREL_BRANCH. + +Sun Dec 6 12:46:36 1998 Ian Lance Taylor + + * configure.in: Define TARGET_BYTES_{BIG,LITTLE}_ENDIAN after + checking the target type. + (mips-dec-bsd*): Set endian to little. + * configure: Rebuild. + + COFF weak symbol support, based on patches from Mark Elbrecht + : + * config/obj-coff.h (S_IS_WEAK): Define if not BFD_ASSEMBLER. + * config/obj-coff.c (obj_coff_weak): New static function. + (obj_coff_endef) [both versions]: Handle weak symbols. + (coff_frob_symbol): Likewise. + (yank_symbols): Likewise. + (obj_pseudo_table): Add "weak". + + * configure.in (m68k-*-gnu*): New target. From Aymeric Vincent + . + * aclocal.m4: Rebuild with current tools. + * configure: Rebuild. + + * config/tc-alpha.c (emit_ldgp): Give an error message rather than + an assertion failure for a case we can't handle when OBJ_ECOFF. + + * expr.c (operator): And with 0xff to avoid problems with signed + char. + +1998-12-03 Nick Clifton + + * config/tc-fr30.c (md_cgen_lookup_reloc): Generate + BFD_RELOC_FR30_48 instead of BFD_RELOC_FR30_32. + +1998-12-02 Nick Clifton + + * config/tc-fr30.c (md_cgen_lookup_reloc): Enable relocs for + LDI:20 insn. + +Thu Nov 26 11:23:48 1998 Dave Brolley + + * config/tc-fr30.c (md_pcrel_from_section): Restore previous + calculation of pcrel point. + +Tue Nov 24 17:21:52 1998 Nick Clifton + + * config/tc-fr30.c (md_pcrel_from_section): Fix calculation of + pcrel point. + +Tue Nov 24 14:54:38 1998 Nick Clifton + + * config/tc-d10v.c (md_assemble): Make static 'etype' have file + scope. + (d10v_cleanup): Only generate previous insn if a multiline insn is + not pending. + +Fri Nov 20 11:41:13 1998 Nick Clifton + + * config/tc-fr30.c (md_cgen_lookup_reloc): Add support for + FR30_OPERAND_I32. + +Thu Nov 19 15:01:29 1998 Nick Clifton + + * config/tc-arm.c (md_parse_option): Add support for -marm7xxx and + -marm6xxx command line switches. + +1998-11-18 Doug Evans + + * Makefile.am (DEP): Use $(srcdir)/../mkdep. + (itbl-ops.o): Delete duplicate dependencies. + Rebuild dependencies. + Add fr30 dependencies. + * Makefile.in: Rebuild. + +Tue Nov 17 13:42:42 1998 Nick Clifton + + * config/tc-fr30.c (md_cgen_lookup_reloc): Updated to match latest + opcode list. + * listing.c: Ignore line terminator characters found inside + strings. + +Thu Nov 12 19:21:24 1998 Dave Brolley + + * po/gas.pot: Regenerated. + +Thu Nov 12 10:54:16 1998 Nick Clifton + + * config/tc-fr30.c (fr30_is_colon_insn): New name for + fr30_is_label_start(). Also checks for delay slot insns. + + * config/tc-fr30.c (fr30_is_label_start): New function: Handle + FR30 instructions which contain a colon in the mnemonic. + + * config/tc-fr30.h (TC_START_LABEL): Define this macro. + +Wed Nov 11 09:58:21 1998 Nick Clifton + + * config/tc-fr30.c: Removed currently superflous code. + +Tue Nov 10 13:13:05 1998 Nick Clifton + + * config/tc-fr30.h: New file. + * config/tc-fr30.c: Tweaking so that it will compile. + +Tue Nov 10 14:41:33 1998 Catherine Moore + + * config/tc-d10v.h (obj_fix_adjustable): Define. + (TC_FORCE_RELOCATION): Define. + (d10v_force_relocation): Declare. + * config/tc-d10v.c (tc_gen_reloc): Handle Vtable relocs. + (md_apply_fix3): Handle Vtable relocs. + (d10v_fix_adjustable): New. + (d10v_force_relocation): New. + +Mon Nov 9 14:25:06 1998 Nick Clifton + + * config/tc-d30v.c: Change default behaviour to ignore potential + conflicts between register name and symbol names. + +Wed Nov 4 18:42:00 1998 Dave Brolley + + * configure.in: Add fr30-*-*. + * config/tc-fr30.c: New file. + * Makefile.in: Regenerated. + * config.in: Regenerated. + * configure: Regenerated. + * doc/Makefile.in: Regenerated. + * po/gas.pot: Regenerated. + +Mon Nov 2 20:54:16 1998 Doug Evans + + * config/tc-m32r.c (assemble_two_insns): Ensure both insns + are 16 bit insns. + +Mon Nov 2 20:10:18 1998 Martin von Loewis + + * app.c (do_scrub_begin): Set characters above 127 to be symbol + characters. + (do_scrub_chars): Add some casts to unsigned char to avoid + unwanted sign extension. + * read.c (lex_type): Set characters about 127 to be symbol + characters. + * config/tc-i386.c (md_begin): Set identifier_chars and + operand_chars for values above 127. + +Mon Nov 2 15:05:33 1998 Geoffrey Noer + + * configure.in: detect cygwin* instead of cygwin32* + * configure: regenerate + +Tue Oct 27 13:18:40 1998 Nick Clifton + + * listing.c: Add support for producing a listing from piped + input. + +Tue Oct 27 08:56:44 1998 Gavin Romig-Koch + + * config/tc-mips.c (hilo_interlocks): Remove mips_3900. + (append_insn): Account for the tx39's multiply behavior. + +1998-10-26 Michael Meissner + + * config/tc-m32r.c (assemble_two_insns): Rename assemble_two_insns + from assemble_parallel_insns. Add support for '->' to indicate + explicitly serializing the instructions. + (md_assemble): Ditto. + +Sat Oct 24 15:12:19 1998 Catherine Moore + + * config/tc-sh.c (sh_fix_adjustable): Adjust EXTERN and + WEAK handling. + +Thu Oct 22 12:41:33 1998 Catherine Moore + + * cgen.c (gas_cgen_md_apply_fix3): Revert last change. + +Thu Oct 22 10:03:15 1998 Ron Unrau + + * config/tc-mips.c: support frame and regmask/fregmask when + MIPS_STABS_ELF is specified. + +Wed Oct 21 11:34:51 1998 Catherine Moore + + * config/tc-sh.c (sh_fix_adjustable): Only include if OBJ_ELF. + (md_apply_fix): Don't return 1 for VTABLE relocs. + * config/tc-sh.h (obj_fix_adjustable): Define only if OBJ_ELF. + +Tue Oct 20 11:18:28 1998 Alan Modra + + * doc/c-i386.texi: Replace occurences of "opcode" with + "instruction mnemonic", "instruction", or "mnemonic" when + referring to the name of an instruction. Use "opcode" when + referring to the sequence of machine bytes. + + * config/tc-i386.c (opcode_chars): Rename to mnemonic_chars. + (is_opcode_char): Rename to is_mnemonic_char. + (md_assemble and i386_operand): Correct error messages from + "opcode" to "instruction mnemonic" + Rename throughout opcode[] -> mnemonic[], opp -> mnem_p, + MAX_OPCODE_SIZE -> MAX_MNEM_SIZE, + DWORD_OPCODE_SUFFIX -> DWORD_MNEM_SUFFIX, + WORD_OPCODE_SUFFIX -> WORD_MNEM_SUFFIX, + BYTE_OPCODE_SUFFIX -> BYTE_MNEM_SUFFIX, + SHORT_OPCODE_SUFFIX -> SHORT_MNEM_SUFFIX + LONG_OPCODE_SUFFIX -> LONG_MNEM_SUFFIX + + * config/tc-i386.h (*_MNEM_SUFFIX): Rename from *_OPCODE_SUFFIX. + + * config/tc-i386.c (i386_operand): Check for garbage after + register name. + +Tue Oct 20 10:49:42 1998 Ian Lance Taylor + + * config/tc-i386.c (md_apply_fix3): Change handling of PCREL reloc + for BFD_ASSEMBLER to only change value when COFF if TE_PE. + +Mon Oct 19 20:20:42 1998 Catherine Moore + + * config/tc-sh.h (obj_fix_adjustable): Define. + * config/tc-sh.c (sh_force_relocation): Handle VT relocs. + (md_apply_fix): Likewise. + (tc_gen_reloc): Likewise. + (sh_fix_adjustable): New. + +Mon Oct 19 12:35:43 1998 Doug Evans + + * cgen.c (gas_cgen_finish_insn): Update handling of CGEN_INT_INSN_P. + * cgen.h (gas_cgen_finish_insn): Update prototype. + * config/tc-m32r.c (m32r_insn): CGEN_INT_INSN -> CGEN_INT_INSN_P. + cgen_insn_t -> CGEN_INSN_INT. + (make_parallel): Update handling of CGEN_INT_INSN_P. + (assemble_parallel_insn): Ditto. + (target_make_parallel): New function. + (md_assemble): Use it. + +Mon Oct 19 13:16:12 1998 Catherine Moore + + * config/tc-m32r.c (m32r_force_relocation): Fix typo. + +Sun Oct 18 18:48:57 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-sh.c (md_assemble): Make sure the entire opcode is + converted into lower case. + +Fri Oct 16 13:36:34 CDT Catherine Moore + + * cgen.c (gas_cgen_md_apply_fix3): Handle VTABLE relocs. + (gas_cgen_tc_gen_reloc): Likewise. + * config/tc-m32r.h (obj_fix_adjustable): Define. + * config/tc-m32r.c (m32r_fix_adjustable): New. + (m32r_force_relocation): Handle VTABLE relocs. + +Wed Oct 14 11:33:38 1998 Nick Clifton + + * doc/c-arm.texi (ARM Directives): Document .ltorn directive. + +Mon Oct 12 11:07:21 1998 Nick Clifton + + * config/tc-m32r.c (assemble_parallel_insn): Convert second opcode + to lower case before parsing. + + * config/tc-d30v.c (parallel_ok): Ignore conflicts when explicitly + parallel insns modift buts in the PSW as a side effect. + +Thu Oct 8 10:18:33 1998 Nick Clifton + + * config/tc-d30v.c (find_format): Test for missing flag and + control registers. + + (md_apply_fix3): Fix error messages to avoid + assumption about presence of a symbol. + + (parallel_ok): Disallow parallel instructions that both modify the + same flag register. + + (find_format): Generate a warning if an odd numbered register is + used as the first register in a mutli-register instruction. + +Wed Oct 7 14:09:14 1998 Nick Clifton + + * config/tc-d30v.c (md_apply_fix3): Do not assume that bad + relocations are always associated with a symbol. + +Tue Oct 6 09:31:15 1998 Catherine Moore + + * tc-sparc.h (TC_FORCE_RELOCATION): Define. + (elf32_sparc_force_relocation): Declare. + * tc-sparc.c (md_apply_fix3): Handle vtable relocs. + (tc_gen_reloc): Handle vtable relocs. + (elf32_sparc_force_relocation): New. + +Mon Oct 5 09:25:32 1998 Catherine Moore + + * symbols.c (S_IS_FUNCTION): New. + * config/tc-v850.h (obj_fix_adjustable): Define. + (TC_FORCE_RELOCATION): Define. + (v850_force_relocation): Declare. + * config/tc-v850.c (tc_gen_reloc): Use offset instead + of fx_addnumber for VTABLE reloc addends. + (md_apply_fix3): Handle VTABLE relocs. + (v850_fix_adjustable): New. + (v850_force_relocation): New. + +Mon Oct 5 00:48:52 1998 Jeffrey A Law (law@cygnus.com) + + * tc-hppa.c (fp_operand_format): Add some additional formats. + (pa_ip): Do not automatically promote into pa2.0 mode. + (pa_level): Handle ".level 2.0". + +Sun Oct 4 20:57:43 1998 Alan Modra + + * config/tc-i386.c (md_assemble): Handle AMD_3DNOW_OPCODE. + * config/tc-i386.h (template.extension_opcode): Change to + unsigned int to allow full range of 8-bit opcode suffixes. + (None): Redefine as 0xffff. + + From Jeff B Epler + * doc/c-i386.texi (i386-SIMD): New section. + +Thu Oct 1 15:37:54 1998 Richard Henderson + + * read.c (discard_rest_of_line): New function. + * read.h: Declare it. + * config/tc-alpha.c (s_alpha_mask, s_alpha_frame): Use it. + +Thu Oct 1 10:33:53 1998 Nick Clifton + + * config/tc-d10v.c (find_symbol_matching_register): New function. + (find_opcode): Cope with the case where a register name matches + a symbol name. + +Wed Sep 30 10:52:32 1998 Nick Clifton + + * config/tc-v850.c (md_pcrel_from): Rename to + v850_pcrel_from_section. + (v850_pcrel_from_section): Do not resolves symbols in other + sections. + + * config/tc-v850.h (MD_PCREL_FROM_SECTION): Define. + +Mon Sep 28 11:01:20 1998 Nick Clifton + + * config/tc-d10v.c (find_opcode): Generate an error if a register + is supplied for an operand that should not be a register. + +Fri Sep 25 10:04:21 1998 Nick Clifton + + * config/tc-d30v.c (write_2_short): But do allow delayed branch + instructions to have another instruction in the right bin. + +Thu Sep 24 09:28:34 1998 Nick Clifton + + * config/tc-d30v.c (write_2_short): Do not allow instructions in + the right container if the left container holds a branch + instruction. + +Wed Sep 23 10:54:29 1998 Nick Clifton + + * config/tc-d30v.c (reg_name_search): Only warn if a name matches + both a register name and symbol name. + (find_format): Allow correct parsing of MVTSYS and MVFSYS insns. + +Tue Sep 22 17:49:16 1998 Nick Clifton + + * config/tc-d30v.c (write_2_short): Implement EITHER_BUT_PREFER_MU + execution unit class. + + (reg_name_search): If a name matches a register and a symbol, + prefer the register. + (find_format): Disallow flag registers when a general purpose + register is required. + If a number is required, but a register has been given, check to + see if a symbol with the same name as the register exists, and if + so, use that symbol. + +Tue Sep 22 16:40:52 1998 Jim Wilson + + * config/obj-elf.h (ECOFF_DEBUGGING): Add missing parens. + +Tue Sep 22 15:44:21 1998 Nick Clifton + + * config/tc-d30v.c (find_format): Do not accept flag registers as + general purpose registers. + (find_format): If an immediate value is expected at a given place + in a format, but a register name has been provided instead, check + to see if that register name matches the name of a predefined + symbol and if it does, then use the symbol instead. + (reg_name_search): If a register name matches a symbol name, + prefer the register name to the symbol name. + +Mon Sep 21 10:42:57 1998 Nick Clifton + + * config/tc-m32r.c (m32r_do_align): After inserting NOPs, reset + the previous insn to empty. + +1998-09-20 Michael Meissner + + * config/tc-ppc.c (md_apply_fix3): Do not break string into two + pieces, forcing the use of an ANSI compiler. + +Sun Sep 20 00:58:12 1998 Andreas Schwab + + * config/tc-m68k.h (TC_FORCE_RELOCATION): New macro. Force vtable + relocs. + * config/tc-m68k.c (md_apply_fix_2): Do nothing for vtable relocs. + +Tue Sep 15 08:51:07 1998 Catherine Moore + + * config/obj-elf.c (obj_elf_vtable_inherit): Handle arm + assembler syntax. + (obj_elf_vtable_entry): Likewise. + * config/tc-arm.h: Define TC_FORCE_RELOCATION for OBJ_ELF. + * config/tc-arm.c (md_apply_fix3): Handle VTABLE relocations. + (tc_gen_reloc): Likewise. + (arm_fix_adjustable): Likewise. + (elf32_arm_force_relocation): New. + (armelf_frob_symbol): Remove coff-style symbol support. + +Wed Sep 9 11:27:16 1998 Richard Henderson + + * config/tc-i386.c (i386_operand): Fix typo in last patch. + +Tue Sep 8 18:10:01 1998 Catherine Moore + + * config/tc-arm.c (arm_adjust_symtab): Move #ifdef + OBJ_COFF so that routine is defined for a.out format. + +Tue Sep 8 15:56:19 1998 Richard Henderson + + * config/tc-i386.c (i386_operand): Detect non-segment registers + used as segment prefixes. + +Sat Sep 5 19:00:38 1998 Ian Lance Taylor + + * ehopt.c (check_eh_frame): Check the size of the FDE, and don't + optimize across FDE boundaries. + + * config/obj-coff.c (obj_coff_section): Preserve any link once + flags when setting the section flags. + +Fri Sep 4 17:07:14 1998 Nick Clifton + + * config/tc-arm.h (obj_adjust_symtab): Fixed typo. + * config/tc-arm.c (armelf_adjust_symtab): Reformatted. + +Fri Sep 4 13:57:43 1998 Jakub Jelinek + + * config/tc-sparc.c (in_signed_range): Sign extend 32-bit words + to the host width. + +Wed Sep 2 11:31:14 1998 Richard Henderson + + * frags.c (frag_grow): Include the size of the frag struct in the + obstack chunk size. + + * subsegs.c (subseg_set_rest): Adjust the seginfo frchain start + if the new subseg comes before the old. + +Tue Sep 1 15:01:33 1998 Jakub Jelinek + + * config/tc-sparc.c (sparc_ip): Allow all digits in an instruction + to handle edge8 and edge16. + +Mon Aug 31 09:51:14 1998 Richard Henderson + + * config/obj-elf.c (obj_elf_vtable_inherit): Print error message + before we clobber the symbol involved. + +Mon Aug 31 10:58:06 1998 Catherine Moore + + * config/tc-arm.c: Remove OBJ_ELF definitions for + S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. Only + use arm_adjust_symtab for OBJ_COFF. + (armelf_adjust_symtab): New Routine. + * config/tc-arm.h: Define obj_adjust_symtab to + armelf_adjust_symtab for OBJ_ELF. + +Sat Aug 29 22:18:51 1998 Richard Henderson + + * configure.in: Make all i386-elf targets use bfd_gas. + * config/tc-i386.c (tc_i386_force_relocation): New. + (tc_i386_fix_adjustable): Don't fix vtable relocs. + (md_apply_fix3): Likewise. + (tc_gen_reloc): Handle them. + * config/tc-i386.h (TC_FORCE_RELOCATION): Always define, calling + tc_i386_force_relocation. + +Mon Aug 24 13:40:21 1998 Nick Clifton + + * config/tc-arm.c (md_show_usage): Improve formatting of --help output. + +Fri Aug 21 18:43:48 1998 Nick Clifton + + * config/tc-d30v.c (md_assemble): Copy previous opcode over + current opcode after writing the first insturction of a reverse + sequential pair. + +Fri Aug 21 07:30:35 1998 Doug Evans + + * read.h (generate_lineno_debug): Add prototype. + * read.c (generate_lineno_debug): Make non-static. + +Thu Aug 20 23:17:04 1998 Alan Modra + + * config/tc-i386.c (md_assemble): Only warn for address/data size + prefixes. + +Thu Aug 20 14:45:08 1998 Nick Clifton + + * config/tc-arm.c (arm_fix_adjustable): Do not adjust relocations + against Thumb function names, as the linker needs this information. + +1998-08-20 Vladimir N. Makarov + + * expr.c (operand): Check also that there is no advance in operand + after atof_generic in order to decide "is it label 0f or floating + point number?". + +Wed Aug 19 09:30:16 1998 Nick Clifton + + * config/tc-m32r.c: Replace double dash prefix to M32R specific + command line options with a single dash. + * doc/c-m32r.texi: Replace double dash prefix with a single dash. + +Tue Aug 18 11:59:43 1998 Catherine Moore + + * tc-arm.h: Define obj_fix_adjustable for OBJ_ELF. + * tc-arm.c (arm_fix_adjustable): New routine. + +1998-08-13 Vladimir N. Makarov + + * read.c (s_align, s_comm, s_mri_common, s_fail, s_globl, s_space, + s_float_space, s_struct, cons_worker): Move ignore_rest_of_line or + demand_empty_rest_of_line before mri_comment_end. + (equals): Check garbage after expression before + mri_comment_end in MRI mode. + +Thu Aug 13 15:08:42 1998 Ian Lance Taylor + + * config/tc-mips.c (macro): Correct M_SGE_I/M_SGEUI_I case for a + small immediate constant to use the constant itself rather than + always using 1. + +Wed Aug 12 18:47:38 1998 Ian Lance Taylor + + * config/tc-hppa.c (pa_enter): Call as_bad rather than abort. + (pa_leave): Likewise. + +Wed Aug 12 13:25:03 1998 Alan Modra + + * config/tc-i386.c (md_assemble): Emit a warning for stand-alone + prefixes. + (i386_operand): Fix an error message. + +Tue Aug 11 14:44:32 1998 Nick Clifton + + * doc/c-arm.texi (ARM Directives): Document .req directive. + + * config/tc-arm.c (reg_required_here): Display erroneous string if + the register name could not be decoded. + Do not set inst.instruction if the sift is -1. + +Mon Aug 10 15:39:56 1998 Richard Henderson + + * config/tc-alpha.c (tc_gen_reloc): Bias WEAK symbols just as + we do for EXTERN. + +Mon Aug 10 15:06:18 1998 Nick Clifton + + * config/tc-d30v.c (d30v_align): Always perform alignment request, + even if it is belived to be unnecessary. + +Mon Aug 10 17:48:09 1998 Alan Modra + + config/tc-i386.c (i386_operand): Size immediate constants by + suffix (erroneously removed as part of July 7 change). + +Sun Aug 9 20:45:32 1998 Catherine Moore + + * config/obj-elf.h: Check for redefinition of obj_frob_symbol. + * config/tc-arm.c: Define S_GET_STORAGE_CLASS and S_SET_STORAGE_CLASS. + (armelf_frob_symbol): New Routine. + * config/tc-arm.h: Define obj_frob_symbol if OBJ_ELF. + +Sat Aug 8 15:21:28 1998 Richard Henderson + + * config/tc-alpha.c (alpha_fix_adjustable): Don't adjust weak syms. + +Wed Aug 5 15:54:14 1998 Nick Clifton + + * config/tc-arm.c (md_begin): Set BFD private flags depending upon + command line switches passed to assembler. + +Mon Aug 3 14:02:52 1998 Doug Evans + + * cgen.h (GAS_CGEN_MAX_FIXUPS): GAS_ prepended, all uses updated. + (gas_cgen_opcode_desc): Declare. + (gas_cgen_parse_operand): Declare. + (*): Prepend gas_ to gas specific fns to denote them as such. + All uses updated. + * cgen.c (gas_cgen_opcode_desc): New global + (gas_cgen_init_parse): Renamed from cgen_asm_init_parse. + (queue_fixup): Renamed from cgen_queue_fixup. + (*): Prepend gas_ to gas specific fns to denote them as such. + All uses updated. + (gas_cgen_md_apply_fix3): Update call to insert_operand. + (gas_cgen_finish_insn): Renamed from cgen_asm_finish_insn. + * config/tc-m32r.c (md_begin): Remove use of CGEN_SYM. + Open opcode table and initialize it. + (make_parallel): Use gas_cgen_opcode_desc. + (assemble_parallel_insn): Ditto. Remove use of CGEN_SYM. + (md_assemble): Ditto. + +Sat Aug 1 19:27:30 1998 Richard Henderson + + * as.h (debug_info_type): Add entries for unspecified and dwarf*. + * ecoff.c (ecoff_generate_asm_lineno): Take no arguments; call + as_where ourselves. Provide a stub for !ECOFF_DEBUGGING. + * ecoff.h: Move ECOFF_DEBUGGING protection inside GAS_ECOFF_H. + Move ecoff_generate_asm_lineno outside ECOFF_DEBUGGING protection. + * read.c (generate_lineno_debug): Tidy ECOFF bits. Use + DEBUG_UNSPECIFIED rather than DEBUG_NONE for initial test. + * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Define to a variable. + (SEPARATE_STAB_SECTIONS): Conditionalize on value of ECOFF_DEBUGGING. + (INIT_STAB_SECTION): Likewise. + (OBJ_PROCESS_STAB): Likewise. + + * config/tc-alpha.c (md_longopts): New options -mdebug/-no-mdebug. + (md_parse_option): Watch for them. + (alpha_cur_ent_sym, alpha_flag_mdebug): New variables. + (md_begin): Kill neverdef code. + (s_alpha_ent, s_alpha_end, s_alpha_mask, s_alpha_frame): New. + (s_alpha_prologue): Watch alpha_cur_ent_sym. + (s_alpha_coff_wrapper): New. + (md_pseudo_table): Trap all ECOFF pseudos. + +Fri Jul 31 16:45:54 1998 Ron Unrau + + Start of changes to remove mdebug section from mips*-elf + Based on MIPS_STAB_ELF definition + * acconfig.h: undef if not configured + * config.in: undef if not configured + * config/mips-elf.h: only set ECOFF debugging if not stabs-in-elf + * config/tc-mips.c (s_ent): set BSF_FUNCTION + * stabs.c (s_stab_generic): flush frag + +Fri Jul 31 16:14:45 1998 Catherine Moore + + * configure.in: (arm-*-elf): Handle. + (thumb-*-elf): Handle. + * configure: Regenerate. + * read.c (stringer): Fix typo in comment. + * write.c (fixup_segment): Don't add symbol value to addend if + TC_ARM and OBJ_ELF. + * config/tc-arm.c (md_section_align): Don't align dwarf debug + sections. + (tc_gen_reloc): Always set the reloc addend to fixp->fx_offset + for OBJ_ELF. + +Thu Jul 30 21:38:43 1998 Frank Ch. Eigler + + * config/tc-d30v.c ({cur,prev}_left_kills_right_p): New variables. + (write_2_short): Emit warning if new flag is set. + (do_assemble): Set flags if left instruction is one of special + "right-instruction-killer" type. + +Tue Jun 28 18:12:28 1998 Stan Cox + + * config/tc-sparc.c (md_number_to_chars, cons_fix_new_sparc): + Always output words in debug_info section as big endian. + (sparc_target_format): Choose correct bfd target. + (md_apply_fix3): Rename BFD_RELOC_SPARC_32LE to BFD_RELOC_SPARC_REV32. + +Tue Jul 28 11:01:21 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (md_assemble): Fix "errmsg" initialization + to work with internationalization code. Issue an error when two + operands match that are not allowed to match. + +Mon Jul 27 16:25:58 1998 Doug Evans + + * configure.in (install_tooldir): Allow target to specify whether + it wants to be installed in $(tooldir)/bin. + * configure: Regenerate. + * Makefile.am (install-exec-local): Set install-exec-tooldir + dependency via configure. + * Makefile.in: Regenerate. + +Fri Jul 24 19:58:59 1998 Doug Evans + + * Makefile.am (install-exec-local): Split into two ... + (install-exec-bindir,install-exec-tooldir): New rules. + * Makefile.in: Regenerate. + +Fri Jul 24 16:31:49 1998 Ian Lance Taylor + + * Makefile.am (install-exec-local): Don't remove the file before + checking whether $(bindir) == $(tooldir)/bin. From Maciej + W. Rozycki . + * Makefile.in: Rebuild. + +Fri Jul 24 09:13:46 1998 Doug Evans + + * cgen.c: Include libiberty.h. + (cgen_md_apply_fix3): Update call to md_cgen_lookup_reloc. + (cgen_tc_gen_reloc): Use xmalloc, not bfd_alloc. + * cgen.h (cgen_md_apply_fix3,cgen_tc_gen_reloc): Declare. + (md_cgen_lookup_reloc)): Declare. + (md_cgen_record_fixup_exp): Declare. + * config/tc-m32r.h (md_pcrel_from_section): Declare. + (m32r_relax_frag): Declare. + (cgen_md_apply_fix3): Decls moved to cgen.h. + (cgen_record_fixup_exp,cgen_tc_gen_reloc): Ditto. + (m32r_cgen_record_fixup_exp): Delete decl. + * config/tc-m32r.c (m32r_cpu_desc): #if 0 out. + (assemble_nop): Delete. + (expand_debug_syms): Delete unused `exp'. + (md_cgen_lookup_reloc): Renamed from CGEN_SYM (lookup_reloc). + Add default case for -Wall. + (m32r_cgen_record_fixup_exp): Add default case for -Wall. + (md_atof): Delete unused wordP. + +Thu Jul 23 13:19:50 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (md_assemble): Make sure "errmsg" has a non-NULL + value. + +Wed Jul 22 14:36:56 1998 Ian Lance Taylor + + * doc/as.texinfo: Add documentation for .end, .exitm, .fail, + .ifc, .ifeqs, .ifge, .ifgt, .ifle, .iflt, .ifnc, .ifne, .ifnes, + .print, .purgem, and .struct. Remove documentation for + .app-file. + +Tue Jul 21 16:50:52 1998 Doug Evans + + * cgen.c (cgen_md_apply_fix3): set_operand renamed to set_vma_operand. + Update call to insert_operand. + +Fri Jul 17 11:42:20 1998 Nick Clifton + + * config/tc-m32r.c (ms_show_usage): Formatting changes. + +Wed Jul 15 15:38:28 1998 Ian Lance Taylor + + * config/tc-i386.c (md_assemble): Don't get confused by trailing + whitespace after a prefix operator. + +Tue Jul 14 15:32:56 1998 Richard Henderson + + * configure.in (i386-*-beos{pe,elf,}*): Recognize. + +Tue Jul 14 12:33:44 1998 Chris Torek + + * config/tc-sparc.c (log2): New static function. + (s_reserve): Use log2 to convert alignment before calling + record_alignment. + (s_common): Use log2 to convert alignment before calling + record_alignment and frag_align. + (sparc_cons_align): Use log2. + +Tue Jul 14 11:58:40 1998 Ian Lance Taylor + + * config/tc-sparc.c (s_reserve): Set symbol size if OBJ_ELF. + (s_common): Likewise. + + * config/tc-sparc.c (sparc_handle_align): Reindent a bit. Correct + initialization of waddr. + (sparc_elf_final_processing): Add default case to switch. + +Tue Jul 14 11:00:16 1998 Alan Modra + + * doc/c-i386.texi: Fix a typo. Use the term 80-bit real rather + than temporary real. + +Mon Jul 13 13:55:42 1998 Ian Lance Taylor + + * write.c (subsegs_finish): Don't align the segments if there were + any errors. + + * config/obj-coff.c (c_symbol_merge): Correct number of bytes when + copying aux information. + + * expr.c (make_expr_symbol): Catch attempts to turn an O_big + expression into a symbol. + +Mon Jul 13 13:29:04 1998 Alan Modra + + * config/tc-i386.c (mode_from_disp_size): Change arg and return + type to unsigned int. + (md_assemble): Change type used to store offsets from unsigned + long to long. + (i386_operand): Switch error check to only call RESTORE_END_STRING + once after parse_register. + +Fri Jul 10 16:00:04 1998 Nick Clifton + + * config/tc-v850.c (md_show_usage): Changed format to match that + of gcc, ld, etc. + + * as.c (show_usage): Changed format to match that of gcc, ld, etc. + +Thu Jul 9 12:09:57 1998 Andreas Schwab + + * config/tc-m68k.c (tc_m68k_fix_adjustable): Don't adjust vtable + relocs. + (md_apply_fix_2): Force the symbol of the vtable reloc to be + weak. + +Thu Jul 9 11:31:54 1998 Ian Lance Taylor + + * doc/Makefile.am (MAINTAINERCLEANFILES): Define. + * doc/Makefile.in: Rebuild. + +Wed Jul 8 12:18:56 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (mips_ip, case 'i' and 'j'): Mask off high bits + for %lo expressions. + (mips_ip, case 'u'): Move range check after code to mask + off bits in %hi/%lo expressions. Mask off high bits for + %lo expressions. + +Tue Jul 7 17:57:38 1998 Ian Lance Taylor + + * doc/Makefile.am (gasver.texi): New target. + (as.info, as.dvi): Depends upon gasver.texi. + * doc/as.texinfo: Include gasver.texi. Mention version number on + title page and in top node. + * doc/Makefile.in: Rebuild. + +Tue Jul 7 11:42:16 1998 Richard Henderson + + * listing.c (listing_listing): For EDICT_LIST, skip all lines up to + but not including the line containing the edict. + * listing.h (LISTING_EOF): New. + * input-scrub.c (input_scrub_next_buffer): Call it. + +Tue Jul 7 13:00:37 1998 Alan Modra + + * config/tc-i386.c (i386_operand): Don't set the size of an + immediate address based solely on the suffix and the mode. + + * config/tc-i386.c (md_assemble): Add assertion to make sure + overlap2 does not set Imm. + + * config/tc-i386.c (space_chars): Remove. The scrubber converts + sequences of whitespace to a single space. + (is_space_chars): Just compare with space. + (md_begin): Don't initialize space_chars. + (md_assemble): Just skip a single whitespace character. + (i386_operand): Rewrite base-index parsing to use new + parse_register, and to skip white space. Skip white space in a + number of other places too. Don't give error message if + parse_register fails. + (parse_register): Change reg_string parameter to be non-const. + Add end_op parameter. Skip white space after the `%', and return + end of register string. Give error message here rather than + caller. + +Fri Jul 3 15:34:34 1998 Ian Lance Taylor + + Based on patch from Matt Semersky : + * expr.c (op_encoding): Make const. + (expr_set_precedence): New function. + (expr_begin): Don't set operator rankings, just call + expr_set_precedence. + * expr.h (expr_set_precedence): Declare. + * read.c (s_mri): Call expr_set_precedence. + +Thu Jul 2 16:24:58 1998 Ian Lance Taylor + + * doc/as.texinfo (Statements): Remove paragraph discussing + continuing lines with a backslash. This hasn't worked for years, + if it ever did. + +Thu Jul 2 14:06:22 1998 Klaus Kaempf + + * obj-vms.c: Add C++ support with ctors/dtors sections. Add weak + symbol definitions. + (Ctors_Symbols, Dtors_Symbols): New symbol chains. + (ps_CTORS, ps_DTORS): New section types. + (vms_fixup_xtors_section): New function + (Ctors_Psect, Dtors_Psect): Define. + (IS_GXX_XTOR): Define + (global_symbol_directory): Change check of gxx_bug_fixed to 0. + Filter static constructors/destructors and add to + Ctors_Symbols/Dtors_Symbols chain. + (vms_write_object_file): Write Ctors_Symbols/Dtors_Symbols to + appropriate section. + + * tc-alpha.h (TARGET_FORMAT): Rename "evax-alpha" to "vms-alpha". + * makefile.vms: Merge vax/vms support. + +Wed Jul 1 20:06:20 1998 Richard Henderson + + * config/obj-elf.c (obj_elf_vtable_inherit, obj_elf_vtable_entry): New. + (elf_pseudo_table): Add them. + * config/tc-mips.c (mips_force_relocation): Force vtable relocs. + (md_apply_fix): Accept them. + (mips_fix_adjustable): Don't adjust them. + (tc_gen_reloc): Mung BFD_RELOC_VTABLE_ENTRY for Rel. + * config/tc-ppc.c (md_apply_fix3): Accept vtable relocs. + * config/tc-ppc.h (TC_FORCE_RELOCATION_SECTION): Force vtable relocs. + (tc_fix_adjustable): Don't adjust them. + +Wed Jul 1 16:35:32 1998 Doug Evans + + * Makefile.am (CGEN_CPU_PREFIX): New variable. + (cgen.o): Use it. + * Makefile.in: Regenerate. + * configure.in: AC_SUBST cgen_cpu_prefix. + * configure: Regenerate. + +Wed Jul 1 21:38:56 1998 J"orn Rennecke + + * config/tc-sh (COND_JUMP_DELAY, COND12_DELAY_LENGTH): Define. + Changed all users of COND12_DELAY. + +Fri Jun 26 11:21:11 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (set_arch_mach): New function. + (md_pseudo_table): Add pseudo-ops to set the current machine type. + (md_begin): Default to mn10300 mode. + (md_assemble): Only accept instructions for the core mn10300 + chip and the active machine type. + +Wed Jun 24 19:06:04 1998 Ian Lance Taylor + + * subsegs.h (segment_info_type): Give the struct a name. + * config/tc-h8300.h (tc_reloc_mangle): Add prototype. + * config/tc-h8500.h (tc_reloc_mangle): Declare. + * config/tc-sh.h (sh_coff_reloc_mangle): Add prototype. + * config/tc-w65.h (tc_reloc_mangle): Declare. + * config/tc-z8k.h (tc_reloc_mangle): Declare. + +Wed Jun 24 13:45:00 1998 Catherine Moore + + * config/tc-v850.c (v850_comm): Restore old section + after common processing. + +Wed Jun 24 11:50:54 1998 Klaus Kaempf + + * config/obj-vms.c (Create_VMS_Object_File): Force binary file. + +Tue Jun 23 17:47:31 1998 Jim Wilson + + * config/tc-h8300.c (do_a_fix_imm, build_bytes): Replace cast to + char with code that explicitly sign-extends. + +Tue Jun 23 13:54:57 1998 Nick Clifton + + * config/tc-v850.c (md_begin): Restore text section as the current + section after creating call table sections. + * config/obj-coff.h (SYM_AUXINFO): New macro to conceal ugly + code. + + * config/obj-coff.c (c_symbol_merge): Replace complex expresion + with call to macro SYM_AUXINFO. + +Tue Jun 23 15:09:27 1998 Mike Stump + + * Makefile.am (install-exec-local): Don't let EXEEXT interfere + with the program transform name. + * Makefile.in: Rebuild. + +Mon Jun 22 19:52:42 1998 Ian Lance Taylor + + * config/obj-coff.c (c_symbol_merge): Fix copying of auxiliary + information. + +Mon Jun 22 15:18:58 1998 Ian Lance Taylor + + * config/tc-i386.c (i386_operand): Be prepared for a space between + the open parenthesis and the start of the register operand, + because of the June 16 change. + +Sun Jun 21 21:27:03 1998 Ian Lance Taylor + + * config/tc-sh.c (md_apply_fix): Handle weak symbols correctly if + BFD_ASSEMBLER. + +Sun Jun 21 12:26:36 1998 Nick Clifton + + * config/tc-d30v.c (d30v_align): Always perform alignment request, + even if it is belived to be unnecessary. + +Fri Jun 19 13:57:06 1998 Ian Lance Taylor + + * write.c (adjust_reloc_syms): Never adjust relocs against weak + symbols. + * config/tc-mips.c (md_apply_fix): Adjust accordingly. + +Fri Jun 19 09:50:17 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10300.c (mn10300_insert_operand): Do not hardcode the + shift amount for a repeated operand. The shift amount for the + repeated copy comes from the size of the operand. + +Fri Jun 19 00:44:19 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-h8300.c (get_operand): Fix typos in ldm/stm support. + +Wed Jun 17 13:07:05 1998 Ian Lance Taylor + + * config/tc-mips.c (md_show_usage): Fix -mipsN usage. + +Tue Jun 16 13:06:21 1998 Alan Modra + + * app.c (do_scrub_begin): If tc_symbol_chars is defined, treat all + characters in it as LEX_IS_SYMBOL_COMPONENT. + * config/tc-i386.h (tc_symbol_chars): Define. + (extra_symbol_chars): Declare. + * config/tc-i386.c (extra_symbol_chars): Define. + (comment_chars): Don't use '/' as comment start if TE_LINUX. + (line_comment_chars): Set to '/' if TE_LINUX. + * doc/c-i386.texi (i386-prefixes): Update. + * doc/internals.texi (CPU backend): Document tc_symbol_chars. + +Fri Jun 12 13:36:54 1998 Tom Tromey + + * po/Make-in (all-yes): If maintainer mode, depend on .pot file. + ($(PACKAGE).pot): Unconditionally depend on POTFILES. + +1998-06-12 Vladimir N. Makarov + + * config/tc-d10v.c (md_apply_fix3): Checking displacement + constraint in instructions REP & REPI. + +Thu Jun 11 08:56:46 1998 Nick Clifton + + * config/tc-d30v.c (md_apply_fix3): Catch BFD_RELOC_8, + BFD_RELOC_16, BFD_RELOC_64 and issue appropriate error messages. + + (check_range): If the operand is shifted, then shift the number + before checking its range. + + * write.c (adjust_reloc_syms): Add more checks for NULL pointers. + + * config/tc-v850.c (v850_comm): Set SEC_COMMON bit on special + common sections. + +Wed Jun 10 17:26:35 1998 Nick Clifton + + * config/tc-v850.c (v850_comm): Create special sections as needed. + +1998-06-10 Vladimir N. Makarov + + * config/tc-d10v.c (write_2_short): Addition of swapping + instructions for sequential and reverse sequential order when + given order is not possible. + +Tue Jun 9 13:52:53 1998 Ian Lance Taylor + + * Makefile.am: Rebuild dependencies. + (DEP_INCLUDES): Fix reference to intl build directory. + * Makefile.in: Rebuild. + +Tue Jun 9 12:20:05 1998 Alan Modra + + * doc/c-i386.texi: Update 16 bit documentation. + + * config/tc-i386.h: Change Data16 to Size16, Data32 to Size32, + IgnoreDataSize to IgnoreSize as they are used for address size as + well as data size. + * config/tc-i386.c: Likewise. Add code to reject addr32/data32 in + 32-bit mode, similarly addr16/data16 and variants. + +Mon Jun 8 18:32:01 1998 Nick Clifton + + * config/tc-d30v.c (md_assemble): Fix handling of reverse + sequential word multiply instructions. + + (do_assemble): Add extra command line argument, to allow mul32 + attribute to be preserved across parallel insns. + (md_assemble): Insert NOPs between explicitly parallel insns which + contain an 32 bit multiply and a 16 multiply. + +Mon Jun 8 12:20:30 1998 Alan Modra + + * config/tc-i386.c: REPNE renamed to REPNE_PREFIX_OPCODE, and + likewise for REPE. + + * config/tc-i386.c (reloc): Add braces. + + * config/tc-i386.c (struct _i386_insn): Rename bi to sib to be + consistent with Intel naming. + * config/tc-i386.h (base_index_byte): Rename to sib_byte. Don't + use bitfields in sib_byte. + (modrm_byte): Don't use bitfields here either. + + * config/tc-i386.c (current_templates): Add const. + (parse_register): Add const to return, param, and char *s. + (i386_operand): Add const to reg_entry *r. + * config/tc-i386.h (templates): Add const to start, end. + + Inspired by code for 16 bit gas support from Martynas Kunigelis + : + * config/tc-i386.c (md_assemble): Add full support for 16 bit + modrm, and Jump, JumpByte, JumpDword, JumpInterSegment insns. + (uses_mem_addrmode): Remove. + (md_estimate_size_before_relax): Add support here too. + (md_relax_table): Rewrite interface to md_relax for 16 bit + support. + (BYTE, WORD, DWORD, UNKNOWN_SIZE): Remove. + (opcode_suffix_to_type): Remove. + (CODE16, SMALL, SMALL16, BIG, BIG16): Define. + (SIZE_FROM_RELAX_STATE): Modify to suit above. + (md_convert_frag): Likewise. + (i386_operand): Add support for 16 bit base/index regs, + immediates, and displacements. Remove some unnecessary casts, and + localise end_of_operand_string, displacement_string_start, + displacement_string_end variables. Add GCC_ASM_O_HACK. + * config/tc-i386.h (NO_BASE_REGISTER_16): Define. + + * config/tc-i386.c (prefix_hash): Remove. + (md_begin): Rewrite without obstacks. Remove prefix hash table + handling. Rewrite lexical table handling. + (i386_print_statistics): Don't print prefix statistics. + (md_assemble): Rewrite instruction parser so that line is not + converted to lower case. Don't do a hash_find for prefixes, + instead recognise them via opcode modifier. + (expecting_operand, paren_not_balanced): Localise variables. + * config/tc-i386.h (IsPrefix): Define. + (prefix_entry): Remove. + + * config/tc-i386.h (PREFIX_SEPERATOR): Don't define. + * config/tc-i386.c (PREFIX_SEPARATOR): Define here instead, using + '\\' in case where comment_chars contains '/'. + + * config/tc-i386.c (MATCH): Ensure given operand and template + match for JumpAbsolute. Makes e.g. `ljmp table(%ebx)' invalid; + you must write `ljmp *table(%ebx)'. + + From H.J. Lu : + * config/tc-i386.c (BFD_RELOC_16, BFD_RELOC_16_PCREL): Define + as 0 ifndef BFD_ASSEMBLER. + (md_assemble): Allow immediate operands without suffix or + other reg operand to default in size to the current code size. + +Mon Jun 8 09:45:00 1998 Catherine Moore + + * config/tc-v850.c (md_begin): Restore creation of + .call_table_text and .call_table_data sections. + +Sat Jun 6 00:02:41 1998 Nick Clifton + + * config/tc-d30v.c (md_assemble): Set execution type to unknown + after emitting a word of noops. + +Fri Jun 5 23:27:04 1998 Alan Modra + + * config/tc-i386.c (mode_from_disp_size): Disp16 is mode 2. + (i386_operand): Simplify checks for valid base/index combinations. + Disallow `in 4(%dx),%al'. + + * config/tc-i386.c (struct _i386_insn): Make regs, base_reg, and + index_reg const. + (add_prefix): Change parameter from char to int. + + * config/tc-i386.h (Ugh): Define opcode modifier. + * config/tc-i386.c (md_assemble): Print warnings for Ugh insns. + + * config/tc-i386.c (md_assemble): Rewrite MATCH and + CONSISTENT_REGISTER_MATCH macros to check register types more + thoroughly. Check for illegal suffix/operand combinations + when matching insns with operands. Handle new `s' suffix, and + associated FloatMF opcode modifier for float insns with memory + operands. + * config/tc-i386.h (FloatMF): Define new opcode modifier. + (No_sSuf, No_bSuf, No_wSuf, No_lSuf): Likewise. + (SHORT_OPCODE_SUFFIX, LONG_OPCODE_SUFFIX): Define. + * config/tc-i386.c: Rename WORD_PREFIX_OPCODE to + DATA_PREFIX_OPCODE throughout. + + * config/tc-i386.c (REGISTER_WARNINGS): Define. + (md_assemble): Rewrite suffix/register operand checking code to be + more thorough. Remove Abs8,16,32. Change occurrences of Mem to + AnyMem, the better to grep. + (pi): Remove Abs. + (i386_operand): Don't set Mem bits in i.types[this_operand] when + given a memory operand. Don't set Abs bits either. + (type_names): Remove Mem*, Abs*. + * config/tc-i386.h (Mem8, Mem16, Mem32, Abs8, Abs16, Abs32): Don't + define opcode_modifiers as these cases are handled by Disp8, + Disp16, Disp32 and suffix checks. + (COMES_IN_BOTH_DIRECTIONS): Remove. + (FloatR): Define. It's OK to share the bit with ReverseRegRegmem. + + * config/tc-i386.c (md_assemble): Don't emit operand size prefix + if IgnoreDataSize modifier given. Remove ShortformW modifier + test. Add test for ShortForm in W base_opcode modification. + Merge Seg2ShortForm and Seg3ShortForm code. + * config/tc-i386.h (ShortFormW): Remove. + (IgnoreDataSize): Define. + +Fri Jun 5 10:50:53 1998 Nick Clifton + + * config/tc-d30v.c (md_assemble): Store previous segment state + with previous instruction. + +Wed Jun 3 18:21:56 1998 Alan Modra + + * config/tc-i386.c (SCALE1_WHEN_NO_INDEX): Define. + (ebp, esp): Remove static variables. + (MATCH): Remove test for InOutPortReg. + (i386_operand): Properly handle InOutPortReg here instead. + Disallows `inb (%dx,2)', `inb %es:(%dx)' and `mov (%dx),%ax' + (md_assemble): Simplify and correct modrm and sib generation. + (i386_operand): Add warning for scale without index. + Rewrite checks for valid base/index combinations. + + * config/tc-i386.c (END_STRING_AND_SAVE): Protect arguments of + macros and enclose in do while(0). + (RESTORE_END_STRING): Likewise. + (md_assemble): Add one to printed operand number so we start + from 1 not 0. Add some more gettext invocations. + (i386_operand): Fix `%%s' -> `%%%s'. Inc printed operand + number here too. + + * config/tc-i386.h (WAIT_PREFIX, LOCKREP_PREFIX, ADDR_PREFIX, + DATA_PREFIX, SEG_PREFIX): Define. + * config/tc-i386.c (struct _i386_insn): Remove wait_prefix field. + (check_prefix): Remove function. + (add_prefix): New function. Add prefix to i.prefix as well as + doing checks. + (md_assemble): Changes for add_prefix. Remove hack for wait + prefix, instead always output prefixes in fixed order. Test + for jcxz/loop when selecting between word & dword operations, + and add address size prefix rather than operand size prefix. + Remove operand -> address size hack when emitting jcxz/loop. + (i386_operand): Remove O_Absent check as it's done in expr. + +Wed Jun 3 15:09:10 1998 Ian Lance Taylor + + * configure.in: Recognize m5200 as a cpu_type of m68k. + * aclocal.m4: Rebuild with current libtool. + * configure: Rebuild. + +Wed Jun 3 14:11:59 1998 Andreas Schwab + + * config/tc-m68k.c (md_estimate_size_before_relax): Add more calls + to relaxable_symbol to prevent references to external symbol from + being relaxed. + +Wed Jun 3 14:10:36 1998 Ian Lance Taylor + + * config/tc-m68k.c (relaxable_symbol): If TARGET_OS is "elf", all + symbols are relaxable. + +Wed Jun 3 09:16:00 1998 Catherine Moore + + * config/tc-v850.c (md_begin): Don't create special + sections by default. + +Tue Jun 2 14:52:56 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (macro): For div and udiv, close the + reorder block as soon as possible. + +Tue Jun 2 15:36:13 1998 Ian Lance Taylor + + From Matt Semersky : + * macro.c (macro_mri_mode): New function. + * macro.h (macro_mri_mode): Declare. + * read.c (s_mri): Call macro_mri_mode when switching in and out of + MRI mode. + +Tue Jun 2 13:32:22 1998 Klaus Kaempf + + * config/tc-alpha.c (s_alpha_comm): Allow alignment parameter in + OBJ_EVAX case. + + * config/tc-alpha.c (s_alpha_comm): Defer restoring character + until after xstrdup in OBJ_EVAX case. + +Tue Jun 2 13:11:13 1998 Pat Rankin + + * config/tc-vax.c (md_create_short_jump): Fix off by two bug in + offset calculation. Also, use VAX_BRW from vax-inst.h instead + of hardcoded magic number. + (md_create_long_jump): Use VAX_JMP and VAX_ABSOLUTE_MODE macros. + +Tue Jun 2 09:25:34 1998 Doug Evans + + * read.c (do_s_func): New function. + (s_func): Call it. + * read.h (do_s_func): Add prototype. + +Mon Jun 1 12:47:30 1998 Doug Evans + + * config/tc-m32r.c (m32r_do_align): Only fill code sections with + nops if fill pattern not specified. + +Mon Jun 1 14:08:35 1998 Ian Lance Taylor + + From Andrew Crabtree : + * config/te-go32.h (TE_GO32): Define. + * config/tc-i386.h (LOCAL_LABEL): Don't define if TE_GO32. + +Sun May 31 15:43:06 1998 Doug Evans + + Implement .func/.endfunc pseudo-ops. + * read.h (stabs_generate_asm_func,stabs_generate_asm_endfunc): Declare. + (s_func): Declare. + * read.c (potable): Add .func,.endfunc. + (s_func): New function. + * stabs.c (stabs_generate_asm_func,stabs_generate_asm_endfunc): New + functions. + (in_doc_func_p,current_function_label): New static globals. + (stabs_generate_asm_lineno): Emit function relative stabs if in .func. + +Fri May 29 18:13:12 1998 Ian Lance Taylor + + * config/tc-a29k.h (WORKING_DOT_WORD): Define. + * config/tc-alpha.h (WORKING_DOT_WORD): Define. + * config/tc-arm.h (WORKING_DOT_WORD): Define. + * config/tc-h8300.h (WORKING_DOT_WORD): Define. + * config/tc-h8500.h (WORKING_DOT_WORD): Define. + * config/tc-hppa.h (WORKING_DOT_WORD): Define. + * config/tc-i860.h (WORKING_DOT_WORD): Define. + * config/tc-i960.h (WORKING_DOT_WORD): Define. + * config/tc-tic30.h (WORKING_DOT_WORD): Define. + * config/tc-w65.h (WORKING_DOT_WORD): Define. + * config/tc-z8k.h (WORKING_DOT_WORD): Define. + * config/tc-a29k.c: Don't define md_short_jump_size, + md_long_jump_size, md_create_short_jump or md_create_long_jump. + * config/tc-alpha.c: Likewise. + * config/tc-alpha.h: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-h8300.c: Likewise. + * config/tc-h8500.c: Likewise. + * config/tc-hppa.c: Likewise. + * config/tc-i860.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-ppc.c: Likewise. + * config/tc-sh.c: Likewise. + * config/tc-sparc.h: Likewise. + * config/tc-tic30.c: Likewise. + * config/tc-w65.c: Likewise. + * config/tc-z8k.c: Likewise. + +Fri May 29 16:03:26 1998 Pat Rankin + + * config/tc-vax.c (_): Delete this macro used for placeholder + values in vax_operand_width_size; it conflicts with the _() macro + used for internationalization. + +Fri May 29 13:46:07 1998 Ian Lance Taylor + + * symbols.c (symbol_find_base): Fix case insensitive symbol name + code. From Chris Moller . + + Based on patch from Klaus Kaempf : + * struc-symbol.h (struct broken_word): Add seg and subseg fields. + * read.c (emit_expr): Initialize seg and subseg fields of a new + broken word. + * write.c (write_object_file): Switch to the appropriate segment + and subsegment when processing a broken word. + + * config/tc-m68k.c (mri_assemble): New static function. + (build_mri_control_operand): Call mri_assemble rather than + md_assemble. + (s_mri_else, s_mri_break, s_mri_next, s_mri_for): Likewise. + (s_mri_endf, s_mri_endw): Likewise. + +Wed May 27 11:16:25 1998 Ian Lance Taylor + + * read.c (s_org): Call md_flush_pending_output if it is defined. + + * config/tc-sparc.c (md_show_usage): Add \n\ to new string. + +Tue May 26 19:27:52 1998 Stan Cox + + * config/tc-sparc.c (OPTION_LITTLE_ENDIAN_DATA): New. + (md_parse_option): Add for same. + (sparc_md_end): Set bfd_mach_sparc_sparclite_le. + (md_apply_fix3, tc_gen_reloc): Allow BFD_RELOC_SPARC_32LE. + (cons_fix_new_sparc): Added to create BFD_RELOC_SPARC_32LE. + + * config/tc-sparc.h (cons_fix_new_sparc): Added. + +Thu May 21 15:02:41 1998 Nick Clifton + + * config/tc-arm.c (find_real_start): Relax definition of local + labels. + +Tue May 19 16:59:44 1998 Nick Clifton + + * config/tc-d30v.c (d30v_align): Apply address adjustment to all + symbols at the given address, not just the last one specified. + +Tue May 19 08:25:19 1998 Catherine Moore + + * config/tc-sparc.c (sparc_handle_align): Use number_to_chars_bigendian + or number_to_chars_littleendian to write data. + +Mon May 18 17:09:30 1998 Nick Clifton + + * config/tc-v850.c (md_assemble): Remove artificially created + register name symbols. + +Mon May 18 13:47:06 1998 Doug Evans + + * write.c (fixup_segment): Change "segment" to "section" in + error message. + +Mon May 18 16:55:40 1998 Michael Meissner + + * write.c (fixup_segment): Change sym1-sym2 message again. + +Mon May 18 09:31:43 1998 Michael Meissner + + * write.c (fixup_segment): Improve error message for sym1-sym2 + errors when sym1 is in a different segment from sym2. + +Wed May 13 10:16:37 1998 Doug Evans + + * config/tc-m32r.c (warn_unmatched_high): New static local. + (OPTION_WARN_PARALLEL): Rename from OPTION_WARN. + (OPTION_NO_WARN_PARALLEL): Rename from OPTION_NO_WARN. + (md_longopts): Recognize --{no-,}warn-unmatched-high. + (md_parse_option): Likewise. + (md_show_usage): Likewise. + (m32r_frob_file): Likewise. + + * read.c (generate_file_debug,generate_lineno_debug): New functions. + (read_a_source_file): Call them. + * read.h (stabs_generate_asm_file): Declare. + * stabs.c (stabs_generate_asm_file): New function. + (generate_asm_file): New function. + (stabs_generate_asm_lineno): Move file name handling into + generate_asm_file. + +Tue May 12 12:03:44 1998 Richard Henderson + + * config/tc-d30v.c (cur_mul32_p, prev_mul32_p): Make static. + (d30v_current_align, d30v_current_align_seg): New variables. + (d30v_last_label): New variable. + (d30v_align, s_d30v_align, s_d30v_text): New functions. + (s_d30v_data, s_d30v_section): Likewise. + (md_pseudo_table): Call them. + (md_begin): Initialize d30v_current_align_seg. + (md_assemble): Call d30v_align when needed by known current alignment. + (d30v_frob_label, d30v_cons_align): New functions. + * config/tc-d30v.h (md_do_align): Remove. + (tc_frob_label): Call d30v_frob_label. + (md_cons_align): New. + + * config/tc-d30v.c (find_format): Convert complex expressions to + expression symbols before processing. Clean up code formatting. + +Sun May 10 22:35:02 1998 Jeffrey A Law (law@cygnus.com) + + * po/Make-in (install-info): New target. + +Thu May 7 15:49:07 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10200.c (md_assemble): Handle "bra" just like "jmp" + instructions. + * config/tc-mn10300.c (md_assemble): Likewise. + +Thu May 7 11:47:22 1998 Doug Evans + + * Makefile.am: Update with `make dep-am'. + (HFILES): Add cgen.h. + (cgen.o): Depend on cgen.h. + * Makefile.in: Regenerate. + + * cgen.c (cgen_md_apply_fix3): Don't pass newline to as_warn_where. + +Thu May 7 13:20:56 1998 Anders Blomdell + + * gasp.c (grab_label): Permit a label to be a preprocessor + variable by permitting a label to start with a backslash. + +Thu May 7 12:50:33 1998 Frank Ch. Eigler + + * config/tc-mips.c (validate_mips_insn): Removed hack + for previously inaccessible bitfields in some INSN_TRAP + instructions. + +Thu May 7 11:13:00 1998 Frank Ch. Eigler + + * config/tc-d30v.c (do_assemble): Abort with error message + if opcode operands do not match. + +Thu May 7 09:36:06 1998 Frank Ch. Eigler + + * config/tc-mips.c (macro_build, validate_mips_insn): Implement + 'q' operand format for 20-bit "break"/"sdbbp" instructions. + (mips_ip): Truncate overflowed "break" 'c' operand. Implement + similar new 'q' operand. + +Thu May 7 07:47:14 1998 Michael Meissner + + * cgen.c (cgen_asm_finish_insn): Fix typo. + +Thu May 7 02:19:14 1998 Doug Evans + + * cgen.h: New file. + * cgen.c: Include it. + (MAX_FIXUPS): Renamed to CGEN_MAX_FIXUPS. + (cgen_asm_finish_insn): Result is now void. New arg `result'. + All callers updated. + * config/tc-m32r.c: Include cgen.h. + (m23r_insn): New members num_fixups,fixups. + +Wed May 6 16:29:19 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-hppa.c (md_apply_fix): Slightly rework some code + to avoid compiler warning. + +Wed May 6 15:26:34 1998 Klaus Kaempf + + * makefile.vms: Run dec c with /nodebug. Pass CC value when + calling make. + + * makefile.vms (OBJS): Add ehopt.obj + +Wed May 6 15:11:12 1998 Klaus Kaempf + + * doc/c-vax.texi: Correct and extend vax/vms documentation. + +Wed May 6 11:51:51 1998 Richard Henderson + + * config/tc-d30v.c (do_assemble): Accept a new parameter requesting + a short format insn. + (md_assemble): Set it for explicitly packed insns. + +Tue May 5 13:23:13 1998 Nick Clifton + + * config/obj-coff.c (c_symbol_merge): Do not take address of + native fields when performing the memcpy. + +Tue May 5 13:10:41 1998 Gavin Koch + + * config/tc-mips.c (macro,macro2): Implement + M_DMULO_I, M_MULO_I, M_DMULOU_I, and M_MULOU_I. + +Mon May 4 17:49:14 1998 Andreas Schwab + + * config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Changed to keep + relocations against globally visible symbols. + * config/tc-m68k.c (relaxable_symbol): New macro. + (m68k_ip, md_estimate_size_before_relax): Use it. + (tc_m68k_fix_adjustable): Also handle weak symbols. + +Mon May 4 16:12:23 1998 Ian Lance Taylor + + * config/tc-i386.h (TC_RELOC_RTSYM_LOC_FIXUP): Keep relocs for all + references to externally visible symbols. + * config/tc-i386.c (md_apply_fix3): When OBJ_ELF, don't add the + values in twice for a PC relative reloc if the symbol is + externally defined. + + * config/tc-sparc.h (tc_fix_adjustable) [OBJ_AOUT]: When PIC, + don't adjust a PC relative reloc against an externally visible + symbol. + * config/tc-sparc.c (md_apply_fix3): When generating a.out PIC, + for a PC relative fixup against an externally visible defined + symbol, arrange to store object file and addend values as though + the symbol were not defined. + (tc_gen_reloc): Likewise. + +Thu Apr 30 13:09:39 1998 Fred Fish + + * read.c (sizeof_leb128): Referenced externally by write.c so + don't inline. + +Wed Apr 29 15:45:57 1998 Michael Meissner + + * config/tc-m32r.c ({,expand_}debug_sym): New functions to record + and expand a 'debug' symbol associated with the next instruction + that does not cause a short instruction to be filled with a NOP. + (md_pseudo_table): Add support for .debugsym. + (assemble_parallel_insn): Add calls to expand_debug_sym as + appropriate. + (md_assemble): Ditto. + +Tue Apr 28 19:16:26 1998 Tom Tromey + + * as.c (main): Conditionally call setlocale. + * gasp.c (main): Likewise. + * asintl.h: Include if HAVE_LOCALE_H. + (LC_MESSAGES): Now can be defined even when ENABLE_NLS. + +Tue Apr 28 18:33:23 1998 Frank Ch. Eigler + + * config/tc-d30v.c (md_show_usage): Correct gettext typo. + +Tue Apr 28 12:16:30 1998 Ian Lance Taylor + + * config/tc-hppa.c: Change all calls to bzero to use memset. + (pa_ip): Add cast to avoid warning. + (tc_gen_reloc, md_apply_fix): Likewise. + (pa_find_space_by_number): Likewise. + (hppa_force_relocation): Likewise. + (pa_block): Change i to unsigned int. + * config/obj-som.h (obj_som_copyright): Declare. + +Tue Apr 28 11:35:56 1998 Frank Ch. Eigler + + * ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno + for line numbers for assembly source. + +Mon Apr 27 15:58:46 1998 Ian Lance Taylor + + * configure.in: Change version number to 2.9.4 + * configure: Rebuild. + +Mon Apr 27 12:07:33 1998 Doug Evans + + * cgen.c (cgen_asm_finish_insn): New arg relax_p. All callers updated. + +Mon Apr 27 15:16:12 1998 Ian Lance Taylor + + * ecoff.h: Change symbolS in function declaration to struct + symbol. + +Sun Apr 26 13:44:22 1998 Ian Lance Taylor + + * config/tc-sh.c (parse_reg): Add casts to avoid warnings. + (md_convert_frag): Fix i18n typo. + +Sat Apr 25 20:12:02 1998 Richard Henderson + + * ecoff.c (ecoff_get_cur_proc_sym): New function. + * ecoff.h: Protoype it. + * config/tc-alpha.c [ELF] (s_alpha_prologue): New function. + [EVAX] (s_alpha_prologue): Delete. + (md_pseudo_table): Update. + +Sat Apr 25 14:00:52 1998 Ian Lance Taylor + + * config/tc-i960.c (md_assemble): Change bp_error_msg from static + array to local pointer. + (get_args, parse_expr): Add casts to avoid warnings. + +Fri Apr 24 12:47:42 1998 Philippe De Muyter + + * read.c (s_set): Cast xmalloc return value to fragS *. + * config/tc-m68k.c (m68k_ip): Function made static to match + previous forward declaration. + (insert_reg, init_regtable, md_convert_frag_1): Likewise. + +Fri Apr 24 09:26:46 1998 Nick Clifton + + * config/tc-v850.c: Add internationalisation macros to error + strings. + + * config/tc-m32r.c (can_make_parallel): Add internationalisation + macros to error strings. + +Thu Apr 23 19:23:23 1998 Ian Lance Taylor + + * config/tc-ppc.c (ppc_fix_adjustable): Correct test of whether a + reloc is in the TOC csect. + (md_apply_fix3): Correct gettext typo. + +Thu Apr 23 14:58:31 1998 Nick Clifton + + * config/tc-arm.c (find_real_start): Ignore symbols starting with + .L - they are local labels and the branches are not really + function calls but rather far jumps. + +Wed Apr 22 15:57:21 1998 Tom Tromey + + * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir). + +Wed Apr 22 14:52:36 1998 Ian Lance Taylor + + * config/tc-i386.c (md_assemble): Print operand number rather than + using ordinal_names. + (i386_operand): Likewise. + +Tue Apr 21 22:34:25 1998 Tom Tromey + + * Makefile.am (INTLLIBS): Define to work around apparent automake + bug. + All Makefiles: Regenerated. + + * Many files: Added gettext invocations around user-visible + strings. + * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY, + HAVE_LC_MESSAGES): Define. + * dep-in.sed: Added asintl.h. + * po/Make-in: New file. + * gasp.c (main): Call setlocale, bindtextdomain, and textdomain. + Include "asintl.h". + * read.c (Z_): Renamed from `_'. + * Makefile.am (SUBDIRS): Added po. + (POTFILES): new macro. + (po/POTFILES.in): New target. + ($(OBJS)): Added asintl.h. + (HFILES): Likewise. + (INCLUDES): Added -DLOCALEDIR, -I$(top_srcdir)/../intl. + (as_new_LDADD): Added $(INTLLIBS). + (as_new_DEPENDENCIES): Added $(INTLDEPS). + (gasp_new_LDADD): Added $(INTLLIBS). + (gasp_new_DEPENDENCIES): New macro. + * configure, aclocal.m4: Rebuilt. + * configure.in: Call CY_GNU_GETTEXT. Generate po/Makefile.in and + po/Makefile. + (ALL_LINGUAS): Define. + * macro.c: Include "asintl.h". + * as.c (main): Call setlocale, bindtextdomain, and textdomain. + * as.h: Include "asintl.h". + * config/tc-i386.c (ordinal_names): Removed. + (md_assemble): Changed error text to avoid ordinal_names. + (i386_operand): Likewise. + (reloc): Added as_bad to avoid i18n problems. + (tc_gen_reloc): Likewise. + * config/tc-arm.c (bad_args): Now a #define. + (bad_pc): Likewise. + * config/obj-vms.c (VMS_stab_parse): Changed type of + `long_const_msg'. + (global_symbol_directory): Unified strings to avoid i18n + problems. + * config/tc-m68k.c (get_reloc_code): Added some as_bad calls to + avoid i18n problems. + * config/tc-ns32k.c (reloc): Added as_bad to avoid i18n problems. + * config/tc-ppc.c (md_apply_fix3): Added as_bad_where to avoid + i18n problems. + * config/tc-sh.c (md_convert_frag): Added as_bad to avoid i18n + problems. + * config/tc-v850.c (md_assemble): Changed C++ comment into C + comment. + * config/tc-vax.c (md_assemble): Added as_warn to avoid i18n + problems. + * as.c (print_version_id): Added an fprintf to avoid i18n + problems. + * cond.c (cond_finish_check): Added as_bad call to avoid i18n + problems. + * expr.c (expr): Added as_warn call to avoid i18n problems. + * messages.c (as_assert): Changed code to avoid i18n problems. + (as_abort): Likewise. + * read.c (pseudo_set): Added as_bad call to avoid i18n problems. + (s_space): Likewise. + * po/Make-in, po/POTFILES.in, po/gas.pot: New files. + +Tue Apr 21 17:01:22 1998 Alan Modra + + * config/tc-i386.c (check_prefix): New static function, split out + from md_assemble. + (struct _i386_insn): Add wait_prefix field. + (md_assemble): Remove wait_prefix local variable. Use + check_prefix when adding a prefix. + + * config/tc-i386.c (current_templates): New static variable. + (md_assemble): Remove current_templates local variable. + (md_assemble, i386_operand): Improve error and warning messages in + many places. Add RESTORE_END_STRING in many places before error + return. Clarify some comments. + + * config/tc-i386.c (struct _i386_insn): Change seg field to a two + element array. + (md_assemble): Parse string instruction operands, looking for + segment override prefixes. Check for invalid segment prefixes on + string instruction. + (i386_operand): i.seg[] and max mem_operand changes for string + insns. + * config/tc-i386.h (EsSeg): Define. + + * config/tc-i386.h (regKludge): Define. + (iclrKludge, imulKludge): Don't define. + * config/tc-i386.c (md_assemble): Merge imulKludge and iclrKludge + code. Move ReverseRegRegmem fudges into Modrm case. Reorder + opcode_modifier checks to look for more common cases first. Add + default_seg for IsString case. + +Tue Apr 21 16:18:12 1998 Ian Lance Taylor + + * configure.in: Call AM_PROG_LEX rather than AC_PROG_LEX and + AC_DECL_YYTEXT. + * configure: Rebuild with new automake and libtool. + * aclocal.m4, Makefile.in: Likewise. + + * doc/Makefile.am (as.dvi): New target. + * doc/Makefile.in: Rebuild. + +Sat Apr 18 01:21:04 1998 Stan Cox + + * configure.in: Added sparc86x support. + + * configure: Rebuild. + + * config/tc-sparc.c (lookup_arch): Added arch_type to struct + sparc_arch. + (md_parse_option): Warn if -EL is not supported for this architecture. + + * config/tc-sparc.h (SPARC_BIENDIAN) Always define. + +Sat Apr 18 01:19:01 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (mips_ip): Note when we use get match on + the full instruction name. + +Wed Apr 15 15:17:27 1998 Richard Henderson + + * symbols.c (resolve_symbol_value) [O_symbol]: Also store the symbol + back into the expression to handle add/sub simplification correctly. + +Wed Apr 15 07:06:04 1998 Catherine Moore + + * config/tc-mips.c (hilo_interlocks): Remove 4300. + +Mon Apr 13 16:51:04 1998 Nick Clifton + + * config/tc-arm.c (do_msr): Support undocumented 'msr cpsr_flg, + #' instruction. + +Thu Apr 9 10:29:42 1998 Doug Evans + + * symbols.c (max_indent_level): New global. + (print_symbol_value_1): Use it. + * expr.h (expr_build_dot): Declare. + * expr.c (expr_build_dot): New function. + +Wed Apr 8 16:16:11 1998 Doug Evans + + * symbols.c (print_binary): New function. + (print_expr_1): Call it. + +Mon Apr 6 12:06:39 1998 Andreas Schwab + + * config/tc-m68k.c (m68k_ip, case "#B"): Install the offset of the + operand in the opcode. + +Fri Apr 3 11:58:19 1998 Alan Modra + + * config/tc-i386.h: Reorder operand flags and opcode modifier + flags for clarity. Remove unused definitions: Unknown, + ImmUnknown, DispUnknown, NoModrm. + * config/tc-i386.c (type_names): Add missing Debug type. + (md_assemble): Better duplicate prefix checking. Quicker string + instruction check via new opcode_modifier flag. + +Fri Apr 3 11:44:34 1998 Ian Lance Taylor + + * doc/as.texinfo (Invoking): Clarify -Wa example. + +Fri Apr 3 09:12:23 1998 Gavin Koch + + * config/tc-mips.c (mips_pseudo_table): Add weakext entry. + (s_mips_weakext): Define. + * ecoff.c (ecoff_directive_weakext): Don't define if defined(TC_MIPS). + * config/obj-ecoff.c (obj_pseudo_table): Don't add weakext if + defined(TC_MIPS). + +Thu Apr 2 22:42:02 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mn10200.c (tc_gen_reloc): The difference of two symbols + is an error if the value can not be computed at assembly time. + * config/tc-mn10300.c (tc_gen-reloc): Likewise. + +Thu Apr 2 16:36:47 1998 Ian Lance Taylor + + * gasp.c (main): Set next field of new include_path structure to + NULL. From Avery Pennarun . + + * read.c (s_mri_sect): Call as_bad rather than abort for an + unsupported MRI target. + +Wed Apr 1 11:08:27 1998 Nick Clifton + + * config/tc-arm.c (arm_validate_fix): New function. Determine if + the destination of a branch instruction should be altered. + (find_real_start): New function: Locate the real, Thumb coded + start of a Thumb function. + (do_t_branch23): Alter the destination of branches to Thumb + functions. + + * config/tc-arm.h: Define TC_VALIDATE_FIX. + +Tue Mar 31 13:27:33 1998 Dean M. Deaver + + * config/tc-arm.c (decode_shift): Handle addressing mode 2 w/rrx + also. + +Wed Apr 1 13:13:20 1998 Andreas Schwab + + * doc/as.texinfo: Use @itemx for a secondary item in a table. + * doc/c-hppa.texi: Likewise. + +Tue Mar 31 17:52:40 1998 Ian Lance Taylor + + * Makefile.am: Rebuild dependencies. + * Makefile.in: Rebuild. + + * Makefile.am (DEP_INCLUDES): New variable. + (.dep1): Change to work when srcdir is not an absolute path. + (.tcdep, .objdep, .dep2, dep.sed): Likewise. + * Makefile.in: Rebuild. + +Mon Mar 30 12:46:48 1998 Ian Lance Taylor + + * config/tc-i386.h, config/tc-i386.c: Revert March 24 + LinearAddress patch. + + * configure.in: Set version to 2.9.1. + * configure: Rebuild. + + * Branched binutils 2.9. + +Mon Mar 30 11:22:08 1998 Alan Modra + + * config/tc-i386.h (FWait): Define. + * config/tc-i386.c (md_assemble): Emit fwait prefix before any + other prefixes. Check FWait flag in opcode table to see which + instructions require an fwait prefix. + +Mon Mar 30 10:12:00 1998 Andreas Schwab + + * stabs.c (get_stab_string_offset): Always create a stab string + section. + +Sat Mar 28 22:28:02 1998 Ian Lance Taylor + + Fix some gcc -Wall warnings: + * atof-generic.c (atof_generic): Add casts to avoid warnings. + * ehopt.c (eh_frame_code_alignment): Likewise. + * expr.c (integer_constant, operand): Likewise. + * frags.c (frag_align): Likewise. + * gasp.c (level_0, change_base, doinstr): Likewise. + * hash.c (hash_ask): Likewise. + * listing.c (listing_page, calc_hex, print_lines): Likewise. + (debugging_pseudo): Likewise. + * macro.c (define_macro, check_macro): Likewise. + * read.c (read_a_source_file, s_align, s_float_space): Likewise. + (ignore_rest_of_line, float_cons): Likewise. + * symbols.c (decode_local_label_name): Likewise. + * write.c (record_alignment, cvs_frag_to_fill): Likewise. + (fixup_segment, number_to_chars_bigendian): Likewise. + (number_to_chars_littleendian): Likewise. + * config/atof-ieee.c (gen_to_words): Likewise. + * config/tc-sparc.c (md_begin, md_assemble): Likewise. + (sparc_ip, parse_keyword_arg, s_common): Likewise. + * read.c (output_big_sleb128): Initialize locals to avoid + warnings. + (output_big_uleb128, equals): Likewise. + * atof-generic.c (atof_generic): Change number_of_digits_* locals + to unsigned int. Change zeros to unsigned int. + * cond.c (s_if): Add return to default case. + * frags.c (frag_now_fix): Change return type to addressT. + * frags.h (frag_now_fix): Update declaration. + * listing.c (file_info_struct): Change linenum to unsigned int. + (struct list_info_struct): Change hll_line to unsigned int. + (print_source): Update format string. + * read.c (emit_expr): Change scan to unsigned int, and don't + bother to initialize it. + * symbols.c (dollar_label_count): Change to unsigned long. + * write.c (adjust_reloc_syms): Remove unused label reduce_fixup. + * config/tc-sparc.c (sparc_memory_model): Only define if OBJ_ELF. + * config/tc-sparc.c (tc_gen_reloc): Add return to default case. + +Fri Mar 27 12:46:47 1998 Ian Lance Taylor + + * config/tc-m68k.c (m68k_ip): Check legal addressing modes for + mcf5200 just as we do for m68000. + (m68k_init_after_args): Likewise. + (md_estimate_size_before_relax): Likewise. + +Fri Mar 27 10:30:01 1998 Catherine Moore + + * config/tc-v850.c (md_assemble): Store relocation addend in + fixup instead of instruction. + +Thu Mar 26 23:07:18 1998 Alan Modra + + * config/tc-i386.c (md_assemble): Swap template arguments to + CONSISTENT_REGISTER_MATCH macro in reverse direction test. + This macro is currently symmetric, so passing them the wrong + way didn't cause any problem, but may if the macro is changed + in the future. + After copying template to i.tm, use i.tm. rather than t-> to + access fields, and make t a const* + Move i.tm.operand_types[] swap to immediately after the copy. + +Wed Mar 25 13:44:18 1998 Doug Evans + + * expr.h (expr_build_uconstant): Add prototype. + (expr_build_unary,expr_build_binary): Add prototypes. + * expr.c (expr_build_uconstant): New function. + (expr_build_unary,expr_build_binary): New functions. + +Wed Mar 25 13:10:42 1998 Bruno Haible + + * gasp.c (IS*): Cast argument to unsigned char, not unsigned int. + * macro.c (macro_expand_body): Increase buffer size. + * messages.c (as_warn): Likewise. + (as_warn_where, as_bad, as_bad_where): Likewise. + +Wed Mar 25 12:59:07 1998 Ian Lance Taylor + + Based on patch from H.J. Lu : + * Makefile.am (DISTSTUFF): New variable. + (diststuff): New target. + * Makefile.in: Rebuild. + +Tue Mar 24 16:51:29 1998 Nick Clifton + + * config/tc-m32r.h (md_cleanup, md_elf_section_change_hook): Call + m32r_elf_section_change_hook. + + * config/tc-m32r.c (m32r_elf_section_change_hook): New function to + emit a nop if a section ends with a 16 bit instruction. + +Tue Mar 24 19:48:09 1998 Ian Lance Taylor + + * config/obj-coff.c (obj_coff_bss): Compile unconditionally. Call + s_lcomm rather than obj_coff_lcomm. + (obj_pseudo_table): Compile .bss pseudo-op unconditionally. + +Tue Mar 24 18:30:58 1998 H.J. Lu + + * config/tc-i386.h (LinearAddress): Define. + * config/tc-i386.c (md_assemble): If LinearAddress is set for the + instruction, don't use a default segment. + +Mon Mar 23 18:53:40 1998 Joel Sherrill + + * configure.in: (sh*-*-rtems*): Switched from ELF to COFF. + * configure: Rebuild. + +Fri Mar 20 19:15:44 1998 Ian Lance Taylor + + * aclocal.m4, configure: Rebuild with libtool 1.2. + +Thu Mar 19 16:03:12 1998 Nick Clifton + + * config/tc-arm.c (md_apply_fix3): fix code to test the range of + PC relative branches. Patch courtesy of Jonathan Walton. + + +Wed Mar 18 09:29:51 1998 Nick Clifton + + * configure.in (emulations): Add thumb-pe target. + + * configure (emulations): Add thumb-pe target. + +1998-03-17 Ken Raeburn + + * itbl-lex.l (yywrap): Don't define if already defined as a + macro. + +Fri Mar 13 16:31:38 1998 Tom Tromey + + * depend.c (quote_string_for_make): New function. + (wrap_output): Use it. + +Thu Mar 12 18:28:22 1998 Nick Clifton + + * config/obj-elf.c (obj_elf_section): Set bss flag in seg_info + structure if type is SHT_NOBITS. [Bug fix courtesy of rth] + +Sat Feb 28 17:28:55 1998 Richard Henderson + + * config/tc-alpha.c (md_shortopts, md_longopts, md_parse_option): + Recognize -GN and -relax. + (md_begin): Initialize gp size from -G switch. + (alpha_force_relocation): Always force if -relax. + (alpha_align): Take a new argument that will specify when to + emit an R_ALPHA_ALIGN relocation (though we don't do that now). + Change all callers. Emit nop alignment padding as nop+unop pair. + +Sat Feb 28 17:06:22 1998 Richard Henderson + + * config/obj-elf.c [TC_ALPHA]: Include . + * config/tc-alpha.h (ELF_TC_SPECIAL_SECTIONS): New. + +Thu Feb 26 15:49:04 1998 Michael Meissner + + * config/tc-d30v.c (write_2_short): Delayed jsr instructions don't + require padding to the next long word boundary. + +Mon Feb 23 11:29:06 1998 Doug Evans + + * cgen.c: #include symcat.h. + * config/tc-m32r.c: Likewise. + +Mon Feb 23 10:27:40 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (mips_ip, case 'P'): Make 'P' arguments be + absolute expressions instead of '$' prefixed register names. + +Sat Feb 21 22:36:52 1998 Richard Henderson + + * read.c (s_set): Record file and line info for symbols when -as. + (pseudo_set): Don't overwrite that dummy fragment. + +Fri Feb 20 15:03:13 1998 Ian Lance Taylor + + * config/tc-ppc.c (md_pseudo_table): Add "section". + (ppc_named_section): New static function. + +Thu Feb 19 22:25:42 1998 Richard Henderson + + * tc-ppc.c (ppc_biei): Cache the last symbol we inserted + so we don't have to scan the entire list. + +Tue Feb 17 17:02:15 1998 Fred Fish + + * config/tc-d30v.c (parallel_ok): For the explicitly parallel + case, allow the parallel instructions to modify the same flag + bits. + +Thu Feb 19 16:08:15 1998 Richard Henderson + + * listing.c (list_symbol_table): Categorize symbols by + undefined_section rather than sy_frag->line == NULL. + +Wed Feb 18 23:39:46 1998 Richard Henderson + + * Makefile.am (install-exec-local): Install properly when ln + fails or tooldir == prefix. + +Tue Feb 17 18:58:51 1998 Doug Evans + + * cgen.c (cgen_md_apply_fix3): Delete call to validate_operand. + Test result of insert_operand for error. + +Fri Feb 13 16:41:42 1998 Ian Lance Taylor + + * Makefile.am (AUTOMAKE_OPTIONS): Add cygnus. + * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e. + * doc/Makefile.am (AUTOMAKE_OPTIONS): Define. + * doc/Makefile.in: Rebuild. + +Fri Feb 13 00:47:44 1998 Ian Lance Taylor + + * config/tc-mips.c (macro_build): Handle operand type 'C'. + (macro): Fix handling of M_COP[0-3]. + +Thu Feb 12 14:06:59 1998 Ian Lance Taylor + + Based on patches from Ross Harvey : + * macro.c (ISSEP): Only treat '<' and '>' as separator characters + if macro_alternate or macro_mri. + (getstring): Remove support for byte constants between < and >. + (get_any_string): '<' only starts a string if macro_alternate or + macro_mri. + (macro_expand_body): Permit keyword parameters following + positional parameters. + + NetBSD patches from Gordon W. Ross : + * configure.in (alpha*-*-netbsd*): New target. + * config/te-nbsd.h (LOCAL_LABELS_FB): Define. + * configure: Rebuild. + + * as.h (flag_warn_suppress_instructionswap): Move from here... + * config/tc-d10v.c (flag_warn_suppress_instructionswap): ...to + here, and make static. + + * ehopt.c (eh_frame_code_alignment): Only use seg_info if + BFD_ASSEMBLER or MANY_SEGMENTS. + + * as.c (show_usage): Update bug-gnu-utils address. + * gasp.c (show_usage): Likewise. + * doc/as.texinfo (Bug Reporting): Likewise. + +Wed Feb 11 23:26:28 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (load_address): Don't use mips III or mips IV + insns regardless of the size of a pointer if we're in mips I or + MIPS II mode. + (macro, macro2, s_cprestore, s_cpadd): Likewise. + +Thu Feb 12 03:41:00 1998 J"orn Rennecke + + Fix rac to accept only a0: + * tc-d10v.c (parallel_ok, find_opcode): + Split OPERAND_ACC into OPERAND_ACC0 and OPERAND_ACC1. + Introduce OPERAND_GPR. + +Wed Feb 11 16:28:13 1998 Richard Henderson + + * read.c (s_fill): Handle non-constant repeat counts by creating + an rs_space fragment. + +Tue Feb 10 18:31:31 1998 Ian Lance Taylor + + * config/tc-i386.c (i386_operand): Change error added Jan 2 1998 + from as_bad to as_warn. + +Tue Feb 10 18:04:00 1998 Jim Lemke + + * as.c: (perform_an_assembly_pass): Use [TEXT|DATA|BSS]_SECTION_NAME + * as.h: Define default values of [TEXT|DATA|BSS]_SECTION_NAME + * config/obj-elf.c (elf_begin): Use [TEXT|DATA|BSS]_SECTION_NAME + +Tue Feb 10 17:58:18 1998 Ian Lance Taylor + + * ehopt.c (eh_frame_code_alignment): If not BFD_ASSEMBLER, use + seg_fix_rotP rather than fix_root from seg_info. + +Tue Feb 10 15:32:22 1998 Ian Carmichael + + * expr.c: Add support for 0x1_2_3_4 bignums. + +Tue Feb 10 14:43:40 1998 Ian Lance Taylor + + * configure.in: Change -linux* to -linux-gnu*. + * configure: Rebuild. + + * app.c (do_scrub_begin): Treat \r as whitespace. + +Mon Feb 9 14:16:11 1998 Ian Lance Taylor + + * Makefile.am: Update dependencies. + * Makefile.in: Rebuild. + +Sat Feb 7 15:33:51 1998 Ian Lance Taylor + + * configure, aclocal.m4: Rebuild with new libtool. + +Fri Feb 6 16:08:30 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (md_begin): If mips_cpu is set, then use it as + the argument to bfd_set_arch_mach. + (load_address): Use bfd_arch_bits_per_address to determine the + bit size of an address instead of looking at the isa level. + (macro, macro2, s_cprestore, s_cpadd): Likewise. + +Fri Feb 6 14:44:34 1998 Nick Clifton + + * config/tc-v850.c (md_parse_option): Add -mv850any command line option. + +Thu Feb 5 12:39:08 1998 Ian Lance Taylor + + * ehopt.c: New file. + * as.h (enum _relax_state): Add rs_cfa. + (check_eh_frame, eh_frame_estimate_size_before_relax): Declare. + (eh_frame_relax_frag, eh_frame_convert_frag): Declare. + * read.c (emit_expr): Call check_eh_frame. + * write.c (cvt_frag_to_fill): Handle rs_cfa. + (relax_segment): Likewise. + * Makefile.am: Rebuild dependencies. + (GAS_CFILES): Add ehopt.c. + (GENERIC_OBJS): Add ehopt.o. + * doc/internals.texi (Frags): Document rs_cfa. + + * as.c (show_usage): Mention --traditional-format. + (parse_args): Accept --traditional-format. + * as.h (flag_traditional_format): Declare. + * output-file.c (output_file_create): If flag_traditional_format, + set BFD_TRADITIONAL_FORMAT on stdoutput. + * doc/as.texinfo, doc/as.1: Document --traditional-format. + + * config/tc-mips.c (append_insn): Make sure that if we have a + fixup for an unmatched %hi reloc, it does not associated with a + variant frag. + + * configure, Makefile.in, aclocal.m4: Rebuild with new libtool. + * doc/Makefile.in: Likewise. + +Wed Feb 4 15:41:54 1998 Nick Clifton + + * config/tc-m32r.c (check_for_side_effects): New function. + (can_make_parallel): Add checks for instruction side effects + clashing with the other instruction. + (assemble_parallel_insn): Improve warning messages. Return error + message from non-swapped instruction order. + +Wed Feb 4 20:00:26 1998 James G. Smith + + * config/tc-arm.c: Rename arm_after_pass_hook() to arm_cleanup(). + + * config/tc-arm.h: Replace md_after_pass_hook definition with a + md_cleanup definition. This moves the forced literal output to + the end of the source pass, and avoids macro's inserting literals + into the code immediately after the macro expansion. + +Wed Feb 4 13:17:19 1998 Ian Lance Taylor + + * config/tc-sparc.h (tc_fix_adjustable) [OBJ_ELF]: A reloc against + a gas internal symbol is adjustable. + * config/tc-ppc.h (tc_fix_adjustable): Likewise. + + * as.h: If gcc version greater than 2.6, use `__format__' and + `__printf__' in function attributes, rather than `format' and + `printf'. + +Mon Feb 2 18:38:18 1998 Ian Lance Taylor + + * config/tc-sparc.c: Only include elf/sparc.h if OBJ_ELF. + +Mon Feb 2 18:30:34 1998 Steve Haworth + + Add tms320c30 support: + * config/tc-tic30.h: New file. + * config/tc-tic30.c: New file. + * config/obj-coff.h: If TC_TIC30, include coff/tic30.h and define + TARGET_FORMAT as "coff-tic30". + * configure.in (tic30-*-*aout*, tic30-*-*coff*): New targets. + * Makefile.am: Rebuild dependencies. + (CPU_TYPES): Add tic30. + (CPU_OBJ_VALID): tic30-aout is valid. + (TARGET_CPU_CFILES): Add config/tc-tic30.c. + (TARGET_CPU_HFILES): Add config/tc-tic30.h. + * configure, Makefile.in: Rebuild. + +Mon Feb 2 10:20:37 1998 Nick Clifton + + * config/tc-v850.c (md_assemble): Improvements to error messages. + +Mon Feb 2 12:39:05 1998 Geoff Keating + + * config/tc-ppc.c (md_apply_fix3): Change BFD_RELOC_HI16 and + BFD_RELOC_HI16_S to store the high bits of any value. + + * config/tc-ppc.h (tc_fix_adjustable): Undo change of Fri Jun 27. + (TC_RELOC_RTSYM_LOC_FIXUP): Don't let the + assembler calculate relocations to any external symbol at all. + * config/tc-ppc.c (md_apply_fix3) [OBJ_ELF]: Correct bugs + involving generation of pc-relative relocs. + (md_pcrel_from_section) [OBJ_ELF]: The job this code used to do + has been moved to md_apply_fix3. + + * config/tc-ppc.c (md_apply_fix3): Fix test for too-far branch. + (ppc_elf_suffix): Warn about 'identifier+constant@got' syntax, + which actually means (the address of identifier's GOT entry) + + constant, which is not particularly useful. + +Fri Jan 30 11:02:35 1998 Doug Evans + + * read.h (include_dirs): Declare. + (include_dir_count,include_dir_maxlen): Declare. + +Fri Jan 30 11:47:02 1998 Ian Lance Taylor + + * configure.in: Correct check for shared opcodes library. + * configure: Rebuild. + + * listing.c (buffer_line): If we can't open the file, set at_end. + (listing_print): Remove unused local variable fi. + + * config/m68k-parse.y (reglistpair): Handle register list in + either order. + + * config/vms-conf.h: Don't undef VERSION. + +Thu Jan 29 14:42:44 1998 Pat Rankin + + * Makefile.am (CONFIG_OBJS): New variable, containing part of old + OBJS variable. + (GENERIC_OBJS): New variable, with the rest of the old OBJS + variable. + (OBJS): Now just $(CONFIG_OBJS) and $(GENERIC_OBJS). + ($(srcdir)/make-gas.com): Rename from make-gas.com. + (stamp-mk.com): Replace $(OBJS) with $(GENERIC_OBJS). + (EXTRA_DIST): Define. + * vmsconf.sh: Handle {targ-cpu, obj-format, atof-targ} modules + explicitly rather than via the list of object files. + (gcc-as.opt): New file created when make-gas.com is run. + * config-gas.com: Create {targ-cpu.h, obj-format.h, targ-env.h, + itbl-cpu.h} to #include appropriate file rather than copying that + file. + * config/vms-conf.h: Synchronize with current config.in. + * Makefile.in: Rebuild. + +Thu Jan 29 18:48:19 1998 Bill Moyer + + * config/tc-d30v.c (do_assemble): Added flag_explicitly_parallel. + (parallel_ok): Relaxed parallel subinstruction dependency check. + +Wed Jan 28 14:35:00 1998 Bill Moyer + + * as.h (flag_warn_suppress_instructionswap): added new flag. + * tc-d10v.c (md_parse_option,md_longopts): added "--nowarnswap" + command line argument. + * tc-d10v.c (write_2_short): emit "Swapping instructions" + warning only if flag_warn_suppress_instructionswap is false. + +Wed Jan 28 16:41:19 1998 J.J. van der Heijden + + * configure.in (i386-*-mingw32*): New target. + * configure: Rebuild. + +Wed Jan 28 14:51:18 1998 Ian Lance Taylor + + * symbols.c (resolve_symbol_value): Don't set the segment if it + hasn't changed, and this is OBJ_AOUT without BFD_ASSEMBLER. + + * config/obj-aout.h (S_IS_LOCAL): Correct typo--pass argument to + S_GET_SEGMENT. + +Wed Jan 28 13:54:50 1998 Pat Rankin + + as.h (unlink): Reverse 13-Feb-97 change; use of unlink vs remove + depends upon HAVE_{UNLINK,REMOVE} values rather than host + compiler. + +Wed Jan 28 13:48:08 1998 Ian Lance Taylor + + * config/obj-coff.h (RESOLVE_SYMBOL_REDEFINITION): Define. + +Wed Jan 28 09:52:00 1998 Nick Clifton + + * config/tc-v850.c (v850_insert_operand): Display instruction when + an error is encountered. + +Tue Jan 27 13:32:01 1998 Robert Lipe + + * configure.in (i386-*-sco3.2v5*): Defaults to ELF now. + (i386-*-sco3.2v5*coff): New target. + (i386-*-sco3.2*): New target. + * configure: Rebuild. + +Tue Jan 27 11:06:52 1998 Nick Clifton + + * config/tc-v850.c: Tidy error message production. + +Tue Jan 27 12:24:32 1998 Ian Lance Taylor + + * config/tc-arm.c (md_apply_fix3): Add new variable newimm to hold + validate_immediate return value in the right type for comparisons + to FAIL. + +Tue Jan 27 06:51:59 1998 Richard Henderson + + * listing.c (MAX_BYTES): Use listing variables not constants. + (data_buffer): No longer an array, but a pointer. + (calc_hex): sizeof(data_buffer) -> MAX_BYTES. + (listing_listing): Allocate data_buffer. + +Tue Jan 27 06:38:35 1998 Richard Henderson + + * as.c (parse_args): Add --listing-lhs-width, --listing-lhs-width2, + --listing-rhs-width, --listing-cont-lines. + (show_usage): Update. + * listing.c (listing_lhs_width, listing_lhs_width_second): New vars. + (listing_lhs_cont_lines, listing_rhs_width): New vars. + (print_lines): Use the variables instead of the constants. + (listing_listing): Likewise. + * listing.h: Declare the new vars. + +Tue Jan 27 05:32:05 1998 Richard Henderson + + * as.c (parse_args): Add --keep-locals alias for -L. + Add --strip-local-absolute. + (show_usage): Update. + * as.h (flag_strip_local_absolute): New flag. + * symbols.c (S_IS_LOCAL): Use it. + * config/obj-aout.h (S_IS_LOCAL): Likewise. + * config/obj-bout.h (S_IS_LOCAL): Likewise. + * config/obj-coff.h (S_IS_LOCAL): Likewise. + +Mon Jan 26 13:07:41 1998 Nick Clifton + + * config/tc-m32r.c: Detect if explicitly parallel instructions + might have an io conflict and issue a warning message. + +Thu Jan 22 17:51:44 1998 Nick Clifton + + * cgen.c (cgen_save_fixups, cgen_restore_fixups, + cgen_swap_fixups): Functions to save, restore and swap the fixup + chain with a backup copy. + (cgen_asm_finish_insn): Returns address of constructed insn. + +Wed Jan 21 16:49:10 1998 Richard Henderson + + * listing.c (file_info_struct): Remove FILE, add POS. + (last_open_file_info, last_open_file): New; a one entry FILE* cache. + (file_info): Don't open the file. + (buffer_line): Check for the file in the last_open cache, updating + as necessary. + (print_source): Don't reference file_info->file. + (listing_listing): Likewise. + (listing_print): Close the file in the cache, if any. + +Fri Jan 16 14:51:48 1998 Ian Lance Taylor + + * read.c (dwarf_file_string): New file static variable. + (emit_expr): Look for constant sequence that leads up to a file + name in DWARF debugging output. + (stringer): Use dwarf_file_string to decide whether to accept a + string as a file name. + +Fri Jan 16 11:30:37 1998 Richard Henderson + + * tc-m68k.c (m68k_ip): Remove absl->reglst MRI hack. + (crack_operand): Add reg->reglst MRI hack. + (r_seg): Put reglst symbols in reg_section. + (m68k_frob_symbol): Frob reglst symbols into absolute_section. + +Thu Jan 15 14:19:01 1998 Richard Henderson + + * tc-sh.c (get_specific): Handle SGR & DBR. + +Thu Jan 15 13:46:48 1998 Richard Henderson + + * tc-h8300.c (parse_reg): Take the length of the symbol into + account when attempting to match a register name. + * tc-h8500.c (parse_reg): Likewise. + +Wed Jan 14 17:52:33 1998 Nick Clifton + + * cgen.c: Formatting changes to improve readability. + +Wed Jan 14 15:41:41 1998 Jeffrey A Law (law@cygnus.com) + + * config/tc-mips.c (macro): Rework division code to avoid unfilled + delay slot. + +Wed Jan 14 18:04:20 1998 Michael Meissner + + Based on a patch from Jim Wilson + * config/tc-d30v.c (do_assemble): Remove non-ansi default case. + (tc_gen_reloc): Handle cross section PC relative relocs + correctly. + +Wed Jan 14 15:02:19 1998 Doug Evans + + * config/tc-mips.c (mips_ip): Don't test pinfo flags if INSN_MACRO. + +Mon Jan 12 13:04:57 1998 Doug Evans + + * cgen.c: #include setjmp.h. Clean up pass over `struct foo' usage. + (expr_jmp_buf): New static local. + (cgen_parse_operand): Allow use of longjmp in parsing to handle errors. + (cgen_md_operand): New function. + * tc-m32r.c: Clean up pass over `struct foo' usage. + (md_estimate_size_before_relax): Use CGEN_INSN_MNEMONIC. + +Tue Jan 6 15:36:02 1998 Richard Henderson + + * symbols.c (S_SET_SEGMENT): Don't set the segment for section syms. + (S_IS_EXTERNAL, S_IS_LOCAL): Correct parenthetication. + +Fri Jan 2 16:08:54 1998 Ian Lance Taylor + + * config/tc-i386.c (i386_operand): Give an error if there are + unrecognized characters after an expression. + +For older changes see ChangeLog-9697 diff --git a/contrib/binutils/gas/MAINTAINERS b/contrib/binutils/gas/MAINTAINERS new file mode 100644 index 0000000..d59a3bd --- /dev/null +++ b/contrib/binutils/gas/MAINTAINERS @@ -0,0 +1 @@ +See ../binutils/MAINTAINERS diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am index 49b52f7..47b6253 100644 --- a/contrib/binutils/gas/Makefile.am +++ b/contrib/binutils/gas/Makefile.am @@ -12,6 +12,9 @@ tooldir = $(exec_prefix)/$(target_alias) YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi` LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi` +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + MKDEP = gcc -MM TARG_CPU = @target_cpu_type@ @@ -39,17 +42,20 @@ CPU_TYPES = \ arc \ arm \ avr \ + cris \ d10v \ d30v \ fr30 \ h8300 \ h8500 \ hppa \ + ia64 \ i370 \ i386 \ i860 \ i960 \ m32r \ + m68hc11 \ m68k \ m88k \ mcore \ @@ -63,6 +69,7 @@ CPU_TYPES = \ sparc \ tahoe \ tic30 \ + tic54x \ tic80 \ vax \ w65 \ @@ -93,14 +100,18 @@ CPU_OBJ_VALID = \ case $$o in \ aout) \ case $$c in \ - a29k | arm | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \ + a29k | arm | cris | i386 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \ valid=yes ;; \ esac ;; \ bout) \ case $$c in \ i960) valid=yes ;; \ esac ;; \ - coff) valid=yes ;; \ + coff) valid=yes; \ + case $$c in \ + cris | i860) \ + valid= ;; \ + esac ;; \ ecoff) \ case $$c in \ mips | alpha) valid=yes ;; \ @@ -122,16 +133,19 @@ CPU_OBJ_VALID = \ # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case. -MULTI_CPU_TYPES = i386 mips +MULTI_CPU_TYPES = i386 mips cris MULTI_CPU_OBJ_VALID = \ valid= ; \ case $$o in \ aout) \ case $$c in \ - i386) valid=yes ;; \ + i386 | cris) valid=yes ;; \ + esac ;; \ + coff) \ + case $$c in \ + i386 | mips) valid=yes ;; \ esac ;; \ - coff) valid=yes ;; \ ecoff) \ case $$c in \ mips) valid=yes ;; \ @@ -209,17 +223,20 @@ TARGET_CPU_CFILES = \ config/tc-arc.c \ config/tc-arm.c \ config/tc-avr.c \ + config/tc-cris.c \ config/tc-d10v.c \ config/tc-d30v.c \ config/tc-fr30.c \ config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ + config/tc-ia64.c \ config/tc-i370.c \ config/tc-i386.c \ config/tc-i860.c \ config/tc-i960.c \ config/tc-m32r.c \ + config/tc-m68hc11.c \ config/tc-m68k.c \ config/tc-m88k.c \ config/tc-mcore.c \ @@ -233,6 +250,7 @@ TARGET_CPU_CFILES = \ config/tc-sparc.c \ config/tc-tahoe.c \ config/tc-tic30.c \ + config/tc-tic54x.c \ config/tc-tic80.c \ config/tc-vax.c \ config/tc-w65.c \ @@ -245,17 +263,20 @@ TARGET_CPU_HFILES = \ config/tc-arc.h \ config/tc-arm.h \ config/tc-avr.h \ + config/tc-cris.h \ config/tc-d10v.h \ config/tc-d30v.h \ config/tc-fr30.h \ config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ + config/tc-ia64.h \ config/tc-i370.h \ config/tc-i386.h \ config/tc-i860.h \ config/tc-i960.h \ config/tc-m32r.h \ + config/tc-m68hc11.h \ config/tc-m68k.h \ config/tc-m88k.h \ config/tc-mcore.h \ @@ -269,6 +290,7 @@ TARGET_CPU_HFILES = \ config/tc-sparc.h \ config/tc-tahoe.h \ config/tc-tic30.h \ + config/tc-tic54x.h \ config/tc-tic80.h \ config/tc-vax.h \ config/tc-w65.h \ @@ -322,7 +344,6 @@ TARG_ENV_HFILES = \ config/te-lynx.h \ config/te-mach.h \ config/te-macos.h \ - config/te-multi.h \ config/te-nbsd.h \ config/te-nbsd532.h \ config/te-pc532mach.h \ @@ -338,6 +359,8 @@ TARG_ENV_HFILES = \ # Multi files in config MULTI_CFILES = \ + config/e-crisaout.c \ + config/e-criself.c \ config/e-i386aout.c \ config/e-i386coff.c \ config/e-i386elf.c \ @@ -437,15 +460,16 @@ $(OBJS): @ALL_OBJ_DEPS@ as_new_SOURCES = $(GAS_CFILES) as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ - $(extra_objects) $(GASLIBS) $(INTLLIBS) + $(extra_objects) $(GASLIBS) $(INTLLIBS) $(LIBM) as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ $(extra_objects) $(GASLIBS) $(INTLDEPS) # Stuff that every object file depends upon. If anything is removed # from this list, remove it from dep-in.sed as well. -$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \ - expr.h write.h frags.h hash.h read.h symbols.h tc.h \ - obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h asintl.h +$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \ + $(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \ + as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \ + frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h gasp_new_SOURCES = gasp.c macro.c sb.c hash.c gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS) @@ -485,7 +509,7 @@ check-DEJAGNU: site.exp # The implicit .c.o rule doesn't work for these, perhaps because of # the variables, or perhaps because the sources are not on vpath. -$(TARG_CPU_O): $(TARG_CPU_C) $(TARG_CPU_DEP_@target_cpu_type@) +$(TARG_CPU_O): $(TARG_CPU_C) $(COMPILE) -c $(TARG_CPU_C) $(ATOF_TARG_O): $(ATOF_TARG_C) $(COMPILE) -c $(ATOF_TARG_C) @@ -532,6 +556,10 @@ e-i386coff.o: $(srcdir)/config/e-i386coff.c $(COMPILE) -c $(srcdir)/config/e-i386coff.c e-i386elf.o: $(srcdir)/config/e-i386elf.c $(COMPILE) -c $(srcdir)/config/e-i386elf.c +e-crisaout.o: $(srcdir)/config/e-crisaout.c + $(COMPILE) -c $(srcdir)/config/e-crisaout.c +e-criself.o: $(srcdir)/config/e-criself.c + $(COMPILE) -c $(srcdir)/config/e-criself.c # The m68k operand parser. @@ -604,7 +632,7 @@ MOSTLYCLEANFILES = $(STAGESTUFF) core stamp-mk.com \ testsuite/*.o testsuite/*.out testsuite/gas.log testsuite/gas.sum \ testsuite/site.exp site.bak site.exp stage stage1 stage2 -CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2a DEP1 DEPA DEP DEPDIR +CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2A DEP1 DEPA DEP DEPDIR .PHONY: install-exec-local install-data-local .PHONY: install-exec-bindir install-exec-tooldir @@ -708,27 +736,36 @@ de-stage3: - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..) - rmdir stage3 -# Automatic dependency computation. This is a real pain, because the -# dependencies change based on target_cpu_type and obj_format. We -# currently ignore any dependencies caused by emulation files. - DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \ $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) +# Automatic dependency computation. This is a real pain, because the +# dependencies change based on target_cpu_type and obj_format. +# Just to make things even more complicated, automake separates the +# dependency variable assignments from the dependency rules, and tacks +# on a .NOEXPORT at the end of Makefile.in. + DEP: dep.sed $(DEP_FILE_DEPS) DEPTC DEPOBJ DEP2 - rm -f DEP1 + rm -f DEP1 # delete because we use $? in DEP1 rule srcdir=`cd $(srcdir); pwd`; \ $(MAKE) MKDEP="$(MKDEP)" srcdir="$${srcdir}" VPATH="$${srcdir}" DEP1 rm -rf DEPDIR - sed -f dep.sed < DEP1 > DEPA + echo 'AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' > DEPA sed -f dep.sed < DEPTC >> DEPA sed -f dep.sed < DEPOBJ >> DEPA sed -f dep.sed < DEP2 >> DEPA + echo 'BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA + echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' >> DEPA + sed -f dep.sed < DEP1 >> DEPA echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> DEPA echo '$$(TARG_CPU_O): $$(DEPTC_@target''_cpu_type@_@obj''_format@)' >> DEPA echo '$$(OBJ_FORMAT_O): $$(DEPOBJ_@target''_cpu_type@_@obj''_format@)' >> DEPA - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA - mv -f DEPA $@ + echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) $(MULTI_CFILES) if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi @@ -739,9 +776,7 @@ DEP1: $(CFILES) $(MULTI_CFILES) echo '' > targ-env.h; \ echo '' > itbl-cpu.h; \ echo '' > itbl-parse.h; \ - echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP; \ - echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP; \ - $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? >> DEP + $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? > DEP mv -f DEPDIR/DEP $@ # Work out the special dependencies for the tc-*.c files. @@ -772,7 +807,7 @@ DEPTC: $(TARGET_CPU_CFILES) echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPTCA echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> DEPTCA for c in $(MULTI_CPU_TYPES); do \ - echo 'DEPTC_'"$${c}"'_multi = \' >> DEPTCA; \ + echo "DEPTC_$${c}"'_multi = \' >> DEPTCA; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -811,7 +846,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> DEPOBJA echo ' $$(INCDIR)/aout/stab.def' >> DEPOBJA for c in $(MULTI_CPU_TYPES); do \ - echo 'DEPOBJ_'"$${c}"'_multi = \' >> DEPOBJA; \ + echo "DEPOBJ_$${c}"'_multi = \' >> DEPOBJA; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -825,7 +860,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) # Work out the dependencies for each CPU/OBJ combination. # Note that SOM is a special case, because it only works native. DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES) - rm -f DEP2a + rm -f DEP2A if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi srcdir=`cd $(srcdir); pwd`; \ cd DEPDIR; \ @@ -836,22 +871,22 @@ DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES) echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \ echo '#include "obj-'"$${o}"'.h"' > dummy.c; \ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \ - sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2a; \ + sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2A; \ else true; fi; \ done; \ done - echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2a + echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2A for c in $(MULTI_CPU_TYPES); do \ - echo 'DEP_'"$${c}"'_multi = \' >> DEP2a; \ + echo "DEP_$${c}"'_multi = \' >> DEP2A; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ - echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2a; \ + echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2A; \ else true; fi; \ done; \ - echo '' >> DEP2a; \ + echo '' >> DEP2A; \ done - mv -f DEP2a DEP2 + mv -f DEP2A DEP2 dep.sed: dep-in.sed config.status srcdir=`cd $(srcdir); pwd`; \ @@ -861,444 +896,379 @@ dep.sed: dep-in.sed config.status -e "s!@SRCDIR@!$${srcdir}!" dep: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < Makefile > tmp-Makefile cat DEP >> tmp-Makefile $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile dep-in: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < $(srcdir)/Makefile.in > tmp-Makefile.in cat DEP >> tmp-Makefile.in $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in dep-am: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < $(srcdir)/Makefile.am > tmp-Makefile.am cat DEP >> tmp-Makefile.am $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am +# HEED THE MKDEP WARNINGS. +# ANYTHING CHANGED OR ADDED BETWEEN THE WARNING LINES MAY GO AWAY. .PHONY: dep dep-in dep-am -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -app.o: app.c $(INCDIR)/bin-bugs.h emul.h -as.o: as.c $(INCDIR)/bin-bugs.h emul.h subsegs.h $(INCDIR)/obstack.h \ - output-file.h sb.h macro.h -atof-generic.o: atof-generic.c $(INCDIR)/bin-bugs.h \ - emul.h -bignum-copy.o: bignum-copy.c $(INCDIR)/bin-bugs.h emul.h -cond.o: cond.c $(INCDIR)/bin-bugs.h emul.h macro.h \ - sb.h $(INCDIR)/obstack.h -depend.o: depend.c $(INCDIR)/bin-bugs.h emul.h -dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/bin-bugs.h emul.h \ - dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h -ecoff.o: ecoff.c $(INCDIR)/bin-bugs.h emul.h ecoff.h -ehopt.o: ehopt.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h -expr.o: expr.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h -flonum-copy.o: flonum-copy.c $(INCDIR)/bin-bugs.h emul.h -flonum-konst.o: flonum-konst.c -flonum-mult.o: flonum-mult.c -frags.o: frags.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -hash.o: hash.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h -input-file.o: input-file.c $(INCDIR)/bin-bugs.h emul.h \ - input-file.h -input-scrub.o: input-scrub.c $(INCDIR)/bin-bugs.h emul.h \ - input-file.h sb.h -listing.o: listing.c $(INCDIR)/bin-bugs.h emul.h input-file.h \ - subsegs.h -literal.o: literal.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -macro.o: macro.c sb.h macro.h -messages.o: messages.c $(INCDIR)/bin-bugs.h emul.h -output-file.o: output-file.c $(INCDIR)/bin-bugs.h emul.h \ - output-file.h -read.o: read.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h sb.h macro.h ecoff.h -sb.o: sb.c sb.h -stabs.o: stabs.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \ - subsegs.h ecoff.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def -subsegs.o: subsegs.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -symbols.o: symbols.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \ - subsegs.h struc-symbol.h -write.o: write.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h output-file.h -gasp.o: gasp.c $(INCDIR)/bin-bugs.h sb.h macro.h -itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/bin-bugs.h \ - emul.h itbl-parse.h -e-i386aout.o: $(srcdir)/config/e-i386aout.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-i386coff.o: $(srcdir)/config/e-i386coff.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-i386elf.o: $(srcdir)/config/e-i386elf.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-mipself.o: $(srcdir)/config/e-mipself.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -DEPTC_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/a29k.h -DEPTC_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/a29k.h -DEPTC_a29k_elf = $(INCDIR)/bin-bugs.h $(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-a29k.h \ - emul.h $(INCDIR)/opcode/a29k.h -DEPTC_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h \ - $(srcdir)/config/atof-vax.c -DEPTC_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \ - struc-symbol.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c -DEPTC_alpha_elf = $(INCDIR)/bin-bugs.h $(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-alpha.h \ - emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ +AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW. +DEPTC_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h +DEPTC_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h +DEPTC_a29k_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-a29k.h $(INCDIR)/opcode/a29k.h +DEPTC_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \ + $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c +DEPTC_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ - $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/alpha.h \ $(srcdir)/config/atof-vax.c -DEPTC_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \ - $(srcdir)/config/tc-alpha.h emul.h subsegs.h $(INCDIR)/obstack.h \ - struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c -DEPTC_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h $(INCDIR)/elf/arc.h \ - $(INCDIR)/elf/reloc-macros.h -DEPTC_arc_elf = $(INCDIR)/bin-bugs.h $(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 \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ +DEPTC_alpha_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-alpha.h subsegs.h \ + $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(srcdir)/config/atof-vax.c +DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.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 -DEPTC_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h -DEPTC_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h -DEPTC_arm_elf = $(INCDIR)/bin-bugs.h $(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-arm.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/arm.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 -DEPTC_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -DEPTC_avr_elf = $(INCDIR)/bin-bugs.h $(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-avr.h \ - emul.h subsegs.h $(INCDIR)/obstack.h -DEPTC_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.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 \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h +DEPTC_arm_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-arm.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ + dwarf2dbg.h +DEPTC_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h +DEPTC_avr_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-avr.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h +DEPTC_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/cris.h dwarf2dbg.h +DEPTC_cris_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-cris.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h dwarf2dbg.h +DEPTC_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \ + $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h +DEPTC_d10v_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-d10v.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h \ $(INCDIR)/elf/reloc-macros.h -DEPTC_d10v_elf = $(INCDIR)/bin-bugs.h $(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-d10v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h -DEPTC_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h +DEPTC_d30v_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-d30v.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h -DEPTC_d30v_elf = $(INCDIR)/bin-bugs.h $(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-d30v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h -DEPTC_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \ + cgen.h +DEPTC_fr30_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-fr30.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \ cgen.h -DEPTC_fr30_elf = $(INCDIR)/bin-bugs.h $(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-fr30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \ - $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \ - $(srcdir)/../opcodes/fr30-opc.h cgen.h -DEPTC_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h -DEPTC_h8300_elf = $(INCDIR)/bin-bugs.h $(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-h8300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h -DEPTC_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h -DEPTC_h8500_elf = $(INCDIR)/bin-bugs.h $(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-h8500.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h -DEPTC_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/libbfd.h \ - $(INCDIR)/opcode/hppa.h -DEPTC_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h -DEPTC_i370_elf = $(INCDIR)/bin-bugs.h $(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-i370.h \ - emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ - $(INCDIR)/opcode/i370.h $(INCDIR)/elf/i370.h -DEPTC_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h -DEPTC_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h -DEPTC_i386_elf = $(INCDIR)/bin-bugs.h $(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-i386.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h -DEPTC_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/i860.h -DEPTC_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/i860.h -DEPTC_i860_elf = $(INCDIR)/bin-bugs.h $(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-i860.h \ - emul.h $(INCDIR)/opcode/i860.h -DEPTC_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \ - $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h \ +DEPTC_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h +DEPTC_h8300_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-h8300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h +DEPTC_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h +DEPTC_h8500_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-h8500.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h +DEPTC_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h +DEPTC_hppa_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-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \ + dwarf2dbg.h +DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h +DEPTC_ia64_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-ia64.h dwarf2dbg.h \ + subsegs.h $(INCDIR)/obstack.h +DEPTC_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h +DEPTC_i370_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-i370.h subsegs.h \ + $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h \ + $(INCDIR)/elf/i370.h +DEPTC_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + dwarf2dbg.h $(INCDIR)/opcode/i386.h +DEPTC_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \ + $(INCDIR)/opcode/i386.h +DEPTC_i386_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-i386.h subsegs.h \ + $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/i386.h +DEPTC_i860_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-i860.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i860.h $(INCDIR)/elf/i860.h \ + $(INCDIR)/elf/reloc-macros.h +DEPTC_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h +DEPTC_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h +DEPTC_i960_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-i960.h $(INCDIR)/obstack.h \ $(INCDIR)/opcode/i960.h -DEPTC_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h -DEPTC_i960_elf = $(INCDIR)/bin-bugs.h $(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-i960.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h -DEPTC_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \ + cgen.h +DEPTC_m32r_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-m32r.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \ cgen.h -DEPTC_m32r_elf = $(INCDIR)/bin-bugs.h $(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-m32r.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \ - $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen.h \ - $(srcdir)/../opcodes/m32r-opc.h cgen.h -DEPTC_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ +DEPTC_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h \ + dwarf2dbg.h +DEPTC_m68hc11_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-m68hc11.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h +DEPTC_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h +DEPTC_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ $(srcdir)/config/m68k-parse.h -DEPTC_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ +DEPTC_m68k_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-m68k.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h \ + $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h +DEPTC_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \ + $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ $(srcdir)/config/m68k-parse.h -DEPTC_m68k_elf = $(INCDIR)/bin-bugs.h $(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-m68k.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ - $(srcdir)/config/m68k-parse.h $(INCDIR)/elf/m68k.h \ - $(INCDIR)/elf/reloc-macros.h -DEPTC_m68k_hp300 = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-hp300.h \ - $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h -DEPTC_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h -DEPTC_m88k_elf = $(INCDIR)/bin-bugs.h $(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-m88k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h -DEPTC_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h -DEPTC_mcore_elf = $(INCDIR)/bin-bugs.h $(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-mcore.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \ +DEPTC_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h +DEPTC_m88k_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-m88k.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h +DEPTC_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h +DEPTC_mcore_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-mcore.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \ $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h -DEPTC_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ +DEPTC_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h +DEPTC_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ +DEPTC_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h +DEPTC_mips_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-mips.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h itbl-ops.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h \ - $(INCDIR)/elf/reloc-macros.h -DEPTC_mips_elf = $(INCDIR)/bin-bugs.h $(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-mips.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ - itbl-ops.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h +DEPTC_mn10200_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-mn10200.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h -DEPTC_mn10200_elf = $(INCDIR)/bin-bugs.h $(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-mn10200.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h -DEPTC_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h -DEPTC_mn10300_elf = $(INCDIR)/bin-bugs.h $(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-mn10300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h -DEPTC_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h -DEPTC_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/ns32k.h \ +DEPTC_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h \ + dwarf2dbg.h +DEPTC_mn10300_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-mn10300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h dwarf2dbg.h +DEPTC_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \ $(INCDIR)/obstack.h -DEPTC_ns32k_elf = $(INCDIR)/bin-bugs.h $(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-ns32k.h \ - emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h -DEPTC_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/pj.h -DEPTC_pj_elf = $(INCDIR)/bin-bugs.h $(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-pj.h \ - emul.h $(INCDIR)/opcode/pj.h -DEPTC_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h -DEPTC_ppc_elf = $(INCDIR)/bin-bugs.h $(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 \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h -DEPTC_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h -DEPTC_sh_elf = $(INCDIR)/bin-bugs.h $(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-sh.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h -DEPTC_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h -DEPTC_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h -DEPTC_sparc_elf = $(INCDIR)/bin-bugs.h $(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-sparc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h \ - $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h -DEPTC_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ +DEPTC_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h +DEPTC_ns32k_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-ns32k.h $(INCDIR)/opcode/ns32k.h \ + $(INCDIR)/obstack.h +DEPTC_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/pj.h +DEPTC_pj_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-pj.h $(INCDIR)/opcode/pj.h +DEPTC_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h +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 +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 \ + struc-symbol.h dwarf2dbg.h +DEPTC_sh_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-sh.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h struc-symbol.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h +DEPTC_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/sparc.h +DEPTC_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h +DEPTC_sparc_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-sparc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h +DEPTC_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_elf = $(INCDIR)/bin-bugs.h $(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-tahoe.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h -DEPTC_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_elf = $(INCDIR)/bin-bugs.h $(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-tic30.h \ - emul.h $(INCDIR)/opcode/tic30.h -DEPTC_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic80.h -DEPTC_tic80_elf = $(INCDIR)/bin-bugs.h $(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-tic80.h \ - emul.h $(INCDIR)/opcode/tic80.h -DEPTC_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/vax.h -DEPTC_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(srcdir)/config/vax-inst.h \ +DEPTC_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h +DEPTC_tahoe_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-tahoe.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/tahoe.h +DEPTC_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h +DEPTC_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h +DEPTC_tic30_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-tic30.h $(INCDIR)/opcode/tic30.h +DEPTC_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sb.h macro.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/tic54x.h +DEPTC_tic54x_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-tic54x.h sb.h \ + macro.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ + $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h +DEPTC_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic80.h +DEPTC_tic80_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-tic80.h $(INCDIR)/opcode/tic80.h +DEPTC_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(srcdir)/config/vax-inst.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_vax_elf = $(INCDIR)/bin-bugs.h $(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-vax.h \ - emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/vax.h -DEPTC_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def emul.h $(srcdir)/config/vax-inst.h \ +DEPTC_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h +DEPTC_vax_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-vax.h $(srcdir)/config/vax-inst.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h -DEPTC_w65_elf = $(INCDIR)/bin-bugs.h $(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-w65.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h -DEPTC_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h -DEPTC_v850_elf = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-elf.h \ +DEPTC_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h +DEPTC_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h +DEPTC_w65_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-w65.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h +DEPTC_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ + dwarf2dbg.h +DEPTC_v850_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-v850.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h dwarf2dbg.h +DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(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-v850.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h -DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h emul.h -DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \ - $(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-z8k.h emul.h + $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \ $(BFDDIR)/som.h @@ -1306,332 +1276,323 @@ DEPTC_i386_multi = $(DEPTC_i386_aout) $(DEPTC_i386_coff) \ $(DEPTC_i386_elf) DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \ $(DEPTC_mips_elf) -DEPOBJ_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_a29k_elf = $(INCDIR)/bin-bugs.h $(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-a29k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h -DEPOBJ_alpha_elf = $(INCDIR)/bin-bugs.h $(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-alpha.h \ - emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/aout/aout64.h -DEPOBJ_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \ - $(srcdir)/config/tc-alpha.h emul.h -DEPOBJ_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_arc_elf = $(INCDIR)/bin-bugs.h $(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 \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_arm_elf = $(INCDIR)/bin-bugs.h $(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-arm.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_avr_elf = $(INCDIR)/bin-bugs.h $(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-avr.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_d10v_elf = $(INCDIR)/bin-bugs.h $(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-d10v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_d30v_elf = $(INCDIR)/bin-bugs.h $(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-d30v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_fr30_elf = $(INCDIR)/bin-bugs.h $(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-fr30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_h8300_elf = $(INCDIR)/bin-bugs.h $(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-h8300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_h8500_elf = $(INCDIR)/bin-bugs.h $(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-h8500.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_i370_elf = $(INCDIR)/bin-bugs.h $(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-i370.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h \ +DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf) +DEPOBJ_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_a29k_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-a29k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(BFDDIR)/libecoff.h +DEPOBJ_alpha_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-alpha.h subsegs.h \ + $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/aout/aout64.h -DEPOBJ_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i386_elf = $(INCDIR)/bin-bugs.h $(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-i386.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_i860_elf = $(INCDIR)/bin-bugs.h $(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-i860.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \ - $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h -DEPOBJ_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i960_elf = $(INCDIR)/bin-bugs.h $(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-i960.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_m32r_elf = $(INCDIR)/bin-bugs.h $(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-m32r.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.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 +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 +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 +DEPOBJ_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_arm_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-arm.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_avr_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-avr.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_cris_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-cris.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_d10v_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-d10v.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_d30v_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-d30v.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_fr30_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-fr30.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_h8300_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-h8300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_h8500_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-h8500.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_hppa_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-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_ia64_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-ia64.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i370_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-i370.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h +DEPOBJ_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i386_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-i386.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i860_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-i860.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/obstack.h +DEPOBJ_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i960_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-i960.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m32r_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-m32r.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68hc11_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-m68hc11.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68k_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-m68k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-aout.h \ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m68k_elf = $(INCDIR)/bin-bugs.h $(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-m68k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m88k_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-m88k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mcore_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-mcore.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/obstack.h -DEPOBJ_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m88k_elf = $(INCDIR)/bin-bugs.h $(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-m88k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mcore_elf = $(INCDIR)/bin-bugs.h $(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-mcore.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h -DEPOBJ_mips_elf = $(INCDIR)/bin-bugs.h $(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-mips.h \ - emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ +DEPOBJ_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(BFDDIR)/libecoff.h +DEPOBJ_mips_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-mips.h subsegs.h \ + $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h +DEPOBJ_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mn10200_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-mn10200.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mn10300_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-mn10300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_ns32k_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-ns32k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_pj_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-pj.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_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)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/aout/aout64.h -DEPOBJ_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_mn10200_elf = $(INCDIR)/bin-bugs.h $(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-mn10200.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_mn10300_elf = $(INCDIR)/bin-bugs.h $(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-mn10300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_ns32k_elf = $(INCDIR)/bin-bugs.h $(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-ns32k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_pj_elf = $(INCDIR)/bin-bugs.h $(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-pj.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_ppc_elf = $(INCDIR)/bin-bugs.h $(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 \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h -DEPOBJ_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sh_elf = $(INCDIR)/bin-bugs.h $(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-sh.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sparc_elf = $(INCDIR)/bin-bugs.h $(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-sparc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_tahoe_elf = $(INCDIR)/bin-bugs.h $(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-tahoe.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_tic30_elf = $(INCDIR)/bin-bugs.h $(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-tic30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_tic80_elf = $(INCDIR)/bin-bugs.h $(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-tic80.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h -DEPOBJ_vax_elf = $(INCDIR)/bin-bugs.h $(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-vax.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def emul.h subsegs.h $(INCDIR)/obstack.h -DEPOBJ_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_w65_elf = $(INCDIR)/bin-bugs.h $(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-w65.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ +DEPOBJ_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 $(INCDIR)/obstack.h subsegs.h +DEPOBJ_sh_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-sh.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_sparc_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-sparc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tahoe_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-tahoe.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tic30_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-tic30.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ subsegs.h -DEPOBJ_v850_elf = $(INCDIR)/bin-bugs.h $(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-v850.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_z8k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_z8k_elf = $(INCDIR)/bin-bugs.h $(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-z8k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic54x_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-tic54x.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tic80_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-tic80.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h +DEPOBJ_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_vax_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-vax.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def subsegs.h \ + $(INCDIR)/obstack.h +DEPOBJ_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_w65_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-w65.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h +DEPOBJ_v850_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-v850.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_z8k_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-z8k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def @@ -1639,6 +1600,7 @@ DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) $(DEPOBJ_i386_coff) \ $(DEPOBJ_i386_elf) DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \ $(DEPOBJ_mips_elf) +DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf) DEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h DEP_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ @@ -1673,6 +1635,11 @@ DEP_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ DEP_avr_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-avr.h +DEP_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h +DEP_cris_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-cris.h DEP_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ @@ -1702,6 +1669,15 @@ DEP_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h DEP_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_hppa_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-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h +DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_ia64_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-ia64.h DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ @@ -1715,10 +1691,6 @@ DEP_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ DEP_i386_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-i386.h -DEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h -DEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \ - $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_i860_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-i860.h @@ -1734,6 +1706,12 @@ DEP_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ DEP_m32r_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-m32r.h +DEP_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h +DEP_m68hc11_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-m68hc11.h DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h DEP_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ @@ -1823,6 +1801,12 @@ DEP_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ DEP_tic30_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-tic30.h +DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_tic54x_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-tic54x.h DEP_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -1860,7 +1844,52 @@ DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \ $(DEP_i386_elf) DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \ $(DEP_mips_elf) +DEP_cris_multi = $(DEP_cris_aout) $(DEP_cris_elf) +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 +atof-generic.o: atof-generic.c +bignum-copy.o: bignum-copy.c +cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h +depend.o: depend.c +dwarf2dbg.o: dwarf2dbg.c dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/elf/dwarf2.h +ecoff.o: ecoff.c ecoff.h +ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h +expr.o: expr.c $(INCDIR)/obstack.h +flonum-copy.o: flonum-copy.c +flonum-konst.o: flonum-konst.c +flonum-mult.o: flonum-mult.c +frags.o: frags.c subsegs.h $(INCDIR)/obstack.h +hash.o: hash.c $(INCDIR)/obstack.h +input-file.o: input-file.c input-file.h +input-scrub.o: input-scrub.c input-file.h sb.h +listing.o: listing.c input-file.h subsegs.h +literal.o: literal.c subsegs.h $(INCDIR)/obstack.h +macro.o: macro.c sb.h macro.h +messages.o: messages.c +output-file.o: output-file.c output-file.h +read.o: read.c subsegs.h $(INCDIR)/obstack.h sb.h macro.h \ + ecoff.h +sb.o: sb.c sb.h +stabs.o: stabs.c $(INCDIR)/obstack.h subsegs.h ecoff.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def +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 +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 +e-criself.o: $(srcdir)/config/e-criself.c emul-target.h +e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h +e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h +e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h +e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul-target.h +e-mipself.o: $(srcdir)/config/e-mipself.c emul-target.h $(OBJS): $(DEP_@target_cpu_type@_@obj_format@) $(TARG_CPU_O): $(DEPTC_@target_cpu_type@_@obj_format@) $(OBJ_FORMAT_O): $(DEPOBJ_@target_cpu_type@_@obj_format@) -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY +#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE. diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in index 569b98e..bd1a89e 100644 --- a/contrib/binutils/gas/Makefile.in +++ b/contrib/binutils/gas/Makefile.in @@ -69,9 +69,13 @@ BFDLIB = @BFDLIB@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GDBINIT = @GDBINIT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ @@ -81,6 +85,7 @@ INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@ INSTOBJEXT = @INSTOBJEXT@ INTLDEPS = @INTLDEPS@ INTLOBJS = @INTLOBJS@ +LIBM = @LIBM@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAINT = @MAINT@ @@ -88,11 +93,13 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ OPCODES_LIB = @OPCODES_LIB@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ +STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -116,6 +123,9 @@ tooldir = $(exec_prefix)/$(target_alias) YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi` LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi` +WARN_CFLAGS = @WARN_CFLAGS@ +AM_CFLAGS = $(WARN_CFLAGS) + MKDEP = gcc -MM TARG_CPU = @target_cpu_type@ @@ -143,17 +153,20 @@ CPU_TYPES = \ arc \ arm \ avr \ + cris \ d10v \ d30v \ fr30 \ h8300 \ h8500 \ hppa \ + ia64 \ i370 \ i386 \ i860 \ i960 \ m32r \ + m68hc11 \ m68k \ m88k \ mcore \ @@ -167,6 +180,7 @@ CPU_TYPES = \ sparc \ tahoe \ tic30 \ + tic54x \ tic80 \ vax \ w65 \ @@ -199,14 +213,18 @@ CPU_OBJ_VALID = \ case $$o in \ aout) \ case $$c in \ - a29k | arm | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \ + a29k | arm | cris | i386 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \ valid=yes ;; \ esac ;; \ bout) \ case $$c in \ i960) valid=yes ;; \ esac ;; \ - coff) valid=yes ;; \ + coff) valid=yes; \ + case $$c in \ + cris | i860) \ + valid= ;; \ + esac ;; \ ecoff) \ case $$c in \ mips | alpha) valid=yes ;; \ @@ -229,16 +247,19 @@ CPU_OBJ_VALID = \ # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case. -MULTI_CPU_TYPES = i386 mips +MULTI_CPU_TYPES = i386 mips cris MULTI_CPU_OBJ_VALID = \ valid= ; \ case $$o in \ aout) \ case $$c in \ - i386) valid=yes ;; \ + i386 | cris) valid=yes ;; \ + esac ;; \ + coff) \ + case $$c in \ + i386 | mips) valid=yes ;; \ esac ;; \ - coff) valid=yes ;; \ ecoff) \ case $$c in \ mips) valid=yes ;; \ @@ -319,17 +340,20 @@ TARGET_CPU_CFILES = \ config/tc-arc.c \ config/tc-arm.c \ config/tc-avr.c \ + config/tc-cris.c \ config/tc-d10v.c \ config/tc-d30v.c \ config/tc-fr30.c \ config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ + config/tc-ia64.c \ config/tc-i370.c \ config/tc-i386.c \ config/tc-i860.c \ config/tc-i960.c \ config/tc-m32r.c \ + config/tc-m68hc11.c \ config/tc-m68k.c \ config/tc-m88k.c \ config/tc-mcore.c \ @@ -343,6 +367,7 @@ TARGET_CPU_CFILES = \ config/tc-sparc.c \ config/tc-tahoe.c \ config/tc-tic30.c \ + config/tc-tic54x.c \ config/tc-tic80.c \ config/tc-vax.c \ config/tc-w65.c \ @@ -356,17 +381,20 @@ TARGET_CPU_HFILES = \ config/tc-arc.h \ config/tc-arm.h \ config/tc-avr.h \ + config/tc-cris.h \ config/tc-d10v.h \ config/tc-d30v.h \ config/tc-fr30.h \ config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ + config/tc-ia64.h \ config/tc-i370.h \ config/tc-i386.h \ config/tc-i860.h \ config/tc-i960.h \ config/tc-m32r.h \ + config/tc-m68hc11.h \ config/tc-m68k.h \ config/tc-m88k.h \ config/tc-mcore.h \ @@ -380,6 +408,7 @@ TARGET_CPU_HFILES = \ config/tc-sparc.h \ config/tc-tahoe.h \ config/tc-tic30.h \ + config/tc-tic54x.h \ config/tc-tic80.h \ config/tc-vax.h \ config/tc-w65.h \ @@ -436,7 +465,6 @@ TARG_ENV_HFILES = \ config/te-lynx.h \ config/te-mach.h \ config/te-macos.h \ - config/te-multi.h \ config/te-nbsd.h \ config/te-nbsd532.h \ config/te-pc532mach.h \ @@ -453,6 +481,8 @@ TARG_ENV_HFILES = \ # Multi files in config MULTI_CFILES = \ + config/e-crisaout.c \ + config/e-criself.c \ config/e-i386aout.c \ config/e-i386coff.c \ config/e-i386elf.c \ @@ -544,7 +574,7 @@ STAGESTUFF = *.o $(noinst_PROGRAMS) as_new_SOURCES = $(GAS_CFILES) as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ - $(extra_objects) $(GASLIBS) $(INTLLIBS) + $(extra_objects) $(GASLIBS) $(INTLLIBS) $(LIBM) as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \ $(extra_objects) $(GASLIBS) $(INTLDEPS) @@ -586,463 +616,456 @@ MOSTLYCLEANFILES = $(STAGESTUFF) core stamp-mk.com \ testsuite/site.exp site.bak site.exp stage stage1 stage2 -CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2a DEP1 DEPA DEP DEPDIR +CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ DEPOBJA DEP2 DEP2A DEP1 DEPA DEP DEPDIR against = stage2 -# Automatic dependency computation. This is a real pain, because the -# dependencies change based on target_cpu_type and obj_format. We -# currently ignore any dependencies caused by emulation files. - DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \ $(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES) -DEPTC_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/a29k.h -DEPTC_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/a29k.h +AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW. +DEPTC_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h -DEPTC_a29k_elf = $(INCDIR)/bin-bugs.h $(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-a29k.h \ - emul.h $(INCDIR)/opcode/a29k.h +DEPTC_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h -DEPTC_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h \ - $(srcdir)/config/atof-vax.c +DEPTC_a29k_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-a29k.h $(INCDIR)/opcode/a29k.h -DEPTC_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \ - struc-symbol.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c +DEPTC_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \ + $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c -DEPTC_alpha_elf = $(INCDIR)/bin-bugs.h $(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-alpha.h \ - emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ +DEPTC_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ - $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/alpha.h \ $(srcdir)/config/atof-vax.c -DEPTC_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \ - $(srcdir)/config/tc-alpha.h emul.h subsegs.h $(INCDIR)/obstack.h \ - struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c +DEPTC_alpha_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-alpha.h subsegs.h \ + $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h \ + $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(srcdir)/config/atof-vax.c + +DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.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 -DEPTC_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.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 -DEPTC_arc_elf = $(INCDIR)/bin-bugs.h $(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 \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \ - $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.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 \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h -DEPTC_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h +DEPTC_arm_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-arm.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \ + dwarf2dbg.h -DEPTC_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h +DEPTC_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h -DEPTC_arm_elf = $(INCDIR)/bin-bugs.h $(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-arm.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h \ - $(INCDIR)/elf/reloc-macros.h +DEPTC_avr_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-avr.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h -DEPTC_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h +DEPTC_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/cris.h dwarf2dbg.h -DEPTC_avr_elf = $(INCDIR)/bin-bugs.h $(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-avr.h \ - emul.h subsegs.h $(INCDIR)/obstack.h +DEPTC_cris_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-cris.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h dwarf2dbg.h -DEPTC_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \ + $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h + +DEPTC_d10v_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-d10v.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h \ $(INCDIR)/elf/reloc-macros.h -DEPTC_d10v_elf = $(INCDIR)/bin-bugs.h $(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-d10v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h +DEPTC_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h -DEPTC_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_d30v_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-d30v.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h -DEPTC_d30v_elf = $(INCDIR)/bin-bugs.h $(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-d30v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h +DEPTC_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \ + cgen.h -DEPTC_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_fr30_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-fr30.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \ cgen.h -DEPTC_fr30_elf = $(INCDIR)/bin-bugs.h $(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-fr30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \ - $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \ - $(srcdir)/../opcodes/fr30-opc.h cgen.h +DEPTC_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h -DEPTC_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h +DEPTC_h8300_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-h8300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h -DEPTC_h8300_elf = $(INCDIR)/bin-bugs.h $(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-h8300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h +DEPTC_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h -DEPTC_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h +DEPTC_h8500_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-h8500.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h -DEPTC_h8500_elf = $(INCDIR)/bin-bugs.h $(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-h8500.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h +DEPTC_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h -DEPTC_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/libbfd.h \ - $(INCDIR)/opcode/hppa.h +DEPTC_hppa_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-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \ + dwarf2dbg.h -DEPTC_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h +DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h -DEPTC_i370_elf = $(INCDIR)/bin-bugs.h $(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-i370.h \ - emul.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ - $(INCDIR)/opcode/i370.h $(INCDIR)/elf/i370.h +DEPTC_ia64_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-ia64.h dwarf2dbg.h \ + subsegs.h $(INCDIR)/obstack.h -DEPTC_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h +DEPTC_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h -DEPTC_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h +DEPTC_i370_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-i370.h subsegs.h \ + $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h \ + $(INCDIR)/elf/i370.h -DEPTC_i386_elf = $(INCDIR)/bin-bugs.h $(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-i386.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i386.h +DEPTC_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + dwarf2dbg.h $(INCDIR)/opcode/i386.h -DEPTC_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/i860.h +DEPTC_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \ + $(INCDIR)/opcode/i386.h -DEPTC_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/i860.h +DEPTC_i386_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-i386.h subsegs.h \ + $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/i386.h -DEPTC_i860_elf = $(INCDIR)/bin-bugs.h $(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-i860.h \ - emul.h $(INCDIR)/opcode/i860.h +DEPTC_i860_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-i860.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i860.h $(INCDIR)/elf/i860.h \ + $(INCDIR)/elf/reloc-macros.h -DEPTC_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \ - $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/i960.h +DEPTC_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h -DEPTC_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h +DEPTC_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h -DEPTC_i960_elf = $(INCDIR)/bin-bugs.h $(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-i960.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h +DEPTC_i960_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-i960.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/i960.h -DEPTC_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \ + $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \ + cgen.h + +DEPTC_m32r_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-m32r.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \ cgen.h -DEPTC_m32r_elf = $(INCDIR)/bin-bugs.h $(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-m32r.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h \ - $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen.h \ - $(srcdir)/../opcodes/m32r-opc.h cgen.h +DEPTC_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h \ + dwarf2dbg.h -DEPTC_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ - $(srcdir)/config/m68k-parse.h +DEPTC_m68hc11_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-m68hc11.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h -DEPTC_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ +DEPTC_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h + +DEPTC_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ $(srcdir)/config/m68k-parse.h -DEPTC_m68k_elf = $(INCDIR)/bin-bugs.h $(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-m68k.h \ - emul.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ - $(srcdir)/config/m68k-parse.h $(INCDIR)/elf/m68k.h \ - $(INCDIR)/elf/reloc-macros.h +DEPTC_m68k_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-m68k.h $(INCDIR)/obstack.h \ + subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h \ + $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h -DEPTC_m68k_hp300 = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-hp300.h \ - $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h +DEPTC_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \ + $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \ + $(srcdir)/config/m68k-parse.h -DEPTC_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h +DEPTC_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h -DEPTC_m88k_elf = $(INCDIR)/bin-bugs.h $(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-m88k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h +DEPTC_m88k_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-m88k.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h -DEPTC_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h +DEPTC_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h -DEPTC_mcore_elf = $(INCDIR)/bin-bugs.h $(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-mcore.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \ +DEPTC_mcore_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-mcore.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \ $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h -DEPTC_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ +DEPTC_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ + $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ + $(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h + +DEPTC_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ +DEPTC_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h + +DEPTC_mips_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-mips.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h itbl-ops.h \ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h -DEPTC_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h subsegs.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \ - $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ - $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h \ - $(INCDIR)/elf/reloc-macros.h - -DEPTC_mips_elf = $(INCDIR)/bin-bugs.h $(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-mips.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \ - itbl-ops.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h +DEPTC_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h -DEPTC_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ +DEPTC_mn10200_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-mn10200.h subsegs.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h -DEPTC_mn10200_elf = $(INCDIR)/bin-bugs.h $(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-mn10200.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h +DEPTC_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h \ + dwarf2dbg.h -DEPTC_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h +DEPTC_mn10300_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-mn10300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h dwarf2dbg.h -DEPTC_mn10300_elf = $(INCDIR)/bin-bugs.h $(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-mn10300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h +DEPTC_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \ + $(INCDIR)/obstack.h -DEPTC_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h +DEPTC_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h -DEPTC_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/ns32k.h \ +DEPTC_ns32k_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-ns32k.h $(INCDIR)/opcode/ns32k.h \ $(INCDIR)/obstack.h -DEPTC_ns32k_elf = $(INCDIR)/bin-bugs.h $(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-ns32k.h \ - emul.h $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h +DEPTC_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/opcode/pj.h -DEPTC_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/opcode/pj.h +DEPTC_pj_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-pj.h $(INCDIR)/opcode/pj.h -DEPTC_pj_elf = $(INCDIR)/bin-bugs.h $(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-pj.h \ - emul.h $(INCDIR)/opcode/pj.h +DEPTC_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h -DEPTC_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h +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 -DEPTC_ppc_elf = $(INCDIR)/bin-bugs.h $(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 \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h \ - $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.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 \ + struc-symbol.h dwarf2dbg.h -DEPTC_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h +DEPTC_sh_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-sh.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h struc-symbol.h \ + $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h -DEPTC_sh_elf = $(INCDIR)/bin-bugs.h $(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-sh.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \ - $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h +DEPTC_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/sparc.h -DEPTC_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h +DEPTC_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h -DEPTC_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h +DEPTC_sparc_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-sparc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h \ + $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h -DEPTC_sparc_elf = $(INCDIR)/bin-bugs.h $(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-sparc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h \ - $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h +DEPTC_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ + $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h +DEPTC_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ +DEPTC_tahoe_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-tahoe.h $(INCDIR)/obstack.h \ $(INCDIR)/opcode/tahoe.h -DEPTC_tahoe_elf = $(INCDIR)/bin-bugs.h $(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-tahoe.h \ - emul.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h +DEPTC_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic30.h +DEPTC_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic30.h +DEPTC_tic30_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-tic30.h $(INCDIR)/opcode/tic30.h -DEPTC_tic30_elf = $(INCDIR)/bin-bugs.h $(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-tic30.h \ - emul.h $(INCDIR)/opcode/tic30.h +DEPTC_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sb.h macro.h \ + subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/tic54x.h -DEPTC_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/opcode/tic80.h +DEPTC_tic54x_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-tic54x.h sb.h \ + macro.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \ + $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h -DEPTC_tic80_elf = $(INCDIR)/bin-bugs.h $(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-tic80.h \ - emul.h $(INCDIR)/opcode/tic80.h +DEPTC_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic80.h -DEPTC_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/vax.h +DEPTC_tic80_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-tic80.h $(INCDIR)/opcode/tic80.h -DEPTC_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(srcdir)/config/vax-inst.h \ +DEPTC_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(srcdir)/config/vax-inst.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_vax_elf = $(INCDIR)/bin-bugs.h $(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-vax.h \ - emul.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \ - $(INCDIR)/opcode/vax.h +DEPTC_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def emul.h $(srcdir)/config/vax-inst.h \ +DEPTC_vax_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-vax.h $(srcdir)/config/vax-inst.h \ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h +DEPTC_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h -DEPTC_w65_elf = $(INCDIR)/bin-bugs.h $(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-w65.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h +DEPTC_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h -DEPTC_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h +DEPTC_w65_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-w65.h subsegs.h \ + $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h -DEPTC_v850_elf = $(INCDIR)/bin-bugs.h $(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-v850.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h +DEPTC_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \ + dwarf2dbg.h -DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ - $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \ - $(INCDIR)/bfdlink.h emul.h +DEPTC_v850_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-v850.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h dwarf2dbg.h -DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(INCDIR)/bin-bugs.h \ - $(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-z8k.h emul.h +DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-coff.h \ + $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ + $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + +DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(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-z8k.h DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \ @@ -1054,415 +1077,412 @@ DEPTC_i386_multi = $(DEPTC_i386_aout) $(DEPTC_i386_coff) \ DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \ $(DEPTC_mips_elf) -DEPOBJ_a29k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf) +DEPOBJ_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_a29k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_a29k_elf = $(INCDIR)/bin-bugs.h $(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-a29k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_a29k_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-a29k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_alpha_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_alpha_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h +DEPOBJ_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(BFDDIR)/libecoff.h -DEPOBJ_alpha_elf = $(INCDIR)/bin-bugs.h $(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-alpha.h \ - emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ +DEPOBJ_alpha_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-alpha.h subsegs.h \ + $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \ $(INCDIR)/aout/aout64.h -DEPOBJ_alpha_evax = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-evax.h \ - $(srcdir)/config/tc-alpha.h emul.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 -DEPOBJ_arc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.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 -DEPOBJ_arc_elf = $(INCDIR)/bin-bugs.h $(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 \ - emul.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 + +DEPOBJ_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_arm_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_arm_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-arm.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_arm_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_arm_elf = $(INCDIR)/bin-bugs.h $(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-arm.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_avr_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-avr.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_avr_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_avr_elf = $(INCDIR)/bin-bugs.h $(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-avr.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_cris_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-cris.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_d10v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_d10v_elf = $(INCDIR)/bin-bugs.h $(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-d10v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_d10v_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-d10v.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_d30v_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_d30v_elf = $(INCDIR)/bin-bugs.h $(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-d30v.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_d30v_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-d30v.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_fr30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_fr30_elf = $(INCDIR)/bin-bugs.h $(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-fr30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_fr30_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-fr30.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_h8300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_h8300_elf = $(INCDIR)/bin-bugs.h $(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-h8300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_h8300_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-h8300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_h8500_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_h8500_elf = $(INCDIR)/bin-bugs.h $(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-h8500.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_h8500_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-h8500.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_hppa_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i370_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_hppa_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-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i370_elf = $(INCDIR)/bin-bugs.h $(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-i370.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h \ - $(INCDIR)/aout/aout64.h +DEPOBJ_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i386_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_ia64_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-ia64.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i386_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i386_elf = $(INCDIR)/bin-bugs.h $(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-i386.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i370_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-i370.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h -DEPOBJ_i860_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-i860.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_i860_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i860.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_i860_elf = $(INCDIR)/bin-bugs.h $(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-i860.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i386_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-i386.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i960_bout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-bout.h \ - $(srcdir)/config/tc-i960.h emul.h $(INCDIR)/obstack.h +DEPOBJ_i860_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-i860.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_i960_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-i960.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/obstack.h -DEPOBJ_i960_elf = $(INCDIR)/bin-bugs.h $(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-i960.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m32r_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_i960_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-i960.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m32r_elf = $(INCDIR)/bin-bugs.h $(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-m32r.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m68k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_m32r_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-m32r.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m68k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m68k_elf = $(INCDIR)/bin-bugs.h $(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-m68k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68hc11_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-m68hc11.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/bin-bugs.h \ - $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/aout/aout64.h \ +DEPOBJ_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ $(INCDIR)/obstack.h -DEPOBJ_m88k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_m88k_elf = $(INCDIR)/bin-bugs.h $(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-m88k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m68k_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-m68k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mcore_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-aout.h \ + $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h -DEPOBJ_mcore_elf = $(INCDIR)/bin-bugs.h $(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-mcore.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mips_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_m88k_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-m88k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mips_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mips_ecoff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-ecoff.h \ - $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h emul.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h +DEPOBJ_mcore_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-mcore.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_mips_elf = $(INCDIR)/bin-bugs.h $(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-mips.h \ - emul.h subsegs.h $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h \ - $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \ - $(INCDIR)/aout/aout64.h +DEPOBJ_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_mn10200_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_mn10200_elf = $(INCDIR)/bin-bugs.h $(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-mn10200.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \ + ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(BFDDIR)/libecoff.h -DEPOBJ_mn10300_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_mips_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-mips.h subsegs.h \ + $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \ + $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h -DEPOBJ_mn10300_elf = $(INCDIR)/bin-bugs.h $(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-mn10300.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_ns32k_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_mn10200_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-mn10200.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_ns32k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_ns32k_elf = $(INCDIR)/bin-bugs.h $(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-ns32k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_mn10300_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-mn10300.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_pj_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_pj_elf = $(INCDIR)/bin-bugs.h $(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-pj.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_ppc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-ppc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_ns32k_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-ns32k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_ppc_elf = $(INCDIR)/bin-bugs.h $(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 \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h \ - $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h +DEPOBJ_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sh_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_pj_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-pj.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_sh_elf = $(INCDIR)/bin-bugs.h $(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-sh.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sparc_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_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)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \ + $(INCDIR)/aout/aout64.h -DEPOBJ_sparc_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_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 $(INCDIR)/obstack.h subsegs.h -DEPOBJ_sparc_elf = $(INCDIR)/bin-bugs.h $(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-sparc.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_sh_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-sh.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tahoe_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_tahoe_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_tahoe_elf = $(INCDIR)/bin-bugs.h $(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-tahoe.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_sparc_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-sparc.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tic30_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_tic30_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_tic30_elf = $(INCDIR)/bin-bugs.h $(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-tic30.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tahoe_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-tahoe.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_tic80_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_tic80_elf = $(INCDIR)/bin-bugs.h $(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-tic80.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_vax_aout = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-aout.h \ - $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h +DEPOBJ_tic30_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-tic30.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_vax_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ +DEPOBJ_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \ subsegs.h -DEPOBJ_vax_elf = $(INCDIR)/bin-bugs.h $(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-vax.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_tic54x_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-tic54x.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_vax_vms = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-vms.h \ - $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \ - $(INCDIR)/aout/stab.def emul.h subsegs.h $(INCDIR)/obstack.h +DEPOBJ_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h -DEPOBJ_w65_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_tic80_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-tic80.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_w65_elf = $(INCDIR)/bin-bugs.h $(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-w65.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \ + $(INCDIR)/obstack.h -DEPOBJ_v850_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \ - $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h emul.h $(INCDIR)/obstack.h \ - subsegs.h +DEPOBJ_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h -DEPOBJ_v850_elf = $(INCDIR)/bin-bugs.h $(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-v850.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_vax_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-vax.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h -DEPOBJ_z8k_coff = $(INCDIR)/bin-bugs.h $(srcdir)/config/obj-coff.h \ - $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \ - $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ - emul.h $(INCDIR)/obstack.h subsegs.h +DEPOBJ_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def subsegs.h \ + $(INCDIR)/obstack.h -DEPOBJ_z8k_elf = $(INCDIR)/bin-bugs.h $(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-z8k.h \ - emul.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h +DEPOBJ_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h + +DEPOBJ_w65_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-w65.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + +DEPOBJ_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h + +DEPOBJ_v850_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-v850.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + +DEPOBJ_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h + +DEPOBJ_z8k_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-z8k.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \ $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \ @@ -1474,6 +1494,7 @@ DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) $(DEPOBJ_i386_coff) \ DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \ $(DEPOBJ_mips_elf) +DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf) DEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h @@ -1521,6 +1542,13 @@ DEP_avr_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-avr.h +DEP_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \ + $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h + +DEP_cris_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-cris.h + DEP_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h @@ -1561,6 +1589,18 @@ DEP_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ DEP_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h +DEP_hppa_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-hppa.h $(BFDDIR)/elf32-hppa.h \ + $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h + +DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + +DEP_ia64_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-ia64.h + DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h @@ -1579,12 +1619,6 @@ DEP_i386_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-i386.h -DEP_i860_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i860.h \ - $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h - -DEP_i860_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i860.h \ - $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h - DEP_i860_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-i860.h @@ -1605,6 +1639,14 @@ DEP_m32r_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-m32r.h +DEP_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \ + $(INCDIR)/bfdlink.h + +DEP_m68hc11_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-m68hc11.h + DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h @@ -1728,6 +1770,14 @@ DEP_tic30_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-tic30.h +DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \ + $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \ + $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + +DEP_tic54x_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-tic54x.h + DEP_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \ $(INCDIR)/bfdlink.h @@ -1779,6 +1829,8 @@ DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \ DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \ $(DEP_mips_elf) +DEP_cris_multi = $(DEP_cris_aout) $(DEP_cris_elf) +BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = config.h @@ -1791,17 +1843,22 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ -itbl_test_OBJECTS = itbl-parse.o itbl-lex.o +itbl_test_OBJECTS = itbl-parse.$(OBJEXT) itbl-lex.$(OBJEXT) itbl_test_DEPENDENCIES = itbl-tops.o itbl-test.o \ ../libiberty/libiberty.a itbl_test_LDFLAGS = -as_new_OBJECTS = app.o as.o atof-generic.o bignum-copy.o cond.o \ -depend.o dwarf2dbg.o ecoff.o ehopt.o expr.o flonum-copy.o \ -flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o \ -listing.o literal.o macro.o messages.o output-file.o read.o sb.o \ -stabs.o subsegs.o symbols.o write.o +as_new_OBJECTS = app.$(OBJEXT) as.$(OBJEXT) atof-generic.$(OBJEXT) \ +bignum-copy.$(OBJEXT) cond.$(OBJEXT) depend.$(OBJEXT) \ +dwarf2dbg.$(OBJEXT) ecoff.$(OBJEXT) ehopt.$(OBJEXT) expr.$(OBJEXT) \ +flonum-copy.$(OBJEXT) flonum-konst.$(OBJEXT) flonum-mult.$(OBJEXT) \ +frags.$(OBJEXT) hash.$(OBJEXT) input-file.$(OBJEXT) \ +input-scrub.$(OBJEXT) listing.$(OBJEXT) literal.$(OBJEXT) \ +macro.$(OBJEXT) messages.$(OBJEXT) output-file.$(OBJEXT) read.$(OBJEXT) \ +sb.$(OBJEXT) stabs.$(OBJEXT) subsegs.$(OBJEXT) symbols.$(OBJEXT) \ +write.$(OBJEXT) as_new_LDFLAGS = -gasp_new_OBJECTS = gasp.o macro.o sb.o hash.o +gasp_new_OBJECTS = gasp.$(OBJEXT) macro.$(OBJEXT) sb.$(OBJEXT) \ +hash.$(OBJEXT) gasp_new_LDFLAGS = SCRIPTS = $(noinst_SCRIPTS) @@ -1820,14 +1877,14 @@ configure configure.in gdbinit.in itbl-lex.c itbl-parse.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar 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) all: all-redirect .SUFFIXES: -.SUFFIXES: .S .c .l .lo .o .s .y +.SUFFIXES: .S .c .l .lo .o .obj .s .y $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile @@ -1885,6 +1942,11 @@ maintainer-clean-noinstPROGRAMS: .c.o: $(COMPILE) -c $< +# FIXME: We should only use cygpath when building on Windows, +# and only if it is available. +.c.obj: + $(COMPILE) -c `cygpath -w $<` + .s.o: $(COMPILE) -c $< @@ -1893,6 +1955,7 @@ maintainer-clean-noinstPROGRAMS: mostlyclean-compile: -rm -f *.o core *.core + -rm -f *.$(OBJEXT) clean-compile: @@ -2219,9 +2282,10 @@ $(OBJS): @ALL_OBJ_DEPS@ # Stuff that every object file depends upon. If anything is removed # from this list, remove it from dep-in.sed as well. -$(OBJS): config.h as.h $(TARG_ENV_H) $(OBJ_FORMAT_H) $(TARG_CPU_H) flonum.h \ - expr.h write.h frags.h hash.h read.h symbols.h tc.h \ - obj.h listing.h bignum.h bit_fix.h $(INCDIR)/libiberty.h asintl.h +$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \ + $(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \ + as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \ + frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h check-DEJAGNU: site.exp if [ -d testsuite ]; then \ @@ -2248,7 +2312,7 @@ check-DEJAGNU: site.exp # The implicit .c.o rule doesn't work for these, perhaps because of # the variables, or perhaps because the sources are not on vpath. -$(TARG_CPU_O): $(TARG_CPU_C) $(TARG_CPU_DEP_@target_cpu_type@) +$(TARG_CPU_O): $(TARG_CPU_C) $(COMPILE) -c $(TARG_CPU_C) $(ATOF_TARG_O): $(ATOF_TARG_C) $(COMPILE) -c $(ATOF_TARG_C) @@ -2295,6 +2359,10 @@ e-i386coff.o: $(srcdir)/config/e-i386coff.c $(COMPILE) -c $(srcdir)/config/e-i386coff.c e-i386elf.o: $(srcdir)/config/e-i386elf.c $(COMPILE) -c $(srcdir)/config/e-i386elf.c +e-crisaout.o: $(srcdir)/config/e-crisaout.c + $(COMPILE) -c $(srcdir)/config/e-crisaout.c +e-criself.o: $(srcdir)/config/e-criself.c + $(COMPILE) -c $(srcdir)/config/e-criself.c # If m68k-parse.y is in a different directory, then ylwrap will use an # absolute path when it invokes yacc, which will cause yacc to put the @@ -2447,20 +2515,33 @@ de-stage3: - (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..) - rmdir stage3 +# Automatic dependency computation. This is a real pain, because the +# dependencies change based on target_cpu_type and obj_format. +# Just to make things even more complicated, automake separates the +# dependency variable assignments from the dependency rules, and tacks +# on a .NOEXPORT at the end of Makefile.in. + DEP: dep.sed $(DEP_FILE_DEPS) DEPTC DEPOBJ DEP2 - rm -f DEP1 + rm -f DEP1 # delete because we use $? in DEP1 rule srcdir=`cd $(srcdir); pwd`; \ $(MAKE) MKDEP="$(MKDEP)" srcdir="$${srcdir}" VPATH="$${srcdir}" DEP1 rm -rf DEPDIR - sed -f dep.sed < DEP1 > DEPA + echo 'AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' > DEPA sed -f dep.sed < DEPTC >> DEPA sed -f dep.sed < DEPOBJ >> DEPA sed -f dep.sed < DEP2 >> DEPA + echo 'BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA + echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.' >> DEPA + sed -f dep.sed < DEP1 >> DEPA echo '$$(OBJS): $$(DEP_@target''_cpu_type@_@obj''_format@)' >> DEPA echo '$$(TARG_CPU_O): $$(DEPTC_@target''_cpu_type@_@obj''_format@)' >> DEPA echo '$$(OBJ_FORMAT_O): $$(DEPOBJ_@target''_cpu_type@_@obj''_format@)' >> DEPA - echo '# IF YOU PUT ANYTHING HERE IT WILL GO AWAY' >> DEPA - mv -f DEPA $@ + echo '#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.' >> DEPA + if grep ' /' DEPA > /dev/null 2> /dev/null; then \ + echo 'make DEP failed!'; exit 1; \ + else \ + mv -f DEPA $@; \ + fi DEP1: $(CFILES) $(MULTI_CFILES) if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi @@ -2471,9 +2552,7 @@ DEP1: $(CFILES) $(MULTI_CFILES) echo '' > targ-env.h; \ echo '' > itbl-cpu.h; \ echo '' > itbl-parse.h; \ - echo '# DO NOT DELETE THIS LINE -- mkdep uses it.' > DEP; \ - echo '# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.' >> DEP; \ - $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? >> DEP + $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? > DEP mv -f DEPDIR/DEP $@ # Work out the special dependencies for the tc-*.c files. @@ -2504,7 +2583,7 @@ DEPTC: $(TARGET_CPU_CFILES) echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPTCA echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> DEPTCA for c in $(MULTI_CPU_TYPES); do \ - echo 'DEPTC_'"$${c}"'_multi = \' >> DEPTCA; \ + echo "DEPTC_$${c}"'_multi = \' >> DEPTCA; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -2543,7 +2622,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> DEPOBJA echo ' $$(INCDIR)/aout/stab.def' >> DEPOBJA for c in $(MULTI_CPU_TYPES); do \ - echo 'DEPOBJ_'"$${c}"'_multi = \' >> DEPOBJA; \ + echo "DEPOBJ_$${c}"'_multi = \' >> DEPOBJA; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -2557,7 +2636,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) # Work out the dependencies for each CPU/OBJ combination. # Note that SOM is a special case, because it only works native. DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES) - rm -f DEP2a + rm -f DEP2A if [ -d DEPDIR ]; then true; else mkdir DEPDIR; fi srcdir=`cd $(srcdir); pwd`; \ cd DEPDIR; \ @@ -2568,22 +2647,22 @@ DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES) echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \ echo '#include "obj-'"$${o}"'.h"' > dummy.c; \ $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \ - sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2a; \ + sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2A; \ else true; fi; \ done; \ done - echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2a + echo 'DEP_hppa_som = $$(BFDDIR)/som.h' >> DEP2A for c in $(MULTI_CPU_TYPES); do \ - echo 'DEP_'"$${c}"'_multi = \' >> DEP2a; \ + echo "DEP_$${c}"'_multi = \' >> DEP2A; \ for o in $(OBJ_FORMATS); do \ $(MULTI_CPU_OBJ_VALID) \ if [ x$${valid} = xyes ]; then \ - echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2a; \ + echo '$$(DEP_'"$${c}_$${o}"') \' >> DEP2A; \ else true; fi; \ done; \ - echo '' >> DEP2a; \ + echo '' >> DEP2A; \ done - mv -f DEP2a DEP2 + mv -f DEP2A DEP2 dep.sed: dep-in.sed config.status srcdir=`cd $(srcdir); pwd`; \ @@ -2593,85 +2672,73 @@ dep.sed: dep-in.sed config.status -e "s!@SRCDIR@!$${srcdir}!" dep: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < Makefile > tmp-Makefile + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < Makefile > tmp-Makefile cat DEP >> tmp-Makefile $(SHELL) $(srcdir)/../move-if-change tmp-Makefile Makefile dep-in: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.in > tmp-Makefile.in + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < $(srcdir)/Makefile.in > tmp-Makefile.in cat DEP >> tmp-Makefile.in $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.in $(srcdir)/Makefile.in dep-am: DEP - sed -e '/^..DO NOT DELETE THIS LINE/,$$d' < $(srcdir)/Makefile.am > tmp-Makefile.am + sed -e '/^.MKDEP.*WARNING BELOW./,/^.MKDEP.*WARNING ABOVE./d' \ + < $(srcdir)/Makefile.am > tmp-Makefile.am cat DEP >> tmp-Makefile.am $(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am +# HEED THE MKDEP WARNINGS. +# ANYTHING CHANGED OR ADDED BETWEEN THE WARNING LINES MAY GO AWAY. .PHONY: dep dep-in dep-am - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. -app.o: app.c $(INCDIR)/bin-bugs.h emul.h -as.o: as.c $(INCDIR)/bin-bugs.h emul.h subsegs.h $(INCDIR)/obstack.h \ - output-file.h sb.h macro.h -atof-generic.o: atof-generic.c $(INCDIR)/bin-bugs.h \ - emul.h -bignum-copy.o: bignum-copy.c $(INCDIR)/bin-bugs.h emul.h -cond.o: cond.c $(INCDIR)/bin-bugs.h emul.h macro.h \ - sb.h $(INCDIR)/obstack.h -depend.o: depend.c $(INCDIR)/bin-bugs.h emul.h -dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/bin-bugs.h emul.h \ - dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h -ecoff.o: ecoff.c $(INCDIR)/bin-bugs.h emul.h ecoff.h -ehopt.o: ehopt.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h -expr.o: expr.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h -flonum-copy.o: flonum-copy.c $(INCDIR)/bin-bugs.h emul.h +#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 +atof-generic.o: atof-generic.c +bignum-copy.o: bignum-copy.c +cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h +depend.o: depend.c +dwarf2dbg.o: dwarf2dbg.c dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h \ + $(INCDIR)/elf/dwarf2.h +ecoff.o: ecoff.c ecoff.h +ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h +expr.o: expr.c $(INCDIR)/obstack.h +flonum-copy.o: flonum-copy.c flonum-konst.o: flonum-konst.c flonum-mult.o: flonum-mult.c -frags.o: frags.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -hash.o: hash.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h -input-file.o: input-file.c $(INCDIR)/bin-bugs.h emul.h \ - input-file.h -input-scrub.o: input-scrub.c $(INCDIR)/bin-bugs.h emul.h \ - input-file.h sb.h -listing.o: listing.c $(INCDIR)/bin-bugs.h emul.h input-file.h \ - subsegs.h -literal.o: literal.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h +frags.o: frags.c subsegs.h $(INCDIR)/obstack.h +hash.o: hash.c $(INCDIR)/obstack.h +input-file.o: input-file.c input-file.h +input-scrub.o: input-scrub.c input-file.h sb.h +listing.o: listing.c input-file.h subsegs.h +literal.o: literal.c subsegs.h $(INCDIR)/obstack.h macro.o: macro.c sb.h macro.h -messages.o: messages.c $(INCDIR)/bin-bugs.h emul.h -output-file.o: output-file.c $(INCDIR)/bin-bugs.h emul.h \ - output-file.h -read.o: read.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h sb.h macro.h ecoff.h +messages.o: messages.c +output-file.o: output-file.c output-file.h +read.o: read.c subsegs.h $(INCDIR)/obstack.h sb.h macro.h \ + ecoff.h sb.o: sb.c sb.h -stabs.o: stabs.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \ - subsegs.h ecoff.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def -subsegs.o: subsegs.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h -symbols.o: symbols.c $(INCDIR)/bin-bugs.h emul.h $(INCDIR)/obstack.h \ - subsegs.h struc-symbol.h -write.o: write.c $(INCDIR)/bin-bugs.h emul.h subsegs.h \ - $(INCDIR)/obstack.h output-file.h -gasp.o: gasp.c $(INCDIR)/bin-bugs.h sb.h macro.h -itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/bin-bugs.h \ - emul.h itbl-parse.h -e-i386aout.o: $(srcdir)/config/e-i386aout.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-i386coff.o: $(srcdir)/config/e-i386coff.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-i386elf.o: $(srcdir)/config/e-i386elf.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h -e-mipself.o: $(srcdir)/config/e-mipself.c $(INCDIR)/bin-bugs.h \ - emul.h emul-target.h +stabs.o: stabs.c $(INCDIR)/obstack.h subsegs.h ecoff.h \ + $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def +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 +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 +e-criself.o: $(srcdir)/config/e-criself.c emul-target.h +e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h +e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h +e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h +e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul-target.h +e-mipself.o: $(srcdir)/config/e-mipself.c emul-target.h $(OBJS): $(DEP_@target_cpu_type@_@obj_format@) $(TARG_CPU_O): $(DEPTC_@target_cpu_type@_@obj_format@) $(OBJ_FORMAT_O): $(DEPOBJ_@target_cpu_type@_@obj_format@) -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY +#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE. # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/contrib/binutils/gas/NEWS b/contrib/binutils/gas/NEWS index 4143540..6c3439d 100644 --- a/contrib/binutils/gas/NEWS +++ b/contrib/binutils/gas/NEWS @@ -1,5 +1,27 @@ -*- text -*- +Changes in 2.11: + +x86 gas now supports the full Pentium4 instruction set. + +Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs. + +Support for Motorola 68HC11 and 68HC12. + +Support for Texas Instruments TMS320C54x (tic54x). + +Support for IA-64. + +Support for i860, by Jason Eckhardt. + +Support for CRIS (Axis Communications ETRAX series). + +x86 gas has a new .arch pseudo op to specify the target CPU architecture. + +x86 gas -q command line option quietens warnings about register size changes +due to suffix, indirect jmp/call without `*', stand-alone prefixes, and +translating various deprecated floating point instructions. + Changes in 2.10: Support for the ARM msr instruction was changed to only allow an immediate diff --git a/contrib/binutils/gas/README b/contrib/binutils/gas/README index 4ac27db..87666df 100644 --- a/contrib/binutils/gas/README +++ b/contrib/binutils/gas/README @@ -229,7 +229,7 @@ warning message when this happens. REPORTING BUGS IN GAS ===================== -Bugs in gas should be reported to bug-gnu-utils@gnu.org. They may be +Bugs in gas should be reported to bug-binutils@gnu.org. They may be cross-posted to bug-gcc if they affect the use of gas with gcc. They should not be reported just to bug-gcc, since I don't read that list, and therefore wouldn't see them. diff --git a/contrib/binutils/gas/acinclude.m4 b/contrib/binutils/gas/acinclude.m4 index 31a2c16..f16eefc 100644 --- a/contrib/binutils/gas/acinclude.m4 +++ b/contrib/binutils/gas/acinclude.m4 @@ -54,3 +54,19 @@ for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do done $1=[$]_gas_uniq_newlist ])dnl + +sinclude(../libtool.m4) +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_DEFUN([AC_CHECK_LIBM],) +AC_SUBST(LIBTOOL) +]) + +sinclude(../gettext.m4) +ifelse(yes,no,[ +AC_DEFUN([CY_WITH_NLS],) +AC_SUBST(INTLLIBS) +]) diff --git a/contrib/binutils/gas/aclocal.m4 b/contrib/binutils/gas/aclocal.m4 index 4b4ca84..338b221 100644 --- a/contrib/binutils/gas/aclocal.m4 +++ b/contrib/binutils/gas/aclocal.m4 @@ -67,6 +67,40 @@ done $1=[$]_gas_uniq_newlist ])dnl +sinclude(../libtool.m4) +dnl The lines below arrange for aclocal not to bring libtool.m4 +dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake +dnl to add a definition of LIBTOOL to Makefile.in. +ifelse(yes,no,[ +AC_DEFUN([AM_PROG_LIBTOOL],) +AC_DEFUN([AC_CHECK_LIBM],) +AC_SUBST(LIBTOOL) +]) + +sinclude(../gettext.m4) +ifelse(yes,no,[ +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. @@ -159,415 +193,6 @@ else fi AC_SUBST($1)]) - -# serial 40 AC_PROG_LIBTOOL -AC_DEFUN(AC_PROG_LIBTOOL, -[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl - -# Save cache, so that ltconfig can load it -AC_CACHE_SAVE - -# Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ -${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ -|| AC_MSG_ERROR([libtool configure failed]) - -# Reload cache, that may have been modified by ltconfig -AC_CACHE_LOAD - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -# Redirect the config.log output again, so that the ltconfig log is not -# clobbered by the next message. -exec 5>>./config.log -]) - -AC_DEFUN(AC_LIBTOOL_SETUP, -[AC_PREREQ(2.13)dnl -AC_REQUIRE([AC_ENABLE_SHARED])dnl -AC_REQUIRE([AC_ENABLE_STATIC])dnl -AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_REQUIRE([AC_PROG_RANLIB])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_LD])dnl -AC_REQUIRE([AC_PROG_NM])dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -dnl - -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac - -# Check for any special flags to pass to ltconfig. -libtool_flags="--cache-file=$cache_file" -test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" -test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" -test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" -test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" -test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" -ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], -[libtool_flags="$libtool_flags --enable-dlopen"]) -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[libtool_flags="$libtool_flags --enable-win32-dll"]) -AC_ARG_ENABLE(libtool-lock, - [ --disable-libtool-lock avoid locking (might break parallel builds)]) -test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" -test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case "$lt_target" in -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case "`/usr/bin/file conftest.o`" in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; - -ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], -[*-*-cygwin* | *-*-mingw*) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -]) -esac -]) - -# AC_LIBTOOL_DLOPEN - enable checks for dlopen support -AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) - -# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's -AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) - -# AC_ENABLE_SHARED - implement the --enable-shared flag -# Usage: AC_ENABLE_SHARED[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_SHARED, [dnl -define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(shared, -changequote(<<, >>)dnl -<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_shared=yes ;; -no) enable_shared=no ;; -*) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl -]) - -# AC_DISABLE_SHARED - set the default shared flag to --disable-shared -AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_SHARED(no)]) - -# AC_ENABLE_STATIC - implement the --enable-static flag -# Usage: AC_ENABLE_STATIC[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_STATIC, [dnl -define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(static, -changequote(<<, >>)dnl -<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_static=yes ;; -no) enable_static=no ;; -*) - enable_static=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_static=AC_ENABLE_STATIC_DEFAULT)dnl -]) - -# AC_DISABLE_STATIC - set the default static flag to --disable-static -AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_STATIC(no)]) - - -# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag -# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] -# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to -# `yes'. -AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl -define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl -AC_ARG_ENABLE(fast-install, -changequote(<<, >>)dnl -<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], -changequote([, ])dnl -[p=${PACKAGE-default} -case "$enableval" in -yes) enable_fast_install=yes ;; -no) enable_fast_install=no ;; -*) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," - for pkg in $enableval; do - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$ac_save_ifs" - ;; -esac], -enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl -]) - -# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install -AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl -AC_ENABLE_FAST_INSTALL(no)]) - -# AC_PROG_LD - find the path to the GNU or non-GNU linker -AC_DEFUN(AC_PROG_LD, -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$ac_cv_prog_gcc" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - ac_prog=`($CC -print-prog-name=ld) 2>&5` - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -]) - -AC_DEFUN(AC_PROG_LD_GNU, -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -]) - -# AC_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(AC_PROG_NM, -[AC_MSG_CHECKING([for BSD-compatible nm]) -AC_CACHE_VAL(ac_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - ac_cv_path_NM="$NM" -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" - break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" - break - else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm -fi]) -NM="$ac_cv_path_NM" -AC_MSG_RESULT([$NM]) -]) - -# AC_CHECK_LIBM - check for math library -AC_DEFUN(AC_CHECK_LIBM, -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case "$lt_target" in -*-*-beos* | *-*-cygwin*) - # These system don't have libm - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, main, LIBM="-lm") - ;; -esac -]) - -# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl convenience library, adds --enable-ltdl-convenience to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - case "$enable_ltdl_convenience" in - no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; - "") enable_ltdl_convenience=yes - ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; - esac - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) -]) - -# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for -# the libltdl installable library, and adds --enable-ltdl-install to -# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor -# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed -# to be `${top_builddir}/libltdl'. Make sure you start DIR with -# '${top_builddir}/' (note the single quotes!) if your package is not -# flat, and, if you're not using automake, define top_builddir as -# appropriate in the Makefiles. -# In the future, this macro may have to be called after AC_PROG_LIBTOOL. -AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl - AC_CHECK_LIB(ltdl, main, - [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], - [if test x"$enable_ltdl_install" = xno; then - AC_MSG_WARN([libltdl not installed, but installation disabled]) - else - enable_ltdl_install=yes - fi - ]) - if test x"$enable_ltdl_install" = x"yes"; then - ac_configure_args="$ac_configure_args --enable-ltdl-install" - LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la - INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl']) - else - ac_configure_args="$ac_configure_args --enable-ltdl-install=no" - LIBLTDL="-lltdl" - INCLTDL= - fi -]) - -dnl old names -AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl -AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl -AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl -AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl -AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl -AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl -AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl - -dnl This is just to silence aclocal about the macro not being used -ifelse([AC_DISABLE_FAST_INSTALL])dnl - # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, @@ -600,351 +225,6 @@ AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") AC_PROG_LEX AC_DECL_YYTEXT]) -# This file is derived from `gettext.m4'. The difference is that the -# included macros assume Cygnus-style source and build trees. - -# Macro to add for using GNU gettext. -# Ulrich Drepper , 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 3 - -AC_DEFUN(CY_WITH_NLS, - [AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) - - USE_INCLUDED_LIBINTL=no - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested]) - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH(included-gettext, - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If gettext or catgets are available (in this order) we - dnl use this. Else we have to fall back to GNU NLS library. - dnl catgets is only used if permitted by option --with-catgets. - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - AC_CHECK_HEADER(libintl.h, - [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc, - [AC_TRY_LINK([#include ], [return (int) gettext ("")], - gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)]) - - if test "$gt_cv_func_gettext_libc" != "yes"; then - AC_CHECK_LIB(intl, bindtextdomain, - [AC_CACHE_CHECK([for gettext in libintl], - gt_cv_func_gettext_libintl, - [AC_TRY_LINK([], [return (int) gettext ("")], - gt_cv_func_gettext_libintl=yes, - gt_cv_func_gettext_libintl=no)])]) - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT, 1, - [Define as 1 if you have gettext and don't want to use GNU gettext.]) - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl - if test "$MSGFMT" != "no"; then - AC_CHECK_FUNCS(dcgettext) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr], - [CATOBJEXT=.gmo - DATADIRNAME=share], - [CATOBJEXT=.mo - DATADIRNAME=lib]) - INSTOBJEXT=.mo - fi - fi - ]) - - dnl In the standard gettext, we would now check for catgets. - dnl However, we never want to use catgets for our releases. - - if test "$CATOBJEXT" = "NONE"; then - dnl Neither gettext nor catgets in included in the C library. - dnl Fall back on GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - INTLOBJS="\$(GETTOBJS)" - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) - AC_SUBST(MSGFMT) - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.gmo - INSTOBJEXT=.mo - DATADIRNAME=share - INTLDEPS='$(top_builddir)/../intl/libintl.a' - INTLLIBS=$INTLDEPS - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - dnl Test whether we really found GNU xgettext. - if test "$XGETTEXT" != ":"; then - dnl If it is no GNU xgettext we define it as : so that the - dnl Makefiles still can work. - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - AC_MSG_RESULT( - [found xgettext programs is not GNU xgettext; ignore it]) - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - else - DATADIRNAME=share - nls_cv_header_intl=libintl.h - nls_cv_header_libgt=libgettext.h - fi - - # If this is used in GNU gettext we have to set USE_NLS to `yes' - # because some of the sources are only built for this goal. - if test "$PACKAGE" = gettext; then - USE_NLS=yes - USE_INCLUDED_LIBINTL=yes - fi - - dnl These rules are solely for the distribution goal. While doing this - dnl we only have to keep exactly one list of the available catalogs - dnl in configure.in. - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - done - - dnl Make all variables we use known to autoconf. - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATALOGS) - AC_SUBST(CATOBJEXT) - AC_SUBST(DATADIRNAME) - AC_SUBST(GMOFILES) - AC_SUBST(INSTOBJEXT) - AC_SUBST(INTLDEPS) - AC_SUBST(INTLLIBS) - AC_SUBST(INTLOBJS) - AC_SUBST(POFILES) - AC_SUBST(POSUB) - ]) - -AC_DEFUN(CY_GNU_GETTEXT, - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([AC_ISC_POSIX])dnl - AC_REQUIRE([AC_HEADER_STDC])dnl - AC_REQUIRE([AC_C_CONST])dnl - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_OFF_T])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \ -unistd.h values.h sys/param.h]) - AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \ -__argz_count __argz_stringify __argz_next]) - - if test "${ac_cv_func_stpcpy+set}" != "set"; then - AC_CHECK_FUNCS(stpcpy) - fi - if test "${ac_cv_func_stpcpy}" = "yes"; then - AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function]) - fi - - AM_LC_MESSAGES - CY_WITH_NLS - - if test "x$CATOBJEXT" != "x"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - AC_MSG_CHECKING(for catalogs to be installed) - NEW_LINGUAS= - for lang in ${LINGUAS=$ALL_LINGUAS}; do - case "$ALL_LINGUAS" in - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac - done - LINGUAS=$NEW_LINGUAS - AC_MSG_RESULT($LINGUAS) - fi - - dnl Construct list of names of catalog files to be constructed. - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - dnl The reference to in the installed file - dnl must be resolved because we cannot expect the users of this - dnl to define HAVE_LOCALE_H. - if test $ac_cv_header_locale_h = yes; then - INCLUDE_LOCALE_H="#include " - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header . Take care yourself. */" - fi - AC_SUBST(INCLUDE_LOCALE_H) - - dnl Determine which catalog format we have (if any is needed) - dnl For now we know about two different formats: - dnl Linux libc-5 and the normal X/Open format - if test -f $srcdir/po2tbl.sed.in; then - if test "$CATOBJEXT" = ".cat"; then - AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen) - - dnl Transform the SED scripts while copying because some dumb SEDs - dnl cannot handle comments. - sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed - fi - dnl po2tbl.sed is always needed. - sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ - $srcdir/po2tbl.sed.in > po2tbl.sed - fi - - dnl In the intl/Makefile.in we have a special dependency which makes - dnl only sense for gettext. We comment this out for non-gettext - dnl packages. - if test "$PACKAGE" = "gettext"; then - GT_NO="#NO#" - GT_YES= - else - GT_NO= - GT_YES="#YES#" - fi - AC_SUBST(GT_NO) - AC_SUBST(GT_YES) - - MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" - AC_SUBST(MKINSTALLDIRS) - - dnl *** For now the libtool support in intl/Makefile is not for real. - l= - AC_SUBST(l) - - dnl Generate list of files to be processed by xgettext which will - dnl be included in po/Makefile. But only do this if the po directory - dnl exists in srcdir. - if test -d $srcdir/po; then - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - fi - ]) - -# Search path for a program which passes the given test. -# Ulrich Drepper , 1996. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN(AM_PATH_PROG_WITH_TEST, -[# Extract the first word of "$2", so it can be a program name with args. -set dummy $2; ac_word=[$]2 -AC_MSG_CHECKING([for $ac_word]) -AC_CACHE_VAL(ac_cv_path_$1, -[case "[$]$1" in - /*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in ifelse([$5], , $PATH, [$5]); do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test -n "[$]$1"; then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) - -# Check whether LC_MESSAGES is available in . -# Ulrich Drepper , 1995. -# -# This file file be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU Public License -# but which still want to provide support for the GNU gettext functionality. -# Please note that the actual code is *not* freely available. - -# serial 1 - -AC_DEFUN(AM_LC_MESSAGES, - [if test $ac_cv_header_locale_h = yes; then - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, - [AC_TRY_LINK([#include ], [return LC_MESSAGES], - am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) - if test $am_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES, 1, - [Define if your locale.h file contains LC_MESSAGES.]) - fi - fi]) - # Add --enable-maintainer-mode option to configure. # From Jim Meyering diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c index 2613e74..46273c2 100644 --- a/contrib/binutils/gas/app.c +++ b/contrib/binutils/gas/app.c @@ -48,7 +48,7 @@ static int scrub_m68k_mri; static const char mri_pseudo[] = ".mri 0"; #if defined TC_ARM && defined OBJ_ELF -/* The pseudo-op for which we need to special-case `@' characters. +/* The pseudo-op for which we need to special-case `@' characters. See the comment in do_scrub_chars. */ static const char symver_pseudo[] = ".symver"; static const char * symver_state; @@ -88,9 +88,9 @@ static int process_escape PARAMS ((int)); /* FIXME-soon: The entire lexer/parser thingy should be built statically at compile time rather than dynamically - each and every time the assembler is run. xoxorich. */ + each and every time the assembler is run. xoxorich. */ -void +void do_scrub_begin (m68k_mri) int m68k_mri ATTRIBUTE_UNUSED; { @@ -101,7 +101,6 @@ do_scrub_begin (m68k_mri) lex['\t'] = LEX_IS_WHITESPACE; lex['\r'] = LEX_IS_WHITESPACE; lex['\n'] = LEX_IS_NEWLINE; - lex[';'] = LEX_IS_LINE_SEPARATOR; lex[':'] = LEX_IS_COLON; #ifdef TC_M68K @@ -212,24 +211,23 @@ static char mri_last_ch; state at the time .include is interpreted is completely unrelated. That's why we have to save it all. */ -struct app_save - { - int state; - int old_state; - char * out_string; - char out_buf[sizeof (out_buf)]; - int add_newlines; - char * saved_input; - int saved_input_len; +struct app_save { + int state; + int old_state; + char * out_string; + char out_buf[sizeof (out_buf)]; + int add_newlines; + char * saved_input; + int saved_input_len; #ifdef TC_M68K - int scrub_m68k_mri; + int scrub_m68k_mri; #endif - const char * mri_state; - char mri_last_ch; + const char * mri_state; + char mri_last_ch; #if defined TC_ARM && defined OBJ_ELF - const char * symver_state; + const char * symver_state; #endif - }; +}; char * app_push () @@ -259,7 +257,7 @@ app_push () saved->symver_state = symver_state; #endif - /* do_scrub_begin() is not useful, just wastes time. */ + /* do_scrub_begin() is not useful, just wastes time. */ state = 0; saved_input = NULL; @@ -267,13 +265,13 @@ app_push () return (char *) saved; } -void +void app_pop (arg) char *arg; { register struct app_save *saved = (struct app_save *) arg; - /* There is no do_scrub_end (). */ + /* There is no do_scrub_end (). */ state = saved->state; old_state = saved->old_state; out_string = saved->out_string; @@ -303,7 +301,7 @@ app_pop (arg) /* @@ This assumes that \n &c are the same on host and target. This is not necessarily true. */ -static int +static int process_escape (ch) int ch; { @@ -780,19 +778,20 @@ do_scrub_chars (get, tostart, tolen) } #ifdef KEEP_WHITE_AROUND_COLON - if (lex[ch] == LEX_IS_COLON) - { - /* only keep this white if there's no white *after* the colon */ - ch2 = GET (); - UNGET (ch2); - if (!IS_WHITESPACE (ch2)) - { - state = 9; - UNGET (ch); - PUT (' '); - break; - } - } + if (lex[ch] == LEX_IS_COLON) + { + /* Only keep this white if there's no white *after* the + colon. */ + ch2 = GET (); + UNGET (ch2); + if (!IS_WHITESPACE (ch2)) + { + state = 9; + UNGET (ch); + PUT (' '); + break; + } + } #endif if (IS_COMMENT (ch) || ch == '/' @@ -913,6 +912,21 @@ do_scrub_chars (get, tostart, tolen) ch = ' '; goto recycle; } +#ifdef DOUBLESLASH_LINE_COMMENTS + else if (ch2 == '/') + { + do + { + ch = GET (); + } + while (ch != EOF && !IS_NEWLINE (ch)); + if (ch == EOF) + as_warn ("end of file in comment; newline inserted"); + state = 0; + PUT ('\n'); + break; + } +#endif else { if (ch2 != EOF) @@ -1000,7 +1014,7 @@ do_scrub_chars (get, tostart, tolen) case LEX_IS_COLON: #ifdef KEEP_WHITE_AROUND_COLON - state = 9; + state = 9; #else if (state == 9 || state == 10) state = 3; @@ -1017,7 +1031,7 @@ do_scrub_chars (get, tostart, tolen) --add_newlines; UNGET (ch); } - /* fall thru into... */ + /* Fall through. */ case LEX_IS_LINE_SEPARATOR: state = 0; @@ -1026,13 +1040,13 @@ do_scrub_chars (get, tostart, tolen) #ifdef TC_V850 case LEX_IS_DOUBLEDASH_1ST: - ch2 = GET(); + ch2 = GET (); if (ch2 != '-') { UNGET (ch2); goto de_fault; } - /* read and skip to end of line */ + /* Read and skip to end of line. */ do { ch = GET (); @@ -1045,10 +1059,10 @@ do_scrub_chars (get, tostart, tolen) state = 0; PUT ('\n'); break; -#endif +#endif #ifdef DOUBLEBAR_PARALLEL case LEX_IS_DOUBLEBAR_1ST: - ch2 = GET(); + ch2 = GET (); if (ch2 != '|') { UNGET (ch2); @@ -1060,7 +1074,7 @@ do_scrub_chars (get, tostart, tolen) PUT ('|'); PUT ('|'); break; -#endif +#endif case LEX_IS_LINE_COMMENT_START: /* FIXME-someday: The two character comment stuff was badly thought out. On i386, we want '/' as line comment start @@ -1109,7 +1123,7 @@ do_scrub_chars (get, tostart, tolen) PUT ('\n'); break; } - /* Loks like `# 123 "filename"' from cpp. */ + /* Looks like `# 123 "filename"' from cpp. */ UNGET (ch); old_state = 4; state = -1; @@ -1126,12 +1140,14 @@ do_scrub_chars (get, tostart, tolen) Trap is the only short insn that has a first operand that is neither register nor label. We must prevent exef0f ||trap #1 to degenerate to exef0f ||trap#1 . - We can't make '#' LEX_IS_SYMBOL_COMPONENT because it is already - LEX_IS_LINE_COMMENT_START. However, it is the only character in - line_comment_chars for d10v, hence we can recognize it as such. */ + We can't make '#' LEX_IS_SYMBOL_COMPONENT because it is + already LEX_IS_LINE_COMMENT_START. However, it is the + only character in line_comment_chars for d10v, hence we + can recognize it as such. */ /* An alternative approach would be to reset the state to 1 when we see '||', '<'- or '->', but that seems to be overkill. */ - if (state == 10) PUT (' '); + if (state == 10) + PUT (' '); #endif /* We have a line comment character which is not at the start of a line. If this is also a normal comment @@ -1151,12 +1167,16 @@ do_scrub_chars (get, tostart, tolen) #if defined TC_ARM && defined OBJ_ELF /* On the ARM, `@' is the comment character. Unfortunately this is also a special character in ELF .symver - directives (and .type, though we deal with those another way). So - we check if this line is such a directive, and treat the character - as default if so. This is a hack. */ + directives (and .type, though we deal with those another way). + So we check if this line is such a directive, and treat + the character as default if so. This is a hack. */ if ((symver_state != NULL) && (*symver_state == 0)) goto de_fault; #endif +#ifdef WARN_COMMENTS + if (!found_comment) + as_where (&found_comment_file, &found_comment); +#endif do { ch = GET (); @@ -1199,7 +1219,7 @@ do_scrub_chars (get, tostart, tolen) { int type; - ch2 = * (unsigned char *) s; + ch2 = *(unsigned char *) s; type = lex[ch2]; if (type != 0 && type != LEX_IS_SYMBOL_COMPONENT) @@ -1236,7 +1256,7 @@ do_scrub_chars (get, tostart, tolen) case 2: *to++ = *from++; case 1: *to++ = *from++; } - } + } ch = GET (); } } diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c index f02c42a..8c7493d 100644 --- a/contrib/binutils/gas/as.c +++ b/contrib/binutils/gas/as.c @@ -1,5 +1,5 @@ /* as.c - GAS main program. - Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,21 +17,18 @@ 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. */ + 02111-1307, USA. */ -/* - * Main program for AS; a 32-bit assembler of GNU. +/* Main program for AS; a 32-bit assembler of GNU. * Understands command arguments. * Has a few routines that don't fit in other modules because they * are shared. * - * * bugs * * : initialisers * Since no-one else says they will support them in future: I * don't support them now. - * */ #include "ansidecl.h" @@ -43,6 +40,7 @@ #include "output-file.h" #include "sb.h" #include "macro.h" +#include "dwarf2dbg.h" #ifdef HAVE_ITBL_CPU #include "itbl-ops.h" @@ -63,19 +61,21 @@ static void dump_statistics PARAMS ((void)); static void perform_an_assembly_pass PARAMS ((int argc, char **argv)); static int macro_expr PARAMS ((const char *, int, sb *, int *)); -int listing; /* true if a listing is wanted */ +/* True if a listing is wanted. */ +int listing; -static char *listing_filename = NULL; /* Name of listing file. */ +/* Name of listing file. */ +static char *listing_filename = NULL; /* Type of debugging to generate. */ -enum debug_info_type debug_type = DEBUG_NONE; +enum debug_info_type debug_type = DEBUG_UNSPECIFIED; /* Maximum level of macro nesting. */ - int max_macro_nest = 100; -char *myname; /* argv[0] */ +/* argv[0] */ +char *myname; #ifdef BFD_ASSEMBLER segT reg_section, expr_section; segT text_section, data_section, bss_section; @@ -92,8 +92,7 @@ int debug_memory = 0; /* We build a list of defsyms as we read the options, and then define them after we have initialized everything. */ -struct defsym_list -{ +struct defsym_list { struct defsym_list *next; char *name; valueT value; @@ -101,10 +100,9 @@ struct defsym_list static struct defsym_list *defsyms; -/* Keep a record of the itbl files we read in. */ +/* Keep a record of the itbl files we read in. */ -struct itbl_file_list -{ +struct itbl_file_list { struct itbl_file_list *next; char *name; }; @@ -117,6 +115,7 @@ static struct itbl_file_list *itbl_files; extern struct emulation mipsbelf, mipslelf, mipself; extern struct emulation mipsbecoff, mipslecoff, mipsecoff; extern struct emulation i386coff, i386elf, i386aout; +extern struct emulation crisaout, criself; static struct emulation *const emulations[] = { EMULATIONS }; static const int n_emulations = sizeof (emulations) / sizeof (emulations[0]); @@ -142,7 +141,7 @@ select_emulation_mode (argc, argv) if (p) p++; else - p = argv[i+1]; + p = argv[i + 1]; if (!p || !*p) as_fatal (_("missing emulation mode name")); @@ -246,12 +245,12 @@ Options:\n\ fprintf (stream, "\ --em=["); - for (i = 0; i < n_emulations-1; i++) + for (i = 0; i < n_emulations - 1; i++) fprintf (stream, "%s | ", emulations[i]->name); fprintf (stream, "%s]\n", emulations[i]->name); def_em = getenv (EMULATION_ENVIRON); - if (!def_em) + if (!def_em) def_em = DEFAULT_EMULATION; fprintf (stream, _("\ emulate output (default %s)\n"), def_em); @@ -266,6 +265,8 @@ Options:\n\ fprintf (stream, _("\ --help show this message and exit\n")); fprintf (stream, _("\ + --target-help show target specific options\n")); + fprintf (stream, _("\ -I DIR add DIR to search list for .include directives\n")); fprintf (stream, _("\ -J don't warn about signed overflow\n")); @@ -326,16 +327,14 @@ Options:\n\ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO); } -/* - * Since it is easy to do here we interpret the special arg "-" - * to mean "use stdin" and we set that argv[] pointing to "". - * After we have munged argv[], the only things left are source file - * name(s) and ""(s) denoting stdin. These file names are used - * (perhaps more than once) later. - * - * check for new machine-dep cmdline options in - * md_parse_option definitions in config/tc-*.c - */ +/* Since it is easy to do here we interpret the special arg "-" + to mean "use stdin" and we set that argv[] pointing to "". + After we have munged argv[], the only things left are source file + name(s) and ""(s) denoting stdin. These file names are used + (perhaps more than once) later. + + check for new machine-dep cmdline options in + md_parse_option definitions in config/tc-*.c. */ static void parse_args (pargc, pargv) @@ -352,24 +351,23 @@ parse_args (pargc, pargv) char *shortopts; extern CONST char *md_shortopts; - static const char std_shortopts[] = - { - '-', 'J', + static const char std_shortopts[] = { + '-', 'J', #ifndef WORKING_DOT_WORD - /* -K is not meaningful if .word is not being hacked. */ - 'K', + /* -K is not meaningful if .word is not being hacked. */ + 'K', #endif - 'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':', + 'L', 'M', 'R', 'W', 'Z', 'f', 'a', ':', ':', 'D', 'I', ':', 'o', ':', #ifndef VMS - /* -v takes an argument on VMS, so we don't make it a generic - option. */ - 'v', + /* -v takes an argument on VMS, so we don't make it a generic + option. */ + 'v', #endif - 'w', 'X', - /* New option for extending instruction set (see also --itbl below) */ - 't', ':', - '\0' - }; + 'w', 'X', + /* New option for extending instruction set (see also --itbl below) */ + 't', ':', + '\0' + }; struct option *longopts; extern struct option md_longopts[]; extern size_t md_longopts_size; @@ -421,17 +419,26 @@ parse_args (pargc, pargv) {"no-warn", no_argument, NULL, 'W'}, #define OPTION_WARN (OPTION_STD_BASE + 18) {"warn", no_argument, NULL, OPTION_WARN}, -#define OPTION_WARN_FATAL (OPTION_STD_BASE + 19) +#define OPTION_TARGET_HELP (OPTION_STD_BASE + 19) + {"target-help", no_argument, NULL, OPTION_TARGET_HELP}, +#define OPTION_WARN_FATAL (OPTION_STD_BASE + 20) {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL} + /* When you add options here, check that they do not collide with + OPTION_MD_BASE. See as.h. */ }; - /* Construct the option lists from the standard list and the - target dependent list. */ + /* Construct the option lists from the standard list and the target + dependent list. Include space for an extra NULL option and + always NULL terminate. */ shortopts = concat (std_shortopts, md_shortopts, (char *) NULL); - longopts = (struct option *) xmalloc (sizeof (std_longopts) + md_longopts_size); + longopts = (struct option *) xmalloc (sizeof (std_longopts) + + md_longopts_size + + sizeof (struct option)); memcpy (longopts, std_longopts, sizeof (std_longopts)); memcpy ((char *) longopts + sizeof (std_longopts), md_longopts, md_longopts_size); + memset ((char *) longopts + sizeof (std_longopts) + md_longopts_size, + 0, sizeof (struct option)); /* Make a local copy of the old argv. */ old_argc = *pargc; @@ -471,7 +478,7 @@ parse_args (pargc, pargv) VMS code in md_parse_option can return 0 in that case, but it has no way of pushing the filename argument back. */ if (optarg && *optarg) - new_argv[new_argc++] = optarg, new_argv[new_argc] = NULL; + new_argv[new_argc++] = optarg, new_argv[new_argc] = NULL; else #else case 'v': @@ -480,7 +487,7 @@ parse_args (pargc, pargv) print_version_id (); break; } - /*FALLTHRU*/ + /* Fall through. */ case '?': exit (EXIT_FAILURE); @@ -492,6 +499,10 @@ parse_args (pargc, pargv) new_argv[new_argc] = NULL; break; + case OPTION_TARGET_HELP: + md_show_usage (stdout); + exit (EXIT_SUCCESS); + case OPTION_HELP: show_usage (stdout); exit (EXIT_SUCCESS); @@ -514,7 +525,7 @@ parse_args (pargc, pargv) case OPTION_VERSION: /* This output is intended to follow the GNU standards document. */ printf (_("GNU assembler %s\n"), VERSION); - printf (_("Copyright 2000 Free Software Foundation, Inc.\n")); + printf (_("Copyright 2001 Free Software Foundation, Inc.\n")); printf (_("\ This program is free software; you may redistribute it under the terms of\n\ the GNU General Public License. This program has absolutely no warranty.\n")); @@ -546,7 +557,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); case OPTION_DEFSYM: { char *s; - long i; + valueT i; struct defsym_list *n; for (s = optarg; *s != '\0' && *s != '='; s++) @@ -554,7 +565,11 @@ the GNU General Public License. This program has absolutely no warranty.\n")); if (*s == '\0') as_fatal (_("bad defsym; format is --defsym name=value")); *s++ = '\0'; +#ifdef BFD_ASSEMBLER + i = bfd_scan_vma (s, (const char **) NULL, 0); +#else i = strtol (s, (char **) NULL, 0); +#endif n = (struct defsym_list *) xmalloc (sizeof *n); n->next = defsyms; n->name = optarg; @@ -566,29 +581,29 @@ the GNU General Public License. This program has absolutely no warranty.\n")); case OPTION_INSTTBL: case 't': { - /* optarg is the name of the file containing the instruction - formats, opcodes, register names, etc. */ + /* optarg is the name of the file containing the instruction + formats, opcodes, register names, etc. */ struct itbl_file_list *n; if (optarg == NULL) { - as_warn ( _("No file name following -t option\n") ); + as_warn (_("No file name following -t option\n")); break; } - + n = (struct itbl_file_list *) xmalloc (sizeof *n); n->next = itbl_files; n->name = optarg; itbl_files = n; /* Parse the file and add the new instructions to our internal - table. If multiple instruction tables are specified, the - information from this table gets appended onto the existing - internal table. */ + table. If multiple instruction tables are specified, the + information from this table gets appended onto the existing + internal table. */ itbl_files->name = xstrdup (optarg); if (itbl_parse (itbl_files->name) != 0) { - fprintf (stderr, _("Failed to read instruction table %s\n"), + fprintf (stderr, _("Failed to read instruction table %s\n"), itbl_files->name); exit (EXIT_SUCCESS); } @@ -602,7 +617,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); case OPTION_GSTABS: debug_type = DEBUG_STABS; break; - + case OPTION_GDWARF2: debug_type = DEBUG_DWARF2; break; @@ -622,22 +637,22 @@ the GNU General Public License. This program has absolutely no warranty.\n")); break; case OPTION_LISTING_LHS_WIDTH: - listing_lhs_width = atoi(optarg); + listing_lhs_width = atoi (optarg); if (listing_lhs_width_second < listing_lhs_width) listing_lhs_width_second = listing_lhs_width; break; case OPTION_LISTING_LHS_WIDTH2: { - int tmp = atoi(optarg); + int tmp = atoi (optarg); if (tmp > listing_lhs_width) listing_lhs_width_second = tmp; } break; case OPTION_LISTING_RHS_WIDTH: - listing_rhs_width = atoi(optarg); + listing_rhs_width = atoi (optarg); break; case OPTION_LISTING_CONT_LINES: - listing_lhs_cont_lines = atoi(optarg); + listing_lhs_cont_lines = atoi (optarg); break; case 'M': @@ -672,6 +687,9 @@ the GNU General Public License. This program has absolutely no warranty.\n")); case 'a': if (optarg) { + if (md_parse_option (optc, optarg) != 0) + break; + while (*optarg) { switch (*optarg) @@ -713,8 +731,8 @@ the GNU General Public License. This program has absolutely no warranty.\n")); break; case 'D': - /* DEBUG is implemented: it debugs different */ - /* things from other people's assemblers. */ + /* DEBUG is implemented: it debugs different + things from other people's assemblers. */ flag_debug = 1; break; @@ -723,7 +741,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); break; case 'I': - { /* Include file directory */ + { /* Include file directory. */ char *temp = xstrdup (optarg); add_include_dir (temp); break; @@ -737,7 +755,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); break; case 'X': - /* -X means treat warnings as errors */ + /* -X means treat warnings as errors. */ break; } } @@ -751,7 +769,7 @@ the GNU General Public License. This program has absolutely no warranty.\n")); static long start_time; -int +int main (argc, argv) int argc; char **argv; @@ -806,7 +824,7 @@ main (argc, argv) symbol_begin (); frag_init (); subsegs_begin (); - parse_args (&argc, &argv); + parse_args (&argc, &argv); read_begin (); input_scrub_begin (); expr_begin (); @@ -859,7 +877,8 @@ main (argc, argv) PROGRESS (1); - perform_an_assembly_pass (argc, argv); /* Assemble it. */ + /* Assemble it. */ + perform_an_assembly_pass (argc, argv); cond_finish_check (-1); @@ -867,6 +886,10 @@ main (argc, argv) md_end (); #endif + /* If we've been collecting dwarf2 .debug_line info, either for + assembly debugging or on behalf of the compiler, emit it now. */ + dwarf2_finish (); + if (seen_at_least_1_file () && (flag_always_generate_output || had_errors () == 0)) keep_it = 1; @@ -895,8 +918,8 @@ main (argc, argv) output_file_close (out_file_name); #endif - if (flag_fatal_warnings && had_warnings() > 0 && had_errors () == 0) - as_bad (_("%d warnings, treating warnings as errors"), had_warnings()); + if (flag_fatal_warnings && had_warnings () > 0 && had_errors () == 0) + as_bad (_("%d warnings, treating warnings as errors"), had_warnings ()); if (had_errors () > 0 && ! flag_always_generate_output) keep_it = 0; @@ -947,19 +970,16 @@ dump_statistics () #endif } +/* Here to attempt 1 pass over each input file. + We scan argv[*] looking for filenames or exactly "" which is + shorthand for stdin. Any argv that is NULL is not a file-name. + We set need_pass_2 TRUE if, after this, we still have unresolved + expressions of the form (unknown value)+-(unknown value). -/* perform_an_assembly_pass() - * - * Here to attempt 1 pass over each input file. - * We scan argv[*] looking for filenames or exactly "" which is - * shorthand for stdin. Any argv that is NULL is not a file-name. - * We set need_pass_2 TRUE if, after this, we still have unresolved - * expressions of the form (unknown value)+-(unknown value). - * - * Note the un*x semantics: there is only 1 logical input file, but it - * may be a catenation of many 'physical' input files. - */ -static void + Note the un*x semantics: there is only 1 logical input file, but it + may be a catenation of many 'physical' input files. */ + +static void perform_an_assembly_pass (argc, argv) int argc; char **argv; @@ -978,7 +998,7 @@ perform_an_assembly_pass (argc, argv) for (i = SEG_E0; i < SEG_UNKNOWN; i++) segment_info[i].fix_root = 0; } - /* Create the three fixed ones */ + /* Create the three fixed ones. */ { segT seg; @@ -1009,7 +1029,7 @@ perform_an_assembly_pass (argc, argv) data_section = subseg_new (DATA_SECTION_NAME, 0); bss_section = subseg_new (BSS_SECTION_NAME, 0); /* @@ FIXME -- we're setting the RELOC flag so that sections are assumed - to have relocs, otherwise we don't find out in time. */ + to have relocs, otherwise we don't find out in time. */ applicable = bfd_applicable_section_flags (stdoutput); bfd_set_section_flags (stdoutput, text_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC @@ -1036,22 +1056,24 @@ perform_an_assembly_pass (argc, argv) obj_begin (); #endif - argv++; /* skip argv[0] */ - argc--; /* skip argv[0] */ + /* Skip argv[0]. */ + argv++; + argc--; + while (argc--) { if (*argv) - { /* Is it a file-name argument? */ + { /* Is it a file-name argument? */ PROGRESS (1); saw_a_file++; - /* argv->"" if stdin desired, else->filename */ + /* argv->"" if stdin desired, else->filename */ read_a_source_file (*argv); } - argv++; /* completed that argv */ + argv++; /* completed that argv */ } if (!saw_a_file) read_a_source_file (""); -} /* perform_an_assembly_pass() */ +} /* The interface between the macro code and gas expression handling. */ @@ -1080,5 +1102,3 @@ macro_expr (emsg, idx, in, val) return idx; } - -/* end of as.c */ diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h index e56d6cd..a98acfe 100644 --- a/contrib/binutils/gas/as.h +++ b/contrib/binutils/gas/as.h @@ -21,8 +21,7 @@ #ifndef GAS #define GAS 1 -/* - * I think this stuff is largely out of date. xoxorich. +/* I think this stuff is largely out of date. xoxorich. * * CAPITALISED names are #defined. * "lowercaseH" is #defined if "lowercase.h" has been #include-d. @@ -80,7 +79,7 @@ extern void *alloca (); /* Now, tend to the rest of the configuration. */ -/* System include files first... */ +/* System include files first... */ #include #include #ifdef HAVE_STRING_H @@ -106,8 +105,8 @@ extern void *alloca (); 150 isn't special; it's just an arbitrary non-ASCII char value. */ #define OPTION_STD_BASE 150 /* The first getopt value for machine-dependent long options. - 170 gives the standard options room to grow. */ -#define OPTION_MD_BASE 170 + 190 gives the standard options room to grow. */ +#define OPTION_MD_BASE 190 #ifdef DEBUG #undef NDEBUG @@ -136,8 +135,7 @@ extern void *alloca (); #endif - -/* Now GNU header files... */ +/* Now GNU header files... */ #include "ansidecl.h" #ifdef BFD_ASSEMBLER #include "bfd.h" @@ -185,9 +183,9 @@ extern char **environ; /* Make Saber happier on obstack.h. */ #ifdef SABER #undef __PTR_TO_INT -#define __PTR_TO_INT(P) ((int)(P)) +#define __PTR_TO_INT(P) ((int) (P)) #undef __INT_TO_PTR -#define __INT_TO_PTR(P) ((char *)(P)) +#define __INT_TO_PTR(P) ((char *) (P)) #endif #ifndef __LINE__ @@ -222,11 +220,11 @@ extern char **environ; #include "asintl.h" -#define BAD_CASE(val) \ -{ \ - as_fatal(_("Case value %ld unexpected at line %d of file \"%s\"\n"), \ - (long) val, __LINE__, __FILE__); \ - } +#define BAD_CASE(val) \ + { \ + as_fatal (_("Case value %ld unexpected at line %d of file \"%s\"\n"), \ + (long) val, __LINE__, __FILE__); \ + } #include "flonum.h" @@ -246,7 +244,7 @@ typedef addressT valueT; #ifndef COMMON #ifdef TEST -#define COMMON /* declare our COMMONs storage here. */ +#define COMMON /* declare our COMMONs storage here. */ #else #define COMMON extern /* our commons live elswhere */ #endif @@ -263,12 +261,9 @@ typedef addressT valueT; /* input_scrub.c */ -/* - * Supplies sanitised buffers to read.c. - * Also understands printing line-number part of error messages. - */ +/* Supplies sanitised buffers to read.c. + Also understands printing line-number part of error messages. */ - /* subsegs.c Sub-segments. Also, segment(=expression type)s.*/ #ifndef BFD_ASSEMBLER @@ -291,20 +286,19 @@ typedef addressT valueT; #define SEG_LIST SEG_TEXT,SEG_DATA,SEG_BSS #endif -typedef enum _segT - { - SEG_ABSOLUTE = 0, - SEG_LIST, - SEG_UNKNOWN, - SEG_GOOF, /* Only happens if AS has a logic error. */ - /* Invented so we don't crash printing */ - /* error message involving weird segment. */ - SEG_EXPR, /* Intermediate expression values. */ - SEG_DEBUG, /* Debug segment */ - SEG_NTV, /* Transfert vector preload segment */ - SEG_PTV, /* Transfert vector postload segment */ - SEG_REGISTER /* Mythical: a register-valued expression */ - } segT; +typedef enum _segT { + SEG_ABSOLUTE = 0, + SEG_LIST, + SEG_UNKNOWN, + SEG_GOOF, /* Only happens if AS has a logic error. */ + /* Invented so we don't crash printing */ + /* error message involving weird segment. */ + SEG_EXPR, /* Intermediate expression values. */ + SEG_DEBUG, /* Debug segment */ + SEG_NTV, /* Transfert vector preload segment */ + SEG_PTV, /* Transfert vector postload segment */ + SEG_REGISTER /* Mythical: a register-valued expression */ +} segT; #define SEG_MAXIMUM_ORDINAL (SEG_REGISTER) #else @@ -319,7 +313,7 @@ typedef int subsegT; /* What subseg we are accreting now? */ COMMON subsegT now_subseg; -/* Segment our instructions emit to. */ +/* Segment our instructions emit to. */ COMMON segT now_seg; #ifdef BFD_ASSEMBLER @@ -351,51 +345,57 @@ extern segT text_section, data_section, bss_section; /* relax() */ -enum _relax_state - { - /* Variable chars to be repeated fr_offset times. - Fr_symbol unused. Used with fr_offset == 0 for a - constant length frag. */ - rs_fill = 1, - - /* Align. The fr_offset field holds the power of 2 to which to - align. The fr_var field holds the number of characters in the - fill pattern. The fr_subtype field holds the maximum number of - bytes to skip when aligning, or 0 if there is no maximum. */ - rs_align, - - /* Align code. The fr_offset field holds the power of 2 to which - to align. This type is only generated by machine specific - code, which is normally responsible for handling the fill - pattern. The fr_subtype field holds the maximum number of - bytes to skip when aligning, or 0 if there is no maximum. */ - rs_align_code, - - /* Org: Fr_offset, fr_symbol: address. 1 variable char: fill - character. */ - rs_org, +enum _relax_state { + /* Variable chars to be repeated fr_offset times. + Fr_symbol unused. Used with fr_offset == 0 for a + constant length frag. */ + rs_fill = 1, + + /* Align. The fr_offset field holds the power of 2 to which to + align. The fr_var field holds the number of characters in the + fill pattern. The fr_subtype field holds the maximum number of + bytes to skip when aligning, or 0 if there is no maximum. */ + rs_align, + + /* Align code. The fr_offset field holds the power of 2 to which + to align. This type is only generated by machine specific + code, which is normally responsible for handling the fill + pattern. The fr_subtype field holds the maximum number of + bytes to skip when aligning, or 0 if there is no maximum. */ + rs_align_code, + + /* Test for alignment. Like rs_align, but used by several targets + to warn if data is not properly aligned. */ + rs_align_test, + + /* Org: Fr_offset, fr_symbol: address. 1 variable char: fill + character. */ + rs_org, #ifndef WORKING_DOT_WORD - /* JF: gunpoint */ - rs_broken_word, + /* JF: gunpoint */ + rs_broken_word, #endif - /* machine-specific relaxable (or similarly alterable) instruction */ - rs_machine_dependent, + /* machine-specific relaxable (or similarly alterable) instruction */ + rs_machine_dependent, - /* .space directive with expression operand that needs to be computed - later. Similar to rs_org, but different. - fr_symbol: operand - 1 variable char: fill character */ - rs_space, + /* .space directive with expression operand that needs to be computed + later. Similar to rs_org, but different. + fr_symbol: operand + 1 variable char: fill character */ + rs_space, - /* A DWARF leb128 value; only ELF uses this. The subtype is 0 for - unsigned, 1 for signed. */ - rs_leb128, + /* A DWARF leb128 value; only ELF uses this. The subtype is 0 for + unsigned, 1 for signed. */ + rs_leb128, - /* Exception frame information which we may be able to optimize. */ - rs_cfa - }; + /* Exception frame information which we may be able to optimize. */ + rs_cfa, + + /* Cross-fragment dwarf2 line number optimization. */ + rs_dwarf2dbg +}; typedef enum _relax_state relax_stateT; @@ -436,7 +436,7 @@ COMMON int flag_fatal_warnings; /* --fatal-warnings */ are detected. */ COMMON unsigned char flag_always_generate_output; /* -Z */ -/* This is true if the assembler should output time and space usage. */ +/* This is true if the assembler should output time and space usage. */ COMMON unsigned char flag_print_statistics; /* True if local absolute symbols are to be stripped. */ @@ -451,7 +451,7 @@ COMMON char *out_file_name; /* name of file defining extensions to the basic instruction set */ COMMON char *insttbl_file_name; -/* TRUE if we need a second pass. */ +/* TRUE if we need a second pass. */ COMMON int need_pass_2; /* TRUE if we should do no relaxing, and @@ -461,18 +461,22 @@ COMMON int linkrelax; /* TRUE if we should produce a listing. */ extern int listing; -/* Type of debugging information we should generate. We currently - support stabs, ECOFF, and DWARF2. */ +/* Type of debugging information we should generate. We currently support + stabs, ECOFF, and DWARF2. + + NOTE! This means debug information about the assembly source code itself + and _not_ about possible debug information from a high-level language. + This is especially relevant to DWARF2, since the compiler may emit line + number directives that the assembler resolves. */ -enum debug_info_type - { - DEBUG_UNSPECIFIED, - DEBUG_NONE, - DEBUG_STABS, - DEBUG_ECOFF, - DEBUG_DWARF, - DEBUG_DWARF2 - }; +enum debug_info_type { + DEBUG_UNSPECIFIED, + DEBUG_NONE, + DEBUG_STABS, + DEBUG_ECOFF, + DEBUG_DWARF, + DEBUG_DWARF2 +}; extern enum debug_info_type debug_type; @@ -483,15 +487,14 @@ extern int max_macro_nest; increase malloc calls for monitoring memory allocation. */ extern int chunksize; -struct _pseudo_type - { - /* assembler mnemonic, lower case, no '.' */ - const char *poc_name; - /* Do the work */ - void (*poc_handler) PARAMS ((int)); - /* Value to pass to handler */ - int poc_val; - }; +struct _pseudo_type { + /* assembler mnemonic, lower case, no '.' */ + const char *poc_name; + /* Do the work */ + void (*poc_handler) PARAMS ((int)); + /* Value to pass to handler */ + int poc_val; +}; typedef struct _pseudo_type pseudo_typeS; @@ -619,6 +622,10 @@ void eh_frame_convert_frag PARAMS ((fragS *)); /* this one starts the chain of target dependant headers */ #include "targ-env.h" +#ifdef TC_ARC +#include "struc-symbol.h" +#endif + #include "write.h" #include "frags.h" #include "hash.h" @@ -640,6 +647,12 @@ COMMON int flag_m68k_mri; #define flag_m68k_mri 0 #endif +#ifdef WARN_COMMENTS +COMMON int warn_comment; +COMMON unsigned int found_comment; +COMMON char *found_comment_file; +#endif + #ifndef NUMBERS_WITH_SUFFIX #define NUMBERS_WITH_SUFFIX 0 #endif @@ -677,5 +690,3 @@ COMMON int flag_m68k_mri; #endif #endif /* GAS */ - -/* end of as.h */ diff --git a/contrib/binutils/gas/asintl.h b/contrib/binutils/gas/asintl.h index b733c85..5b6369f 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 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Written by Tom Tromey @@ -18,7 +18,7 @@ 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. */ + 02111-1307, USA. */ #ifdef HAVE_LOCALE_H # include @@ -33,12 +33,11 @@ # define N_(String) (String) # endif #else -/* Stubs that do something close enough. */ -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) +# define gettext(Msgid) (Msgid) +# define dgettext(Domainname, Msgid) (Msgid) +# define dcgettext(Domainname, Msgid, Category) (Msgid) +# define textdomain(Domainname) while (0) /* nothing */ +# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */ # define _(String) (String) # define N_(String) (String) #endif diff --git a/contrib/binutils/gas/atof-generic.c b/contrib/binutils/gas/atof-generic.c index de29f21..93eadc1 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, 1998 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,8 +15,9 @@ 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. */ + 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. */ #include #include @@ -78,14 +79,14 @@ atof_generic (address_of_string_pointer, string_of_decimal_marks, string_of_decimal_exponent_marks, address_of_generic_floating_point_number) - /* return pointer to just AFTER number we read. */ + /* return pointer to just AFTER number we read. */ char **address_of_string_pointer; - /* At most one per number. */ + /* At most one per number. */ const char *string_of_decimal_marks; const char *string_of_decimal_exponent_marks; FLONUM_TYPE *address_of_generic_floating_point_number; { - int return_value; /* 0 means OK. */ + int return_value; /* 0 means OK. */ char *first_digit; unsigned int number_of_digits_before_decimal; unsigned int number_of_digits_after_decimal; @@ -184,9 +185,9 @@ atof_generic (address_of_string_pointer, } else { - break; /* p -> char after pre-decimal digits. */ + break; /* p -> char after pre-decimal digits. */ } - } /* For each digit before decimal mark. */ + } /* For each digit before decimal mark. */ #ifndef OLD_FLOAT_READS /* Ignore trailing 0's after the decimal point. The original code here @@ -222,7 +223,7 @@ atof_generic (address_of_string_pointer, { if (isdigit ((unsigned char) c)) { - /* This may be retracted below. */ + /* This may be retracted below. */ number_of_digits_after_decimal++; if ( /* seen_significant_digit || */ c > '0') @@ -238,7 +239,7 @@ atof_generic (address_of_string_pointer, } break; } - } /* For each digit after decimal mark. */ + } /* For each digit after decimal mark. */ } while (number_of_digits_after_decimal @@ -295,8 +296,6 @@ atof_generic (address_of_string_pointer, *address_of_string_pointer = p; - - number_of_digits_available = number_of_digits_before_decimal + number_of_digits_after_decimal; return_value = 0; @@ -311,7 +310,7 @@ atof_generic (address_of_string_pointer, } else { - int count; /* Number of useful digits left to scan. */ + int count; /* Number of useful digits left to scan. */ LITTLENUM_TYPE *digits_binary_low; unsigned int precision; @@ -326,7 +325,7 @@ atof_generic (address_of_string_pointer, precision = (address_of_generic_floating_point_number->high - address_of_generic_floating_point_number->low - + 1); /* Number of destination littlenums. */ + + 1); /* Number of destination littlenums. */ /* Includes guard bits (two littlenums worth) */ #if 0 /* The integer version below is very close, and it doesn't @@ -335,12 +334,12 @@ atof_generic (address_of_string_pointer, maximum_useful_digits = (((double) (precision - 2)) * ((double) (LITTLENUM_NUMBER_OF_BITS)) / (LOG_TO_BASE_2_OF_10)) - + 2; /* 2 :: guard digits. */ + + 2; /* 2 :: guard digits. */ #else maximum_useful_digits = (((precision - 2)) * ( (LITTLENUM_NUMBER_OF_BITS)) * 1000000 / 3321928) - + 2; /* 2 :: guard digits. */ + + 2; /* 2 :: guard digits. */ #endif if (number_of_digits_available > maximum_useful_digits) @@ -388,7 +387,7 @@ atof_generic (address_of_string_pointer, memset ((char *) digits_binary_low, '\0', size_of_digits_in_chars); - /* Digits_binary_low[] is allocated and zeroed. */ + /* Digits_binary_low[] is allocated and zeroed. */ /* * Parse the decimal digits as if * digits_low was in the units position. @@ -440,11 +439,10 @@ atof_generic (address_of_string_pointer, } else { - ++count; /* '.' doesn't alter digits used count. */ + ++count; /* '.' doesn't alter digits used count. */ } } - /* * Digits_binary_low[] properly encodes the value of the digits. * Forget about any high-order littlenums that are 0. @@ -480,7 +478,7 @@ atof_generic (address_of_string_pointer, LITTLENUM_TYPE *power_binary_low; int decimal_exponent_is_negative; - /* This refers to the "-56" in "12.34E-56". */ + /* This refers to the "-56" in "12.34E-56". */ /* FALSE: decimal_exponent is positive (or 0) */ /* TRUE: decimal_exponent is negative */ FLONUM_TYPE temporary_flonum; @@ -489,7 +487,7 @@ atof_generic (address_of_string_pointer, unsigned int size_of_power_in_chars; size_of_power_in_littlenums = precision; - /* Precision has a built-in fudge factor so we get a few guard bits. */ + /* Precision has a built-in fudge factor so we get a few guard bits. */ decimal_exponent_is_negative = decimal_exponent < 0; if (decimal_exponent_is_negative) @@ -497,7 +495,7 @@ atof_generic (address_of_string_pointer, decimal_exponent = -decimal_exponent; } - /* From now on: the decimal exponent is > 0. Its sign is separate. */ + /* From now on: the decimal exponent is > 0. Its sign is separate. */ size_of_power_in_chars = size_of_power_in_littlenums * sizeof (LITTLENUM_TYPE) + 2; @@ -530,7 +528,7 @@ atof_generic (address_of_string_pointer, int place_number_limit; /* Any 10^(2^n) whose "n" exceeds this */ /* value will fall off the end of */ - /* flonum_XXXX_powers_of_ten[]. */ + /* flonum_XXXX_powers_of_ten[]. */ int place_number; const FLONUM_TYPE *multiplicand; /* -> 10^(2^n) */ @@ -540,8 +538,8 @@ atof_generic (address_of_string_pointer, ? flonum_negative_powers_of_ten : flonum_positive_powers_of_ten); - for (place_number = 1;/* Place value of this bit of exponent. */ - decimal_exponent;/* Quit when no more 1 bits in exponent. */ + for (place_number = 1;/* Place value of this bit of exponent. */ + decimal_exponent;/* Quit when no more 1 bits in exponent. */ decimal_exponent >>= 1, place_number++) { if (decimal_exponent & 1) @@ -586,7 +584,7 @@ atof_generic (address_of_string_pointer, (void) putchar ('\n'); #endif } /* If this bit of decimal_exponent was computable.*/ - } /* If this bit of decimal_exponent was set. */ + } /* If this bit of decimal_exponent was set. */ } /* For each bit of binary representation of exponent */ #ifdef TRACE printf ("after computing power_of_10_flonum:\n"); @@ -605,7 +603,7 @@ atof_generic (address_of_string_pointer, */ flonum_multip (&power_of_10_flonum, &digits_flonum, address_of_generic_floating_point_number); - /* Assert sign of the number we made is '+'. */ + /* Assert sign of the number we made is '+'. */ address_of_generic_floating_point_number->sign = digits_sign_char; } diff --git a/contrib/binutils/gas/bignum-copy.c b/contrib/binutils/gas/bignum-copy.c index 2bffcbf..8384ff1 100644 --- a/contrib/binutils/gas/bignum-copy.c +++ b/contrib/binutils/gas/bignum-copy.c @@ -1,5 +1,6 @@ /* bignum_copy.c - copy a bignum - Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1990, 1991, 1992, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,7 +16,7 @@ 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. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "as.h" @@ -43,7 +44,7 @@ bignum_copy (in, in_length, out, out_length) if (out_length < in_length) { LITTLENUM_TYPE *p; /* -> most significant (non-zero) input - littlenum. */ + littlenum. */ memcpy ((void *) out, (void *) in, (unsigned int) out_length << LITTLENUM_SHIFT); diff --git a/contrib/binutils/gas/bit_fix.h b/contrib/binutils/gas/bit_fix.h index 6a729a7..b9768fd 100644 --- a/contrib/binutils/gas/bit_fix.h +++ b/contrib/binutils/gas/bit_fix.h @@ -1,6 +1,5 @@ -/* write.h - - Copyright (C) 1987, 1992 Free Software Foundation, Inc. +/* bit_fix.h + Copyright (C) 1987, 1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,8 +14,9 @@ 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. */ + 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. */ /* The bit_fix was implemented to support machines that need variables to be inserted in bitfields other than 1, 2 and 4 bytes. @@ -33,19 +33,16 @@ #ifndef __bit_fix_h__ #define __bit_fix_h__ -struct bit_fix - { - int fx_bit_size; /* Length of bitfield */ - int fx_bit_offset; /* Bit offset to bitfield */ - long fx_bit_base; /* Where do we apply the bitfix. - If this is zero, default is assumed. */ - long fx_bit_base_adj; /* Adjustment of base */ - long fx_bit_max; /* Signextended max for bitfield */ - long fx_bit_min; /* Signextended min for bitfield */ - long fx_bit_add; /* Or mask, used for huffman prefix */ - }; +struct bit_fix { + int fx_bit_size; /* Length of bitfield */ + int fx_bit_offset; /* Bit offset to bitfield */ + long fx_bit_base; /* Where do we apply the bitfix. + If this is zero, default is assumed. */ + long fx_bit_base_adj; /* Adjustment of base */ + long fx_bit_max; /* Signextended max for bitfield */ + long fx_bit_min; /* Signextended min for bitfield */ + long fx_bit_add; /* Or mask, used for huffman prefix */ +}; typedef struct bit_fix bit_fixS; #endif /* __bit_fix_h__ */ - -/* end of bit_fix.h */ diff --git a/contrib/binutils/gas/cond.c b/contrib/binutils/gas/cond.c index 025ca51..6c6e8ad 100644 --- a/contrib/binutils/gas/cond.c +++ b/contrib/binutils/gas/cond.c @@ -1,5 +1,5 @@ /* cond.c - conditional assembly pseudo-ops, and .include - Copyright (C) 1990, 91, 92, 93, 95, 96, 97, 98, 99, 2000 + Copyright 1990, 1991, 1992, 1993, 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -24,11 +24,11 @@ #include "obstack.h" -/* This is allocated to grow and shrink as .ifdef/.endif pairs are scanned. */ +/* This is allocated to grow and shrink as .ifdef/.endif pairs are + scanned. */ struct obstack cond_obstack; -struct file_line -{ +struct file_line { char *file; unsigned int line; }; @@ -36,8 +36,7 @@ struct file_line /* We push one of these structures for each .if, and pop it at the .endif. */ -struct conditional_frame -{ +struct conditional_frame { /* The source file & line number of the "if". */ struct file_line if_file_line; /* The source file & line of the "else". */ @@ -48,7 +47,9 @@ struct conditional_frame int else_seen; /* Whether we are currently ignoring input. */ int ignoring; - /* Whether a conditional at a higher level is ignoring input. */ + /* Whether a conditional at a higher level is ignoring input. + Set also when a branch of an "if .. elseif .." tree has matched + to prevent further matches. */ int dead_tree; /* Macro nesting level at which this conditional was created. */ int macro_nest; @@ -59,15 +60,18 @@ static char *get_mri_string PARAMS ((int, int *)); static struct conditional_frame *current_cframe = NULL; -void +void s_ifdef (arg) int arg; { - register char *name; /* points to name of symbol */ - register symbolS *symbolP; /* Points to symbol */ + /* Points to name of symbol. */ + register char *name; + /* Points to symbol. */ + register symbolS *symbolP; struct conditional_frame cframe; - SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */ + /* Leading whitespace is part of operand. */ + SKIP_WHITESPACE (); name = input_line_pointer; if (!is_name_beginner (*name)) @@ -98,9 +102,9 @@ s_ifdef (arg) demand_empty_rest_of_line (); } /* if a valid identifyer name */ -} /* s_ifdef() */ +} -void +void s_if (arg) int arg; { @@ -113,7 +117,8 @@ s_if (arg) if (flag_mri) stop = mri_comment_field (&stopc); - SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */ + /* Leading whitespace is part of operand. */ + SKIP_WHITESPACE (); if (current_cframe != NULL && current_cframe->ignoring) { @@ -158,7 +163,7 @@ s_if (arg) mri_comment_end (stop, stopc); demand_empty_rest_of_line (); -} /* s_if() */ +} /* Get a string for the MRI IFC or IFNC pseudo-ops. */ @@ -246,17 +251,13 @@ s_ifc (arg) demand_empty_rest_of_line (); } -void +void s_elseif (arg) int arg; { - expressionS operand; - int t; - if (current_cframe == NULL) { as_bad (_("\".elseif\" without matching \".if\" - ignored")); - } else if (current_cframe->else_seen) { @@ -273,60 +274,60 @@ s_elseif (arg) as_where (¤t_cframe->else_file_line.file, ¤t_cframe->else_file_line.line); - if (!current_cframe->dead_tree) - { - current_cframe->ignoring = !current_cframe->ignoring; - if (LISTING_SKIP_COND ()) - { - if (! current_cframe->ignoring) - listing_list (1); - else - listing_list (2); - } - } /* if not a dead tree */ - } /* if error else do it */ - - - SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */ + current_cframe->dead_tree |= !current_cframe->ignoring; + current_cframe->ignoring = current_cframe->dead_tree; + } - if (current_cframe != NULL && current_cframe->ignoring) + if (current_cframe == NULL || current_cframe->ignoring) { - operand.X_add_number = 0; while (! is_end_of_line[(unsigned char) *input_line_pointer]) ++input_line_pointer; + + if (current_cframe == NULL) + return; } else { + expressionS operand; + int t; + + /* Leading whitespace is part of operand. */ + SKIP_WHITESPACE (); + expression (&operand); if (operand.X_op != O_constant) as_bad (_("non-constant expression in \".elseif\" statement")); - } - - switch ((operatorT) arg) - { - case O_eq: t = operand.X_add_number == 0; break; - case O_ne: t = operand.X_add_number != 0; break; - case O_lt: t = operand.X_add_number < 0; break; - case O_le: t = operand.X_add_number <= 0; break; - case O_ge: t = operand.X_add_number >= 0; break; - case O_gt: t = operand.X_add_number > 0; break; - default: - abort (); - return; - } - current_cframe->ignoring = current_cframe->dead_tree || ! t; + switch ((operatorT) arg) + { + case O_eq: t = operand.X_add_number == 0; break; + case O_ne: t = operand.X_add_number != 0; break; + case O_lt: t = operand.X_add_number < 0; break; + case O_le: t = operand.X_add_number <= 0; break; + case O_ge: t = operand.X_add_number >= 0; break; + case O_gt: t = operand.X_add_number > 0; break; + default: + abort (); + return; + } + + current_cframe->ignoring = current_cframe->dead_tree || ! t; + } if (LISTING_SKIP_COND () - && current_cframe->ignoring && (current_cframe->previous_cframe == NULL || ! current_cframe->previous_cframe->ignoring)) - listing_list (2); + { + if (! current_cframe->ignoring) + listing_list (1); + else + listing_list (2); + } demand_empty_rest_of_line (); } -void +void s_endif (arg) int arg ATTRIBUTE_UNUSED; { @@ -356,16 +357,15 @@ s_endif (arg) } demand_empty_rest_of_line (); -} /* s_endif() */ +} -void +void s_else (arg) int arg ATTRIBUTE_UNUSED; { if (current_cframe == NULL) { as_bad (_(".else without matching .if - ignored")); - } else if (current_cframe->else_seen) { @@ -382,20 +382,21 @@ s_else (arg) as_where (¤t_cframe->else_file_line.file, ¤t_cframe->else_file_line.line); - if (!current_cframe->dead_tree) + current_cframe->ignoring = + current_cframe->dead_tree | !current_cframe->ignoring; + + if (LISTING_SKIP_COND () + && (current_cframe->previous_cframe == NULL + || ! current_cframe->previous_cframe->ignoring)) { - current_cframe->ignoring = !current_cframe->ignoring; - if (LISTING_SKIP_COND ()) - { - if (! current_cframe->ignoring) - listing_list (1); - else - listing_list (2); - } - } /* if not a dead tree */ + if (! current_cframe->ignoring) + listing_list (1); + else + listing_list (2); + } current_cframe->else_seen = 1; - } /* if error else do it */ + } if (flag_mri) { @@ -404,9 +405,9 @@ s_else (arg) } demand_empty_rest_of_line (); -} /* s_else() */ +} -void +void s_ifeqs (arg) int arg; { @@ -443,9 +444,9 @@ s_ifeqs (arg) listing_list (2); demand_empty_rest_of_line (); -} /* s_ifeqs() */ +} -int +int ignore_input () { char *s; @@ -477,9 +478,9 @@ ignore_input () return 0; return (current_cframe != NULL) && (current_cframe->ignoring); -} /* ignore_input() */ +} -static void +static void initialize_cframe (cframe) struct conditional_frame *cframe; { @@ -533,5 +534,3 @@ cond_exit_macro (nest) obstack_free (&cond_obstack, hold); } } - -/* end of cond.c */ diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in index 81f2ada..fc7ef2b 100644 --- a/contrib/binutils/gas/config.in +++ b/contrib/binutils/gas/config.in @@ -25,9 +25,6 @@ /* 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 @@ -151,6 +148,9 @@ /* Define if defaulting to ELF on SCO 5. */ #undef SCO_ELF +/* Using strict COFF? */ +#undef STRICTCOFF + /* Use ELF stabs for MIPS, not ECOFF stabs */ #undef MIPS_STABS_ELF diff --git a/contrib/binutils/gas/config/aout_gnu.h b/contrib/binutils/gas/config/aout_gnu.h index badf9cb..52ea70d 100644 --- a/contrib/binutils/gas/config/aout_gnu.h +++ b/contrib/binutils/gas/config/aout_gnu.h @@ -63,7 +63,6 @@ enum reloc_type #endif /* TC_SPARC or TC_A29K */ - #define __GNU_EXEC_MACROS__ #ifndef __STRUCT_EXEC_OVERRIDE__ @@ -183,7 +182,6 @@ enum machine_type sizeof (struct exec)) #endif - #ifndef N_DATOFF #define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text ) #endif @@ -317,7 +315,6 @@ struct reloc_ext_bytes unsigned char r_addend[4]; }; - #define RELOC_EXT_BITS_EXTERN_BIG 0x80 #define RELOC_EXT_BITS_EXTERN_LITTLE 0x01 @@ -345,8 +342,6 @@ struct reloc_info_extended /* The standard, old-fashioned, Berkeley compatible relocation struct */ - - #ifdef TC_I860 /* NOTE: three bits max, see struct reloc_info_i860.r_type */ enum i860_reloc_type @@ -362,7 +357,6 @@ enum highlow_type NO_SPEC = 0, PAIR, HIGH, HIGHADJ, }; - struct reloc_info_i860 { unsigned long r_address; @@ -381,7 +375,6 @@ struct reloc_info_i860 #endif /* TC_I860 */ - struct reloc_std_bytes { unsigned char r_address[4]; diff --git a/contrib/binutils/gas/config/atof-ieee.c b/contrib/binutils/gas/config/atof-ieee.c index 2e3c0dc..2a916cd 100644 --- a/contrib/binutils/gas/config/atof-ieee.c +++ b/contrib/binutils/gas/config/atof-ieee.c @@ -29,7 +29,7 @@ static void unget_bits PARAMS ((int)); static void make_invalid_floating_point_number PARAMS ((LITTLENUM_TYPE *)); extern const char EXP_CHARS[]; -/* Precision in LittleNums. */ +/* Precision in LittleNums. */ /* Don't count the gap in the m68k extended precision format. */ #define MAX_PRECISION (5) #define F_PRECISION (2) @@ -37,7 +37,7 @@ extern const char EXP_CHARS[]; #define X_PRECISION (5) #define P_PRECISION (5) -/* Length in LittleNums of guard bits. */ +/* Length in LittleNums of guard bits. */ #define GUARD (2) static const unsigned long mask[] = @@ -77,7 +77,6 @@ static const unsigned long mask[] = 0xffffffff, }; - static int bits_left_in_littlenum; static int littlenums_left; static LITTLENUM_TYPE *littlenum_pointer; @@ -100,18 +99,22 @@ next_bits (number_of_bits) { bits_left_in_littlenum = LITTLENUM_NUMBER_OF_BITS - number_of_bits; --littlenum_pointer; - return_value |= (*littlenum_pointer >> bits_left_in_littlenum) & mask[number_of_bits]; + return_value |= + (*littlenum_pointer >> bits_left_in_littlenum) + & mask[number_of_bits]; } } else { bits_left_in_littlenum -= number_of_bits; - return_value = mask[number_of_bits] & (*littlenum_pointer >> bits_left_in_littlenum); + return_value = + mask[number_of_bits] & (*littlenum_pointer >> bits_left_in_littlenum); } - return (return_value); + return return_value; } -/* Num had better be less than LITTLENUM_NUMBER_OF_BITS */ +/* Num had better be less than LITTLENUM_NUMBER_OF_BITS. */ + static void unget_bits (num) int num; @@ -124,7 +127,8 @@ unget_bits (num) } else if (bits_left_in_littlenum + num > LITTLENUM_NUMBER_OF_BITS) { - bits_left_in_littlenum = num - (LITTLENUM_NUMBER_OF_BITS - bits_left_in_littlenum); + bits_left_in_littlenum = + num - (LITTLENUM_NUMBER_OF_BITS - bits_left_in_littlenum); ++littlenum_pointer; ++littlenums_left; } @@ -137,7 +141,8 @@ make_invalid_floating_point_number (words) LITTLENUM_TYPE *words; { as_bad (_("cannot create floating-point number")); - words[0] = (LITTLENUM_TYPE) ((unsigned) -1) >> 1; /* Zero the leftmost bit */ + /* Zero the leftmost bit. */ + words[0] = (LITTLENUM_TYPE) ((unsigned) -1) >> 1; words[1] = (LITTLENUM_TYPE) -1; words[2] = (LITTLENUM_TYPE) -1; words[3] = (LITTLENUM_TYPE) -1; @@ -145,29 +150,27 @@ make_invalid_floating_point_number (words) words[5] = (LITTLENUM_TYPE) -1; } -/************************************************************************\ - * Warning: this returns 16-bit LITTLENUMs. It is up to the caller * - * to figure out any alignment problems and to conspire for the * - * bytes/word to be emitted in the right order. Bigendians beware! * - * * -\************************************************************************/ +/* Warning: This returns 16-bit LITTLENUMs. It is up to the caller to + figure out any alignment problems and to conspire for the + bytes/word to be emitted in the right order. Bigendians beware! */ /* Note that atof-ieee always has X and P precisions enabled. it is up to md_atof to filter them out if the target machine does not support them. */ -/* Returns pointer past text consumed. */ +/* Returns pointer past text consumed. */ + char * atof_ieee (str, what_kind, words) - char *str; /* Text to convert to binary. */ - int what_kind; /* 'd', 'f', 'g', 'h' */ - LITTLENUM_TYPE *words; /* Build the binary here. */ + char *str; /* Text to convert to binary. */ + int what_kind; /* 'd', 'f', 'g', 'h'. */ + LITTLENUM_TYPE *words; /* Build the binary here. */ { - /* Extra bits for zeroed low-order bits. The 1st MAX_PRECISION are - zeroed, the last contain flonum bits. */ + /* Extra bits for zeroed low-order bits. + The 1st MAX_PRECISION are zeroed, the last contain flonum bits. */ static LITTLENUM_TYPE bits[MAX_PRECISION + MAX_PRECISION + GUARD]; char *return_value; - /* Number of 16-bit words in the format. */ + /* Number of 16-bit words in the format. */ int precision; long exponent_bits; FLONUM_TYPE save_gen_flonum; @@ -186,7 +189,7 @@ atof_ieee (str, what_kind, words) generic_floating_point_number.sign = '\0'; /* Use more LittleNums than seems necessary: the highest flonum may - have 15 leading 0 bits, so could be useless. */ + have 15 leading 0 bits, so could be useless. */ memset (bits, '\0', sizeof (LITTLENUM_TYPE) * MAX_PRECISION); @@ -247,6 +250,7 @@ atof_ieee (str, what_kind, words) } /* Turn generic_floating_point_number into a real float/double/extended. */ + int gen_to_words (words, precision, exponent_bits) LITTLENUM_TYPE *words; @@ -274,17 +278,17 @@ gen_to_words (words, precision, exponent_bits) if (generic_floating_point_number.low > generic_floating_point_number.leader) { - /* 0.0e0 seen. */ + /* 0.0e0 seen. */ if (generic_floating_point_number.sign == '+') words[0] = 0x0000; else words[0] = 0x8000; memset (&words[1], '\0', (words_end - words - 1) * sizeof (LITTLENUM_TYPE)); - return (return_value); + return return_value; } - /* NaN: Do the right thing */ + /* NaN: Do the right thing. */ if (generic_floating_point_number.sign == 0) { if (precision == F_PRECISION) @@ -301,17 +305,17 @@ gen_to_words (words, precision, exponent_bits) words[3] = 0xffff; words[4] = 0xffff; words[5] = 0xffff; -#else /* ! TC_M68K */ +#else /* ! TC_M68K */ #ifdef TC_I386 words[0] = 0xffff; words[1] = 0xc000; words[2] = 0; words[3] = 0; words[4] = 0; -#else /* ! TC_I386 */ +#else /* ! TC_I386 */ abort (); -#endif /* ! TC_I386 */ -#endif /* ! TC_M68K */ +#endif /* ! TC_I386 */ +#endif /* ! TC_M68K */ } else { @@ -324,7 +328,7 @@ gen_to_words (words, precision, exponent_bits) } else if (generic_floating_point_number.sign == 'P') { - /* +INF: Do the right thing */ + /* +INF: Do the right thing. */ if (precision == F_PRECISION) { words[0] = 0x7f80; @@ -339,17 +343,17 @@ gen_to_words (words, precision, exponent_bits) words[3] = 0; words[4] = 0; words[5] = 0; -#else /* ! TC_M68K */ +#else /* ! TC_M68K */ #ifdef TC_I386 words[0] = 0x7fff; words[1] = 0x8000; words[2] = 0; words[3] = 0; words[4] = 0; -#else /* ! TC_I386 */ +#else /* ! TC_I386 */ abort (); -#endif /* ! TC_I386 */ -#endif /* ! TC_M68K */ +#endif /* ! TC_I386 */ +#endif /* ! TC_M68K */ } else { @@ -358,11 +362,11 @@ gen_to_words (words, precision, exponent_bits) words[2] = 0; words[3] = 0; } - return (return_value); + return return_value; } else if (generic_floating_point_number.sign == 'N') { - /* Negative INF */ + /* Negative INF. */ if (precision == F_PRECISION) { words[0] = 0xff80; @@ -377,17 +381,17 @@ gen_to_words (words, precision, exponent_bits) words[3] = 0; words[4] = 0; words[5] = 0; -#else /* ! TC_M68K */ +#else /* ! TC_M68K */ #ifdef TC_I386 words[0] = 0xffff; words[1] = 0x8000; words[2] = 0; words[3] = 0; words[4] = 0; -#else /* ! TC_I386 */ +#else /* ! TC_I386 */ abort (); -#endif /* ! TC_I386 */ -#endif /* ! TC_M68K */ +#endif /* ! TC_I386 */ +#endif /* ! TC_M68K */ } else { @@ -396,46 +400,49 @@ gen_to_words (words, precision, exponent_bits) words[2] = 0x0; words[3] = 0x0; } - return (return_value); + return return_value; } - /* - * The floating point formats we support have: - * Bit 15 is sign bit. - * Bits 14:n are excess-whatever exponent. - * Bits n-1:0 (if any) are most significant bits of fraction. - * Bits 15:0 of the next word(s) are the next most significant bits. - * - * So we need: number of bits of exponent, number of bits of - * mantissa. - */ + + /* The floating point formats we support have: + Bit 15 is sign bit. + Bits 14:n are excess-whatever exponent. + Bits n-1:0 (if any) are most significant bits of fraction. + Bits 15:0 of the next word(s) are the next most significant bits. + + So we need: number of bits of exponent, number of bits of + mantissa. */ bits_left_in_littlenum = LITTLENUM_NUMBER_OF_BITS; littlenum_pointer = generic_floating_point_number.leader; littlenums_left = (1 + generic_floating_point_number.leader - generic_floating_point_number.low); - /* Seek (and forget) 1st significant bit */ + + /* Seek (and forget) 1st significant bit. */ for (exponent_skippage = 0; !next_bits (1); ++exponent_skippage);; exponent_1 = (generic_floating_point_number.exponent + generic_floating_point_number.leader + 1 - generic_floating_point_number.low); + /* Radix LITTLENUM_RADIX, point just higher than - generic_floating_point_number.leader. */ + generic_floating_point_number.leader. */ exponent_2 = exponent_1 * LITTLENUM_NUMBER_OF_BITS; - /* Radix 2. */ + + /* Radix 2. */ exponent_3 = exponent_2 - exponent_skippage; - /* Forget leading zeros, forget 1st bit. */ + + /* Forget leading zeros, forget 1st bit. */ exponent_4 = exponent_3 + ((1 << (exponent_bits - 1)) - 2); - /* Offset exponent. */ + /* Offset exponent. */ lp = words; - /* Word 1. Sign, exponent and perhaps high bits. */ + /* Word 1. Sign, exponent and perhaps high bits. */ word1 = ((generic_floating_point_number.sign == '+') ? 0 : (1 << (LITTLENUM_NUMBER_OF_BITS - 1))); - /* Assume 2's complement integers. */ + /* Assume 2's complement integers. */ if (exponent_4 <= 0) { int prec_bits; @@ -443,7 +450,8 @@ gen_to_words (words, precision, exponent_bits) unget_bits (1); num_bits = -exponent_4; - prec_bits = LITTLENUM_NUMBER_OF_BITS * precision - (exponent_bits + 1 + num_bits); + prec_bits = + LITTLENUM_NUMBER_OF_BITS * precision - (exponent_bits + 1 + num_bits); #ifdef TC_I386 if (precision == X_PRECISION && exponent_bits == 15) { @@ -457,14 +465,15 @@ gen_to_words (words, precision, exponent_bits) if (num_bits >= LITTLENUM_NUMBER_OF_BITS - exponent_bits) { - /* Bigger than one littlenum */ + /* Bigger than one littlenum. */ num_bits -= (LITTLENUM_NUMBER_OF_BITS - 1) - exponent_bits; *lp++ = word1; - if (num_bits + exponent_bits + 1 > precision * LITTLENUM_NUMBER_OF_BITS) + if (num_bits + exponent_bits + 1 + > precision * LITTLENUM_NUMBER_OF_BITS) { - /* Exponent overflow */ + /* Exponent overflow. */ make_invalid_floating_point_number (words); - return (return_value); + return return_value; } #ifdef TC_M68K if (precision == X_PRECISION && exponent_bits == 15) @@ -490,14 +499,15 @@ gen_to_words (words, precision, exponent_bits) } else { - word1 |= next_bits ((LITTLENUM_NUMBER_OF_BITS - 1) - (exponent_bits + num_bits)); + word1 |= next_bits ((LITTLENUM_NUMBER_OF_BITS - 1) + - (exponent_bits + num_bits)); *lp++ = word1; } } while (lp < words_end) *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS); - /* Round the mantissa up, but don't change the number */ + /* Round the mantissa up, but don't change the number. */ if (next_bits (1)) { --lp; @@ -570,15 +580,11 @@ gen_to_words (words, precision, exponent_bits) } else if ((unsigned long) exponent_4 >= mask[exponent_bits]) { - /* - * Exponent overflow. Lose immediately. - */ - - /* - * We leave return_value alone: admit we read the - * number, but return a floating exception - * because we can't encode the number. - */ + /* Exponent overflow. Lose immediately. */ + + /* We leave return_value alone: admit we read the + number, but return a floating exception + because we can't encode the number. */ make_invalid_floating_point_number (words); return return_value; } @@ -591,7 +597,7 @@ gen_to_words (words, precision, exponent_bits) *lp++ = word1; /* X_PRECISION is special: on the 68k, it has 16 bits of zero in the - middle. Either way, it is then followed by a 1 bit. */ + middle. Either way, it is then followed by a 1 bit. */ if (exponent_bits == 15 && precision == X_PRECISION) { #ifdef TC_M68K @@ -601,21 +607,19 @@ gen_to_words (words, precision, exponent_bits) | next_bits (LITTLENUM_NUMBER_OF_BITS - 1)); } - /* The rest of the words are just mantissa bits. */ + /* The rest of the words are just mantissa bits. */ while (lp < words_end) *lp++ = next_bits (LITTLENUM_NUMBER_OF_BITS); if (next_bits (1)) { unsigned long carry; - /* - * Since the NEXT bit is a 1, round UP the mantissa. - * The cunning design of these hidden-1 floats permits - * us to let the mantissa overflow into the exponent, and - * it 'does the right thing'. However, we lose if the - * highest-order bit of the lowest-order word flips. - * Is that clear? - */ + /* Since the NEXT bit is a 1, round UP the mantissa. + The cunning design of these hidden-1 floats permits + us to let the mantissa overflow into the exponent, and + it 'does the right thing'. However, we lose if the + highest-order bit of the lowest-order word flips. + Is that clear? */ /* #if (sizeof(carry)) < ((sizeof(bits[0]) * BITS_PER_CHAR) + 2) Please allow at least 1 more bit in carry than is in a LITTLENUM. @@ -640,33 +644,36 @@ gen_to_words (words, precision, exponent_bits) { #ifdef TC_M68K /* On the m68k there is a gap of 16 bits. We must - explicitly propagate the carry into the exponent. */ + explicitly propagate the carry into the exponent. */ words[0] += words[1]; words[1] = 0; lp++; #endif - /* Put back the integer bit. */ + /* Put back the integer bit. */ lp[1] |= 1 << (LITTLENUM_NUMBER_OF_BITS - 1); } - } + } if ((word1 ^ *words) & (1 << (LITTLENUM_NUMBER_OF_BITS - 1))) { - /* We leave return_value alone: admit we read the - * number, but return a floating exception - * because we can't encode the number. - */ + /* We leave return_value alone: admit we read the number, + but return a floating exception because we can't encode + the number. */ *words &= ~(1 << (LITTLENUM_NUMBER_OF_BITS - 1)); - /* make_invalid_floating_point_number (words); */ - /* return return_value; */ +#if 0 + make_invalid_floating_point_number (words); + return return_value; +#endif } } - return (return_value); + return return_value; } -#if 0 /* unused */ +#if 0 +/* Unused. */ /* This routine is a real kludge. Someone really should do it better, but I'm too lazy, and I don't understand this stuff all too well anyway. (JF) */ + static void int_to_gen (x) long x; @@ -705,13 +712,9 @@ print_gen (gen) sprintf (sbuf + strlen (sbuf), "%x %x %.12g\n", arr[0], arr[1], fv); if (gen) - { - generic_floating_point_number = f; - } + generic_floating_point_number = f; return (sbuf); } #endif - -/* end of atof-ieee.c */ diff --git a/contrib/binutils/gas/config/obj-aout.c b/contrib/binutils/gas/config/obj-aout.c index eabbe92..67bb18e 100644 --- a/contrib/binutils/gas/config/obj-aout.c +++ b/contrib/binutils/gas/config/obj-aout.c @@ -17,7 +17,7 @@ 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. */ +02111-1307, USA. */ #define OBJ_HEADER "obj-aout.h" @@ -99,13 +99,12 @@ const pseudo_typeS aout_pseudo_table[] = {NULL, NULL, 0} /* end sentinel */ }; /* aout_pseudo_table */ - #ifdef BFD_ASSEMBLER void obj_aout_frob_symbol (sym, punt) symbolS *sym; - int *punt; + int *punt ATTRIBUTE_UNUSED; { flagword flags; asection *sec; @@ -223,7 +222,7 @@ obj_aout_frob_file () #else /* ! BFD_ASSEMBLER */ -/* Relocation. */ +/* Relocation. */ /* * emit_relocations() @@ -233,7 +232,7 @@ obj_aout_frob_file () void obj_emit_relocations (where, fixP, segment_address_in_file) char **where; - fixS *fixP; /* Fixup chain for this segment. */ + fixS *fixP; /* Fixup chain for this segment. */ relax_addressT segment_address_in_file; { for (; fixP; fixP = fixP->fx_next) @@ -322,13 +321,13 @@ obj_emit_symbols (where, symbol_rootP) for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) { /* Used to save the offset of the name. It is used to point - to the string in memory but must be a file offset. */ + to the string in memory but must be a file offset. */ register char *temp; temp = S_GET_NAME (symbolP); S_SET_OFFSET (symbolP, symbolP->sy_name_offset); - /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */ + /* Any symbol still undefined and is not a dbg symbol is made N_EXT. */ if (!S_IS_DEBUG (symbolP) && !S_IS_DEFINED (symbolP)) S_SET_EXTERNAL (symbolP); @@ -355,11 +354,11 @@ obj_emit_symbols (where, symbol_rootP) static void obj_aout_line (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* Assume delimiter is part of expression. BSD4.2 as fails with delightful bug, so we - are not being incompatible here. */ + are not being incompatible here. */ new_logical_line ((char *) NULL, (int) (get_absolute_expression ())); demand_empty_rest_of_line (); } /* obj_aout_line() */ @@ -368,7 +367,7 @@ obj_aout_line (ignore) static void obj_aout_weak (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int c; @@ -396,12 +395,12 @@ obj_aout_weak (ignore) /* Handle .type. On {Net,Open}BSD, this is used to set the n_other field, which is then apparently used when doing dynamic linking. Older - versions ogas ignored the .type pseudo-op, so we also ignore it if + versions of gas ignored the .type pseudo-op, so we also ignore it if we can't parse it. */ static void obj_aout_type (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int c; @@ -409,31 +408,28 @@ obj_aout_type (ignore) name = input_line_pointer; c = get_symbol_end (); - sym = symbol_find (name); + sym = symbol_find_or_make (name); *input_line_pointer = c; - if (sym != NULL) + SKIP_WHITESPACE (); + if (*input_line_pointer == ',') { + ++input_line_pointer; SKIP_WHITESPACE (); - if (*input_line_pointer == ',') + if (*input_line_pointer == '@') { ++input_line_pointer; - SKIP_WHITESPACE (); - if (*input_line_pointer == '@') - { - ++input_line_pointer; - if (strncmp (input_line_pointer, "object", 6) == 0) + if (strncmp (input_line_pointer, "object", 6) == 0) #ifdef BFD_ASSEMBLER - aout_symbol (symbol_get_bfdsym (sym))->other = 1; + aout_symbol (symbol_get_bfdsym (sym))->other = 1; #else - S_SET_OTHER (sym, 1); + S_SET_OTHER (sym, 1); #endif - else if (strncmp (input_line_pointer, "function", 8) == 0) + else if (strncmp (input_line_pointer, "function", 8) == 0) #ifdef BFD_ASSEMBLER - aout_symbol (symbol_get_bfdsym (sym))->other = 2; + aout_symbol (symbol_get_bfdsym (sym))->other = 2; #else - S_SET_OTHER (sym, 2); + S_SET_OTHER (sym, 2); #endif - } } } @@ -453,7 +449,7 @@ obj_crawl_symbol_chain (headers) tc_crawl_symbol_chain (headers); - symbolPP = &symbol_rootP; /*->last symbol chain link. */ + symbolPP = &symbol_rootP; /*->last symbol chain link. */ while ((symbolP = *symbolPP) != NULL) { if (symbolP->sy_mri_common) @@ -494,8 +490,7 @@ obj_crawl_symbol_chain (headers) switch was passed to gas. All other symbols are output. We complain if a deleted - symbol was marked external. */ - + symbol was marked external. */ if (!S_IS_REGISTER (symbolP) && (!S_GET_NAME (symbolP) @@ -511,11 +506,11 @@ obj_crawl_symbol_chain (headers) end of each string */ if (!S_IS_STABD (symbolP)) { - /* Ordinary case. */ + /* Ordinary case. */ symbolP->sy_name_offset = string_byte_count; string_byte_count += strlen (S_GET_NAME (symbolP)) + 1; } - else /* .Stabd case. */ + else /* .Stabd case. */ symbolP->sy_name_offset = 0; symbolPP = &symbolP->sy_next; } @@ -527,7 +522,7 @@ obj_crawl_symbol_chain (headers) register names... */ { as_bad (_("Local symbol %s never defined."), decode_local_label_name (S_GET_NAME (symbolP))); - } /* oops. */ + } /* oops. */ /* Unhook it from the chain */ *symbolPP = symbol_next (symbolP); @@ -578,7 +573,7 @@ obj_pre_write_hook (headers) } void -DEFUN_VOID (s_sect) +s_sect () { /* Strip out the section name */ char *section_name; @@ -641,7 +636,14 @@ DEFUN_VOID (s_sect) static void aout_pop_insert PARAMS ((void)); static int obj_aout_s_get_other PARAMS ((symbolS *)); +static void obj_aout_s_set_other PARAMS ((symbolS *, int)); static int obj_aout_s_get_desc PARAMS ((symbolS *)); +static void obj_aout_s_set_desc PARAMS ((symbolS *, int)); +static int obj_aout_s_get_type PARAMS ((symbolS *)); +static void obj_aout_s_set_type PARAMS ((symbolS *, int)); +static int obj_aout_separate_stab_sections PARAMS ((void)); +static int obj_aout_sec_sym_ok_for_reloc PARAMS ((asection *)); +static void obj_aout_process_stab PARAMS ((segT, int, const char *, int, int, int)); static void aout_pop_insert () @@ -656,6 +658,33 @@ obj_aout_s_get_other (sym) return aout_symbol (symbol_get_bfdsym (sym))->other; } +static void +obj_aout_s_set_other (sym, o) + symbolS *sym; + int o; +{ + aout_symbol (symbol_get_bfdsym (sym))->other = o; +} + +static int +obj_aout_sec_sym_ok_for_reloc (sec) + asection *sec ATTRIBUTE_UNUSED; +{ + return obj_sec_sym_ok_for_reloc (sec); +} + +static void +obj_aout_process_stab (seg, w, s, t, o, d) + segT seg ATTRIBUTE_UNUSED; + int w; + const char *s; + int t; + int o; + int d; +{ + aout_process_stab (w, s, t, o, d); +} + static int obj_aout_s_get_desc (sym) symbolS *sym; @@ -663,30 +692,67 @@ obj_aout_s_get_desc (sym) return aout_symbol (symbol_get_bfdsym (sym))->desc; } +static void +obj_aout_s_set_desc (sym, d) + symbolS *sym; + int d; +{ + aout_symbol (symbol_get_bfdsym (sym))->desc = d; +} + +static int +obj_aout_s_get_type (sym) + symbolS *sym; +{ + return aout_symbol (symbol_get_bfdsym (sym))->type; +} +static void +obj_aout_s_set_type (sym, t) + symbolS *sym; + int t; +{ + aout_symbol (symbol_get_bfdsym (sym))->type = t; +} + +static int +obj_aout_separate_stab_sections () +{ + return 0; +} + +/* When changed, make sure these table entries match the single-format + definitions in obj-aout.h. */ const struct format_ops aout_format_ops = { bfd_target_aout_flavour, 1, /* dfl_leading_underscore */ 0, /* emit_section_symbols */ + 0, /* begin */ + 0, /* app_file */ obj_aout_frob_symbol, obj_aout_frob_file, + 0, /* frob_file_before_adjust */ 0, /* frob_file_after_relocs */ 0, /* s_get_size */ 0, /* s_set_size */ 0, /* s_get_align */ 0, /* s_set_align */ obj_aout_s_get_other, + obj_aout_s_set_other, obj_aout_s_get_desc, + obj_aout_s_set_desc, + obj_aout_s_get_type, + obj_aout_s_set_type, 0, /* copy_symbol_attributes */ 0, /* generate_asm_lineno */ - 0, /* process_stab */ - 0, /* sec_sym_ok_for_reloc */ + obj_aout_process_stab, + obj_aout_separate_stab_sections, + 0, /* init_stab_section */ + obj_aout_sec_sym_ok_for_reloc, aout_pop_insert, 0, /* ecoff_set_ext */ 0, /* read_begin_hook */ 0 /* symbol_new_hook */ }; #endif BFD_ASSEMBLER - -/* end of obj-aout.c */ diff --git a/contrib/binutils/gas/config/obj-aout.h b/contrib/binutils/gas/config/obj-aout.h index d08302a..d91cc48 100644 --- a/contrib/binutils/gas/config/obj-aout.h +++ b/contrib/binutils/gas/config/obj-aout.h @@ -17,7 +17,7 @@ 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. */ + 02111-1307, USA. */ /* Tag to validate a.out object file format processing */ #define OBJ_AOUT 1 @@ -33,7 +33,7 @@ #else /* ! BFD_ASSEMBLER */ #ifndef VMS -#include "aout_gnu.h" /* Needed to define struct nlist. Sigh. */ +#include "aout_gnu.h" /* Needed to define struct nlist. Sigh. */ #else #include "a_out.h" #endif @@ -229,12 +229,12 @@ extern void obj_aout_frob_file PARAMS ((void)); typedef struct { struct exec header; /* a.out header */ - long string_table_size; /* names + '\0' + sizeof(int) */ + long string_table_size; /* names + '\0' + sizeof (int) */ } object_headers; -/* line numbering stuff. */ +/* line numbering stuff. */ #define OBJ_EMIT_LINENO(a, b, c) {;} struct fix; @@ -248,5 +248,3 @@ void tc_aout_fix_to_chars PARAMS ((char *where, struct fix *fixP, relax_addressT #define EMIT_SECTION_SYMBOLS 0 #define AOUT_STABS - -/* end of obj-aout.h */ diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c index a0847c4..e16e5df 100644 --- a/contrib/binutils/gas/config/obj-coff.c +++ b/contrib/binutils/gas/config/obj-coff.c @@ -30,6 +30,13 @@ #define KEEP_RELOC_INFO #endif +/* The BFD_ASSEMBLER version of obj_coff_section will use this macro to set + a new section's attributes when a directive has no valid flags or the + "w" flag is used. This default should be appropriate for most. */ +#ifndef TC_COFF_SECTION_DEFAULT_ATTRIBUTES +#define TC_COFF_SECTION_DEFAULT_ATTRIBUTES (SEC_LOAD | SEC_DATA) +#endif + static void obj_coff_bss PARAMS ((int)); const char *s_get_name PARAMS ((symbolS * s)); static void obj_coff_ln PARAMS ((int)); @@ -204,7 +211,7 @@ obj_coff_weak (ignore) char *name; int c; symbolS *symbolP; - + do { name = input_line_pointer; @@ -213,7 +220,7 @@ obj_coff_weak (ignore) *input_line_pointer = c; SKIP_WHITESPACE (); -#ifdef BFD_ASSEMBLER +#if defined BFD_ASSEMBLER || defined S_SET_WEAK S_SET_WEAK (symbolP); #endif @@ -241,7 +248,7 @@ obj_coff_weak (ignore) static void SA_SET_SYM_TAGNDX PARAMS ((symbolS *, symbolS *)); #define GET_FILENAME_STRING(X) \ -((char*)(&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1]) +((char*) (&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1]) /* @@ Ick. */ static segT @@ -316,7 +323,7 @@ S_SET_STORAGE_CLASS (sym, val) return val; } -/* Merge a debug symbol containing debug information into a normal symbol. */ +/* Merge a debug symbol containing debug information into a normal symbol. */ void c_symbol_merge (debug, normal) @@ -340,13 +347,13 @@ c_symbol_merge (debug, normal) * sizeof (*SYM_AUXINFO (debug)))); } - /* Move the debug flags. */ + /* Move the debug flags. */ SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug)); } void c_dot_file_symbol (filename) - char *filename; + const char *filename; { symbolS *symbolP; @@ -401,7 +408,7 @@ coff_obj_symbol_new_hook (symbolP) { long sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type); char * s = (char *) xmalloc (sz); - + memset (s, 0, sz); coffsymbol (symbol_get_bfdsym (symbolP))->native = (combined_entry_type *) s; @@ -411,7 +418,7 @@ coff_obj_symbol_new_hook (symbolP) if (S_IS_STRING (symbolP)) SF_SET_STRING (symbolP); - + if (S_IS_LOCAL (symbolP)) SF_SET_LOCAL (symbolP); } @@ -429,7 +436,7 @@ int coff_n_line_nos; static void add_lineno (frag, offset, num) fragS *frag; - int offset; + addressT offset; int num; { struct line_no *new_line = @@ -438,7 +445,7 @@ add_lineno (frag, offset, num) { abort (); } - if (num <= 0) + if (num <= 0) { /* Zero is used as an end marker in the file. */ as_warn (_("Line numbers must be positive integers\n")); @@ -652,7 +659,7 @@ static void obj_coff_endef (ignore) int ignore ATTRIBUTE_UNUSED; { - symbolS *symbolP; + symbolS *symbolP = NULL; /* DIM BUG FIX sac@cygnus.com */ dim_index = 0; @@ -663,7 +670,7 @@ obj_coff_endef (ignore) return; } /* if not inside .def/.endef */ - /* Set the section number according to storage class. */ + /* Set the section number according to storage class. */ switch (S_GET_STORAGE_CLASS (def_symbol_in_progress)) { case C_STRTAG: @@ -678,7 +685,7 @@ obj_coff_endef (ignore) break; case C_EFCN: - SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */ + SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */ /* intentional fallthrough */ case C_BLOCK: SF_SET_PROCESS (def_symbol_in_progress); /* Will need processing before writing */ @@ -693,7 +700,7 @@ obj_coff_endef (ignore) { switch (name[1]) { - case 'b': + case 'b': /* .bf */ if (! in_function ()) as_warn (_("`%s' symbol without preceding function"), name); @@ -702,12 +709,12 @@ obj_coff_endef (ignore) clear_function (); break; #ifdef TE_PE - case 'e': + case 'e': /* .ef */ /* The MS compilers output the actual endline, not the function-relative one... we want to match without changing the assembler input. */ - SA_SET_SYM_LNNO (def_symbol_in_progress, + SA_SET_SYM_LNNO (def_symbol_in_progress, (SA_GET_SYM_LNNO (def_symbol_in_progress) + coff_line_base)); break; @@ -725,16 +732,49 @@ obj_coff_endef (ignore) case C_ARG: case C_REGPARM: case C_FIELD: + + /* According to the COFF documentation: + + http://osr5doc.sco.com:1996/topics/COFF_SectNumFld.html + + A special section number (-2) marks symbolic debugging symbols, + including structure/union/enumeration tag names, typedefs, and + the name of the file. A section number of -1 indicates that the + symbol has a value but is not relocatable. Examples of + absolute-valued symbols include automatic and register variables, + function arguments, and .eos symbols. + + But from Ian Lance Taylor: + + http://sources.redhat.com/ml/binutils/2000-08/msg00202.html + + the actual tools all marked them as section -1. So the GNU COFF + assembler follows historical COFF assemblers. + + However, it causes problems for djgpp + + http://sources.redhat.com/ml/binutils/2000-08/msg00210.html + + By defining STRICTCOFF, a COFF port can make the assembler to + follow the documented behavior. */ +#ifdef STRICTCOFF + case C_MOS: + case C_MOE: + case C_MOU: + case C_EOS: +#endif SF_SET_DEBUG (def_symbol_in_progress); S_SET_SEGMENT (def_symbol_in_progress, absolute_section); break; +#ifndef STRICTCOFF case C_MOS: case C_MOE: case C_MOU: case C_EOS: S_SET_SEGMENT (def_symbol_in_progress, absolute_section); break; +#endif case C_EXT: case C_WEAKEXT: @@ -768,11 +808,11 @@ obj_coff_endef (ignore) lineno entry MUST point to the definition function or else it will point off into space when obj_crawl_symbol_chain() merges the debug symbol into the real symbol. Therefor, let's presume - the debug symbol is a real function reference. */ + the debug symbol is a real function reference. */ /* FIXME-SOON If for some reason the definition label/symbol is never seen, this will probably leave an undefined symbol at link - time. */ + time. */ if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN || S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL @@ -803,7 +843,7 @@ obj_coff_endef (ignore) symbols. [loic] */ /* The debug entry (def_symbol_in_progress) is merged into the - previous definition. */ + previous definition. */ c_symbol_merge (def_symbol_in_progress, symbolP); symbol_remove (def_symbol_in_progress, &symbol_rootP, &symbol_lastP); @@ -816,7 +856,7 @@ obj_coff_endef (ignore) { /* For functions, and tags, and static symbols, the symbol *must* be where the debug symbol appears. Move the - existing symbol to the current place. */ + existing symbol to the current place. */ /* If it already is at the end of the symbol list, do nothing */ if (def_symbol_in_progress != symbol_lastP) { @@ -846,7 +886,7 @@ obj_coff_endef (ignore) if (symbolP == NULL) { /* That is, if this is the first time we've seen the - function... */ + function... */ symbol_table_insert (def_symbol_in_progress); } /* definition follows debug */ } /* Create the line number entry pointing to the function being defined */ @@ -982,7 +1022,7 @@ obj_coff_tag (ignore) #endif /* Assume that the symbol referred to by .tag is always defined. - This was a bad assumption. I've added find_or_make. xoxorich. */ + This was a bad assumption. I've added find_or_make. xoxorich. */ SA_SET_SYM_TAGNDX (def_symbol_in_progress, tag_find_or_make (symbol_name)); if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L) @@ -1065,7 +1105,7 @@ obj_coff_val (ignore) just below. */ } /* Otherwise, it is the name of a non debug symbol and its value - will be calculated later. */ + will be calculated later. */ *input_line_pointer = name_end; } else @@ -1079,7 +1119,7 @@ obj_coff_val (ignore) void coff_obj_read_begin_hook () { - /* These had better be the same. Usually 18 bytes. */ + /* These had better be the same. Usually 18 bytes. */ #ifndef BFD_HEADERS know (sizeof (SYMENT) == sizeof (AUXENT)); know (SYMESZ == AUXESZ); @@ -1087,7 +1127,6 @@ coff_obj_read_begin_hook () tag_init (); } - symbolS *coff_last_function; static symbolS *coff_last_bf; @@ -1132,11 +1171,14 @@ coff_frob_symbol (symp, punt) symbolS *real; if (!SF_GET_LOCAL (symp) && !SF_GET_STATICS (symp) + && S_GET_STORAGE_CLASS (symp) != C_LABEL + && symbol_constant_p(symp) && (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP)) && real != symp) { c_symbol_merge (symp, real); *punt = 1; + return; } if (!S_IS_DEFINED (symp) && !SF_GET_LOCAL (symp)) { @@ -1196,7 +1238,7 @@ coff_frob_symbol (symp, punt) if (SF_GET_FUNCTION (symp)) symbol_get_bfdsym (symp)->flags |= BSF_FUNCTION; - /* more ... */ + /* more ... */ } /* Double check weak symbols. */ @@ -1353,7 +1395,7 @@ obj_coff_section (ignore) char c; char *name; unsigned int exp; - flagword flags; + flagword flags, oldflags; asection *sec; if (flag_mri) @@ -1375,7 +1417,7 @@ obj_coff_section (ignore) SKIP_WHITESPACE (); exp = 0; - flags = SEC_LOAD; + flags = SEC_NO_FLAGS; if (*input_line_pointer == ',') { @@ -1420,18 +1462,35 @@ obj_coff_section (ignore) sec = subseg_new (name, (subsegT) exp); - if (flags != SEC_NO_FLAGS) + oldflags = bfd_get_section_flags (stdoutput, sec); + if (oldflags == SEC_NO_FLAGS) { - flagword oldflags; + /* Set section flags for a new section just created by subseg_new. + Provide a default if no flags were parsed. */ + if (flags == SEC_NO_FLAGS) + flags = TC_COFF_SECTION_DEFAULT_ATTRIBUTES; - oldflags = bfd_get_section_flags (stdoutput, sec); - oldflags &= SEC_LINK_ONCE | SEC_LINK_DUPLICATES; - flags |= oldflags; +#ifdef COFF_LONG_SECTION_NAMES + /* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce + sections so adjust_reloc_syms in write.c will correctly handle + relocs which refer to non-local symbols in these sections. */ + if (strncmp (name, ".gnu.linkonce", sizeof (".gnu.linkonce") - 1) == 0) + flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; +#endif if (! bfd_set_section_flags (stdoutput, sec, flags)) - as_warn (_("error setting flags for \"%s\": %s"), - bfd_section_name (stdoutput, sec), - bfd_errmsg (bfd_get_error ())); + as_warn (_("error setting flags for \"%s\": %s"), + bfd_section_name (stdoutput, sec), + bfd_errmsg (bfd_get_error ())); + } + else if (flags != SEC_NO_FLAGS) + { + /* 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; + if ((flags ^ oldflags) & matchflags) + as_warn (_("Ignoring changed section attributes for %s"), name); } demand_empty_rest_of_line (); @@ -1459,14 +1518,26 @@ coff_frob_section (sec) rounded up to multiples of the corresponding section alignments, supposedly because standard COFF has no other way of encoding alignment for sections. If your COFF flavor has a different way of encoding - section alignment, then skip this step, as TICOFF does. */ + section alignment, then skip this step, as TICOFF does. */ size = bfd_get_section_size_before_reloc (sec); mask = ((bfd_vma) 1 << align_power) - 1; #if !defined(TICOFF) if (size & mask) { - size = (size + mask) & ~mask; - bfd_set_section_size (stdoutput, sec, size); + bfd_vma new_size; + fragS *last; + + new_size = (size + mask) & ~mask; + bfd_set_section_size (stdoutput, sec, new_size); + + /* If the size had to be rounded up, add some padding in + the last non-empty frag. */ + fragp = seg_info (sec)->frchainP->frch_root; + last = seg_info (sec)->frchainP->frch_last; + while (fragp->fr_next != last) + fragp = fragp->fr_next; + last->fr_address = size; + fragp->fr_offset += new_size - size; } #endif @@ -1526,9 +1597,9 @@ obj_coff_init_stab_section (seg) char *stabstr_name; unsigned int stroff; - /* Make space for this first symbol. */ + /* Make space for this first symbol. */ p = frag_more (12); - /* Zero it out. */ + /* Zero it out. */ memset (p, 0, 12); as_where (&file, (unsigned int *) NULL); stabstr_name = (char *) alloca (strlen (seg->name) + 4); @@ -1555,7 +1626,7 @@ symbol_dump () for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) { - printf(_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"), + printf (_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"), (unsigned long) symbolP, S_GET_NAME(symbolP), (long) S_GET_DATA_TYPE(symbolP), @@ -1569,7 +1640,7 @@ symbol_dump () #else /* not BFD_ASSEMBLER */ #include "frags.h" -/* This is needed because we include internal bfd things. */ +/* This is needed because we include internal bfd things. */ #include #include "libbfd.h" @@ -1616,7 +1687,7 @@ int function_lineoff = -1; /* Offset in line#s where the last function /* structure used to keep the filenames which are too long around so that we can stick them into the string table */ -struct filename_list +struct filename_list { char *filename; struct filename_list *next; @@ -1641,22 +1712,18 @@ bfd *abfd; static void fixup_segment PARAMS ((segment_info_type *segP, segT this_segment_type)); - static void fixup_mdeps PARAMS ((fragS *, object_headers *, segT)); - static void fill_section PARAMS ((bfd * abfd, object_headers *, unsigned long *)); - static int c_line_new PARAMS ((symbolS * symbol, long paddr, int line_number, fragS * frag)); - static void w_symbols PARAMS ((bfd * abfd, char *where, symbolS * symbol_rootP)); @@ -1717,7 +1784,6 @@ relax_align (address, alignment) return (new_address - address); } - segT s_get_segment (x) symbolS * x; @@ -1760,6 +1826,7 @@ size_section (abfd, idx) break; case rs_align: case rs_align_code: + case rs_align_test: { addressT off; @@ -1780,7 +1847,6 @@ size_section (abfd, idx) return size; } - static unsigned int count_entries_in_chain (idx) unsigned int idx; @@ -1986,7 +2052,6 @@ do_relocs_for (abfd, h, file_cursor) H_SET_RELOCATION_SIZE (h, *file_cursor - reloc_start, 0); } - /* run through a frag chain and write out the data to go with it, fill in the scnhdrs with the info on the file postions */ @@ -2071,6 +2136,7 @@ fill_section (abfd, h, file_cursor) case rs_fill: case rs_align: case rs_align_code: + case rs_align_test: case rs_org: if (frag->fr_fix) { @@ -2181,7 +2247,6 @@ coff_header_append (abfd, h) } } - char * symbol_to_chars (abfd, where, symbolP) bfd * abfd; @@ -2232,7 +2297,7 @@ coff_obj_symbol_new_hook (symbolP) char underscore = 0; /* Symbol has leading _ */ /* Effective symbol */ - /* Store the pointer in the offset. */ + /* Store the pointer in the offset. */ S_SET_ZEROES (symbolP, 0L); S_SET_DATA_TYPE (symbolP, T_NULL); S_SET_STORAGE_CLASS (symbolP, 0); @@ -2360,7 +2425,6 @@ obj_coff_def (what) unsigned int dim_index; - static void obj_coff_endef (ignore) int ignore ATTRIBUTE_UNUSED; @@ -2375,7 +2439,7 @@ obj_coff_endef (ignore) return; } /* if not inside .def/.endef */ - /* Set the section number according to storage class. */ + /* Set the section number according to storage class. */ switch (S_GET_STORAGE_CLASS (def_symbol_in_progress)) { case C_STRTAG: @@ -2390,7 +2454,7 @@ obj_coff_endef (ignore) break; case C_EFCN: - SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */ + SF_SET_LOCAL (def_symbol_in_progress); /* Do not emit this symbol. */ /* intentional fallthrough */ case C_BLOCK: SF_SET_PROCESS (def_symbol_in_progress); /* Will need processing before writing */ @@ -2411,7 +2475,7 @@ obj_coff_endef (ignore) SF_SET_PROCESS (def_symbol_in_progress); function_lineoff = -1; } - /* Value is always set to . */ + /* Value is always set to . */ def_symbol_in_progress->sy_frag = frag_now; S_SET_VALUE (def_symbol_in_progress, (valueT) frag_now_fix ()); break; @@ -2462,11 +2526,11 @@ obj_coff_endef (ignore) lineno entry MUST point to the definition function or else it will point off into space when crawl_symbols() merges the debug symbol into the real symbol. Therefor, let's presume the debug - symbol is a real function reference. */ + symbol is a real function reference. */ /* FIXME-SOON If for some reason the definition label/symbol is never seen, this will probably leave an undefined symbol at link - time. */ + time. */ if (S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_EFCN || S_GET_STORAGE_CLASS (def_symbol_in_progress) == C_LABEL @@ -2492,7 +2556,7 @@ obj_coff_endef (ignore) previous definition. */ c_symbol_merge (def_symbol_in_progress, symbolP); - /* FIXME-SOON Should *def_symbol_in_progress be free'd? xoxorich. */ + /* FIXME-SOON Should *def_symbol_in_progress be free'd? xoxorich. */ def_symbol_in_progress = symbolP; if (SF_GET_FUNCTION (def_symbol_in_progress) @@ -2501,7 +2565,7 @@ obj_coff_endef (ignore) { /* For functions, and tags, and static symbols, the symbol *must* be where the debug symbol appears. Move the - existing symbol to the current place. */ + existing symbol to the current place. */ /* If it already is at the end of the symbol list, do nothing */ if (def_symbol_in_progress != symbol_lastP) { @@ -2535,7 +2599,7 @@ obj_coff_endef (ignore) if (symbolP == NULL) { /* That is, if this is the first time we've seen the - function... */ + function... */ symbol_table_insert (def_symbol_in_progress); } /* definition follows debug */ } /* Create the line number entry pointing to the function being defined */ @@ -2682,7 +2746,7 @@ obj_coff_tag (ignore) #endif /* Assume that the symbol referred to by .tag is always defined. - This was a bad assumption. I've added find_or_make. xoxorich. */ + This was a bad assumption. I've added find_or_make. xoxorich. */ SA_SET_SYM_TAGNDX (def_symbol_in_progress, (long) tag_find_or_make (symbol_name)); if (SA_GET_SYM_TAGNDX (def_symbol_in_progress) == 0L) @@ -2764,7 +2828,7 @@ obj_coff_val (ignore) just below. */ } /* Otherwise, it is the name of a non debug symbol and - its value will be calculated later. */ + its value will be calculated later. */ *input_line_pointer = name_end; /* FIXME: this is to avoid an error message in the @@ -2802,7 +2866,7 @@ obj_coff_pe_handle_link_once (type) void coff_obj_read_begin_hook () { - /* These had better be the same. Usually 18 bytes. */ + /* These had better be the same. Usually 18 bytes. */ #ifndef BFD_HEADERS know (sizeof (SYMENT) == sizeof (AUXENT)); know (SYMESZ == AUXESZ); @@ -2857,7 +2921,7 @@ yank_symbols () /* Debug symbols do not need all this rubbish */ symbolS *real_symbolP; - /* L* and C_EFCN symbols never merge. */ + /* L* and C_EFCN symbols never merge. */ if (!SF_GET_LOCAL (symbolP) && !SF_GET_STATICS (symbolP) && S_GET_STORAGE_CLASS (symbolP) != C_LABEL @@ -2866,12 +2930,12 @@ yank_symbols () && real_symbolP != symbolP) { /* FIXME-SOON: where do dups come from? - Maybe tag references before definitions? xoxorich. */ + Maybe tag references before definitions? xoxorich. */ /* Move the debug data from the debug symbol to the real symbol. Do NOT do the oposite (i.e. move from real symbol to debug symbol and remove real symbol from the list.) Because some pointers refer to the real symbol - whereas no pointers refer to the debug symbol. */ + whereas no pointers refer to the debug symbol. */ c_symbol_merge (symbolP, real_symbolP); /* Replace the current symbol by the real one */ /* The symbols will never be the last or the first @@ -2909,7 +2973,7 @@ yank_symbols () /* Mainly to speed up if not -g */ if (SF_GET_PROCESS (symbolP)) { - /* Handle the nested blocks auxiliary info. */ + /* Handle the nested blocks auxiliary info. */ if (S_GET_STORAGE_CLASS (symbolP) == C_BLOCK) { if (!strcmp (S_GET_NAME (symbolP), ".bb")) @@ -2927,7 +2991,7 @@ yank_symbols () /* If we are able to identify the type of a function, and we are out of a function (last_functionP == 0) then, the function symbol will be associated with an auxiliary - entry. */ + entry. */ if (last_functionP == (symbolS *) 0 && SF_GET_FUNCTION (symbolP)) { @@ -2938,7 +3002,7 @@ yank_symbols () S_SET_NUMBER_AUXILIARY (symbolP, 1); } /* make it at least 1 */ - /* Clobber possible stale .dim information. */ + /* Clobber possible stale .dim information. */ #if 0 /* Iffed out by steve - this fries the lnnoptr info too */ bzero (symbolP->sy_symbol.ost_auxent[0].x_sym.x_fcnary.x_ary.x_dimen, @@ -2971,7 +3035,7 @@ yank_symbols () else if (SF_GET_TAG (symbolP)) { /* First descriptor of a structure must point to - the first slot after the structure description. */ + the first slot after the structure description. */ last_tagP = symbolP; } @@ -3011,8 +3075,7 @@ yank_symbols () [21] foo external [22] .be ld will move the symbol 21 to the end of the list but - endndx will still be 22 instead of 21. */ - + endndx will still be 22 instead of 21. */ if (SF_GET_LOCAL (symbolP)) { @@ -3086,7 +3149,6 @@ yank_symbols () } - static unsigned int glue_symbols (head, tail) symbolS **head; @@ -3165,7 +3227,7 @@ crawl_symbols (h, abfd) * undefined symbols at the end of the list. */ - /* Is there a .file symbol ? If not insert one at the beginning. */ + /* Is there a .file symbol ? If not insert one at the beginning. */ if (symbol_rootP == NULL || S_GET_STORAGE_CLASS (symbol_rootP) != C_FILE) { @@ -3176,7 +3238,6 @@ crawl_symbols (h, abfd) * Build up static symbols for the sections, they are filled in later */ - for (i = SEG_E0; i < SEG_LAST; i++) if (segment_info[i].scnhdr.s_name[0]) segment_info[i].dot = c_section_symbol (segment_info[i].name, @@ -3272,7 +3333,6 @@ do_linenos_for (abfd, h, file_cursor) { segment_info_type *s = segment_info + idx; - if (s->scnhdr.s_nlnno != 0) { struct lineno_list *line_ptr; @@ -3301,7 +3361,6 @@ do_linenos_for (abfd, h, file_cursor) line_ptr->line.l_addr.l_paddr += ((struct frag *) (line_ptr->frag))->fr_address; } - (void) bfd_coff_swap_lineno_out (abfd, &(line_ptr->line), dst); dst++; @@ -3318,7 +3377,6 @@ do_linenos_for (abfd, h, file_cursor) H_SET_LINENO_SIZE (h, *file_cursor - start); } - /* Now we run through the list of frag chains in a segment and make all the subsegment frags appear at the end of the list, as if the seg 0 was extra long */ @@ -3359,7 +3417,6 @@ write_object_file () unsigned int addr; abfd = bfd_openw (out_file_name, TARGET_FORMAT); - if (abfd == 0) { as_perror (_("FATAL: Can't create %s"), out_file_name); @@ -3388,21 +3445,22 @@ write_object_file () md_do_align (SUB_SEGMENT_ALIGN (now_seg), (char *) NULL, 0, 0, alignment_done); #endif - frag_align (SUB_SEGMENT_ALIGN (now_seg), - subseg_text_p (now_seg) ? NOP_OPCODE : 0, - 0); + if (subseg_text_p (now_seg)) + frag_align_code (SUB_SEGMENT_ALIGN (now_seg), 0); + else + frag_align (SUB_SEGMENT_ALIGN (now_seg), 0, 0); + #ifdef md_do_align alignment_done: #endif + frag_wane (frag_now); frag_now->fr_fix = 0; know (frag_now->fr_next == NULL); } - remove_subsegs (); - for (i = SEG_E0; i < SEG_UNKNOWN; i++) { relax_segment (segment_info[i].frchainP->frch_root, i); @@ -3476,7 +3534,7 @@ write_object_file () } /* Look for ".stab" segments and fill in their initial symbols - correctly. */ + correctly. */ for (i = SEG_E0; i < SEG_UNKNOWN; i++) { name = segment_info[i].name; @@ -3537,7 +3595,7 @@ write_object_file () coff_header_append (abfd, &headers); #if 0 /* Recent changes to write need this, but where it should - go is up to Ken.. */ + go is up to Ken.. */ if (bfd_close_all_done (abfd) == false) as_fatal (_("Can't close %s: %s"), out_file_name, bfd_errmsg (bfd_get_error ())); @@ -3683,7 +3741,6 @@ obj_coff_section (ignore) demand_empty_rest_of_line (); } - static void obj_coff_text (ignore) int ignore ATTRIBUTE_UNUSED; @@ -3691,7 +3748,6 @@ obj_coff_text (ignore) subseg_new (".text", get_absolute_expression ()); } - static void obj_coff_data (ignore) int ignore ATTRIBUTE_UNUSED; @@ -3733,7 +3789,7 @@ c_symbol_merge (debug, normal) (unsigned int) (S_GET_NUMBER_AUXILIARY (debug) * AUXESZ)); } /* Move all the auxiliary information */ - /* Move the debug flags. */ + /* Move the debug flags. */ SF_SET_DEBUG_FIELD (normal, SF_GET_DEBUG_FIELD (debug)); } /* c_symbol_merge() */ @@ -3763,7 +3819,6 @@ c_line_new (symbol, paddr, line_number, frag) new_line->frag = (char *) frag; new_line->next = (struct lineno_list *) NULL; - if (s->lineno_list_head == (struct lineno_list *) NULL) { s->lineno_list_head = new_line; @@ -3805,13 +3860,13 @@ c_dot_file_symbol (filename) SA_SET_FILE_FNAME_ZEROS (symbolP, 0); SA_SET_FILE_FNAME_OFFSET (symbolP, 1); - if (filename_list_tail) + if (filename_list_tail) filename_list_tail->next = f; else filename_list_head = f; - filename_list_tail = f; + filename_list_tail = f; } - else + else { SA_SET_FILE_FNAME (symbolP, filename); } @@ -3930,7 +3985,7 @@ w_symbols (abfd, where, symbol_rootP) for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) { /* Used to save the offset of the name. It is used to point - to the string in memory but must be a file offset. */ + to the string in memory but must be a file offset. */ register char *temp; /* We can't fix the lnnoptr field in yank_symbols with the other @@ -4042,6 +4097,7 @@ fixup_mdeps (frags, h, this_segment) { case rs_align: case rs_align_code: + case rs_align_test: case rs_org: #ifdef HANDLE_ALIGN HANDLE_ALIGN (frags); @@ -4112,7 +4168,7 @@ fixup_segment (segP, this_segment_type) if (fixP->fx_tcbit && SF_GET_CALLNAME (add_symbolP)) { /* Relocation should be done via the associated 'bal' entry - point symbol. */ + point symbol. */ if (!SF_GET_BALNAME (tc_get_bal_of_call (add_symbolP))) { @@ -4210,7 +4266,7 @@ fixup_segment (segP, this_segment_type) { /* Difference of 2 symbols from same segment. Can't make difference of 2 undefineds: 'value' means - something different for N_UNDF. */ + something different for N_UNDF. */ #ifdef TC_I960 /* Makes no sense to use the difference of 2 arbitrary symbols as the target of a call instruction. */ @@ -4237,7 +4293,7 @@ fixup_segment (segP, this_segment_type) } else { - /* Different segments in subtraction. */ + /* Different segments in subtraction. */ know (!(S_IS_EXTERNAL (sub_symbolP) && (S_GET_SEGMENT (sub_symbolP) == absolute_section))); if ((S_GET_SEGMENT (sub_symbolP) == absolute_section)) @@ -4246,7 +4302,7 @@ fixup_segment (segP, this_segment_type) } #ifdef DIFF_EXPR_OK else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type -#if 0 /* Okay for 68k, at least... */ +#if 0 /* Okay for 68k, at least... */ && !pcrel #endif ) @@ -4306,7 +4362,7 @@ fixup_segment (segP, this_segment_type) the i386 are relaxed, this could only arise with a call instruction. */ - pcrel = 0; /* Lie. Don't want further pcrel processing. */ + pcrel = 0; /* Lie. Don't want further pcrel processing. */ if (!TC_FORCE_RELOCATION (fixP)) { fixP->fx_addsy = NULL; @@ -4332,7 +4388,6 @@ fixup_segment (segP, this_segment_type) break; default: - #if defined(TC_A29K) || (defined(TE_PE) && defined(TC_I386)) || defined(TC_M88K) /* This really should be handled in the linker, but backward compatibility forbids. */ @@ -4367,13 +4422,12 @@ fixup_segment (segP, this_segment_type) /* This is also true for 68k COFF on sysv machines (Checked on Motorola sysv68 R3V6 and R3V7.1, and also on UNIX System V/M68000, Release 1.0 from ATT/Bell Labs) - Philippe De Muyter . */ + Philippe De Muyter . */ if (S_IS_COMMON (add_symbolP)) add_number += S_GET_VALUE (add_symbolP); #endif break; - } /* switch on symbol seg */ } /* if not in local seg */ } /* if there was a + symbol */ @@ -4452,7 +4506,7 @@ fixup_segment (segP, this_segment_type) (unsigned long) (fragP->fr_address + where)); #endif } /* not a bit fix */ - } /* For each fixS in this segment. */ + } /* For each fixS in this segment. */ } /* fixup_segment() */ #endif @@ -4468,9 +4522,9 @@ obj_coff_init_stab_section (seg) char *stabstr_name; unsigned int stroff; - /* Make space for this first symbol. */ + /* Make space for this first symbol. */ p = frag_more (12); - /* Zero it out. */ + /* Zero it out. */ memset (p, 0, 12); as_where (&file, (unsigned int *) NULL); stabstr_name = (char *) alloca (strlen (segment_info[seg].name) + 4); @@ -4495,7 +4549,7 @@ adjust_stab_section(abfd, seg) int i, strsz = 0, nsyms; fragS *frag = segment_info[seg].frchainP->frch_root; - /* Look for the associated string table section. */ + /* Look for the associated string table section. */ secname = segment_info[seg].name; name = (char *) alloca (strlen (secname) + 4); @@ -4512,14 +4566,14 @@ adjust_stab_section(abfd, seg) } } - /* If we found the section, get its size. */ + /* If we found the section, get its size. */ if (stabstrseg != SEG_UNKNOWN) strsz = size_section (abfd, stabstrseg); nsyms = size_section (abfd, seg) / 12 - 1; /* Look for the first frag of sufficient size for the initial stab - symbol, and collect a pointer to it. */ + symbol, and collect a pointer to it. */ while (frag && frag->fr_fix < 12) frag = frag->fr_next; assert (frag != 0); @@ -4527,7 +4581,7 @@ adjust_stab_section(abfd, seg) assert (p != 0); /* Write in the number of stab symbols and the size of the string - table. */ + table. */ bfd_h_put_16 (abfd, (bfd_vma) nsyms, (bfd_byte *) p + 6); bfd_h_put_32 (abfd, (bfd_vma) strsz, (bfd_byte *) p + 8); } @@ -4582,6 +4636,7 @@ const pseudo_typeS coff_pseudo_table[] = /* Support for a COFF emulation. */ static void coff_pop_insert PARAMS ((void)); +static int coff_separate_stab_sections PARAMS ((void)); static void coff_pop_insert () @@ -4589,23 +4644,38 @@ coff_pop_insert () pop_insert (coff_pseudo_table); } +static int +coff_separate_stab_sections () +{ + return 1; +} + const struct format_ops coff_format_ops = { bfd_target_coff_flavour, 0, /* dfl_leading_underscore */ 1, /* emit_section_symbols */ + 0, /* begin */ + c_dot_file_symbol, coff_frob_symbol, 0, /* frob_file */ + 0, /* frob_file_before_adjust */ coff_frob_file_after_relocs, 0, /* s_get_size */ 0, /* s_set_size */ 0, /* s_get_align */ 0, /* s_set_align */ 0, /* s_get_other */ + 0, /* s_set_other */ 0, /* s_get_desc */ + 0, /* s_set_desc */ + 0, /* s_get_type */ + 0, /* s_set_type */ 0, /* copy_symbol_attributes */ 0, /* generate_asm_lineno */ 0, /* process_stab */ + coff_separate_stab_sections, + obj_coff_init_stab_section, 0, /* sec_sym_ok_for_reloc */ coff_pop_insert, 0, /* ecoff_set_ext */ diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h index f60ae36..8cf7999 100644 --- a/contrib/binutils/gas/config/obj-coff.h +++ b/contrib/binutils/gas/config/obj-coff.h @@ -39,7 +39,7 @@ #include "bfd.h" /* This internal_lineno crap is to stop namespace pollution from the - bfd internal coff headerfile. */ + bfd internal coff headerfile. */ #define internal_lineno bfd_internal_lineno #include "coff/internal.h" #undef internal_lineno @@ -149,6 +149,11 @@ #define TARGET_FORMAT "coff-tic30" #endif +#ifdef TC_TIC54X +#include "coff/tic54x.h" +#define TARGET_FORMAT "coff1-c54x" +#endif + #ifdef TC_TIC80 #include "coff/tic80.h" #define TARGET_FORMAT "coff-tic80" @@ -250,7 +255,7 @@ extern void obj_coff_section PARAMS ((int)); /* The number of auxiliary entries */ #define S_SET_NUMBER_AUXILIARY(s,v) (S_GET_NUMBER_AUXILIARY (s) = (v)) -/* True if a symbol name is in the string table, i.e. its length is > 8. */ +/* True if a symbol name is in the string table, i.e. its length is > 8. */ #define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0) extern int S_SET_DATA_TYPE PARAMS ((symbolS *, int)); @@ -294,13 +299,13 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *)); * differently. */ -#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */ +#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */ #define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */ #define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */ #define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */ #define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */ -#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */ +#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */ #define SF_STATICS (0x00001000) /* Mark the .text & all symbols */ #define SF_DEFINED (0x00002000) /* Symbol is defined in this file */ @@ -314,8 +319,8 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *)); #define SF_TAGGED (0x00040000) /* Is associated with a tag */ #define SF_TAG (0x00080000) /* Is a tag */ #define SF_DEBUG (0x00100000) /* Is in debug or abs section */ -#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */ -/* All other bits are unused. */ +#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */ +/* All other bits are unused. */ /* Accessors */ #define SF_GET(s) (*symbol_get_obj (s)) @@ -341,7 +346,7 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *)); /* Modifiers */ #define SF_SET(s,v) (SF_GET (s) = (v)) -#define SF_SET_NORMAL_FIELD(s,v)(SF_GET (s) |= ((v) & SF_NORMAL_MASK)) +#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK)) #define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK)) #define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE) #define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS) @@ -368,8 +373,7 @@ extern int coff_n_line_nos; #define obj_emit_lineno(WHERE,LINE,FILE_START) abort () extern void coff_add_linesym PARAMS ((symbolS *)); - -void c_dot_file_symbol PARAMS ((char *filename)); +void c_dot_file_symbol PARAMS ((const char *filename)); #define obj_app_file c_dot_file_symbol extern void coff_frob_symbol PARAMS ((symbolS *, int *)); @@ -430,10 +434,9 @@ hey ! Where is the C_LEAFSTAT definition ? i960 - coff support is depending on i extern const segT N_TYPE_seg[]; -/* Magic number of paged executable. */ +/* Magic number of paged executable. */ #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE 0x8300 - /* SYMBOL TABLE */ /* Symbol table entry data type */ @@ -442,7 +445,7 @@ typedef struct { /* Basic symbol */ struct internal_syment ost_entry; - /* Auxiliary entry. */ + /* Auxiliary entry. */ union internal_auxent ost_auxent[OBJ_COFF_MAX_AUXENTRIES]; /* obj_coff internal use only flags */ unsigned int ost_flags; @@ -502,7 +505,7 @@ typedef struct */ #define S_IS_COMMON(s) ((s)->sy_symbol.ost_entry.n_scnum == 0 \ && S_GET_VALUE (s) != 0) -/* True if a symbol name is in the string table, i.e. its length is > 8. */ +/* True if a symbol name is in the string table, i.e. its length is > 8. */ #define S_IS_STRING(s) (strlen(S_GET_NAME(s)) > 8 ? 1 : 0) /* True if a symbol is defined as weak. */ @@ -517,7 +520,7 @@ typedef struct /* Accessors */ /* The name of the symbol */ -#define S_GET_NAME(s) ((char*)(s)->sy_symbol.ost_entry.n_offset) +#define S_GET_NAME(s) ((char*) (s)->sy_symbol.ost_entry.n_offset) /* The pointer to the string table */ #define S_GET_OFFSET(s) ((s)->sy_symbol.ost_entry.n_offset) /* The numeric value of the segment */ @@ -531,7 +534,7 @@ typedef struct /* Modifiers */ /* Set the name of the symbol */ -#define S_SET_NAME(s,v) ((s)->sy_symbol.ost_entry.n_offset = (unsigned long)(v)) +#define S_SET_NAME(s,v) ((s)->sy_symbol.ost_entry.n_offset = (unsigned long) (v)) /* Set the offset of the symbol */ #define S_SET_OFFSET(s,v) ((s)->sy_symbol.ost_entry.n_offset = (v)) /* The numeric value of the segment */ @@ -591,13 +594,13 @@ typedef struct * differently. */ -#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */ +#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */ #define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */ #define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */ #define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */ #define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */ -#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */ +#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */ #define SF_STATICS (0x00001000) /* Mark the .text & all symbols */ #define SF_DEFINED (0x00002000) /* Symbol is defined in this file */ @@ -611,9 +614,9 @@ typedef struct #define SF_TAGGED (0x00040000) /* Is associated with a tag */ #define SF_TAG (0x00080000) /* Is a tag */ #define SF_DEBUG (0x00100000) /* Is in debug or abs section */ -#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */ +#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */ #define SF_ADJ_LNNOPTR (0x00400000) /* Has a lnnoptr */ -/* All other bits are unused. */ +/* All other bits are unused. */ /* Accessors */ #define SF_GET(s) ((s)->sy_symbol.ost_flags) @@ -639,7 +642,7 @@ typedef struct /* Modifiers */ #define SF_SET(s,v) (SF_GET (s) = (v)) -#define SF_SET_NORMAL_FIELD(s,v)(SF_GET (s) |= ((v) & SF_NORMAL_MASK)) +#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK)) #define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK)) #define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE) #define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS) @@ -674,31 +677,31 @@ typedef struct #endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ #define H_GET_FILE_SIZE(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h) + \ H_GET_SYMBOL_TABLE_SIZE(h) + \ (h)->string_table_size) #define H_GET_TEXT_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ) #define H_GET_DATA_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h)) #define H_GET_BSS_FILE_OFFSET(h) 0 #define H_GET_RELOCATION_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h)) #define H_GET_LINENO_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_RELOCATION_SIZE(h)) #define H_GET_SYMBOL_TABLE_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h)) @@ -728,11 +731,11 @@ typedef struct #define H_GET_LINENO_SIZE(h) ((h)->lineno_size) #ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER -#define H_GET_HEADER_SIZE(h) (sizeof(FILHDR) \ - + sizeof(AOUTHDR)\ +#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \ + + sizeof (AOUTHDR)\ + (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ)) #else /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ -#define H_GET_HEADER_SIZE(h) (sizeof(FILHDR) \ +#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \ + (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ)) #endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ @@ -767,17 +770,15 @@ typedef struct typedef struct { struct internal_aouthdr aouthdr; /* a.out header */ - struct internal_filehdr filehdr; /* File header, not machine dep. */ - long string_table_size; /* names + '\0' + sizeof(int) */ + struct internal_filehdr filehdr; /* File header, not machine dep. */ + long string_table_size; /* names + '\0' + sizeof (int) */ long relocation_size; /* Cumulated size of relocation information for all sections in - bytes. */ + bytes. */ long lineno_size; /* Size of the line number information table in bytes */ } object_headers; - - struct lineno_list { struct bfd_internal_lineno line; @@ -785,9 +786,6 @@ struct lineno_list struct lineno_list *next; /* Forward chain pointer */ }; - - - #define obj_segment_name(i) (segment_info[(int) (i)].scnhdr.s_name) #define obj_add_segment(s) obj_coff_add_segment (s) diff --git a/contrib/binutils/gas/config/obj-ecoff.c b/contrib/binutils/gas/config/obj-ecoff.c index 767dc58..3f80e7d 100644 --- a/contrib/binutils/gas/config/obj-ecoff.c +++ b/contrib/binutils/gas/config/obj-ecoff.c @@ -34,6 +34,7 @@ static int ecoff_sec_sym_ok_for_reloc PARAMS ((asection *)); static void obj_ecoff_frob_symbol PARAMS ((symbolS *, int *)); static void ecoff_pop_insert PARAMS ((void)); +static int ecoff_separate_stab_sections PARAMS ((void)); /* These are the pseudo-ops we support in this file. Only those relating to debugging information are supported here. @@ -84,7 +85,7 @@ const pseudo_typeS obj_pseudo_table[] = { "extern", ecoff_directive_extern, 0 }, #ifndef TC_MIPS - /* For TC_MIPS, tc-mips.c adds this. */ + /* For TC_MIPS, tc-mips.c adds this. */ { "weakext", ecoff_directive_weakext, 0 }, #endif @@ -290,26 +291,44 @@ ecoff_pop_insert () pop_insert (obj_pseudo_table); } +static int +ecoff_separate_stab_sections () +{ + return 0; +} + const struct format_ops ecoff_format_ops = { bfd_target_ecoff_flavour, 0, /* dfl_leading_underscore */ + + /* FIXME: A comment why emit_section_symbols is different here (1) from + the single-format definition (0) would be in order. */ 1, /* emit_section_symbols */ + 0, /* begin */ + ecoff_new_file, obj_ecoff_frob_symbol, ecoff_frob_file, + 0, /* frob_file_before_adjust */ 0, /* frob_file_after_relocs */ 0, /* s_get_size */ 0, /* s_set_size */ 0, /* s_get_align */ 0, /* s_set_align */ 0, /* s_get_other */ + 0, /* s_set_other */ 0, /* s_get_desc */ + 0, /* s_set_desc */ + 0, /* s_get_type */ + 0, /* s_set_type */ 0, /* copy_symbol_attributes */ ecoff_generate_asm_lineno, ecoff_stab, + ecoff_separate_stab_sections, + 0, /* init_stab_section */ ecoff_sec_sym_ok_for_reloc, ecoff_pop_insert, ecoff_set_ext, ecoff_read_begin_hook, - ecoff_symbol_new_hook, + ecoff_symbol_new_hook }; diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c index 21fd0fa..d56eaa9 100644 --- a/contrib/binutils/gas/config/obj-elf.c +++ b/contrib/binutils/gas/config/obj-elf.c @@ -17,7 +17,7 @@ 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. */ + 02111-1307, USA. */ #define OBJ_HEADER "obj-elf.h" #include "as.h" @@ -54,9 +54,12 @@ static bfd_vma elf_s_get_size PARAMS ((symbolS *)); static void elf_s_set_size PARAMS ((symbolS *, bfd_vma)); static bfd_vma elf_s_get_align PARAMS ((symbolS *)); static void elf_s_set_align PARAMS ((symbolS *, bfd_vma)); +static void elf_s_set_other PARAMS ((symbolS *, int)); static void elf_copy_symbol_attributes PARAMS ((symbolS *, symbolS *)); static int elf_sec_sym_ok_for_reloc PARAMS ((asection *)); static void adjust_stab_sections PARAMS ((bfd *, asection *, PTR)); +static int elf_separate_stab_sections PARAMS ((void)); +static void elf_init_stab_section PARAMS ((segT)); #ifdef NEED_ECOFF_DEBUG static boolean elf_get_extr PARAMS ((asymbol *, EXTR *)); @@ -72,8 +75,6 @@ static void obj_elf_weak PARAMS ((int)); static void obj_elf_local PARAMS ((int)); static void obj_elf_visibility PARAMS ((int)); static void obj_elf_symver PARAMS ((int)); -static void obj_elf_vtable_inherit PARAMS ((int)); -static void obj_elf_vtable_entry PARAMS ((int)); static void obj_elf_subsection PARAMS ((int)); static void obj_elf_popsection PARAMS ((int)); @@ -95,7 +96,7 @@ static const pseudo_typeS elf_pseudo_table[] = {"version", obj_elf_version, 0}, {"weak", obj_elf_weak, 0}, - /* These define symbol visibility. */ + /* These define symbol visibility. */ {"internal", obj_elf_visibility, STV_INTERNAL}, {"hidden", obj_elf_visibility, STV_HIDDEN}, {"protected", obj_elf_visibility, STV_PROTECTED}, @@ -110,10 +111,10 @@ static const pseudo_typeS elf_pseudo_table[] = {"subsection", obj_elf_subsection, 0}, /* These are GNU extensions to aid in garbage collecting C++ vtables. */ - {"vtable_inherit", obj_elf_vtable_inherit, 0}, - {"vtable_entry", obj_elf_vtable_entry, 0}, + {"vtable_inherit", (void (*) PARAMS ((int))) &obj_elf_vtable_inherit, 0}, + {"vtable_entry", (void (*) PARAMS ((int))) &obj_elf_vtable_entry, 0}, - /* These are used for dwarf. */ + /* These are used for dwarf. */ {"2byte", cons, 2}, {"4byte", cons, 4}, {"8byte", cons, 8}, @@ -234,6 +235,14 @@ elf_s_get_other (sym) } static void +elf_s_set_other (sym, other) + symbolS *sym; + int other; +{ + S_SET_OTHER (sym, other); +} + +static void elf_copy_symbol_attributes (dest, src) symbolS *dest, *src; { @@ -249,7 +258,7 @@ elf_sec_sym_ok_for_reloc (sec) void elf_file_symbol (s) - char *s; + const char *s; { symbolS *sym; @@ -533,7 +542,6 @@ obj_elf_visibility (visibility) demand_empty_rest_of_line (); } - static segT previous_section; static int previous_subsection; @@ -546,7 +554,6 @@ struct section_stack static struct section_stack *section_stack; - /* Handle the .section pseudo-op. This code supports two different syntaxes. @@ -617,8 +624,10 @@ obj_elf_change_section (name, type, attr, push) char *name; int type, attr, push; { - int new_sec; + asection *old_sec; segT sec; + flagword flags; + int i; #ifdef md_flush_pending_output md_flush_pending_output (); @@ -639,49 +648,57 @@ obj_elf_change_section (name, type, attr, push) previous_section = now_seg; previous_subsection = now_subseg; - new_sec = bfd_get_section_by_name (stdoutput, name) == NULL; + old_sec = bfd_get_section_by_name (stdoutput, name); sec = subseg_new (name, 0); - if (new_sec) - { - flagword flags; - symbolS *secsym; - int i; - - /* See if this is one of the special sections. */ - for (i = 0; special_sections[i].name != NULL; i++) - if (strcmp (name, special_sections[i].name) == 0) - { - if (type == SHT_NULL) - type = special_sections[i].type; - else if (type != special_sections[i].type) - as_warn (_("Setting incorrect section type for %s"), name); - - if ((attr &~ special_sections[i].attributes) != 0) + /* See if this is one of the special sections. */ + for (i = 0; special_sections[i].name != NULL; i++) + if (strcmp (name, special_sections[i].name) == 0) + { + if (type == SHT_NULL) + type = special_sections[i].type; + else if (type != special_sections[i].type) + { + if (old_sec == NULL) + { + as_warn (_("Setting incorrect section type for %s"), name); + } + else { - /* As a GNU extension, we permit a .note section to be - allocatable. If the linker sees an allocateable .note - section, it will create a PT_NOTE segment in the output - file. */ - if (strcmp (name, ".note") != 0 - || attr != SHF_ALLOC) - as_warn (_("Setting incorrect section attributes for %s"), - name); + as_warn (_("Ignoring incorrect section type for %s"), name); + type = special_sections[i].type; } - attr |= special_sections[i].attributes; - break; } - - /* Convert ELF type and flags to BFD flags. */ - flags = (SEC_RELOC - | ((attr & SHF_WRITE) ? 0 : SEC_READONLY) - | ((attr & SHF_ALLOC) ? SEC_ALLOC : 0) - | (((attr & SHF_ALLOC) && type != SHT_NOBITS) ? SEC_LOAD : 0) - | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0)); + if ((attr &~ special_sections[i].attributes) != 0 + && old_sec == NULL) + { + /* As a GNU extension, we permit a .note section to be + allocatable. If the linker sees an allocateable .note + section, it will create a PT_NOTE segment in the output + file. */ + if (strcmp (name, ".note") != 0 + || attr != SHF_ALLOC) + as_warn (_("Setting incorrect section attributes for %s"), + name); + } + attr |= special_sections[i].attributes; + break; + } + + /* Convert ELF type and flags to BFD flags. */ + flags = (SEC_RELOC + | ((attr & SHF_WRITE) ? 0 : SEC_READONLY) + | ((attr & SHF_ALLOC) ? SEC_ALLOC : 0) + | (((attr & SHF_ALLOC) && type != SHT_NOBITS) ? SEC_LOAD : 0) + | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0)); #ifdef md_elf_section_flags - flags = md_elf_section_flags (flags, attr, type); + flags = md_elf_section_flags (flags, attr, type); #endif + if (old_sec == NULL) + { + symbolS *secsym; + /* Prevent SEC_HAS_CONTENTS from being inadvertently set. */ if (type == SHT_NOBITS) seg_info (sec)->bss = 1; @@ -695,9 +712,19 @@ obj_elf_change_section (name, type, attr, push) else symbol_table_insert (section_symbol (sec)); } + else if (attr != 0) + { + /* If section attributes are specified the second time we see a + particular section, then check that they are the same as we + saw the first time. */ + if ((old_sec->flags ^ flags) + & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE + | SEC_EXCLUDE | SEC_SORT_ENTRIES)) + as_warn (_("Ignoring changed section attributes for %s"), name); + } #ifdef md_elf_section_change_hook - md_elf_section_change_hook (); + md_elf_section_change_hook (); #endif } @@ -802,7 +829,7 @@ obj_elf_section (push) char mri_type; #ifdef md_flush_pending_output - md_flush_pending_output (); + md_flush_pending_output (); #endif previous_section = now_seg; @@ -1054,7 +1081,7 @@ obj_elf_line (ignore) int ignore ATTRIBUTE_UNUSED; { /* Assume delimiter is part of expression. BSD4.2 as fails with - delightful bug, so we are not being incompatible here. */ + delightful bug, so we are not being incompatible here. */ new_logical_line ((char *) NULL, (int) (get_absolute_expression ())); demand_empty_rest_of_line (); } @@ -1080,14 +1107,6 @@ obj_elf_symver (ignore) *input_line_pointer = c; - if (symbol_get_obj (sym)->versioned_name != NULL) - { - as_bad (_("multiple .symver directives for symbol `%s'"), - S_GET_NAME (sym)); - ignore_rest_of_line (); - return; - } - SKIP_WHITESPACE (); if (*input_line_pointer != ',') { @@ -1106,16 +1125,34 @@ obj_elf_symver (ignore) *input_line_pointer++ = c; } - symbol_get_obj (sym)->versioned_name = xstrdup (name); + if (symbol_get_obj (sym)->versioned_name == NULL) + { + symbol_get_obj (sym)->versioned_name = xstrdup (name); - *input_line_pointer = c; + *input_line_pointer = c; - if (strchr (symbol_get_obj (sym)->versioned_name, ELF_VER_CHR) == NULL) + if (strchr (symbol_get_obj (sym)->versioned_name, + ELF_VER_CHR) == NULL) + { + as_bad (_("missing version name in `%s' for symbol `%s'"), + symbol_get_obj (sym)->versioned_name, + S_GET_NAME (sym)); + ignore_rest_of_line (); + return; + } + } + else { - as_bad (_("missing version name in `%s' for symbol `%s'"), - symbol_get_obj (sym)->versioned_name, S_GET_NAME (sym)); - ignore_rest_of_line (); - return; + if (strcmp (symbol_get_obj (sym)->versioned_name, name)) + { + as_bad (_("multiple versions [`%s'|`%s'] for symbol `%s'"), + name, symbol_get_obj (sym)->versioned_name, + S_GET_NAME (sym)); + ignore_rest_of_line (); + return; + } + + *input_line_pointer = c; } demand_empty_rest_of_line (); @@ -1125,7 +1162,7 @@ obj_elf_symver (ignore) to the linker the hierarchy in which a particular table resides. The syntax is ".vtable_inherit CHILDNAME, PARENTNAME". */ -static void +struct fix * obj_elf_vtable_inherit (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -1158,7 +1195,7 @@ obj_elf_vtable_inherit (ignore) { as_bad ("expected comma after name in .vtable_inherit"); ignore_rest_of_line (); - return; + return NULL; } ++input_line_pointer; @@ -1185,19 +1222,19 @@ obj_elf_vtable_inherit (ignore) demand_empty_rest_of_line (); if (bad) - return; + return NULL; assert (symbol_get_value_expression (csym)->X_op == O_constant); - fix_new (symbol_get_frag (csym), - symbol_get_value_expression (csym)->X_add_number, 0, psym, 0, 0, - BFD_RELOC_VTABLE_INHERIT); + return fix_new (symbol_get_frag (csym), + symbol_get_value_expression (csym)->X_add_number, + 0, psym, 0, 0, BFD_RELOC_VTABLE_INHERIT); } /* This handles the .vtable_entry pseudo-op, which is used to indicate to the linker that a vtable slot was used. The syntax is ".vtable_entry tablename, offset". */ -static void +struct fix * obj_elf_vtable_entry (ignore) int ignore ATTRIBUTE_UNUSED; { @@ -1219,7 +1256,7 @@ obj_elf_vtable_entry (ignore) { as_bad ("expected comma after name in .vtable_entry"); ignore_rest_of_line (); - return; + return NULL; } ++input_line_pointer; @@ -1228,10 +1265,10 @@ obj_elf_vtable_entry (ignore) offset = get_absolute_expression (); - fix_new (frag_now, frag_now_fix (), 0, sym, offset, 0, - BFD_RELOC_VTABLE_ENTRY); - demand_empty_rest_of_line (); + + return fix_new (frag_now, frag_now_fix (), 0, sym, offset, 0, + BFD_RELOC_VTABLE_ENTRY); } void @@ -1277,7 +1314,7 @@ obj_elf_version (ignore) SKIP_WHITESPACE (); if (*input_line_pointer == '\"') { - ++input_line_pointer; /* -> 1st char of string. */ + ++input_line_pointer; /* -> 1st char of string. */ name = input_line_pointer; while (is_a_char (c = next_char_of_string ())) @@ -1370,7 +1407,7 @@ obj_elf_size (ignore) } /* Handle the ELF .type pseudo-op. This sets the type of a symbol. - There are four syntaxes: + There are five syntaxes: The first (used on Solaris) is .type SYM,#function @@ -1380,6 +1417,8 @@ obj_elf_size (ignore) .type SYM STT_FUNC The fourth (used on NetBSD/Arm and Linux/ARM) is .type SYM,%function + The fifth (used on SVR4/860) is + .type SYM,"function" */ static void @@ -1391,10 +1430,12 @@ obj_elf_type (ignore) int type; const char *typename; symbolS *sym; + elf_symbol_type *elfsym; name = input_line_pointer; c = get_symbol_end (); sym = symbol_find_or_make (name); + elfsym = (elf_symbol_type *) symbol_get_bfdsym (sym); *input_line_pointer = c; SKIP_WHITESPACE (); @@ -1404,6 +1445,7 @@ obj_elf_type (ignore) SKIP_WHITESPACE (); if ( *input_line_pointer == '#' || *input_line_pointer == '@' + || *input_line_pointer == '"' || *input_line_pointer == '%') ++input_line_pointer; @@ -1417,12 +1459,19 @@ obj_elf_type (ignore) else if (strcmp (typename, "object") == 0 || strcmp (typename, "STT_OBJECT") == 0) type = BSF_OBJECT; +#ifdef md_elf_symbol_type + else if ((type = md_elf_symbol_type (typename, sym, elfsym)) != -1) + ; +#endif else as_bad (_("ignoring unrecognized symbol type \"%s\""), typename); *input_line_pointer = c; - symbol_get_bfdsym (sym)->flags |= type; + if (*input_line_pointer == '"') + ++input_line_pointer; + + elfsym->symbol.flags |= type; demand_empty_rest_of_line (); } @@ -1471,9 +1520,9 @@ obj_elf_init_stab_section (seg) UnixWare ar crashes. */ bfd_set_section_alignment (stdoutput, seg, 2); - /* Make space for this first symbol. */ + /* Make space for this first symbol. */ p = frag_more (12); - /* Zero it out. */ + /* Zero it out. */ memset (p, 0, 12); as_where (&file, (unsigned int *) NULL); stabstr_name = (char *) alloca (strlen (segment_name (seg)) + 4); @@ -1605,6 +1654,11 @@ elf_frob_symbol (symp, puntp) if (sy_obj->versioned_name != NULL) { + char *p; + + p = strchr (sy_obj->versioned_name, ELF_VER_CHR); + know (p != NULL); + /* This symbol was given a new name with the .symver directive. If this is an external reference, just rename the symbol to @@ -1618,13 +1672,9 @@ elf_frob_symbol (symp, puntp) if (! S_IS_DEFINED (symp)) { - char *p; - /* Verify that the name isn't using the @@ syntax--this is reserved for definitions of the default version to link against. */ - p = strchr (sy_obj->versioned_name, ELF_VER_CHR); - know (p != NULL); if (p[1] == ELF_VER_CHR) { as_bad (_("invalid attempt to declare external version name as default in symbol `%s'"), @@ -1635,36 +1685,50 @@ elf_frob_symbol (symp, puntp) } else { - symbolS *symp2; + if (p [1] == ELF_VER_CHR && p [2] == ELF_VER_CHR) + { + size_t l; + + /* The @@@ syntax is a special case. It renames the + symbol name to versioned_name with one `@' removed. */ + l = strlen (&p[3]) + 1; + memmove (&p [2], &p[3], l); + S_SET_NAME (symp, sy_obj->versioned_name); + } + else + { + symbolS *symp2; - /* FIXME: Creating a new symbol here is risky. We're in the - final loop over the symbol table. We can get away with - it only because the symbol goes to the end of the list, - where the loop will still see it. It would probably be - better to do this in obj_frob_file_before_adjust. */ + /* FIXME: Creating a new symbol here is risky. We're + in the final loop over the symbol table. We can + get away with it only because the symbol goes to + the end of the list, where the loop will still see + it. It would probably be better to do this in + obj_frob_file_before_adjust. */ - symp2 = symbol_find_or_make (sy_obj->versioned_name); + symp2 = symbol_find_or_make (sy_obj->versioned_name); - /* Now we act as though we saw symp2 = sym. */ + /* Now we act as though we saw symp2 = sym. */ - S_SET_SEGMENT (symp2, S_GET_SEGMENT (symp)); + S_SET_SEGMENT (symp2, S_GET_SEGMENT (symp)); - /* Subtracting out the frag address here is a hack because - we are in the middle of the final loop. */ - S_SET_VALUE (symp2, - (S_GET_VALUE (symp) - - symbol_get_frag (symp)->fr_address)); + /* Subtracting out the frag address here is a hack + because we are in the middle of the final loop. */ + S_SET_VALUE (symp2, + (S_GET_VALUE (symp) + - symbol_get_frag (symp)->fr_address)); - symbol_set_frag (symp2, symbol_get_frag (symp)); + symbol_set_frag (symp2, symbol_get_frag (symp)); - /* This will copy over the size information. */ - copy_symbol_attributes (symp2, symp); + /* This will copy over the size information. */ + copy_symbol_attributes (symp2, symp); - if (S_IS_WEAK (symp)) - S_SET_WEAK (symp2); + if (S_IS_WEAK (symp)) + S_SET_WEAK (symp2); - if (S_IS_EXTERNAL (symp)) - S_SET_EXTERNAL (symp2); + if (S_IS_EXTERNAL (symp)) + S_SET_EXTERNAL (symp2); + } } } @@ -1715,6 +1779,42 @@ elf_frob_file () #endif } +/* It removes any unneeded versioned symbols from the symbol table. */ + +void +elf_frob_file_before_adjust () +{ + if (symbol_rootP) + { + symbolS *symp; + + for (symp = symbol_rootP; symp; symp = symbol_next (symp)) + if (symbol_get_obj (symp)->versioned_name) + { + if (!S_IS_DEFINED (symp)) + { + char *p; + + /* The @@@ syntax is a special case. If the symbol is + not defined, 2 `@'s will be removed from the + versioned_name. */ + + p = strchr (symbol_get_obj (symp)->versioned_name, + ELF_VER_CHR); + know (p != NULL); + if (p [1] == ELF_VER_CHR && p [2] == ELF_VER_CHR) + { + size_t l = strlen (&p[3]) + 1; + memmove (&p [1], &p[3], l); + } + if (symbol_used_p (symp) == 0 + && symbol_used_in_reloc_p (symp) == 0) + symbol_remove (symp, &symbol_rootP, &symbol_lastP); + } + } + } +} + /* It is required that we let write_relocs have the opportunity to optimize away fixups before output has begun, since it is possible to eliminate all fixups for a section and thus we never should @@ -1890,18 +1990,45 @@ sco_id () #endif /* SCO_ELF */ +static int +elf_separate_stab_sections () +{ +#ifdef NEED_ECOFF_DEBUG + return (!ECOFF_DEBUGGING); +#else + return 1; +#endif +} + +static void +elf_init_stab_section (seg) + segT seg; +{ +#ifdef NEED_ECOFF_DEBUG + if (!ECOFF_DEBUGGING) +#endif + obj_elf_init_stab_section (seg); +} + const struct format_ops elf_format_ops = { bfd_target_elf_flavour, 0, /* dfl_leading_underscore */ 1, /* emit_section_symbols */ + elf_begin, + elf_file_symbol, elf_frob_symbol, elf_frob_file, + elf_frob_file_before_adjust, elf_frob_file_after_relocs, elf_s_get_size, elf_s_set_size, elf_s_get_align, elf_s_set_align, elf_s_get_other, + elf_s_set_other, 0, /* s_get_desc */ + 0, /* s_set_desc */ + 0, /* s_get_type */ + 0, /* s_set_type */ elf_copy_symbol_attributes, #ifdef NEED_ECOFF_DEBUG ecoff_generate_asm_lineno, @@ -1910,6 +2037,8 @@ const struct format_ops elf_format_ops = 0, /* generate_asm_lineno */ 0, /* process_stab */ #endif + elf_separate_stab_sections, + elf_init_stab_section, elf_sec_sym_ok_for_reloc, elf_pop_insert, #ifdef NEED_ECOFF_DEBUG @@ -1918,5 +2047,5 @@ const struct format_ops elf_format_ops = 0, /* ecoff_set_ext */ #endif elf_obj_read_begin_hook, - elf_obj_symbol_new_hook, + elf_obj_symbol_new_hook }; diff --git a/contrib/binutils/gas/config/obj-elf.h b/contrib/binutils/gas/config/obj-elf.h index 722c5fd..43daf64 100644 --- a/contrib/binutils/gas/config/obj-elf.h +++ b/contrib/binutils/gas/config/obj-elf.h @@ -6,7 +6,7 @@ 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 1, or (at your option) + 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, @@ -19,7 +19,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - /* HP PA-RISC support was contributed by the Center for Software Science at the University of Utah. */ @@ -28,11 +27,14 @@ #define OBJ_ELF 1 +/* Note that all macros in this file should be wrapped in #ifndef, for + sake of obj-multi.h which includes this file. */ + #ifndef OUTPUT_FLAVOR #define OUTPUT_FLAVOR bfd_target_elf_flavour #endif -#include +#include "bfd.h" #define BYTES_IN_WORD 4 /* for now */ #include "bfd/elf-bfd.h" @@ -40,7 +42,7 @@ #include "targ-cpu.h" #ifdef TC_ALPHA -#define ECOFF_DEBUGGING alpha_flag_mdebug +#define ECOFF_DEBUGGING (alpha_flag_mdebug > 0) extern int alpha_flag_mdebug; #endif @@ -83,16 +85,26 @@ struct elf_obj_sy #define OBJ_SYMFIELD_TYPE struct elf_obj_sy +/* Symbol fields used by the ELF back end. */ +#define ELF_TARGET_SYMBOL_FIELDS int local:1; + +/* Don't change this; change ELF_TARGET_SYMBOL_FIELDS instead. */ +#define TARGET_SYMBOL_FIELDS ELF_TARGET_SYMBOL_FIELDS + +/* #include "targ-cpu.h" */ + #ifndef FALSE #define FALSE 0 #define TRUE !FALSE #endif +#ifndef obj_begin #define obj_begin() elf_begin () +#endif extern void elf_begin PARAMS ((void)); /* should be conditional on address size! */ -#define elf_symbol(asymbol) ((elf_symbol_type *)(&(asymbol)->the_bfd)) +#define elf_symbol(asymbol) ((elf_symbol_type *) (&(asymbol)->the_bfd)) #ifndef S_GET_SIZE #define S_GET_SIZE(S) \ @@ -128,13 +140,20 @@ extern asection *gdb_section; #endif extern void elf_frob_file PARAMS ((void)); +#ifndef obj_frob_file_before_adjust +#define obj_frob_file_before_adjust elf_frob_file_before_adjust +#endif +extern void elf_frob_file_before_adjust PARAMS ((void)); + #ifndef obj_frob_file_after_relocs #define obj_frob_file_after_relocs elf_frob_file_after_relocs #endif extern void elf_frob_file_after_relocs PARAMS ((void)); +#ifndef obj_app_file #define obj_app_file elf_file_symbol -extern void elf_file_symbol PARAMS ((char *)); +#endif +extern void elf_file_symbol PARAMS ((const char *)); extern void obj_elf_section_change_hook PARAMS ((void)); @@ -144,6 +163,8 @@ extern void obj_elf_version PARAMS ((int)); extern void obj_elf_common PARAMS ((int)); extern void obj_elf_data PARAMS ((int)); extern void obj_elf_text PARAMS ((int)); +extern struct fix *obj_elf_vtable_inherit PARAMS ((int)); +extern struct fix *obj_elf_vtable_entry PARAMS ((int)); /* BFD wants to write the udata field, which is a no-no for the globally defined sections. */ @@ -189,6 +210,12 @@ do \ while (0) #endif +#ifndef SEPARATE_STAB_SECTIONS +/* Avoid ifndef each separate macro setting by wrapping the whole of the + stab group on the assumption that whoever sets SEPARATE_STAB_SECTIONS + caters to ECOFF_DEBUGGING and the right setting of INIT_STAB_SECTIONS + and OBJ_PROCESS_STAB too, without needing the tweaks below. */ + /* Stabs go in a separate section. */ #define SEPARATE_STAB_SECTIONS 1 @@ -206,7 +233,7 @@ extern void obj_elf_init_stab_section PARAMS ((segT)); #undef INIT_STAB_SECTION #define INIT_STAB_SECTION(seg) \ - ((void)(ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0))) + ((void) (ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0))) #undef OBJ_PROCESS_STAB #define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \ @@ -214,6 +241,8 @@ extern void obj_elf_init_stab_section PARAMS ((segT)); ecoff_stab ((seg), (what), (string), (type), (other), (desc)) #endif /* ECOFF_DEBUGGING */ +#endif /* SEPARATE_STAB_SECTIONS not defined. */ + extern void elf_frob_symbol PARAMS ((symbolS *, int *)); #ifndef obj_frob_symbol #define obj_frob_symbol(symp, punt) elf_frob_symbol (symp, &punt) diff --git a/contrib/binutils/gas/config/obj-generic.h b/contrib/binutils/gas/config/obj-generic.h index dc18e43..00e4638 100644 --- a/contrib/binutils/gas/config/obj-generic.h +++ b/contrib/binutils/gas/config/obj-generic.h @@ -1,5 +1,5 @@ /* This file is obj-generic.h - Copyright (C) 1987-1992 Free Software Foundation, Inc. + Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -14,18 +14,19 @@ 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. */ + 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. */ /* * This file is obj-generic.h and is intended to be a template for * object format specific header files. */ -/* define an obj specific macro off which target cpu back ends may key. */ +/* define an obj specific macro off which target cpu back ends may key. */ #define OBJ_GENERIC 1 -/* include whatever target cpu is appropriate. */ +/* include whatever target cpu is appropriate. */ #include "targ-cpu.h" /* @@ -65,10 +66,9 @@ typedef void *object_headers; /* symbols may or may not be defined */ #define S_IS_DEFINED(s) (0) - #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE (0) /* your magic number */ -#define OBJ_EMIT_LINENO(a,b,c) /* must be *something*. This no-op's it out. */ +#define OBJ_EMIT_LINENO(a,b,c) /* must be *something*. This no-op's it out. */ /* * Local Variables: @@ -76,5 +76,3 @@ typedef void *object_headers; * fill-column: 131 * End: */ - -/* end of obj-generic.h */ diff --git a/contrib/binutils/gas/config/obj-ieee.c b/contrib/binutils/gas/config/obj-ieee.c index 30a0798..35b49da 100644 --- a/contrib/binutils/gas/config/obj-ieee.c +++ b/contrib/binutils/gas/config/obj-ieee.c @@ -1,5 +1,6 @@ /* obj-format for ieee-695 records. - Copyright (C) 1991, 92, 93, 94, 95, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1991, 92, 93, 94, 95, 97, 98, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -16,19 +17,12 @@ 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. */ + 02111-1307, USA. */ +/* Created by Steve Chamberlain . */ -/* - created by - - steve chamberlain steve@cygnus.com - */ - -/* - this will hopefully become the port through which bfd and gas talk, - for the moment, only ieee is known to work well. - */ +/* This will hopefully become the port through which bfd and gas talk, + for the moment, only ieee is known to work well. */ #include "bfd.h" #include "as.h" @@ -38,11 +32,15 @@ bfd *abfd; -/* How many addresses does the .align take? */ +/* How many addresses does the .align take? */ + static relax_addressT relax_align (address, alignment) - register relax_addressT address; /* Address now. */ - register long alignment; /* Alignment (binary). */ + /* Address now. */ + register relax_addressT address; + + /* Alignment (binary). */ + register long alignment; { relax_addressT mask; relax_addressT new_address; @@ -50,18 +48,20 @@ relax_align (address, alignment) mask = ~((~0) << alignment); new_address = (address + mask) & (~mask); return (new_address - address); -} /* relax_align() */ +} + +/* Calculate the size of the frag chain + and create a bfd section to contain all of it. */ -/* calculate the size of the frag chain and create a bfd section - to contain all of it */ static void -DEFUN (size_section, (abfd, idx), - bfd * abfd AND - unsigned int idx) +size_section (abfd, idx) + bfd *abfd; + unsigned int idx; { asection *sec; unsigned int size = 0; fragS *frag = segment_info[idx].frag_root; + while (frag) { if (frag->fr_address != size) @@ -92,25 +92,28 @@ DEFUN (size_section, (abfd, idx), if (size) { char *name = segment_info[idx].name; + if (name == (char *) NULL) - { - name = ".data"; - } - segment_info[idx].user_stuff = (char *) (sec = bfd_make_section (abfd, name)); - /* Make it output through itself */ + name = ".data"; + + segment_info[idx].user_stuff = + (char *) (sec = bfd_make_section (abfd, name)); + /* Make it output through itself. */ sec->output_section = sec; sec->flags |= SEC_HAS_CONTENTS; bfd_set_section_size (abfd, sec, size); } } -/* run through a frag chain and write out the data to go with it */ +/* Run through a frag chain and write out the data to go with it. */ + static void -DEFUN (fill_section, (abfd, idx), - bfd * abfd AND - unsigned int idx) +fill_section (abfd, idx) + bfd *abfd; + unsigned int idx; { asection *sec = segment_info[idx].user_stuff; + if (sec) { fragS *frag = segment_info[idx].frag_root; @@ -156,16 +159,16 @@ DEFUN (fill_section, (abfd, idx), } } -/* Count the relocations in a chain */ +/* Count the relocations in a chain. */ static unsigned int -DEFUN (count_entries_in_chain, (idx), - unsigned int idx) +count_entries_in_chain (idx) + unsigned int idx; { unsigned int nrelocs; fixS *fixup_ptr; - /* Count the relocations */ + /* Count the relocations. */ fixup_ptr = segment_info[idx].fix_root; nrelocs = 0; while (fixup_ptr != (fixS *) NULL) @@ -176,10 +179,11 @@ DEFUN (count_entries_in_chain, (idx), return nrelocs; } -/* output all the relocations for a section */ +/* Output all the relocations for a section. */ + void -DEFUN (do_relocs_for, (idx), - unsigned int idx) +do_relocs_for (idx) + unsigned int idx; { unsigned int nrelocs; arelent **reloc_ptr_vector; @@ -188,11 +192,13 @@ DEFUN (do_relocs_for, (idx), asection *section = (asection *) (segment_info[idx].user_stuff); unsigned int i; fixS *from; + if (section) { nrelocs = count_entries_in_chain (idx); - reloc_ptr_vector = (arelent **) malloc ((nrelocs + 1) * sizeof (arelent *)); + reloc_ptr_vector = + (arelent **) malloc ((nrelocs + 1) * sizeof (arelent *)); reloc_vector = (arelent *) malloc (nrelocs * sizeof (arelent)); ptrs = (asymbol **) malloc (nrelocs * sizeof (asymbol *)); from = segment_info[idx].fix_root; @@ -203,8 +209,10 @@ DEFUN (do_relocs_for, (idx), reloc_ptr_vector[i] = to; to->howto = (reloc_howto_type *) (from->fx_r_type); -#if 0 /* We can't represent complicated things in a reloc yet */ - if (from->fx_addsy == 0 || from->fx_subsy != 0) abort(); +#if 0 + /* We can't represent complicated things in a reloc yet. */ + if (from->fx_addsy == 0 || from->fx_subsy != 0) + abort (); #endif s = &(from->fx_addsy->sy_symbol.sy); @@ -218,7 +226,7 @@ DEFUN (do_relocs_for, (idx), If this relocation is pcrelative, and we know the destination, we still want to keep the relocation - since the linker might relax some of the bytes, but it stops - being pc relative and turns into an absolute relocation. */ + being pc relative and turns into an absolute relocation. */ if (s) { if ((s->flags & BSF_UNDEFINED) == 0) @@ -233,10 +241,9 @@ DEFUN (do_relocs_for, (idx), to->sym_ptr_ptr = 0; if (to->howto->pcrel_offset) - { - /* This is a pcrel relocation, the addend should be adjusted */ - to->addend -= to->address + 1; - } + /* This is a pcrel relocation, the addend should + be adjusted. */ + to->addend -= to->address + 1; } else { @@ -245,33 +252,30 @@ DEFUN (do_relocs_for, (idx), to->sym_ptr_ptr = ptrs; if (to->howto->pcrel_offset) - { - /* This is a pcrel relocation, the addend should be adjusted */ - to->addend -= to->address - 1; - } + /* This is a pcrel relocation, the addend should + be adjusted. */ + to->addend -= to->address - 1; } - } else - { - to->section = 0; - } + to->section = 0; ptrs++; from = from->fx_next; } - /* attatch to the section */ + /* Attatch to the section. */ section->orelocation = reloc_ptr_vector; section->reloc_count = nrelocs; section->flags |= SEC_LOAD; } } -/* do the symbols.. */ +/* Do the symbols. */ + static void -DEFUN (do_symbols, (abfd), - bfd * abfd) +do_symbols (abfd) + bfd *abfd; { extern symbolS *symbol_rootP; symbolS *ptr; @@ -280,7 +284,6 @@ DEFUN (do_symbols, (abfd), unsigned int count = 0; unsigned int index; - for (ptr = symbol_rootP; ptr != (symbolS *) NULL; ptr = ptr->sy_next) @@ -291,9 +294,7 @@ DEFUN (do_symbols, (abfd), (asection *) (segment_info[ptr->sy_symbol.seg].user_stuff); S_SET_VALUE (ptr, S_GET_VALUE (ptr) + ptr->sy_frag->fr_address); if (ptr->sy_symbol.sy.flags == 0) - { - ptr->sy_symbol.sy.flags = BSF_LOCAL; - } + ptr->sy_symbol.sy.flags = BSF_LOCAL; } else { @@ -330,18 +331,15 @@ DEFUN (do_symbols, (abfd), } /* The generic as->bfd converter. Other backends may have special case - code */ + code. */ void -DEFUN_VOID (bfd_as_write_hook) +bfd_as_write_hook () { int i; for (i = SEG_E0; i < SEG_UNKNOWN; i++) - { - size_section (abfd, i); - } - + size_section (abfd, i); for (i = SEG_E0; i < SEG_UNKNOWN; i++) fill_section (abfd, i); @@ -350,7 +348,6 @@ DEFUN_VOID (bfd_as_write_hook) for (i = SEG_E0; i < SEG_UNKNOWN; i++) do_relocs_for (i); - } S_SET_SEGMENT (x, y) @@ -437,7 +434,8 @@ obj_ieee_section (ignore) char *p = input_line_pointer; char *s = p; int i; - /* Look up the name, if it doesn't exist, make it */ + + /* Look up the name, if it doesn't exist, make it. */ while (*p && *p != ' ' && *p != ',' && !is_end_of_line[*p]) { p++; @@ -447,10 +445,7 @@ obj_ieee_section (ignore) if (segment_info[i].hadone) { if (strncmp (segment_info[i].name, s, p - s) == 0) - { - goto ok; - - } + goto ok; } else break; @@ -470,32 +465,26 @@ ok: while (!is_end_of_line[*p]) p++; input_line_pointer = p; - } - void cons (); void s_ignore (); - void s_globl (); const pseudo_typeS obj_pseudo_table[] = { {"section", obj_ieee_section, 0}, - {"data.b", cons, 1}, - {"data.w", cons, 2}, - {"data.l", cons, 4}, - {"export", s_globl, 0}, - {"option", s_ignore, 0}, - {"end", s_ignore, 0}, - {"import", s_ignore, 0}, - {"sdata", stringer, 0}, + {"data.b" , cons , 1}, + {"data.w" , cons , 2}, + {"data.l" , cons , 4}, + {"export" , s_globl , 0}, + {"option" , s_ignore , 0}, + {"end" , s_ignore , 0}, + {"import" , s_ignore , 0}, + {"sdata" , stringer , 0}, 0, - }; - - void obj_symbol_new_hook (symbolP) symbolS *symbolP; @@ -503,13 +492,9 @@ obj_symbol_new_hook (symbolP) symbolP->sy_symbol.sy.the_bfd = abfd; } - - - - #if 1 extern void -DEFUN_VOID (write_object_file) +write_object_file () { int i; struct frchain *frchain_ptr; @@ -531,10 +516,10 @@ DEFUN_VOID (write_object_file) frchain_ptr != (struct frchain *) NULL; frchain_ptr = frchain_ptr->frch_next) { - /* Run through all the sub-segments and align them up. Also close any - open frags. We tack a .fill onto the end of the frag chain so - that any .align's size can be worked by looking at the next - frag. */ + /* Run through all the sub-segments and align them up. Also + close any open frags. We tack a .fill onto the end of the + frag chain so that any .align's size can be worked by looking + at the next frag. */ subseg_set (frchain_ptr->frch_seg, frchain_ptr->frch_subseg); #ifndef SUB_SEGMENT_ALIGN @@ -547,18 +532,19 @@ DEFUN_VOID (write_object_file) } /* Now build one big frag chain for each segment, linked through - fr_next. */ + fr_next. */ for (i = SEG_E0; i < SEG_UNKNOWN; i++) { - fragS **prev_frag_ptr_ptr; struct frchain *next_frchain_ptr; - /* struct frag **head_ptr = segment_info[i].frag_root;*/ +#if 0 + struct frag **head_ptr = segment_info[i].frag_root; +#endif segment_info[i].frag_root = segment_info[i].frchainP->frch_root; #if 0 - /* Im not sure what this is for */ + /* I'm not sure what this is for. */ for (frchain_ptr = segment_info[i].frchainP->frch_root; frchain_ptr != (struct frchain *) NULL; frchain_ptr = frchain_ptr->frch_next) @@ -566,17 +552,13 @@ DEFUN_VOID (write_object_file) *head_ptr = frchain_ptr; head_ptr = &frchain_ptr->next; } - - #endif } for (i = SEG_E0; i < SEG_UNKNOWN; i++) - { - relax_segment (segment_info[i].frag_root, i); - } + relax_segment (segment_info[i].frag_root, i); - /* Now the addresses of the frags are correct within the segment */ + /* Now the addresses of the frags are correct within the segment. */ bfd_as_write_hook (); bfd_close (abfd); @@ -623,5 +605,3 @@ H_GET_TEXT_RELOCATION_SIZE () { abort (); } - -/* end of obj-ieee.c */ diff --git a/contrib/binutils/gas/config/obj-ieee.h b/contrib/binutils/gas/config/obj-ieee.h index 4a0f126..fbef1cd 100644 --- a/contrib/binutils/gas/config/obj-ieee.h +++ b/contrib/binutils/gas/config/obj-ieee.h @@ -1,6 +1,5 @@ /* This file is obj-ieee.h - - Copyright (C) 1987-1992 Free Software Foundation, Inc. + Copyright (C) 1987-1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -15,12 +14,13 @@ 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. */ + 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. */ #define BFD 1 -#include +#include "bfd.h" typedef struct { @@ -41,10 +41,6 @@ object_headers; #define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE 1 - int lineno_rootP; - #define IEEE_STYLE - -/* end of obj-ieee.h */ diff --git a/contrib/binutils/gas/config/obj-multi.h b/contrib/binutils/gas/config/obj-multi.h index 42b7eb3..1d68a0c 100644 --- a/contrib/binutils/gas/config/obj-multi.h +++ b/contrib/binutils/gas/config/obj-multi.h @@ -6,7 +6,7 @@ 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 1, or (at your option) + 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, @@ -32,6 +32,16 @@ #define OUTPUT_FLAVOR \ (this_format->flavor) +#define obj_begin() \ + (this_format->begin \ + ? (*this_format->begin) () \ + : (void) 0) + +#define obj_app_file(NAME) \ + (this_format->app_file \ + ? (*this_format->app_file) (NAME) \ + : (void) 0) + #define obj_frob_symbol(S,P) \ (*this_format->frob_symbol) (S, &(P)) @@ -40,6 +50,11 @@ ? (*this_format->frob_file) () \ : (void) 0) +#define obj_frob_file_before_adjust() \ + (this_format->frob_file_before_adjust \ + ? (*this_format->frob_file_before_adjust) () \ + : (void) 0) + #define obj_frob_file_after_relocs() \ (this_format->frob_file_after_relocs \ ? (*this_format->frob_file_after_relocs) () \ @@ -69,21 +84,43 @@ #define S_GET_SIZE \ (*this_format->s_get_size) -#define S_SET_SIZE \ - (*this_format->s_set_size) +#define S_SET_SIZE(S, N) \ + (this_format->s_set_size \ + ? (*this_format->s_set_size) (S, N) \ + : (void) 0) #define S_GET_ALIGN \ (*this_format->s_get_align) -#define S_SET_ALIGN \ - (*this_format->s_set_align) +#define S_SET_ALIGN(S, N) \ + (this_format->s_set_align \ + ? (*this_format->s_set_align) (S, N) \ + : (void) 0) #define S_GET_OTHER \ (*this_format->s_get_other) +#define S_SET_OTHER(S, O) \ + (this_format->s_set_other \ + ? (*this_format->s_set_other) (S, O) \ + : (void) 0) + #define S_GET_DESC \ (*this_format->s_get_desc) +#define S_SET_DESC(S, D) \ + (this_format->s_set_desc \ + ? (*this_format->s_set_desc) (S, D) \ + : (void) 0) + +#define S_GET_TYPE \ + (*this_format->s_get_desc) + +#define S_SET_TYPE(S, T) \ + (this_format->s_set_type \ + ? (*this_format->s_set_type) (S, T) \ + : (void) 0) + #define OBJ_COPY_SYMBOL_ATTRIBUTES(d,s) \ (this_format->copy_symbol_attributes \ ? (*this_format->copy_symbol_attributes) (d, s) \ @@ -94,11 +131,27 @@ ? (*this_format->process_stab) (SEG,W,S,T,O,D) \ : (void) 0) +#define SEPARATE_STAB_SECTIONS \ + ((*this_format->separate_stab_sections) ()) + +#define INIT_STAB_SECTION(S) \ + (this_format->init_stab_section \ + ? (*this_format->init_stab_section) (S) \ + : (void) 0) + +#define EMIT_SECTION_SYMBOLS (this_format->emit_section_symbols) + #ifdef OBJ_MAYBE_ELF /* We need OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined in symbol.c We also need various STAB defines for stab.c */ #include "obj-elf.h" #endif +#ifdef OBJ_MAYBE_AOUT +/* We want aout_process_stab in stabs.c for the aout table. Defining this + macro will have no other effect. */ +#define AOUT_STABS +#endif + #endif /* !OBJ_HEADER */ #endif /* _OBJ_MULTI_H */ diff --git a/contrib/binutils/gas/config/tc-alpha.c b/contrib/binutils/gas/config/tc-alpha.c index 0eed2e2..ae42d95 100644 --- a/contrib/binutils/gas/config/tc-alpha.c +++ b/contrib/binutils/gas/config/tc-alpha.c @@ -1,5 +1,5 @@ /* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU. - Copyright (C) 1989, 93-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1989, 93-98, 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. @@ -58,10 +58,10 @@ #ifdef OBJ_ELF #include "elf/alpha.h" +#include "dwarf2dbg.h" #endif #include - /* Local types */ @@ -71,22 +71,19 @@ #define MAX_INSN_FIXUPS 2 #define MAX_INSN_ARGS 5 -struct alpha_fixup -{ +struct alpha_fixup { expressionS exp; bfd_reloc_code_real_type reloc; }; -struct alpha_insn -{ +struct alpha_insn { unsigned insn; int nfixups; struct alpha_fixup fixups[MAX_INSN_FIXUPS]; unsigned sequence[MAX_INSN_FIXUPS]; }; -enum alpha_macro_arg -{ +enum alpha_macro_arg { MACRO_EOA = 1, MACRO_IR, MACRO_PIR, @@ -100,15 +97,14 @@ enum alpha_macro_arg MACRO_JSR }; -struct alpha_macro -{ +struct alpha_macro { const char *name; void (*emit) PARAMS ((const expressionS *, int, const PTR)); const PTR arg; enum alpha_macro_arg argsets[16]; }; -/* Extra expression types. */ +/* Extra expression types. */ #define O_pregister O_md1 /* O_register, in parentheses */ #define O_cpregister O_md2 /* + a leading comma */ @@ -127,7 +123,6 @@ struct alpha_macro #define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_gprellow) #endif - /* Macros for extracting the type and number of encoded register tokens */ #define is_ir_num(x) (((x) & 32) == 0) @@ -145,14 +140,14 @@ struct alpha_macro #if 1 #define range_signed_16(x) \ - (((offsetT)(x) >> 15) == 0 || ((offsetT)(x) >> 15) == -1) + (((offsetT) (x) >> 15) == 0 || ((offsetT) (x) >> 15) == -1) #define range_signed_32(x) \ - (((offsetT)(x) >> 31) == 0 || ((offsetT)(x) >> 31) == -1) + (((offsetT) (x) >> 31) == 0 || ((offsetT) (x) >> 31) == -1) #else -#define range_signed_16(x) ((offsetT)(x) >= -(offsetT)0x8000 && \ - (offsetT)(x) <= (offsetT)0x7FFF) -#define range_signed_32(x) ((offsetT)(x) >= -(offsetT)0x80000000 && \ - (offsetT)(x) <= (offsetT)0x7FFFFFFF) +#define range_signed_16(x) ((offsetT) (x) >= -(offsetT) 0x8000 && \ + (offsetT) (x) <= (offsetT) 0x7FFF) +#define range_signed_32(x) ((offsetT) (x) >= -(offsetT) 0x80000000 && \ + (offsetT) (x) <= (offsetT) 0x7FFFFFFF) #endif /* Macros for sign extending from 16- and 32-bits. */ @@ -160,36 +155,35 @@ struct alpha_macro but really a predicate should be found to use the non-cast forms. */ #if 1 -#define sign_extend_16(x) ((short)(x)) -#define sign_extend_32(x) ((int)(x)) +#define sign_extend_16(x) ((short) (x)) +#define sign_extend_32(x) ((int) (x)) #else -#define sign_extend_16(x) ((offsetT)(((x) & 0xFFFF) ^ 0x8000) - 0x8000) -#define sign_extend_32(x) ((offsetT)(((x) & 0xFFFFFFFF) \ +#define sign_extend_16(x) ((offsetT) (((x) & 0xFFFF) ^ 0x8000) - 0x8000) +#define sign_extend_32(x) ((offsetT) (((x) & 0xFFFFFFFF) \ ^ 0x80000000) - 0x80000000) #endif /* Macros to build tokens */ -#define set_tok_reg(t, r) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_reg(t, r) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_register, \ (t).X_add_number = (r)) -#define set_tok_preg(t, r) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_preg(t, r) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_pregister, \ (t).X_add_number = (r)) -#define set_tok_cpreg(t, r) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_cpreg(t, r) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_cpregister, \ (t).X_add_number = (r)) -#define set_tok_freg(t, r) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_freg(t, r) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_register, \ - (t).X_add_number = (r)+32) -#define set_tok_sym(t, s, a) (memset(&(t), 0, sizeof(t)), \ + (t).X_add_number = (r) + 32) +#define set_tok_sym(t, s, a) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_symbol, \ (t).X_add_symbol = (s), \ (t).X_add_number = (a)) -#define set_tok_const(t, n) (memset(&(t), 0, sizeof(t)), \ +#define set_tok_const(t, n) (memset (&(t), 0, sizeof (t)), \ (t).X_op = O_constant, \ (t).X_add_number = (n)) - /* Prototypes for all local functions */ @@ -246,6 +240,9 @@ static void s_alpha_end PARAMS ((int)); static void s_alpha_mask PARAMS ((int)); static void s_alpha_frame PARAMS ((int)); static void s_alpha_prologue PARAMS ((int)); +static void s_alpha_file PARAMS ((int)); +static void s_alpha_loc PARAMS ((int)); +static void s_alpha_stab PARAMS ((int)); static void s_alpha_coff_wrapper PARAMS ((int)); #endif #ifdef OBJ_EVAX @@ -269,7 +266,6 @@ static void alpha_align PARAMS ((int, char *, symbolS *, int)); #ifdef RELOC_OP_P static void alpha_adjust_symtab_relocs PARAMS ((bfd *, asection *, PTR)); #endif - /* Generic assembler global variables which must be defined by all targets. */ @@ -306,19 +302,18 @@ const char *md_shortopts = "Fm:gG:"; struct option md_longopts[] = { #define OPTION_32ADDR (OPTION_MD_BASE) { "32addr", no_argument, NULL, OPTION_32ADDR }, -#define OPTION_RELAX (OPTION_32ADDR+1) +#define OPTION_RELAX (OPTION_32ADDR + 1) { "relax", no_argument, NULL, OPTION_RELAX }, #ifdef OBJ_ELF -#define OPTION_MDEBUG (OPTION_RELAX+1) -#define OPTION_NO_MDEBUG (OPTION_MDEBUG+1) +#define OPTION_MDEBUG (OPTION_RELAX + 1) +#define OPTION_NO_MDEBUG (OPTION_MDEBUG + 1) { "mdebug", no_argument, NULL, OPTION_MDEBUG }, { "no-mdebug", no_argument, NULL, OPTION_NO_MDEBUG }, #endif { NULL, no_argument, NULL, 0 } }; -size_t md_longopts_size = sizeof(md_longopts); - +size_t md_longopts_size = sizeof (md_longopts); #ifdef OBJ_EVAX #define AXP_REG_R0 0 @@ -376,7 +371,7 @@ static segT alpha_dtors_section; #endif static segT alpha_lit8_section; -/* Symbols referring to said sections. */ +/* Symbols referring to said sections. */ #ifdef OBJ_ECOFF static symbolS *alpha_lita_symbol; static symbolS *alpha_lit4_symbol; @@ -394,8 +389,8 @@ static offsetT alpha_lit4_literal; static offsetT alpha_lit8_literal; #endif -/* The active .ent symbol. */ #ifdef OBJ_ELF +/* The active .ent symbol. */ static symbolS *alpha_cur_ent_sym; #endif @@ -433,7 +428,7 @@ static int alpha_debug; #ifdef OBJ_ELF /* Whether we are emitting an mdebug section. */ -int alpha_flag_mdebug = 1; +int alpha_flag_mdebug = -1; #endif /* Don't fully resolve relocations, allowing code movement in the linker. */ @@ -475,7 +470,7 @@ static int alpha_flag_show_after_trunc = 0; /* -H */ #define ALPHA_RELOC_TABLE(op) \ &alpha_reloc_op[ ((!USER_RELOC_P (op)) \ ? (abort (), 0) \ - : (int)(op) - (int)O_literal) ] + : (int) (op) - (int) O_literal) ] #define LITUSE_BASE 1 #define LITUSE_BYTOFF 2 @@ -547,13 +542,13 @@ static const struct alpha_reloc_op_tag { }; static const int alpha_num_reloc_op - = sizeof(alpha_reloc_op) / sizeof(*alpha_reloc_op); + = sizeof (alpha_reloc_op) / sizeof (*alpha_reloc_op); /* Maximum # digits needed to hold the largest sequence # */ #define ALPHA_RELOC_DIGITS 25 /* Whether a sequence number is valid. */ -#define ALPHA_RELOC_SEQUENCE_OK(X) ((X) > 0 && ((unsigned)(X)) == (X)) +#define ALPHA_RELOC_SEQUENCE_OK(X) ((X) > 0 && ((unsigned) (X)) == (X)) /* Structure to hold explict sequence information. */ struct alpha_literal_tag @@ -573,14 +568,12 @@ static struct hash_control *alpha_literal_hash; /* A table of CPU names and opcode sets. */ -static const struct cpu_type -{ +static const struct cpu_type { const char *name; unsigned flags; -} cpu_types[] = -{ +} cpu_types[] = { /* Ad hoc convention: cpu number gets palcode, process code doesn't. - This supports usage under DU 4.0b that does ".arch ev4", and + This supports usage under DU 4.0b that does ".arch ev4", and usage in MILO that does -m21064. Probably something more specific like -m21064-pal should be used, but oh well. */ @@ -635,24 +628,24 @@ static const struct alpha_macro alpha_macros[] = { { "ldt", emit_loadstore, "ldt", { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ldb", emit_ldX, (PTR)0, + { "ldb", emit_ldX, (PTR) 0, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ldbu", emit_ldXu, (PTR)0, + { "ldbu", emit_ldXu, (PTR) 0, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ldw", emit_ldX, (PTR)1, + { "ldw", emit_ldX, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ldwu", emit_ldXu, (PTR)1, + { "ldwu", emit_ldXu, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldw", emit_uldX, (PTR)1, + { "uldw", emit_uldX, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldwu", emit_uldXu, (PTR)1, + { "uldwu", emit_uldXu, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldl", emit_uldX, (PTR)2, + { "uldl", emit_uldX, (PTR) 2, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldlu", emit_uldXu, (PTR)2, + { "uldlu", emit_uldXu, (PTR) 2, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "uldq", emit_uldXu, (PTR)3, + { "uldq", emit_uldXu, (PTR) 3, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, { "ldgp", emit_ldgp, NULL, @@ -696,15 +689,15 @@ static const struct alpha_macro alpha_macros[] = { { "stt", emit_loadstore, "stt", { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "stb", emit_stX, (PTR)0, + { "stb", emit_stX, (PTR) 0, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "stw", emit_stX, (PTR)1, + { "stw", emit_stX, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ustw", emit_ustX, (PTR)1, + { "ustw", emit_ustX, (PTR) 1, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ustl", emit_ustX, (PTR)2, + { "ustl", emit_ustX, (PTR) 2, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, - { "ustq", emit_ustX, (PTR)3, + { "ustq", emit_ustX, (PTR) 3, { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } }, /* Arithmetic macros */ @@ -717,11 +710,11 @@ static const struct alpha_macro alpha_macros[] = { { "absq" emit_absq, 2, { EXP, IR } }, #endif - { "sextb", emit_sextX, (PTR)0, + { "sextb", emit_sextX, (PTR) 0, { MACRO_IR, MACRO_IR, MACRO_EOA, MACRO_IR, MACRO_EOA, /* MACRO_EXP, MACRO_IR, MACRO_EOA */ } }, - { "sextw", emit_sextX, (PTR)1, + { "sextw", emit_sextX, (PTR) 1, { MACRO_IR, MACRO_IR, MACRO_EOA, MACRO_IR, MACRO_EOA, /* MACRO_EXP, MACRO_IR, MACRO_EOA */ } }, @@ -801,7 +794,7 @@ static const struct alpha_macro alpha_macros[] = { }; static const unsigned int alpha_num_macros - = sizeof(alpha_macros) / sizeof(*alpha_macros); + = sizeof (alpha_macros) / sizeof (*alpha_macros); /* Public interface functions */ @@ -824,12 +817,12 @@ md_begin () /* Create the opcode hash table */ alpha_opcode_hash = hash_new (); - for (i = 0; i < alpha_num_opcodes; ) + for (i = 0; i < alpha_num_opcodes;) { const char *name, *retval, *slash; name = alpha_opcodes[i].name; - retval = hash_insert (alpha_opcode_hash, name, (PTR)&alpha_opcodes[i]); + retval = hash_insert (alpha_opcode_hash, name, (PTR) &alpha_opcodes[i]); if (retval) as_fatal (_("internal error: can't hash opcode `%s': %s"), name, retval); @@ -844,7 +837,7 @@ md_begin () memcpy (p, name, slash - name); strcpy (p + (slash - name), slash + 1); - (void)hash_insert(alpha_opcode_hash, p, (PTR)&alpha_opcodes[i]); + (void) hash_insert (alpha_opcode_hash, p, (PTR) &alpha_opcodes[i]); /* Ignore failures -- the opcode table does duplicate some variants in different forms, like "hw_stq" and "hw_st/q". */ } @@ -858,14 +851,15 @@ md_begin () /* Create the macro hash table */ alpha_macro_hash = hash_new (); - for (i = 0; i < alpha_num_macros; ) + for (i = 0; i < alpha_num_macros;) { const char *name, *retval; name = alpha_macros[i].name; - retval = hash_insert (alpha_macro_hash, name, (PTR)&alpha_macros[i]); + retval = hash_insert (alpha_macro_hash, name, (PTR) &alpha_macros[i]); if (retval) - as_fatal (_("internal error: can't hash macro `%s': %s"), name, retval); + as_fatal (_("internal error: can't hash macro `%s': %s"), + name, retval); while (++i < alpha_num_macros && (alpha_macros[i].name == name @@ -878,16 +872,16 @@ md_begin () for (i = 0; i < 32; ++i) { char name[4]; - sprintf(name, "$%d", i); - alpha_register_table[i] = symbol_create(name, reg_section, i, - &zero_address_frag); + sprintf (name, "$%d", i); + alpha_register_table[i] = symbol_create (name, reg_section, i, + &zero_address_frag); } for (; i < 64; ++i) { char name[5]; - sprintf(name, "$f%d", i-32); - alpha_register_table[i] = symbol_create(name, reg_section, i, - &zero_address_frag); + sprintf (name, "$f%d", i - 32); + alpha_register_table[i] = symbol_create (name, reg_section, i, + &zero_address_frag); } /* Create the special symbols and sections we'll be using */ @@ -911,17 +905,17 @@ md_begin () #ifdef OBJ_ELF if (ECOFF_DEBUGGING) { - segT sec = subseg_new(".mdebug", (subsegT)0); - bfd_set_section_flags(stdoutput, sec, SEC_HAS_CONTENTS|SEC_READONLY); - bfd_set_section_alignment(stdoutput, sec, 3); + segT sec = subseg_new (".mdebug", (subsegT) 0); + bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY); + bfd_set_section_alignment (stdoutput, sec, 3); } #endif /* OBJ_ELF */ - subseg_set(text_section, 0); + subseg_set (text_section, 0); #ifdef RELOC_OP_P /* Create literal lookup hash table. */ - alpha_literal_hash = hash_new(); + alpha_literal_hash = hash_new (); #endif } @@ -964,15 +958,15 @@ md_section_align (seg, size) segT seg; valueT size; { - int align = bfd_get_section_alignment(stdoutput, seg); - valueT mask = ((valueT)1 << align) - 1; + int align = bfd_get_section_alignment (stdoutput, seg); + valueT mask = ((valueT) 1 << align) - 1; return (size + mask) & ~mask; } /* Turn a string in input_line_pointer into a floating point constant - of type type, and store the appropriate bytes in *litP. The number - of LITTLENUMS emitted is stored in *sizeP. An error message is + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is returned, or NULL on OK. */ /* Equal to MAX_PRECISION in atof-ieee.c */ @@ -1060,25 +1054,25 @@ md_parse_option (c, arg) break; case 'G': - g_switch_value = atoi(arg); + g_switch_value = atoi (arg); break; case 'm': { const struct cpu_type *p; for (p = cpu_types; p->name; ++p) - if (strcmp(arg, p->name) == 0) + if (strcmp (arg, p->name) == 0) { alpha_target_name = p->name, alpha_target = p->flags; goto found; } - as_warn(_("Unknown CPU identifier `%s'"), arg); + as_warn (_("Unknown CPU identifier `%s'"), arg); found:; } break; #ifdef OBJ_EVAX - case '+': /* For g++. Hash any name > 63 chars long. */ + case '+': /* For g++. Hash any name > 63 chars long. */ alpha_flag_hash_long_names = 1; break; @@ -1116,7 +1110,7 @@ void md_show_usage (stream) FILE *stream; { - fputs(_("\ + fputs (_("\ Alpha options:\n\ -32addr treat addresses as 32-bit values\n\ -F lack floating point instructions support\n\ @@ -1243,7 +1237,7 @@ md_apply_fix (fixP, valueP) case BFD_RELOC_23_PCREL_S2: if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0) { - image = bfd_getl32(fixpos); + image = bfd_getl32 (fixpos); image = (image & ~0x1FFFFF) | ((value >> 2) & 0x1FFFFF); goto write_done; } @@ -1252,7 +1246,7 @@ md_apply_fix (fixP, valueP) case BFD_RELOC_ALPHA_HINT: if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0) { - image = bfd_getl32(fixpos); + image = bfd_getl32 (fixpos); image = (image & ~0x3FFF) | ((value >> 2) & 0x3FFF); goto write_done; } @@ -1290,16 +1284,20 @@ md_apply_fix (fixP, valueP) abort (); #endif + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + return 1; + default: { const struct alpha_operand *operand; - if ((int)fixP->fx_r_type >= 0) + if ((int) fixP->fx_r_type >= 0) as_fatal (_("unhandled relocation type %s"), bfd_get_reloc_code_name (fixP->fx_r_type)); - assert (-(int)fixP->fx_r_type < (int)alpha_num_operands); - operand = &alpha_operands[-(int)fixP->fx_r_type]; + assert (-(int) fixP->fx_r_type < (int) alpha_num_operands); + operand = &alpha_operands[-(int) fixP->fx_r_type]; /* The rest of these fixups only exist internally during symbol resolution and have no representation in the object file. @@ -1310,9 +1308,9 @@ md_apply_fix (fixP, valueP) as_bad_where (fixP->fx_file, fixP->fx_line, _("non-absolute expression in constant field")); - image = bfd_getl32(fixpos); - image = insert_operand(image, operand, (offsetT)value, - fixP->fx_file, fixP->fx_line); + image = bfd_getl32 (fixpos); + image = insert_operand (image, operand, (offsetT) value, + fixP->fx_file, fixP->fx_line); } goto write_done; } @@ -1321,13 +1319,13 @@ md_apply_fix (fixP, valueP) return 1; else { - as_warn_where(fixP->fx_file, fixP->fx_line, - _("type %d reloc done?\n"), (int)fixP->fx_r_type); + as_warn_where (fixP->fx_file, fixP->fx_line, + _("type %d reloc done?\n"), (int) fixP->fx_r_type); goto done; } write_done: - md_number_to_chars(fixpos, image, 4); + md_number_to_chars (fixpos, image, 4); done: fixP->fx_done = 1; @@ -1339,7 +1337,7 @@ done: */ symbolS * -md_undefined_symbol(name) +md_undefined_symbol (name) char *name; { if (*name == '$') @@ -1355,7 +1353,7 @@ md_undefined_symbol(name) /* FALLTHRU */ case 'r': - if (!isdigit(*++name)) + if (!isdigit (*++name)) break; /* FALLTHRU */ @@ -1363,7 +1361,7 @@ md_undefined_symbol(name) case '5': case '6': case '7': case '8': case '9': if (name[1] == '\0') num = name[0] - '0'; - else if (name[0] != '0' && isdigit(name[1]) && name[2] == '\0') + else if (name[0] != '0' && isdigit (name[1]) && name[2] == '\0') { num = (name[0] - '0') * 10 + name[1] - '0'; if (num >= 32) @@ -1373,14 +1371,14 @@ md_undefined_symbol(name) break; if (!alpha_noat_on && (num + is_float) == AXP_REG_AT) - as_warn(_("Used $at without \".set noat\"")); + as_warn (_("Used $at without \".set noat\"")); return alpha_register_table[num + is_float]; case 'a': if (name[1] == 't' && name[2] == '\0') { if (!alpha_noat_on) - as_warn(_("Used $at without \".set noat\"")); + as_warn (_("Used $at without \".set noat\"")); return alpha_register_table[AXP_REG_AT]; } break; @@ -1459,6 +1457,8 @@ alpha_force_relocation (f) case BFD_RELOC_ALPHA_USER_GPRELHIGH: case BFD_RELOC_ALPHA_USER_GPRELLOW: #endif + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: return 1; case BFD_RELOC_23_PCREL_S2: @@ -1468,7 +1468,8 @@ alpha_force_relocation (f) return 0; default: - assert((int)f->fx_r_type < 0 && -(int)f->fx_r_type < (int)alpha_num_operands); + assert ((int) f->fx_r_type < 0 + && -(int) f->fx_r_type < (int) alpha_num_operands); return 0; } } @@ -1518,6 +1519,8 @@ alpha_fix_adjustable (f) case BFD_RELOC_ALPHA_USER_GPRELHIGH: case BFD_RELOC_ALPHA_USER_GPRELLOW: #endif + case BFD_RELOC_VTABLE_ENTRY: + case BFD_RELOC_VTABLE_INHERIT: return 0; case BFD_RELOC_GPREL32: @@ -1528,8 +1531,8 @@ alpha_fix_adjustable (f) return 1; default: - assert ((int)f->fx_r_type < 0 - && - (int)f->fx_r_type < (int)alpha_num_operands); + assert ((int) f->fx_r_type < 0 + && - (int) f->fx_r_type < (int) alpha_num_operands); return 1; } /*NOTREACHED*/ @@ -1552,7 +1555,7 @@ tc_gen_reloc (sec, fixp) /* Make sure none of our internal relocations make it this far. They'd better have been fully resolved by this point. */ - assert ((int)fixp->fx_r_type > 0); + assert ((int) fixp->fx_r_type > 0); reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); if (reloc->howto == NULL) @@ -1588,7 +1591,7 @@ tc_gen_reloc (sec, fixp) * of thing, and as a result we need to fake it out here. */ if ((S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)) - && !S_IS_COMMON(fixp->fx_addsy)) + && !S_IS_COMMON (fixp->fx_addsy)) reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value; #endif } @@ -1615,7 +1618,7 @@ tc_get_register (frame) char c = get_symbol_end (); symbolS *sym = md_undefined_symbol (s); - *strchr(s, '\0') = c; + *strchr (s, '\0') = c; if (sym && (framereg = S_GET_VALUE (sym)) <= 31) goto found; } @@ -1647,10 +1650,10 @@ alpha_frob_file_before_adjust () #ifdef RELOC_OP_P -/* Before the relocations are written, reorder them, so that user supplied - !lituse relocations follow the appropriate !literal relocations. Also - convert the gas-internal relocations to the appropriate linker relocations. - */ +/* Before the relocations are written, reorder them, so that user + supplied !lituse relocations follow the appropriate !literal + relocations. Also convert the gas-internal relocations to the + appropriate linker relocations. */ void alpha_adjust_symtab () @@ -1661,20 +1664,21 @@ alpha_adjust_symtab () fprintf (stderr, "alpha_adjust_symtab called\n"); #endif - /* Go over each section, reordering the relocations so that all of the - explicit LITUSE's are adjacent to the explicit LITERAL's */ - bfd_map_over_sections (stdoutput, alpha_adjust_symtab_relocs, (char *) 0); + /* Go over each section, reordering the relocations so that all + of the explicit LITUSE's are adjacent to the explicit + LITERAL's. */ + bfd_map_over_sections (stdoutput, alpha_adjust_symtab_relocs, + (char *) 0); } } - /* Inner function to move LITUSE's next to the LITERAL. */ static void alpha_adjust_symtab_relocs (abfd, sec, ptr) - bfd *abfd; + bfd *abfd ATTRIBUTE_UNUSED; asection *sec; - PTR ptr; + PTR ptr ATTRIBUTE_UNUSED; { segment_info_type *seginfo = seg_info (sec); fixS **prevP; @@ -1689,8 +1693,9 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) int n_dup_literals = 0; #endif - /* If seginfo is NULL, we did not create this section; don't do anything with - it. By using a pointer to a pointer, we can update the links in place. */ + /* If seginfo is NULL, we did not create this section; don't do + anything with it. By using a pointer to a pointer, we can update + the links in place. */ if (seginfo == NULL) return; @@ -1703,7 +1708,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) for (fixp = seginfo->fix_root; fixp; fixp = next) { next = fixp->fx_next; - fixp->fx_next = (fixS *)0; + fixp->fx_next = (fixS *) 0; #ifdef DEBUG2_ALPHA n++; #endif @@ -1716,7 +1721,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) #ifdef DEBUG2_ALPHA fprintf (stderr, "alpha_adjust_symtab_relocs: 0x%lx, other relocation %s\n", - (long)fixp, + (long) fixp, bfd_get_reloc_code_name (fixp->fx_r_type)); #endif break; @@ -1731,7 +1736,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) n_dup_literals++; fprintf (stderr, "alpha_adjust_symtab_relocs: 0x%lx, !literal!%.6d, # literals = %2d\n", - (long)fixp, + (long) fixp, fixp->tc_fix_data.info->sequence, fixp->tc_fix_data.info->n_literals); #endif @@ -1749,10 +1754,10 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) #ifdef DEBUG2_ALPHA fprintf (stderr, "alpha_adjust_symtab_relocs: 0x%lx, !lituse !%.6d, # lituses = %2d, next_lituse = 0x%lx\n", - (long)fixp, + (long) fixp, fixp->tc_fix_data.info->sequence, fixp->tc_fix_data.info->n_lituses, - (long)fixp->tc_fix_data.next_lituse); + (long) fixp->tc_fix_data.next_lituse); #endif break; } @@ -1785,7 +1790,7 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) && ! fixp->tc_fix_data.info->multi_section_p) { for (lituse = fixp->tc_fix_data.info->lituse; - lituse != (fixS *)0; + lituse != (fixS *) 0; lituse = lituse->tc_fix_data.next_lituse) { lituse->fx_next = fixp->fx_next; @@ -1813,7 +1818,6 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr) } #endif /* RELOC_OP_P */ - #ifdef DEBUG_ALPHA static void @@ -1882,7 +1886,7 @@ debug_exp (tok, ntok) fprintf (stderr, ", %s(%s, %s, %d)", name, (t->X_add_symbol) ? S_GET_NAME (t->X_add_symbol) : "--", (t->X_op_symbol) ? S_GET_NAME (t->X_op_symbol) : "--", - (int)t->X_add_number); + (int) t->X_add_number); } fprintf (stderr, "\n"); fflush (stderr); @@ -1960,7 +1964,7 @@ tokenize_arguments (str, tok, ntok) } r = &alpha_reloc_op[0]; - for (i = alpha_num_reloc_op-1; i >= 0; i--, r++) + for (i = alpha_num_reloc_op - 1; i >= 0; i--, r++) { if (len == r->length && memcmp (input_line_pointer, r->name, len) == 0) @@ -1968,7 +1972,8 @@ tokenize_arguments (str, tok, ntok) } if (i < 0) { - as_bad (_("Unknown relocation operand: !%s"), input_line_pointer); + as_bad (_("Unknown relocation operand: !%s"), + input_line_pointer); goto err_report; } @@ -1981,7 +1986,8 @@ tokenize_arguments (str, tok, ntok) if (tok->X_op != O_constant || ! ALPHA_RELOC_SEQUENCE_OK (tok->X_add_number)) { - as_bad (_("Bad sequence number: !%s!%s"), r->name, input_line_pointer); + as_bad (_("Bad sequence number: !%s!%s"), + r->name, input_line_pointer); goto err_report; } @@ -2002,7 +2008,7 @@ tokenize_arguments (str, tok, ntok) { char *hold = input_line_pointer++; - /* First try for parenthesized register ... */ + /* First try for parenthesized register ... */ expression (tok); if (*input_line_pointer == ')' && tok->X_op == O_register) { @@ -2059,7 +2065,7 @@ err_report: syntax match. */ static const struct alpha_opcode * -find_opcode_match(first_opcode, tok, pntok, pcpumatch) +find_opcode_match (first_opcode, tok, pntok, pcpumatch) const struct alpha_opcode *first_opcode; const expressionS *tok; int *pntok; @@ -2101,22 +2107,22 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch) { case AXP_OPERAND_IR: if (tok[tokidx].X_op != O_register - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; break; case AXP_OPERAND_FPR: if (tok[tokidx].X_op != O_register - || !is_fpr_num(tok[tokidx].X_add_number)) + || !is_fpr_num (tok[tokidx].X_add_number)) goto match_failed; break; - case AXP_OPERAND_IR|AXP_OPERAND_PARENS: + case AXP_OPERAND_IR | AXP_OPERAND_PARENS: if (tok[tokidx].X_op != O_pregister - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; break; - case AXP_OPERAND_IR|AXP_OPERAND_PARENS|AXP_OPERAND_COMMA: + case AXP_OPERAND_IR | AXP_OPERAND_PARENS | AXP_OPERAND_COMMA: if (tok[tokidx].X_op != O_cpregister - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; break; @@ -2139,7 +2145,7 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch) default: /* everything else should have been fake */ - abort(); + abort (); } ++tokidx; } @@ -2153,11 +2159,11 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch) match_failed:; } - while (++opcode-alpha_opcodes < alpha_num_opcodes - && !strcmp(opcode->name, first_opcode->name)); + while (++opcode - alpha_opcodes < alpha_num_opcodes + && !strcmp (opcode->name, first_opcode->name)); if (*pcpumatch) - *pcpumatch = got_cpu_match; + *pcpumatch = got_cpu_match; return NULL; } @@ -2166,7 +2172,7 @@ find_opcode_match(first_opcode, tok, pntok, pcpumatch) match. */ static const struct alpha_macro * -find_macro_match(first_macro, tok, pntok) +find_macro_match (first_macro, tok, pntok) const struct alpha_macro *first_macro; const expressionS *tok; int *pntok; @@ -2193,7 +2199,7 @@ find_macro_match(first_macro, tok, pntok) /* index register */ case MACRO_IR: if (tokidx >= ntok || tok[tokidx].X_op != O_register - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; ++tokidx; break; @@ -2201,7 +2207,7 @@ find_macro_match(first_macro, tok, pntok) /* parenthesized index register */ case MACRO_PIR: if (tokidx >= ntok || tok[tokidx].X_op != O_pregister - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; ++tokidx; break; @@ -2209,14 +2215,14 @@ find_macro_match(first_macro, tok, pntok) /* optional parenthesized index register */ case MACRO_OPIR: if (tokidx < ntok && tok[tokidx].X_op == O_pregister - && is_ir_num(tok[tokidx].X_add_number)) + && is_ir_num (tok[tokidx].X_add_number)) ++tokidx; break; /* leading comma with a parenthesized index register */ case MACRO_CPIR: if (tokidx >= ntok || tok[tokidx].X_op != O_cpregister - || !is_ir_num(tok[tokidx].X_add_number)) + || !is_ir_num (tok[tokidx].X_add_number)) goto match_failed; ++tokidx; break; @@ -2224,7 +2230,7 @@ find_macro_match(first_macro, tok, pntok) /* floating point register */ case MACRO_FPR: if (tokidx >= ntok || tok[tokidx].X_op != O_register - || !is_fpr_num(tok[tokidx].X_add_number)) + || !is_fpr_num (tok[tokidx].X_add_number)) goto match_failed; ++tokidx; break; @@ -2298,8 +2304,8 @@ find_macro_match(first_macro, tok, pntok) ++arg; } } - while (++macro-alpha_macros < alpha_num_macros - && !strcmp(macro->name, first_macro->name)); + while (++macro - alpha_macros < alpha_num_macros + && !strcmp (macro->name, first_macro->name)); return NULL; } @@ -2307,7 +2313,7 @@ find_macro_match(first_macro, tok, pntok) /* Insert an operand value into an instruction. */ static unsigned -insert_operand(insn, operand, val, file, line) +insert_operand (insn, operand, val, file, line) unsigned insn; const struct alpha_operand *operand; offsetT val; @@ -2335,11 +2341,11 @@ insert_operand(insn, operand, val, file, line) _("operand out of range (%s not between %d and %d)"); char buf[sizeof (val) * 3 + 2]; - sprint_value(buf, val); + sprint_value (buf, val); if (file) - as_warn_where(file, line, err, buf, min, max); + as_warn_where (file, line, err, buf, min, max); else - as_warn(err, buf, min, max); + as_warn (err, buf, min, max); } } @@ -2363,7 +2369,7 @@ insert_operand(insn, operand, val, file, line) */ static void -assemble_insn(opcode, tok, ntok, insn) +assemble_insn (opcode, tok, ntok, insn) const struct alpha_opcode *opcode; const expressionS *tok; int ntok; @@ -2379,12 +2385,12 @@ assemble_insn(opcode, tok, ntok, insn) for (argidx = opcode->operands; *argidx; ++argidx) { const struct alpha_operand *operand = &alpha_operands[*argidx]; - const expressionS *t = (const expressionS *)0; + const expressionS *t = (const expressionS *) 0; if (operand->flags & AXP_OPERAND_FAKE) { /* fake operands take no value and generate no fixup */ - image = insert_operand(image, operand, 0, NULL, 0); + image = insert_operand (image, operand, 0, NULL, 0); continue; } @@ -2407,7 +2413,7 @@ assemble_insn(opcode, tok, ntok, insn) } break; default: - abort(); + abort (); } } else @@ -2418,12 +2424,12 @@ assemble_insn(opcode, tok, ntok, insn) case O_register: case O_pregister: case O_cpregister: - image = insert_operand(image, operand, regno(t->X_add_number), - NULL, 0); + image = insert_operand (image, operand, regno (t->X_add_number), + NULL, 0); break; case O_constant: - image = insert_operand(image, operand, t->X_add_number, NULL, 0); + image = insert_operand (image, operand, t->X_add_number, NULL, 0); break; default: @@ -2431,7 +2437,7 @@ assemble_insn(opcode, tok, ntok, insn) struct alpha_fixup *fixup; if (insn->nfixups >= MAX_INSN_FIXUPS) - as_fatal(_("too many fixups")); + as_fatal (_("too many fixups")); fixup = &insn->fixups[insn->nfixups++]; @@ -2451,12 +2457,12 @@ assemble_insn(opcode, tok, ntok, insn) static void emit_insn (insn) - struct alpha_insn *insn; + struct alpha_insn *insn; { char *f; int i; - /* Take care of alignment duties */ + /* Take care of alignment duties. */ if (alpha_auto_align_on && alpha_current_align < 2) alpha_align (2, (char *) NULL, alpha_insn_label, 0); if (alpha_current_align > 2) @@ -2467,10 +2473,14 @@ emit_insn (insn) f = frag_more (4); md_number_to_chars (f, insn->insn, 4); +#ifdef OBJ_ELF + dwarf2_emit_insn (4); +#endif + /* Apply the fixups in order */ for (i = 0; i < insn->nfixups; ++i) { - const struct alpha_operand *operand = (const struct alpha_operand *)0; + const struct alpha_operand *operand = (const struct alpha_operand *) 0; struct alpha_fixup *fixup = &insn->fixups[i]; int size, pcrel; fixS *fixP; @@ -2480,48 +2490,49 @@ emit_insn (insn) #endif /* Some fixups are only used internally and so have no howto */ - if ((int)fixup->reloc < 0) + if ((int) fixup->reloc < 0) { - operand = &alpha_operands[-(int)fixup->reloc]; + operand = &alpha_operands[-(int) fixup->reloc]; size = 4; pcrel = ((operand->flags & AXP_OPERAND_RELATIVE) != 0); } - else switch (fixup->reloc) - { + else + switch (fixup->reloc) + { #ifdef OBJ_ELF - /* These relocation types are only used internally. */ - case BFD_RELOC_ALPHA_GPDISP_HI16: - case BFD_RELOC_ALPHA_GPDISP_LO16: - size = 2; - pcrel = 0; - break; + /* These relocation types are only used internally. */ + case BFD_RELOC_ALPHA_GPDISP_HI16: + case BFD_RELOC_ALPHA_GPDISP_LO16: + size = 2; + pcrel = 0; + break; #endif #ifdef RELOC_OP_P - /* and these also are internal only relocations */ - case BFD_RELOC_ALPHA_USER_LITERAL: - case BFD_RELOC_ALPHA_USER_LITUSE_BASE: - case BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF: - case BFD_RELOC_ALPHA_USER_LITUSE_JSR: - case BFD_RELOC_ALPHA_USER_GPDISP: - case BFD_RELOC_ALPHA_USER_GPRELHIGH: - case BFD_RELOC_ALPHA_USER_GPRELLOW: - size = 2; - pcrel = 0; - break; + /* and these also are internal only relocations */ + case BFD_RELOC_ALPHA_USER_LITERAL: + case BFD_RELOC_ALPHA_USER_LITUSE_BASE: + case BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF: + case BFD_RELOC_ALPHA_USER_LITUSE_JSR: + case BFD_RELOC_ALPHA_USER_GPDISP: + case BFD_RELOC_ALPHA_USER_GPRELHIGH: + case BFD_RELOC_ALPHA_USER_GPRELLOW: + size = 2; + pcrel = 0; + break; #endif - default: - { - reloc_howto_type *reloc_howto - = bfd_reloc_type_lookup (stdoutput, fixup->reloc); - assert (reloc_howto); + default: + { + reloc_howto_type *reloc_howto + = bfd_reloc_type_lookup (stdoutput, fixup->reloc); + assert (reloc_howto); - size = bfd_get_reloc_size (reloc_howto); - pcrel = reloc_howto->pc_relative; + size = bfd_get_reloc_size (reloc_howto); + pcrel = reloc_howto->pc_relative; + } + assert (size >= 1 && size <= 4); + break; } - assert (size >= 1 && size <= 4); - break; - } fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size, &fixup->exp, pcrel, fixup->reloc); @@ -2559,7 +2570,7 @@ emit_insn (insn) info->segment = now_seg; info->sequence = insn->sequence[i]; strcpy (info->string, buffer); - errmsg = hash_insert (alpha_literal_hash, info->string, (PTR)info); + errmsg = hash_insert (alpha_literal_hash, info->string, (PTR) info); if (errmsg) as_bad (errmsg); } @@ -2590,7 +2601,7 @@ emit_insn (insn) info->segment = now_seg; info->sequence = insn->sequence[i]; strcpy (info->string, buffer); - errmsg = hash_insert (alpha_literal_hash, info->string, (PTR)info); + errmsg = hash_insert (alpha_literal_hash, info->string, (PTR) info); if (errmsg) as_bad (errmsg); } @@ -2605,7 +2616,7 @@ emit_insn (insn) #endif default: - if ((int)fixup->reloc < 0) + if ((int) fixup->reloc < 0) { if (operand->flags & AXP_OPERAND_NOOVERFLOW) fixP->fx_no_overflow = 1; @@ -2622,7 +2633,7 @@ emit_insn (insn) than one insn in an insn structure. */ static void -assemble_tokens_to_insn(opname, tok, ntok, insn) +assemble_tokens_to_insn (opname, tok, ntok, insn) const char *opname; const expressionS *tok; int ntok; @@ -2645,7 +2656,7 @@ assemble_tokens_to_insn(opname, tok, ntok, insn) as_bad (_("inappropriate arguments for opcode `%s'"), opname); else as_bad (_("opcode `%s' not supported for target %s"), opname, - alpha_target_name); + alpha_target_name); } else as_bad (_("unknown opcode `%s'"), opname); @@ -2684,12 +2695,12 @@ assemble_tokens (opname, tok, ntok, local_macros_on) } #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, opname); + (int) reloc_exp->X_add_number, opname); ntok--; } #endif @@ -2718,7 +2729,6 @@ assemble_tokens (opname, tok, ntok, local_macros_on) else as_bad (_("unknown opcode `%s'"), opname); } - /* Some instruction sets indexed by lg(size) */ static const char * const sextX_op[] = { "sextb", "sextw", "sextl", NULL }; @@ -2751,12 +2761,12 @@ FIXME expressionS addend; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "ldgp"); + (int) reloc_exp->X_add_number, "ldgp"); ntok--; } #endif @@ -2839,7 +2849,7 @@ add_to_link_pool (basesym, sym, addend) { if (range_signed_16 (offset)) { - return offset; + return offset; } } } @@ -2938,7 +2948,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) assemble_tokens_to_insn ("ldq", newtok, 3, &insn); - assert (explicit_reloc == (const expressionS *)0); + assert (explicit_reloc == (const expressionS *) 0); assert (insn.nfixups == 1); insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITERAL; #endif /* OBJ_ECOFF */ @@ -2960,8 +2970,9 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) /* XXX: Disable this .got minimizing optimization so that we can get better instruction offset knowledge in the compiler. This happens very infrequently anyway. */ - if (1 || (!range_signed_32 (addend) - && (alpha_noat_on || targreg == AXP_REG_AT))) + if (1 + || (!range_signed_32 (addend) + && (alpha_noat_on || targreg == AXP_REG_AT))) { newtok[1] = *exp; addend = 0; @@ -2994,7 +3005,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) /* Find symbol or symbol pointer in link section. */ - assert (explicit_reloc == (const expressionS *)0); + assert (explicit_reloc == (const expressionS *) 0); if (exp->X_add_symbol == alpha_evax_proc.symbol) { if (range_signed_16 (addend)) @@ -3033,7 +3044,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) } #endif /* OBJ_EVAX */ - emit_insn(&insn); + emit_insn (&insn); #ifndef OBJ_EVAX emit_lituse = 1; @@ -3053,14 +3064,14 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) break; case O_constant: - assert (explicit_reloc == (const expressionS *)0); + assert (explicit_reloc == (const expressionS *) 0); break; case O_subtract: /* Assume that this difference expression will be resolved to an - absolute value and that that value will fit in 16 bits. */ + absolute value and that that value will fit in 16 bits. */ - assert (explicit_reloc == (const expressionS *)0); + assert (explicit_reloc == (const expressionS *) 0); set_tok_reg (newtok[0], targreg); newtok[1] = *exp; set_tok_preg (newtok[2], basereg); @@ -3162,7 +3173,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc) if (insn.nfixups > 0) { memmove (&insn.fixups[1], &insn.fixups[0], - sizeof(struct alpha_fixup) * insn.nfixups); + sizeof (struct alpha_fixup) * insn.nfixups); } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; @@ -3254,22 +3265,22 @@ emit_lda (tok, ntok, opname) const PTR opname; { int basereg; - const expressionS *reloc = (const expressionS *)0; + const expressionS *reloc = (const expressionS *) 0; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { const struct alpha_reloc_op_tag *r; - reloc = &tok[ntok-1]; + reloc = &tok[ntok - 1]; r = ALPHA_RELOC_TABLE (reloc->X_op); switch (reloc->X_op) { default: as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc->X_add_number, (const char *)opname); + (int) reloc->X_add_number, (const char *) opname); - reloc = (const expressionS *)0; + reloc = (const expressionS *) 0; ntok--; break; @@ -3283,15 +3294,15 @@ emit_lda (tok, ntok, opname) case O_lituse_base: if (ntok != 4 || tok[0].X_op != O_register - || !is_ir_num(tok[0].X_add_number) + || !is_ir_num (tok[0].X_add_number) || tok[1].X_op != O_constant || tok[2].X_op != O_pregister - || !is_ir_num(tok[2].X_add_number)) + || !is_ir_num (tok[2].X_add_number)) { - as_bad (_("bad instruction format for lda !%s!%d"), r->name, - reloc->X_add_number); + as_bad (_("bad instruction format for lda !%s!%ld"), r->name, + (long) reloc->X_add_number); - reloc = (const expressionS *)0; + reloc = (const expressionS *) 0; ntok--; break; } @@ -3322,12 +3333,12 @@ emit_ldah (tok, ntok, unused) expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "ldah"); + (int) reloc_exp->X_add_number, "ldah"); ntok--; } #endif @@ -3354,13 +3365,13 @@ emit_ir_load (tok, ntok, opname) struct alpha_insn insn; #ifdef RELOC_OP_P - const expressionS *reloc = (const expressionS *)0; + const expressionS *reloc = (const expressionS *) 0; - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { const struct alpha_reloc_op_tag *r; - reloc = &tok[ntok-1]; + reloc = &tok[ntok - 1]; switch (reloc->X_op) { case O_lituse_base: @@ -3368,7 +3379,7 @@ emit_ir_load (tok, ntok, opname) break; case O_literal: - if (strcmp ((const char *)opname, "ldq") == 0) + if (strcmp ((const char *) opname, "ldq") == 0) { emit_lda (tok, ntok, opname); return; @@ -3379,7 +3390,7 @@ emit_ir_load (tok, ntok, opname) ntok--; r = ALPHA_RELOC_TABLE (reloc->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc->X_add_number, (const char *)opname); + (int) reloc->X_add_number, (const char *) opname); } } #endif @@ -3390,12 +3401,12 @@ emit_ir_load (tok, ntok, opname) basereg = tok[2].X_add_number; lituse = load_expression (tok[0].X_add_number, &tok[1], &basereg, - &newtok[1], (const expressionS *)0); + &newtok[1], (const expressionS *) 0); newtok[0] = tok[0]; set_tok_preg (newtok[2], basereg); - assemble_tokens_to_insn ((const char *)opname, newtok, 3, &insn); + assemble_tokens_to_insn ((const char *) opname, newtok, 3, &insn); #ifdef RELOC_OP_P if (reloc) @@ -3419,7 +3430,7 @@ emit_ir_load (tok, ntok, opname) if (insn.nfixups > 0) { memmove (&insn.fixups[1], &insn.fixups[0], - sizeof(struct alpha_fixup) * insn.nfixups); + sizeof (struct alpha_fixup) * insn.nfixups); } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; @@ -3445,16 +3456,16 @@ emit_loadstore (tok, ntok, opname) struct alpha_insn insn; #ifdef RELOC_OP_P - const expressionS *reloc = (const expressionS *)0; + const expressionS *reloc = (const expressionS *) 0; - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { reloc = &tok[--ntok]; if (reloc->X_op != O_lituse_base) { - const struct alpha_reloc_op_tag *r = &alpha_reloc_op[ reloc->X_md ]; + const struct alpha_reloc_op_tag *r = &alpha_reloc_op[reloc->X_md]; as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc->X_add_number, (const char *)opname); + (int) reloc->X_add_number, (const char *) opname); } } #endif @@ -3464,13 +3475,13 @@ emit_loadstore (tok, ntok, opname) else basereg = tok[2].X_add_number; - if (tok[1].X_op != O_constant || !range_signed_16(tok[1].X_add_number)) + if (tok[1].X_op != O_constant || !range_signed_16 (tok[1].X_add_number)) { if (alpha_noat_on) as_bad (_("macro requires $at register while noat in effect")); lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1], - (const expressionS *)0); + (const expressionS *) 0); } else { @@ -3481,7 +3492,7 @@ emit_loadstore (tok, ntok, opname) newtok[0] = tok[0]; set_tok_preg (newtok[2], basereg); - assemble_tokens_to_insn ((const char *)opname, newtok, 3, &insn); + assemble_tokens_to_insn ((const char *) opname, newtok, 3, &insn); #ifdef RELOC_OP_P if (reloc) @@ -3505,7 +3516,7 @@ emit_loadstore (tok, ntok, opname) if (insn.nfixups > 0) { memmove (&insn.fixups[1], &insn.fixups[0], - sizeof(struct alpha_fixup) * insn.nfixups); + sizeof (struct alpha_fixup) * insn.nfixups); } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; @@ -3526,20 +3537,20 @@ emit_ldXu (tok, ntok, vlgsize) const PTR vlgsize; { if (alpha_target & AXP_OPCODE_BWX) - emit_ir_load (tok, ntok, ldXu_op[(long)vlgsize]); + emit_ir_load (tok, ntok, ldXu_op[(long) vlgsize]); else { expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "ldbu/ldwu"); + (int) reloc_exp->X_add_number, "ldbu/ldwu"); ntok--; } #endif @@ -3564,7 +3575,7 @@ emit_ldXu (tok, ntok, vlgsize) set_tok_reg (newtok[1], AXP_REG_AT); newtok[2] = newtok[0]; - assemble_tokens (extXl_op[(long)vlgsize], newtok, 3, 1); + assemble_tokens (extXl_op[(long) vlgsize], newtok, 3, 1); } } @@ -3577,7 +3588,7 @@ emit_ldX (tok, ntok, vlgsize) const PTR vlgsize; { emit_ldXu (tok, ntok, vlgsize); - assemble_tokens (sextX_op[(long)vlgsize], tok, 1, 1); + assemble_tokens (sextX_op[(long) vlgsize], tok, 1, 1); } /* Load an integral value from an unaligned address as an unsigned @@ -3589,7 +3600,7 @@ emit_uldXu (tok, ntok, vlgsize) int ntok; const PTR vlgsize; { - long lgsize = (long)vlgsize; + long lgsize = (long) vlgsize; expressionS newtok[3]; if (alpha_noat_on) @@ -3611,7 +3622,7 @@ emit_uldXu (tok, ntok, vlgsize) /* emit "ldq_u $t10, size-1($at)" */ set_tok_reg (newtok[0], AXP_REG_T10); - set_tok_const (newtok[1], (1<X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "ldil"); + (int) reloc_exp->X_add_number, "ldil"); ntok--; } #endif - memcpy (newtok, tok, sizeof(newtok)); + memcpy (newtok, tok, sizeof (newtok)); newtok[1].X_add_number = sign_extend_32 (tok[1].X_add_number); assemble_tokens ("lda", newtok, ntok, 1); @@ -3684,7 +3695,7 @@ emit_stX (tok, ntok, vlgsize) int ntok; const PTR vlgsize; { - int lgsize = (int)(long)vlgsize; + int lgsize = (int) (long) vlgsize; if (alpha_target & AXP_OPCODE_BWX) emit_loadstore (tok, ntok, stX_op[lgsize]); @@ -3693,7 +3704,7 @@ emit_stX (tok, ntok, vlgsize) expressionS newtok[3]; if (alpha_noat_on) - as_bad(_("macro requires $at register while noat in effect")); + as_bad (_("macro requires $at register while noat in effect")); /* emit "lda $at, exp" */ @@ -3742,7 +3753,7 @@ emit_ustX (tok, ntok, vlgsize) int ntok; const PTR vlgsize; { - int lgsize = (int)(long)vlgsize; + int lgsize = (int) (long) vlgsize; expressionS newtok[3]; /* emit "lda $at, exp" */ @@ -3761,7 +3772,7 @@ emit_ustX (tok, ntok, vlgsize) /* emit "ldq_u $10, size-1($at)" */ set_tok_reg (newtok[0], AXP_REG_T10); - set_tok_const (newtok[1], (1 << lgsize)-1); + set_tok_const (newtok[1], (1 << lgsize) - 1); assemble_tokens ("ldq_u", newtok, 3, 1); /* emit "insXl src, $at, $t11" */ @@ -3812,7 +3823,7 @@ emit_ustX (tok, ntok, vlgsize) /* emit "stq_u $t10, size-1($at)" */ set_tok_reg (newtok[0], AXP_REG_T10); - set_tok_const (newtok[1], (1 << lgsize)-1); + set_tok_const (newtok[1], (1 << lgsize) - 1); assemble_tokens ("stq_u", newtok, 3, 1); } @@ -3825,7 +3836,7 @@ emit_sextX (tok, ntok, vlgsize) int ntok; const PTR vlgsize; { - long lgsize = (long)vlgsize; + long lgsize = (long) vlgsize; if (alpha_target & AXP_OPCODE_BWX) assemble_tokens (sextX_op[lgsize], tok, ntok, 0); @@ -3835,14 +3846,14 @@ emit_sextX (tok, ntok, vlgsize) expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, "setxt"); + (int) reloc_exp->X_add_number, "setxt"); ntok--; } #endif @@ -3894,12 +3905,12 @@ emit_division (tok, ntok, symname) expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, (char char *)symname); + (int) reloc_exp->X_add_number, (char char *) symname); ntok--; } #endif @@ -3945,7 +3956,7 @@ emit_division (tok, ntok, symname) { set_tok_reg (newtok[0], xr); set_tok_reg (newtok[1], AXP_REG_R16); - assemble_tokens ("mov", newtok, 2, 1); + assemble_tokens ("mov", newtok, 2, 1); } if (yr != AXP_REG_R16 && yr != AXP_REG_R17) @@ -3956,7 +3967,7 @@ emit_division (tok, ntok, symname) } } - sym = symbol_find_or_make ((const char *)symname); + sym = symbol_find_or_make ((const char *) symname); set_tok_reg (newtok[0], AXP_REG_AT); set_tok_sym (newtok[1], sym, 0); @@ -4004,12 +4015,12 @@ emit_division (tok, ntok, symname) expressionS newtok[3]; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, (const char *)symname); + (int) reloc_exp->X_add_number, (const char *) symname); ntok--; } #endif @@ -4022,7 +4033,7 @@ emit_division (tok, ntok, symname) else rr = regno (tok[2].X_add_number); - sym = symbol_find_or_make ((const char *)symname); + sym = symbol_find_or_make ((const char *) symname); /* Move the operands into the right place */ if (yr == AXP_REG_T10 && xr == AXP_REG_T11) @@ -4057,7 +4068,7 @@ emit_division (tok, ntok, symname) { set_tok_reg (newtok[0], xr); set_tok_reg (newtok[1], AXP_REG_T10); - assemble_tokens ("mov", newtok, 2, 1); + assemble_tokens ("mov", newtok, 2, 1); } if (yr != AXP_REG_T10 && yr != AXP_REG_T11) @@ -4111,12 +4122,12 @@ emit_jsrjmp (tok, ntok, vopname) int r, tokidx = 0, lituse = 0; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, opname); + (int) reloc_exp->X_add_number, opname); ntok--; } #endif @@ -4138,7 +4149,7 @@ emit_jsrjmp (tok, ntok, vopname) { int basereg = alpha_gp_register; lituse = load_expression (r = AXP_REG_PV, &tok[tokidx], &basereg, NULL, - (const expressionS *)0); + (const expressionS *) 0); } #endif @@ -4162,7 +4173,7 @@ emit_jsrjmp (tok, ntok, vopname) if (insn.nfixups > 0) { memmove (&insn.fixups[1], &insn.fixups[0], - sizeof(struct alpha_fixup) * insn.nfixups); + sizeof (struct alpha_fixup) * insn.nfixups); } insn.nfixups++; insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE; @@ -4183,17 +4194,17 @@ emit_retjcr (tok, ntok, vopname) int ntok; const PTR vopname; { - const char *opname = (const char *)vopname; + const char *opname = (const char *) vopname; expressionS newtok[3]; int r, tokidx = 0; #ifdef RELOC_OP_P - if (ntok && USER_RELOC_P (tok[ntok-1].X_op)) + if (ntok && USER_RELOC_P (tok[ntok - 1].X_op)) { - const expressionS *reloc_exp = &tok[ntok-1]; + const expressionS *reloc_exp = &tok[ntok - 1]; const struct alpha_reloc_op_tag *r = ALPHA_RELOC_TABLE (reloc_exp->X_op); as_bad (_("Cannot use !%s!%d with %s"), r->name, - (int)reloc_exp->X_add_number, opname); + (int) reloc_exp->X_add_number, opname); ntok--; } #endif @@ -4216,7 +4227,7 @@ emit_retjcr (tok, ntok, vopname) if (tokidx < ntok) newtok[2] = tok[tokidx]; else - set_tok_const (newtok[2], strcmp(opname, "ret") == 0); + set_tok_const (newtok[2], strcmp (opname, "ret") == 0); assemble_tokens (opname, newtok, 3, 0); } @@ -4309,7 +4320,7 @@ s_alpha_comm (ignore) { offsetT align; - input_line_pointer++; + input_line_pointer++; align = get_absolute_expression (); bfd_set_section_alignment (stdoutput, new_seg, align); } @@ -4324,7 +4335,7 @@ s_alpha_comm (ignore) #ifdef OBJ_EVAX if (bfd_section_size (stdoutput, new_seg) > 0) - { + { if (bfd_section_size (stdoutput, new_seg) != temp) as_bad (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."), S_GET_NAME (symbolP), @@ -4343,7 +4354,7 @@ s_alpha_comm (ignore) #endif else { -#ifdef OBJ_EVAX +#ifdef OBJ_EVAX subseg_set (new_seg, 0); p = frag_more (temp); new_seg->flags |= SEC_IS_COMMON; @@ -4499,7 +4510,7 @@ s_alpha_end (dummy) (expressionS *) xmalloc (sizeof (expressionS)); symbol_get_obj (sym)->size->X_op = O_subtract; symbol_get_obj (sym)->size->X_add_symbol - = symbol_new ("L0\001", now_seg, frag_now_fix (), frag_now); + = symbol_new ("L0\001", now_seg, frag_now_fix (), frag_now); symbol_get_obj (sym)->size->X_op_symbol = sym; symbol_get_obj (sym)->size->X_add_number = 0; } @@ -4519,9 +4530,9 @@ s_alpha_mask (fp) if (ECOFF_DEBUGGING) { if (fp) - ecoff_directive_fmask (0); + ecoff_directive_fmask (0); else - ecoff_directive_mask (0); + ecoff_directive_mask (0); } else discard_rest_of_line (); @@ -4555,19 +4566,87 @@ s_alpha_prologue (ignore) switch (arg) { - case 0: /* No PV required. */ - S_SET_OTHER (sym, STO_ALPHA_NOPV); - break; - case 1: /* Std GP load. */ - S_SET_OTHER (sym, STO_ALPHA_STD_GPLOAD); - break; - case 2: /* Non-std use of PV. */ - break; - - default: - as_bad (_("Invalid argument %d to .prologue."), arg); - break; - } + case 0: /* No PV required. */ + S_SET_OTHER (sym, STO_ALPHA_NOPV + | (S_GET_OTHER (sym) & ~STO_ALPHA_STD_GPLOAD)); + break; + case 1: /* Std GP load. */ + S_SET_OTHER (sym, STO_ALPHA_STD_GPLOAD + | (S_GET_OTHER (sym) & ~STO_ALPHA_STD_GPLOAD)); + break; + case 2: /* Non-std use of PV. */ + break; + + default: + as_bad (_("Invalid argument %d to .prologue."), arg); + break; + } +} + +static char *first_file_directive; + +static void +s_alpha_file (ignore) + int ignore ATTRIBUTE_UNUSED; +{ + /* Save the first .file directive we see, so that we can change our + minds about whether ecoff debugging should or shouldn't be enabled. */ + if (alpha_flag_mdebug < 0 && ! first_file_directive) + { + char *start = input_line_pointer; + size_t len; + + discard_rest_of_line (); + + len = input_line_pointer - start; + first_file_directive = xmalloc (len + 1); + memcpy (first_file_directive, start, len); + first_file_directive[len] = '\0'; + + input_line_pointer = start; + } + + if (ECOFF_DEBUGGING) + ecoff_directive_file (0); + else + dwarf2_directive_file (0); +} + +static void +s_alpha_loc (ignore) + int ignore ATTRIBUTE_UNUSED; +{ + if (ECOFF_DEBUGGING) + ecoff_directive_loc (0); + else + dwarf2_directive_loc (0); +} + +static void +s_alpha_stab (n) + int n; +{ + /* If we've been undecided about mdebug, make up our minds in favour. */ + if (alpha_flag_mdebug < 0) + { + segT sec = subseg_new (".mdebug", 0); + bfd_set_section_flags (stdoutput, sec, SEC_HAS_CONTENTS | SEC_READONLY); + bfd_set_section_alignment (stdoutput, sec, 3); + + ecoff_read_begin_hook (); + + if (first_file_directive) + { + char *save_ilp = input_line_pointer; + input_line_pointer = first_file_directive; + ecoff_directive_file (0); + input_line_pointer = save_ilp; + free (first_file_directive); + } + + alpha_flag_mdebug = 1; + } + s_stab (n); } static void @@ -4580,17 +4659,15 @@ s_alpha_coff_wrapper (which) ecoff_directive_def, ecoff_directive_dim, ecoff_directive_endef, - ecoff_directive_file, ecoff_directive_scl, ecoff_directive_tag, ecoff_directive_val, - ecoff_directive_loc, }; - assert (which >= 0 && which < (int)(sizeof(fns)/sizeof(*fns))); + assert (which >= 0 && which < (int) (sizeof (fns)/sizeof (*fns))); if (ECOFF_DEBUGGING) - (*fns[which])(0); + (*fns[which]) (0); else { as_bad (_("ECOFF debugging is disabled.")); @@ -4600,16 +4677,16 @@ s_alpha_coff_wrapper (which) #endif /* OBJ_ELF */ #ifdef OBJ_EVAX - + /* Handle the section specific pseudo-op. */ - + static void s_alpha_section (secid) int secid; { int temp; #define EVAX_SECTION_COUNT 5 - static char *section_name[EVAX_SECTION_COUNT+1] = + static char *section_name[EVAX_SECTION_COUNT + 1] = { "NULL", ".rdata", ".comm", ".link", ".ctors", ".dtors" }; if ((secid <= 0) || (secid > EVAX_SECTION_COUNT)) @@ -4626,7 +4703,6 @@ s_alpha_section (secid) alpha_current_align = 0; } - /* Parse .ent directives. */ static void @@ -4664,7 +4740,6 @@ s_alpha_ent (ignore) return; } - /* Parse .frame ,,RA, directives. */ static void @@ -4757,15 +4832,15 @@ s_alpha_pdesc (ignore) name = input_line_pointer; name_end = get_symbol_end (); - if (strncmp(name, "stack", 5) == 0) + if (strncmp (name, "stack", 5) == 0) { alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_STACK; } - else if (strncmp(name, "reg", 3) == 0) + else if (strncmp (name, "reg", 3) == 0) { alpha_evax_proc.pdsckind = PDSC_S_K_KIND_FP_REGISTER; } - else if (strncmp(name, "null", 4) == 0) + else if (strncmp (name, "null", 4) == 0) { alpha_evax_proc.pdsckind = PDSC_S_K_KIND_NULL; } @@ -4790,34 +4865,33 @@ s_alpha_pdesc (ignore) seginfo->literal_pool_size += 16; *p = alpha_evax_proc.pdsckind - | ((alpha_evax_proc.framereg == 29) ? PDSC_S_M_BASE_REG_IS_FP : 0); - *(p+1) = PDSC_S_M_NATIVE - | PDSC_S_M_NO_JACKET; + | ((alpha_evax_proc.framereg == 29) ? PDSC_S_M_BASE_REG_IS_FP : 0); + *(p + 1) = PDSC_S_M_NATIVE | PDSC_S_M_NO_JACKET; switch (alpha_evax_proc.pdsckind) { - case PDSC_S_K_KIND_NULL: - *(p+2) = 0; - *(p+3) = 0; - break; - case PDSC_S_K_KIND_FP_REGISTER: - *(p+2) = alpha_evax_proc.fp_save; - *(p+3) = alpha_evax_proc.ra_save; - break; - case PDSC_S_K_KIND_FP_STACK: - md_number_to_chars (p+2, (valueT)alpha_evax_proc.rsa_offset, 2); - break; - default: /* impossible */ - break; + case PDSC_S_K_KIND_NULL: + *(p + 2) = 0; + *(p + 3) = 0; + break; + case PDSC_S_K_KIND_FP_REGISTER: + *(p + 2) = alpha_evax_proc.fp_save; + *(p + 3) = alpha_evax_proc.ra_save; + break; + case PDSC_S_K_KIND_FP_STACK: + md_number_to_chars (p + 2, (valueT) alpha_evax_proc.rsa_offset, 2); + break; + default: /* impossible */ + break; } - *(p+4) = 0; - *(p+5) = alpha_evax_proc.type & 0x0f; + *(p + 4) = 0; + *(p + 5) = alpha_evax_proc.type & 0x0f; /* Signature offset. */ - md_number_to_chars (p+6, (valueT)0, 2); + md_number_to_chars (p + 6, (valueT) 0, 2); - fix_new_exp (frag_now, p-frag_now->fr_literal+8, 8, &exp, 0, BFD_RELOC_64); + fix_new_exp (frag_now, p - frag_now->fr_literal+8, 8, &exp, 0, BFD_RELOC_64); if (alpha_evax_proc.pdsckind == PDSC_S_K_KIND_NULL) return; @@ -4829,12 +4903,12 @@ s_alpha_pdesc (ignore) seginfo->literal_pool_size += 8; /* pdesc+16: Size. */ - md_number_to_chars (p, (valueT)alpha_evax_proc.framesize, 4); + md_number_to_chars (p, (valueT) alpha_evax_proc.framesize, 4); - md_number_to_chars (p+4, (valueT)0, 2); + md_number_to_chars (p + 4, (valueT) 0, 2); /* Entry length. */ - md_number_to_chars (p+6, alpha_evax_proc.prologue, 2); + md_number_to_chars (p + 6, alpha_evax_proc.prologue, 2); if (alpha_evax_proc.pdsckind == PDSC_S_K_KIND_FP_REGISTER) return; @@ -4848,12 +4922,11 @@ s_alpha_pdesc (ignore) /* pdesc+24: register masks. */ md_number_to_chars (p, alpha_evax_proc.imask, 4); - md_number_to_chars (p+4, alpha_evax_proc.fmask, 4); + md_number_to_chars (p + 4, alpha_evax_proc.fmask, 4); return; } - /* Support for crash debug on vms. */ static void @@ -4889,12 +4962,11 @@ s_alpha_name (ignore) p = frag_more (8); seginfo->literal_pool_size += 8; - fix_new_exp (frag_now, p-frag_now->fr_literal, 8, &exp, 0, BFD_RELOC_64); + fix_new_exp (frag_now, p - frag_now->fr_literal, 8, &exp, 0, BFD_RELOC_64); return; } - static void s_alpha_linkage (ignore) int ignore; @@ -4923,7 +4995,6 @@ s_alpha_linkage (ignore) return; } - static void s_alpha_code_address (ignore) int ignore; @@ -4952,7 +5023,6 @@ s_alpha_code_address (ignore) return; } - static void s_alpha_fp_save (ignore) int ignore; @@ -4964,7 +5034,6 @@ s_alpha_fp_save (ignore) return; } - static void s_alpha_mask (ignore) int ignore; @@ -4979,14 +5048,13 @@ s_alpha_mask (ignore) else { alpha_evax_proc.imask = val; - (void)get_absolute_expression (); + (void) get_absolute_expression (); } demand_empty_rest_of_line (); return; } - static void s_alpha_fmask (ignore) int ignore; @@ -5022,7 +5090,6 @@ s_alpha_end (ignore) return; } - static void s_alpha_file (ignore) int ignore; @@ -5064,13 +5131,13 @@ s_alpha_gprel32 (ignore) switch (e.X_op) { case O_constant: - e.X_add_symbol = section_symbol(absolute_section); + e.X_add_symbol = section_symbol (absolute_section); e.X_op = O_symbol; /* FALLTHRU */ case O_symbol: break; default: - abort(); + abort (); } #else #ifdef OBJ_ECOFF @@ -5097,7 +5164,7 @@ s_alpha_gprel32 (ignore) p = frag_more (4); memset (p, 0, 4); - fix_new_exp (frag_now, p-frag_now->fr_literal, 4, + fix_new_exp (frag_now, p - frag_now->fr_literal, 4, &e, 0, BFD_RELOC_GPREL32); } @@ -5366,45 +5433,43 @@ s_alpha_arch (ignored) ch = get_symbol_end (); for (p = cpu_types; p->name; ++p) - if (strcmp(name, p->name) == 0) + if (strcmp (name, p->name) == 0) { - alpha_target_name = p->name, alpha_target = p->flags; + alpha_target_name = p->name, alpha_target = p->flags; goto found; } - as_warn("Unknown CPU identifier `%s'", name); + as_warn ("Unknown CPU identifier `%s'", name); found: *input_line_pointer = ch; demand_empty_rest_of_line (); } - - #ifdef DEBUG1 /* print token expression with alpha specific extension. */ static void -alpha_print_token(f, exp) - FILE *f; - const expressionS *exp; +alpha_print_token (f, exp) + FILE *f; + const expressionS *exp; { switch (exp->X_op) { - case O_cpregister: - putc (',', f); - /* FALLTHRU */ - case O_pregister: - putc ('(', f); - { - expressionS nexp = *exp; - nexp.X_op = O_register; - print_expr (f, &nexp); - } - putc (')', f); - break; - default: - print_expr (f, exp); - break; + case O_cpregister: + putc (',', f); + /* FALLTHRU */ + case O_pregister: + putc ('(', f); + { + expressionS nexp = *exp; + nexp.X_op = O_register; + print_expr (f, &nexp); + } + putc (')', f); + break; + default: + print_expr (f, exp); + break; } return; } @@ -5412,8 +5477,7 @@ alpha_print_token(f, exp) /* The target specific pseudo-ops which we support. */ -const pseudo_typeS md_pseudo_table[] = -{ +const pseudo_typeS md_pseudo_table[] = { #ifdef OBJ_ECOFF {"comm", s_alpha_comm, 0}, /* osf1 compiler does this */ {"rdata", s_alpha_rdata, 0}, @@ -5455,17 +5519,19 @@ const pseudo_typeS md_pseudo_table[] = {"fmask", s_alpha_mask, 1}, {"frame", s_alpha_frame, 0}, {"prologue", s_alpha_prologue, 0}, + {"file", s_alpha_file, 5}, + {"loc", s_alpha_loc, 9}, + {"stabs", s_alpha_stab, 's'}, + {"stabn", s_alpha_stab, 'n'}, /* COFF debugging related pseudos. */ {"begin", s_alpha_coff_wrapper, 0}, {"bend", s_alpha_coff_wrapper, 1}, {"def", s_alpha_coff_wrapper, 2}, {"dim", s_alpha_coff_wrapper, 3}, {"endef", s_alpha_coff_wrapper, 4}, - {"file", s_alpha_coff_wrapper, 5}, - {"scl", s_alpha_coff_wrapper, 6}, - {"tag", s_alpha_coff_wrapper, 7}, - {"val", s_alpha_coff_wrapper, 8}, - {"loc", s_alpha_coff_wrapper, 9}, + {"scl", s_alpha_coff_wrapper, 5}, + {"tag", s_alpha_coff_wrapper, 6}, + {"val", s_alpha_coff_wrapper, 7}, #else {"prologue", s_ignore, 0}, #endif @@ -5518,7 +5584,6 @@ const pseudo_typeS md_pseudo_table[] = {NULL, 0, 0}, }; - /* Build a BFD section with its flags set appropriately for the .lita, .lit8, or .lit4 sections. */ @@ -5566,7 +5631,8 @@ select_gp_value () assert (alpha_gp_value == 0); /* Get minus-one in whatever width... */ - alpha_gp_value = 0; alpha_gp_value--; + alpha_gp_value = 0; + alpha_gp_value--; /* Select the smallest VMA of these existing sections. */ maybe_set_gp (alpha_lita_section); @@ -5607,27 +5673,8 @@ alpha_align (n, pfill, label, force) if (pfill == NULL) { - if (n > 2 - && (bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0) - { - static char const unop[4] = { 0x00, 0x00, 0xe0, 0x2f }; - static char const nopunop[8] = { - 0x1f, 0x04, 0xff, 0x47, - 0x00, 0x00, 0xe0, 0x2f - }; - - /* First, make sure we're on a four-byte boundary, in case - someone has been putting .byte values into the text - section. The DEC assembler silently fills with unaligned - no-op instructions. This will zero-fill, then nop-fill - with proper alignment. */ - if (alpha_current_align < 2) - frag_align (2, 0, 0); - if (alpha_current_align < 3) - frag_align_pattern (3, unop, sizeof unop, 0); - if (n > 3) - frag_align_pattern (n, nopunop, sizeof nopunop, 0); - } + if (subseg_text_p (now_seg)) + frag_align_code (n, 0); else frag_align (n, 0, 0); } @@ -5644,10 +5691,55 @@ alpha_align (n, pfill, label, force) record_alignment (now_seg, n); - /* ??? if alpha_flag_relax && force && elf, record the requested alignment + /* ??? If alpha_flag_relax && force && elf, record the requested alignment in a reloc for the linker to see. */ } +/* This is called from HANDLE_ALIGN in write.c. Fill in the contents + of an rs_align_code fragment. */ + +void +alpha_handle_align (fragp) + fragS *fragp; +{ + static char const unop[4] = { 0x00, 0x00, 0xe0, 0x2f }; + static char const nopunop[8] = { + 0x1f, 0x04, 0xff, 0x47, + 0x00, 0x00, 0xe0, 0x2f + }; + + int bytes, fix; + char *p; + + 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 & 3) + { + fix = bytes & 3; + memset (p, 0, fix); + p += fix; + bytes -= fix; + } + + if (bytes & 4) + { + memcpy (p, unop, 4); + p += 4; + bytes -= 4; + fix += 4; + } + + memcpy (p, nopunop, 8); + + fragp->fr_fix += fix; + fragp->fr_var = 8; +} + /* The Alpha has support for some VAX floating point types, as well as for IEEE floating point. We consider IEEE to be the primary floating point format, and sneak in the VAX floating point support here. */ diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h index 632b04e..7edc412 100644 --- a/contrib/binutils/gas/config/tc-alpha.h +++ b/contrib/binutils/gas/config/tc-alpha.h @@ -90,6 +90,11 @@ extern void alpha_define_label PARAMS ((symbolS *)); #define md_cons_align(nbytes) alpha_cons_align (nbytes) extern void alpha_cons_align PARAMS ((int)); +#define HANDLE_ALIGN(fragp) alpha_handle_align (fragp) +extern void alpha_handle_align PARAMS ((struct frag *)); + +#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4 + 8) + #ifdef OBJ_ECOFF #define tc_frob_file_before_adjust() alpha_frob_file_before_adjust () extern void alpha_frob_file_before_adjust PARAMS ((void)); @@ -146,3 +151,5 @@ do { \ (long)fixP->tc_fix_data.next_lituse); \ } while (0) #endif + +#define DWARF2_LINE_MIN_INSN_LENGTH 4 diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c index 04f0060..514dba7 100644 --- a/contrib/binutils/gas/config/tc-arm.c +++ b/contrib/binutils/gas/config/tc-arm.c @@ -1,5 +1,6 @@ /* tc-arm.c -- Assemble for the ARM - Copyright (C) 1994, 95, 96, 97, 98, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 1999, 2000 + Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modified by David Taylor (dtaylor@armltd.co.uk) @@ -25,7 +26,7 @@ #define NO_RELOC 0 #include "as.h" -/* need TARGET_CPU */ +/* Need TARGET_CPU. */ #include "config.h" #include "subsegs.h" #include "obstack.h" @@ -34,6 +35,7 @@ #ifdef OBJ_ELF #include "elf/arm.h" +#include "dwarf2dbg.h" #endif /* Types of processor to assemble for. */ @@ -42,46 +44,53 @@ #define ARM_3 0x00000004 #define ARM_250 ARM_3 #define ARM_6 0x00000008 -#define ARM_7 ARM_6 /* same core instruction set */ -#define ARM_8 ARM_6 /* same core instruction set */ -#define ARM_9 ARM_6 /* same core instruction set */ +#define ARM_7 ARM_6 /* Same core instruction set. */ +#define ARM_8 ARM_6 /* Same core instruction set. */ +#define ARM_9 ARM_6 /* Same core instruction set. */ #define ARM_CPU_MASK 0x0000000f -/* The following bitmasks control CPU extensions (ARM7 onwards): */ -#define ARM_LONGMUL 0x00000010 /* allow long multiplies */ -#define ARM_HALFWORD 0x00000020 /* allow half word loads */ -#define ARM_THUMB 0x00000040 /* allow BX instruction */ -#define ARM_EXT_V5 0x00000080 /* allow CLZ etc */ -#define ARM_EXT_V5E 0x00000200 /* "El Segundo" */ +/* The following bitmasks control CPU extensions (ARM7 onwards): */ +#define ARM_EXT_LONGMUL 0x00000010 /* Allow long multiplies. */ +#define ARM_EXT_HALFWORD 0x00000020 /* Allow half word loads. */ +#define ARM_EXT_THUMB 0x00000040 /* Allow BX instruction. */ +#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */ +#define ARM_EXT_V5E 0x00000100 /* "El Segundo". */ +#define ARM_EXT_XSCALE 0x00000200 /* Allow MIA etc. */ /* Architectures are the sum of the base and extensions. */ -#define ARM_ARCH_V4 (ARM_7 | ARM_LONGMUL | ARM_HALFWORD) -#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_THUMB) +#define ARM_ARCH_V3M ARM_EXT_LONGMUL +#define ARM_ARCH_V4 (ARM_ARCH_V3M | ARM_EXT_HALFWORD) +#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_EXT_THUMB) #define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5) -#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_THUMB) +#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_EXT_THUMB) +#define ARM_ARCH_V5TE (ARM_ARCH_V5T | ARM_EXT_V5E) +#define ARM_ARCH_XSCALE (ARM_ARCH_V5TE | ARM_EXT_XSCALE) /* Some useful combinations: */ #define ARM_ANY 0x00ffffff #define ARM_2UP (ARM_ANY - ARM_1) -#define ARM_ALL ARM_2UP /* Not arm1 only */ +#define ARM_ALL ARM_2UP /* Not arm1 only. */ #define ARM_3UP 0x00fffffc -#define ARM_6UP 0x00fffff8 /* Includes ARM7 */ +#define ARM_6UP 0x00fffff8 /* Includes ARM7. */ #define FPU_CORE 0x80000000 #define FPU_FPA10 0x40000000 #define FPU_FPA11 0x40000000 #define FPU_NONE 0 -/* Some useful combinations */ -#define FPU_ALL 0xff000000 /* Note this is ~ARM_ANY */ -#define FPU_MEMMULTI 0x7f000000 /* Not fpu_core */ +/* Some useful combinations. */ +#define FPU_ALL 0xff000000 /* Note this is ~ARM_ANY. */ +#define FPU_MEMMULTI 0x7f000000 /* Not fpu_core. */ - #ifndef CPU_DEFAULT +#if defined __XSCALE__ +#define CPU_DEFAULT (ARM_9 | ARM_ARCH_XSCALE) +#else #if defined __thumb__ -#define CPU_DEFAULT (ARM_ARCH_V4 | ARM_THUMB) +#define CPU_DEFAULT (ARM_7 | ARM_ARCH_V4T) #else -#define CPU_DEFAULT ARM_ALL +#define CPU_DEFAULT ARM_ALL +#endif #endif #endif @@ -90,17 +99,18 @@ #endif #define streq(a, b) (strcmp (a, b) == 0) -#define skip_whitespace(str) while (* (str) == ' ') ++ (str) +#define skip_whitespace(str) while (*(str) == ' ') ++(str) -static unsigned long cpu_variant = CPU_DEFAULT | FPU_DEFAULT; +static unsigned long cpu_variant = CPU_DEFAULT | FPU_DEFAULT; static int target_oabi = 0; #if defined OBJ_COFF || defined OBJ_ELF -/* Flags stored in private area of BFD structure */ -static boolean uses_apcs_26 = false; -static boolean support_interwork = false; -static boolean uses_apcs_float = false; -static boolean pic_code = false; +/* Flags stored in private area of BFD structure. */ +static boolean uses_apcs_26 = false; +static boolean atpcs = false; +static boolean support_interwork = false; +static boolean uses_apcs_float = false; +static boolean pic_code = false; #endif /* This array holds the chars that always start a comment. If the @@ -116,19 +126,15 @@ CONST char comment_chars[] = "@"; /* Also note that comments like this one will always work. */ CONST char line_comment_chars[] = "#"; -#ifdef TE_LINUX CONST char line_separator_chars[] = ";"; -#else -CONST char line_separator_chars[] = ""; -#endif /* Chars that can be used to separate mant from exp in floating point numbers. */ CONST char EXP_CHARS[] = "eE"; -/* Chars that mean this number is a floating point constant */ -/* As in 0f12.456 */ -/* or 0d1.2345e12 */ +/* Chars that mean this number is a floating point constant. */ +/* As in 0f12.456 */ +/* or 0d1.2345e12 */ CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP"; @@ -137,14 +143,19 @@ CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP"; #define is_immediate_prefix(C) ((C) == '#' || (C) == '$') #ifdef OBJ_ELF -symbolS * GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */ +/* Pre-defined "_GLOBAL_OFFSET_TABLE_" */ +symbolS * GOT_symbol; #endif -CONST int md_reloc_size = 8; /* Size of relocation record */ +/* Size of relocation record. */ +CONST int md_reloc_size = 8; + +/* 0: assemble for ARM, + 1: assemble for Thumb, + 2: assemble for Thumb even though target CPU does not support thumb + instructions. */ +static int thumb_mode = 0; -static int thumb_mode = 0; /* 0: assemble for ARM, 1: assemble for Thumb, - 2: assemble for Thumb even though target cpu - does not support thumb instructions. */ typedef struct arm_fix { int thumb_mode; @@ -157,35 +168,61 @@ struct arm_it int suffix; int size; struct - { - bfd_reloc_code_real_type type; - expressionS exp; - int pc_rel; - } reloc; + { + bfd_reloc_code_real_type type; + expressionS exp; + int pc_rel; + } reloc; }; struct arm_it inst; -struct asm_shift +enum asm_shift_index { - CONST char * template; - unsigned long value; + SHIFT_LSL = 0, + SHIFT_LSR, + SHIFT_ASR, + SHIFT_ROR, + SHIFT_RRX +}; + +struct asm_shift_properties +{ + enum asm_shift_index index; + unsigned long bit_field; + unsigned int allows_0 : 1; + unsigned int allows_32 : 1; +}; + +static const struct asm_shift_properties shift_properties [] = +{ + { SHIFT_LSL, 0, 1, 0}, + { SHIFT_LSR, 0x20, 0, 1}, + { SHIFT_ASR, 0x40, 0, 1}, + { SHIFT_ROR, 0x60, 0, 0}, + { SHIFT_RRX, 0x60, 0, 0} +}; + +struct asm_shift_name +{ + const char * name; + const struct asm_shift_properties * properties; }; -static CONST struct asm_shift shift[] = -{ - {"asl", 0}, - {"lsl", 0}, - {"lsr", 0x00000020}, - {"asr", 0x00000040}, - {"ror", 0x00000060}, - {"rrx", 0x00000060}, - {"ASL", 0}, - {"LSL", 0}, - {"LSR", 0x00000020}, - {"ASR", 0x00000040}, - {"ROR", 0x00000060}, - {"RRX", 0x00000060} +static const struct asm_shift_name shift_names [] = +{ + { "asl", shift_properties + SHIFT_LSL }, + { "lsl", shift_properties + SHIFT_LSL }, + { "lsr", shift_properties + SHIFT_LSR }, + { "asr", shift_properties + SHIFT_ASR }, + { "ror", shift_properties + SHIFT_ROR }, + { "rrx", shift_properties + SHIFT_RRX }, + { "ASL", shift_properties + SHIFT_LSL }, + { "LSL", shift_properties + SHIFT_LSL }, + { "LSR", shift_properties + SHIFT_LSR }, + { "ASR", shift_properties + SHIFT_ASR }, + { "ROR", shift_properties + SHIFT_ROR }, + { "RRX", shift_properties + SHIFT_RRX } }; #define NO_SHIFT_RESTRICT 1 @@ -193,7 +230,7 @@ static CONST struct asm_shift shift[] = #define NUM_FLOAT_VALS 8 -CONST char * fp_const[] = +CONST char * fp_const[] = { "0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0", 0 }; @@ -217,9 +254,11 @@ LITTLENUM_TYPE fp_values[NUM_FLOAT_VALS][MAX_LITTLENUMS]; #define CP_T_UD 0x00800000 #define CP_T_WB 0x00200000 -#define CONDS_BIT (0x00100000) -#define LOAD_BIT (0x00100000) -#define TRANS_BIT (0x00200000) +#define CONDS_BIT 0x00100000 +#define LOAD_BIT 0x00100000 +#define TRANS_BIT 0x00200000 + +#define DOUBLE_LOAD_FLAG 0x00000001 struct asm_cond { @@ -230,7 +269,7 @@ struct asm_cond /* This is to save a hash look-up in the common case. */ #define COND_ALWAYS 0xe0000000 -static CONST struct asm_cond conds[] = +static CONST struct asm_cond conds[] = { {"eq", 0x00000000}, {"ne", 0x10000000}, @@ -255,8 +294,8 @@ static CONST struct asm_cond conds[] = the set_bits: */ struct asm_flg { - CONST char * template; /* Basic flag string */ - unsigned long set_bits; /* Bits to set */ + CONST char * template; /* Basic flag string. */ + unsigned long set_bits; /* Bits to set. */ }; static CONST struct asm_flg s_flag[] = @@ -267,6 +306,7 @@ static CONST struct asm_flg s_flag[] = static CONST struct asm_flg ldr_flags[] = { + {"d", DOUBLE_LOAD_FLAG}, {"b", 0x00400000}, {"t", TRANS_BIT}, {"bt", 0x00400000 | TRANS_BIT}, @@ -278,6 +318,7 @@ static CONST struct asm_flg ldr_flags[] = static CONST struct asm_flg str_flags[] = { + {"d", DOUBLE_LOAD_FLAG}, {"b", 0x00400000}, {"t", TRANS_BIT}, {"bt", 0x00400000 | TRANS_BIT}, @@ -303,24 +344,24 @@ static CONST struct asm_flg ldm_flags[] = {"ed", 0x01800000}, {"fd", 0x00800000}, {"ea", 0x01000000}, - {"fa", 0x08000000}, + {"fa", 0x00000000}, {"ib", 0x01800000}, {"ia", 0x00800000}, {"db", 0x01000000}, - {"da", 0x08000000}, + {"da", 0x00000000}, {NULL, 0} }; static CONST struct asm_flg stm_flags[] = { - {"ed", 0x08000000}, + {"ed", 0x00000000}, {"fd", 0x01000000}, {"ea", 0x00800000}, {"fa", 0x01800000}, {"ib", 0x01800000}, {"ia", 0x00800000}, {"db", 0x01000000}, - {"da", 0x08000000}, + {"da", 0x00000000}, {NULL, 0} }; @@ -386,8 +427,11 @@ struct asm_psr unsigned long field; }; -#define SPSR_BIT (1 << 22) /* The bit that distnguishes CPSR and SPSR. */ -#define PSR_SHIFT 16 /* How many bits to shift the PSR_xxx bits up by. */ +/* The bit that distnguishes CPSR and SPSR. */ +#define SPSR_BIT (1 << 22) + +/* How many bits to shift the PSR_xxx bits up by. */ +#define PSR_SHIFT 16 #define PSR_c (1 << 0) #define PSR_x (1 << 1) @@ -403,7 +447,7 @@ static CONST struct asm_psr psrs[] = {"CPSR_flg", true, PSR_f}, {"CPSR_f", true, PSR_f}, {"SPSR_flg", false, PSR_f}, - {"SPSR_f", false, PSR_f}, + {"SPSR_f", false, PSR_f}, {"CPSR_c", true, PSR_c}, {"CPSR_ctl", true, PSR_c}, {"SPSR_c", false, PSR_c}, @@ -412,24 +456,131 @@ static CONST struct asm_psr psrs[] = {"CPSR_s", true, PSR_s}, {"SPSR_x", false, PSR_x}, {"SPSR_s", false, PSR_s}, - /* For backwards compatability with older toolchain we also - support lower case versions of some of these flags. */ - {"cpsr", true, PSR_c | PSR_f}, - {"cpsr_all", true, PSR_c | PSR_f}, - {"spsr", false, PSR_c | PSR_f}, - {"spsr_all", false, PSR_c | PSR_f}, - {"cpsr_flg", true, PSR_f}, - {"cpsr_f", true, PSR_f}, - {"spsr_flg", false, PSR_f}, - {"spsr_f", false, PSR_f}, - {"cpsr_c", true, PSR_c}, - {"cpsr_ctl", true, PSR_c}, - {"spsr_c", false, PSR_c}, - {"spsr_ctl", false, PSR_c} + /* Combinations of flags. */ + {"CPSR_fs", true, PSR_f | PSR_s}, + {"CPSR_fx", true, PSR_f | PSR_x}, + {"CPSR_fc", true, PSR_f | PSR_c}, + {"CPSR_sf", true, PSR_s | PSR_f}, + {"CPSR_sx", true, PSR_s | PSR_x}, + {"CPSR_sc", true, PSR_s | PSR_c}, + {"CPSR_xf", true, PSR_x | PSR_f}, + {"CPSR_xs", true, PSR_x | PSR_s}, + {"CPSR_xc", true, PSR_x | PSR_c}, + {"CPSR_cf", true, PSR_c | PSR_f}, + {"CPSR_cs", true, PSR_c | PSR_s}, + {"CPSR_cx", true, PSR_c | PSR_x}, + {"CPSR_fsx", true, PSR_f | PSR_s | PSR_x}, + {"CPSR_fsc", true, PSR_f | PSR_s | PSR_c}, + {"CPSR_fxs", true, PSR_f | PSR_x | PSR_s}, + {"CPSR_fxc", true, PSR_f | PSR_x | PSR_c}, + {"CPSR_fcs", true, PSR_f | PSR_c | PSR_s}, + {"CPSR_fcx", true, PSR_f | PSR_c | PSR_x}, + {"CPSR_sfx", true, PSR_s | PSR_f | PSR_x}, + {"CPSR_sfc", true, PSR_s | PSR_f | PSR_c}, + {"CPSR_sxf", true, PSR_s | PSR_x | PSR_f}, + {"CPSR_sxc", true, PSR_s | PSR_x | PSR_c}, + {"CPSR_scf", true, PSR_s | PSR_c | PSR_f}, + {"CPSR_scx", true, PSR_s | PSR_c | PSR_x}, + {"CPSR_xfs", true, PSR_x | PSR_f | PSR_s}, + {"CPSR_xfc", true, PSR_x | PSR_f | PSR_c}, + {"CPSR_xsf", true, PSR_x | PSR_s | PSR_f}, + {"CPSR_xsc", true, PSR_x | PSR_s | PSR_c}, + {"CPSR_xcf", true, PSR_x | PSR_c | PSR_f}, + {"CPSR_xcs", true, PSR_x | PSR_c | PSR_s}, + {"CPSR_cfs", true, PSR_c | PSR_f | PSR_s}, + {"CPSR_cfx", true, PSR_c | PSR_f | PSR_x}, + {"CPSR_csf", true, PSR_c | PSR_s | PSR_f}, + {"CPSR_csx", true, PSR_c | PSR_s | PSR_x}, + {"CPSR_cxf", true, PSR_c | PSR_x | PSR_f}, + {"CPSR_cxs", true, PSR_c | PSR_x | PSR_s}, + {"CPSR_fsxc", true, PSR_f | PSR_s | PSR_x | PSR_c}, + {"CPSR_fscx", true, PSR_f | PSR_s | PSR_c | PSR_x}, + {"CPSR_fxsc", true, PSR_f | PSR_x | PSR_s | PSR_c}, + {"CPSR_fxcs", true, PSR_f | PSR_x | PSR_c | PSR_s}, + {"CPSR_fcsx", true, PSR_f | PSR_c | PSR_s | PSR_x}, + {"CPSR_fcxs", true, PSR_f | PSR_c | PSR_x | PSR_s}, + {"CPSR_sfxc", true, PSR_s | PSR_f | PSR_x | PSR_c}, + {"CPSR_sfcx", true, PSR_s | PSR_f | PSR_c | PSR_x}, + {"CPSR_sxfc", true, PSR_s | PSR_x | PSR_f | PSR_c}, + {"CPSR_sxcf", true, PSR_s | PSR_x | PSR_c | PSR_f}, + {"CPSR_scfx", true, PSR_s | PSR_c | PSR_f | PSR_x}, + {"CPSR_scxf", true, PSR_s | PSR_c | PSR_x | PSR_f}, + {"CPSR_xfsc", true, PSR_x | PSR_f | PSR_s | PSR_c}, + {"CPSR_xfcs", true, PSR_x | PSR_f | PSR_c | PSR_s}, + {"CPSR_xsfc", true, PSR_x | PSR_s | PSR_f | PSR_c}, + {"CPSR_xscf", true, PSR_x | PSR_s | PSR_c | PSR_f}, + {"CPSR_xcfs", true, PSR_x | PSR_c | PSR_f | PSR_s}, + {"CPSR_xcsf", true, PSR_x | PSR_c | PSR_s | PSR_f}, + {"CPSR_cfsx", true, PSR_c | PSR_f | PSR_s | PSR_x}, + {"CPSR_cfxs", true, PSR_c | PSR_f | PSR_x | PSR_s}, + {"CPSR_csfx", true, PSR_c | PSR_s | PSR_f | PSR_x}, + {"CPSR_csxf", true, PSR_c | PSR_s | PSR_x | PSR_f}, + {"CPSR_cxfs", true, PSR_c | PSR_x | PSR_f | PSR_s}, + {"CPSR_cxsf", true, PSR_c | PSR_x | PSR_s | PSR_f}, + {"SPSR_fs", false, PSR_f | PSR_s}, + {"SPSR_fx", false, PSR_f | PSR_x}, + {"SPSR_fc", false, PSR_f | PSR_c}, + {"SPSR_sf", false, PSR_s | PSR_f}, + {"SPSR_sx", false, PSR_s | PSR_x}, + {"SPSR_sc", false, PSR_s | PSR_c}, + {"SPSR_xf", false, PSR_x | PSR_f}, + {"SPSR_xs", false, PSR_x | PSR_s}, + {"SPSR_xc", false, PSR_x | PSR_c}, + {"SPSR_cf", false, PSR_c | PSR_f}, + {"SPSR_cs", false, PSR_c | PSR_s}, + {"SPSR_cx", false, PSR_c | PSR_x}, + {"SPSR_fsx", false, PSR_f | PSR_s | PSR_x}, + {"SPSR_fsc", false, PSR_f | PSR_s | PSR_c}, + {"SPSR_fxs", false, PSR_f | PSR_x | PSR_s}, + {"SPSR_fxc", false, PSR_f | PSR_x | PSR_c}, + {"SPSR_fcs", false, PSR_f | PSR_c | PSR_s}, + {"SPSR_fcx", false, PSR_f | PSR_c | PSR_x}, + {"SPSR_sfx", false, PSR_s | PSR_f | PSR_x}, + {"SPSR_sfc", false, PSR_s | PSR_f | PSR_c}, + {"SPSR_sxf", false, PSR_s | PSR_x | PSR_f}, + {"SPSR_sxc", false, PSR_s | PSR_x | PSR_c}, + {"SPSR_scf", false, PSR_s | PSR_c | PSR_f}, + {"SPSR_scx", false, PSR_s | PSR_c | PSR_x}, + {"SPSR_xfs", false, PSR_x | PSR_f | PSR_s}, + {"SPSR_xfc", false, PSR_x | PSR_f | PSR_c}, + {"SPSR_xsf", false, PSR_x | PSR_s | PSR_f}, + {"SPSR_xsc", false, PSR_x | PSR_s | PSR_c}, + {"SPSR_xcf", false, PSR_x | PSR_c | PSR_f}, + {"SPSR_xcs", false, PSR_x | PSR_c | PSR_s}, + {"SPSR_cfs", false, PSR_c | PSR_f | PSR_s}, + {"SPSR_cfx", false, PSR_c | PSR_f | PSR_x}, + {"SPSR_csf", false, PSR_c | PSR_s | PSR_f}, + {"SPSR_csx", false, PSR_c | PSR_s | PSR_x}, + {"SPSR_cxf", false, PSR_c | PSR_x | PSR_f}, + {"SPSR_cxs", false, PSR_c | PSR_x | PSR_s}, + {"SPSR_fsxc", false, PSR_f | PSR_s | PSR_x | PSR_c}, + {"SPSR_fscx", false, PSR_f | PSR_s | PSR_c | PSR_x}, + {"SPSR_fxsc", false, PSR_f | PSR_x | PSR_s | PSR_c}, + {"SPSR_fxcs", false, PSR_f | PSR_x | PSR_c | PSR_s}, + {"SPSR_fcsx", false, PSR_f | PSR_c | PSR_s | PSR_x}, + {"SPSR_fcxs", false, PSR_f | PSR_c | PSR_x | PSR_s}, + {"SPSR_sfxc", false, PSR_s | PSR_f | PSR_x | PSR_c}, + {"SPSR_sfcx", false, PSR_s | PSR_f | PSR_c | PSR_x}, + {"SPSR_sxfc", false, PSR_s | PSR_x | PSR_f | PSR_c}, + {"SPSR_sxcf", false, PSR_s | PSR_x | PSR_c | PSR_f}, + {"SPSR_scfx", false, PSR_s | PSR_c | PSR_f | PSR_x}, + {"SPSR_scxf", false, PSR_s | PSR_c | PSR_x | PSR_f}, + {"SPSR_xfsc", false, PSR_x | PSR_f | PSR_s | PSR_c}, + {"SPSR_xfcs", false, PSR_x | PSR_f | PSR_c | PSR_s}, + {"SPSR_xsfc", false, PSR_x | PSR_s | PSR_f | PSR_c}, + {"SPSR_xscf", false, PSR_x | PSR_s | PSR_c | PSR_f}, + {"SPSR_xcfs", false, PSR_x | PSR_c | PSR_f | PSR_s}, + {"SPSR_xcsf", false, PSR_x | PSR_c | PSR_s | PSR_f}, + {"SPSR_cfsx", false, PSR_c | PSR_f | PSR_s | PSR_x}, + {"SPSR_cfxs", false, PSR_c | PSR_f | PSR_x | PSR_s}, + {"SPSR_csfx", false, PSR_c | PSR_s | PSR_f | PSR_x}, + {"SPSR_csxf", false, PSR_c | PSR_s | PSR_x | PSR_f}, + {"SPSR_cxfs", false, PSR_c | PSR_x | PSR_f | PSR_s}, + {"SPSR_cxsf", false, PSR_c | PSR_x | PSR_s | PSR_f}, }; /* Functions called by parser. */ -/* ARM instructions */ +/* ARM instructions. */ static void do_arit PARAMS ((char *, unsigned long)); static void do_cmp PARAMS ((char *, unsigned long)); static void do_mov PARAMS ((char *, unsigned long)); @@ -437,25 +588,49 @@ static void do_ldst PARAMS ((char *, unsigned long)); static void do_ldmstm PARAMS ((char *, unsigned long)); static void do_branch PARAMS ((char *, unsigned long)); static void do_swi PARAMS ((char *, unsigned long)); -/* Pseudo Op codes */ +/* Pseudo Op codes. */ static void do_adr PARAMS ((char *, unsigned long)); static void do_adrl PARAMS ((char *, unsigned long)); static void do_nop PARAMS ((char *, unsigned long)); -/* ARM 2 */ +/* ARM 2. */ static void do_mul PARAMS ((char *, unsigned long)); static void do_mla PARAMS ((char *, unsigned long)); -/* ARM 3 */ +/* ARM 3. */ static void do_swap PARAMS ((char *, unsigned long)); -/* ARM 6 */ +/* ARM 6. */ static void do_msr PARAMS ((char *, unsigned long)); static void do_mrs PARAMS ((char *, unsigned long)); -/* ARM 7M */ +/* ARM 7M. */ static void do_mull PARAMS ((char *, unsigned long)); -/* ARM THUMB */ +/* ARM THUMB. */ static void do_bx PARAMS ((char *, unsigned long)); - -/* Coprocessor Instructions */ +/* ARM_EXT_XScale. */ +static void do_mia PARAMS ((char *, unsigned long)); +static void do_mar PARAMS ((char *, unsigned long)); +static void do_mra PARAMS ((char *, unsigned long)); +static void do_pld PARAMS ((char *, unsigned long)); +static void do_ldrd PARAMS ((char *, unsigned long)); + +/* ARM_EXT_V5. */ +static void do_blx PARAMS ((char *, unsigned long)); +static void do_bkpt PARAMS ((char *, unsigned long)); +static void do_clz PARAMS ((char *, unsigned long)); +static void do_lstc2 PARAMS ((char *, unsigned long)); +static void do_cdp2 PARAMS ((char *, unsigned long)); +static void do_co_reg2 PARAMS ((char *, unsigned long)); + +static void do_t_blx PARAMS ((char *)); +static void do_t_bkpt PARAMS ((char *)); + +/* ARM_EXT_V5E. */ +static void do_smla PARAMS ((char *, unsigned long)); +static void do_smlal PARAMS ((char *, unsigned long)); +static void do_smul PARAMS ((char *, unsigned long)); +static void do_qadd PARAMS ((char *, unsigned long)); +static void do_co_reg2c PARAMS ((char *, unsigned long)); + +/* Coprocessor Instructions. */ static void do_cdp PARAMS ((char *, unsigned long)); static void do_lstc PARAMS ((char *, unsigned long)); static void do_co_reg PARAMS ((char *, unsigned long)); @@ -512,30 +687,49 @@ static bfd_reloc_code_real_type arm_parse_reloc PARAMS ((void)); take 2: */ #define INSN_SIZE 4 -/* LONGEST_INST is the longest basic instruction name without conditions or - flags. ARM7M has 4 of length 5. */ +/* LONGEST_INST is the longest basic instruction name without + conditions or flags. ARM7M has 4 of length 5. El Segundo + has one basic instruction name of length 7 (SMLALxy). */ +#define LONGEST_INST 7 -#define LONGEST_INST 5 +struct asm_opcode +{ + /* Basic string to match. */ + CONST char * template; + + /* Basic instruction code. */ + unsigned long value; + /* Compulsory suffix that must follow conds. If "", then the + instruction is not conditional and must have no suffix. */ + CONST char * comp_suffix; -struct asm_opcode -{ - CONST char * template; /* Basic string to match */ - unsigned long value; /* Basic instruction code */ + /* Bits to toggle if flag 'n' set. */ + CONST struct asm_flg * flags; - /* Compulsory suffix that must follow conds. If "", then the - instruction is not conditional and must have no suffix. */ - CONST char * comp_suffix; + /* Which CPU variants this exists for. */ + unsigned long variants; - CONST struct asm_flg * flags; /* Bits to toggle if flag 'n' set */ - unsigned long variants; /* Which CPU variants this exists for */ - /* Function to call to parse args */ - void (* parms) PARAMS ((char *, unsigned long)); + /* Function to call to parse args. */ + void (* parms) PARAMS ((char *, unsigned long)); }; -static CONST struct asm_opcode insns[] = -{ -/* ARM Instructions */ +static CONST struct asm_opcode insns[] = +{ +/* Intel XScale extensions to ARM V5 ISA. */ + {"mia", 0x0e200010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miaph", 0x0e280010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miabb", 0x0e2c0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miabt", 0x0e2d0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miatb", 0x0e2e0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"miatt", 0x0e2f0010, NULL, NULL, ARM_EXT_XSCALE, do_mia}, + {"mar", 0x0c400000, NULL, NULL, ARM_EXT_XSCALE, do_mar}, + {"mra", 0x0c500000, NULL, NULL, ARM_EXT_XSCALE, do_mra}, + {"pld", 0xf450f000, "", NULL, ARM_EXT_XSCALE, do_pld}, + {"ldr", 0x000000d0, NULL, ldr_flags, ARM_ANY, do_ldrd}, + {"str", 0x000000f0, NULL, str_flags, ARM_ANY, do_ldrd}, + +/* ARM Instructions. */ {"and", 0x00000000, NULL, s_flag, ARM_ANY, do_arit}, {"eor", 0x00200000, NULL, s_flag, ARM_ANY, do_arit}, {"sub", 0x00400000, NULL, s_flag, ARM_ANY, do_arit}, @@ -564,36 +758,36 @@ static CONST struct asm_opcode insns[] = {"bl", 0x0bfffffe, NULL, NULL, ARM_ANY, do_branch}, {"b", 0x0afffffe, NULL, NULL, ARM_ANY, do_branch}, #endif - -/* Pseudo ops */ + +/* Pseudo ops. */ {"adr", 0x028f0000, NULL, NULL, ARM_ANY, do_adr}, {"adrl", 0x028f0000, NULL, NULL, ARM_ANY, do_adrl}, {"nop", 0x01a00000, NULL, NULL, ARM_ANY, do_nop}, -/* ARM 2 multiplies */ +/* ARM 2 multiplies. */ {"mul", 0x00000090, NULL, s_flag, ARM_2UP, do_mul}, {"mla", 0x00200090, NULL, s_flag, ARM_2UP, do_mla}, -/* ARM 3 - swp instructions */ +/* ARM 3 - swp instructions. */ {"swp", 0x01000090, NULL, byte_flag, ARM_3UP, do_swap}, -/* ARM 6 Coprocessor instructions */ +/* ARM 6 Coprocessor instructions. */ {"mrs", 0x010f0000, NULL, NULL, ARM_6UP, do_mrs}, {"msr", 0x0120f000, NULL, NULL, ARM_6UP, do_msr}, /* ScottB: our code uses 0x0128f000 for msr. NickC: but this is wrong because the bits 16 through 19 are handled by the PSR_xxx defines above. */ -/* ARM 7M long multiplies - need signed/unsigned flags! */ - {"smull", 0x00c00090, NULL, s_flag, ARM_LONGMUL, do_mull}, - {"umull", 0x00800090, NULL, s_flag, ARM_LONGMUL, do_mull}, - {"smlal", 0x00e00090, NULL, s_flag, ARM_LONGMUL, do_mull}, - {"umlal", 0x00a00090, NULL, s_flag, ARM_LONGMUL, do_mull}, +/* ARM 7M long multiplies - need signed/unsigned flags! */ + {"smull", 0x00c00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, + {"umull", 0x00800090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, + {"smlal", 0x00e00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, + {"umlal", 0x00a00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull}, -/* ARM THUMB interworking */ - {"bx", 0x012fff10, NULL, NULL, ARM_THUMB, do_bx}, +/* ARM THUMB interworking. */ + {"bx", 0x012fff10, NULL, NULL, ARM_EXT_THUMB, do_bx}, -/* Floating point instructions */ +/* Floating point instructions. */ {"wfs", 0x0e200110, NULL, NULL, FPU_ALL, do_fp_ctrl}, {"rfs", 0x0e300110, NULL, NULL, FPU_ALL, do_fp_ctrl}, {"wfc", 0x0e400110, NULL, NULL, FPU_ALL, do_fp_ctrl}, @@ -647,6 +841,48 @@ static CONST struct asm_opcode insns[] = {"stc", 0x0c000000, NULL, cplong_flag, ARM_2UP, do_lstc}, {"mcr", 0x0e000010, NULL, NULL, ARM_2UP, do_co_reg}, {"mrc", 0x0e100010, NULL, NULL, ARM_2UP, do_co_reg}, + +/* ARM ISA extension 5. */ +/* Note: blx is actually 2 opcodes, so the .value is set dynamically. + And it's sometimes conditional and sometimes not. */ + {"blx", 0, NULL, NULL, ARM_EXT_V5, do_blx}, + {"clz", 0x016f0f10, NULL, NULL, ARM_EXT_V5, do_clz}, + {"bkpt", 0xe1200070, "", NULL, ARM_EXT_V5, do_bkpt}, + {"ldc2", 0xfc100000, "", cplong_flag, ARM_EXT_V5, do_lstc2}, + {"stc2", 0xfc000000, "", cplong_flag, ARM_EXT_V5, do_lstc2}, + {"cdp2", 0xfe000000, "", NULL, ARM_EXT_V5, do_cdp2}, + {"mcr2", 0xfe000010, "", NULL, ARM_EXT_V5, do_co_reg2}, + {"mrc2", 0xfe100010, "", NULL, ARM_EXT_V5, do_co_reg2}, + +/* ARM ISA extension 5E, El Segundo. */ + {"smlabb", 0x01000080, NULL, NULL, ARM_EXT_V5E, do_smla}, + {"smlatb", 0x010000a0, NULL, NULL, ARM_EXT_V5E, do_smla}, + {"smlabt", 0x010000c0, NULL, NULL, ARM_EXT_V5E, do_smla}, + {"smlatt", 0x010000e0, NULL, NULL, ARM_EXT_V5E, do_smla}, + + {"smlawb", 0x01200080, NULL, NULL, ARM_EXT_V5E, do_smla}, + {"smlawt", 0x012000c0, NULL, NULL, ARM_EXT_V5E, do_smla}, + + {"smlalbb",0x01400080, NULL, NULL, ARM_EXT_V5E, do_smlal}, + {"smlaltb",0x014000a0, NULL, NULL, ARM_EXT_V5E, do_smlal}, + {"smlalbt",0x014000c0, NULL, NULL, ARM_EXT_V5E, do_smlal}, + {"smlaltt",0x014000e0, NULL, NULL, ARM_EXT_V5E, do_smlal}, + + {"smulbb", 0x01600080, NULL, NULL, ARM_EXT_V5E, do_smul}, + {"smultb", 0x016000a0, NULL, NULL, ARM_EXT_V5E, do_smul}, + {"smulbt", 0x016000c0, NULL, NULL, ARM_EXT_V5E, do_smul}, + {"smultt", 0x016000e0, NULL, NULL, ARM_EXT_V5E, do_smul}, + + {"smulwb", 0x012000a0, NULL, NULL, ARM_EXT_V5E, do_smul}, + {"smulwt", 0x012000e0, NULL, NULL, ARM_EXT_V5E, do_smul}, + + {"qadd", 0x01000050, NULL, NULL, ARM_EXT_V5E, do_qadd}, + {"qdadd", 0x01400050, NULL, NULL, ARM_EXT_V5E, do_qadd}, + {"qsub", 0x01200050, NULL, NULL, ARM_EXT_V5E, do_qadd}, + {"qdsub", 0x01600050, NULL, NULL, ARM_EXT_V5E, do_qadd}, + + {"mcrr", 0x0c400000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c}, + {"mrrc", 0x0c500000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c}, }; /* Defines for various bits that we will want to toggle. */ @@ -786,75 +1022,85 @@ static int thumb_reg PARAMS ((char ** str, int hi_lo)); #define THUMB_HALFWORD 1 #define THUMB_BYTE 0 -struct thumb_opcode +struct thumb_opcode { - CONST char * template; /* Basic string to match */ - unsigned long value; /* Basic instruction code */ - int size; - unsigned long variants; /* Which CPU variants this exists for */ - void (* parms) PARAMS ((char *)); /* Function to call to parse args */ + /* Basic string to match. */ + CONST char * template; + + /* Basic instruction code. */ + unsigned long value; + + int size; + + /* Which CPU variants this exists for. */ + unsigned long variants; + + /* Function to call to parse args. */ + void (* parms) PARAMS ((char *)); }; static CONST struct thumb_opcode tinsns[] = { - {"adc", 0x4140, 2, ARM_THUMB, do_t_arit}, - {"add", 0x0000, 2, ARM_THUMB, do_t_add}, - {"and", 0x4000, 2, ARM_THUMB, do_t_arit}, - {"asr", 0x0000, 2, ARM_THUMB, do_t_asr}, - {"b", T_OPCODE_BRANCH, 2, ARM_THUMB, do_t_branch12}, - {"beq", 0xd0fe, 2, ARM_THUMB, do_t_branch9}, - {"bne", 0xd1fe, 2, ARM_THUMB, do_t_branch9}, - {"bcs", 0xd2fe, 2, ARM_THUMB, do_t_branch9}, - {"bhs", 0xd2fe, 2, ARM_THUMB, do_t_branch9}, - {"bcc", 0xd3fe, 2, ARM_THUMB, do_t_branch9}, - {"bul", 0xd3fe, 2, ARM_THUMB, do_t_branch9}, - {"blo", 0xd3fe, 2, ARM_THUMB, do_t_branch9}, - {"bmi", 0xd4fe, 2, ARM_THUMB, do_t_branch9}, - {"bpl", 0xd5fe, 2, ARM_THUMB, do_t_branch9}, - {"bvs", 0xd6fe, 2, ARM_THUMB, do_t_branch9}, - {"bvc", 0xd7fe, 2, ARM_THUMB, do_t_branch9}, - {"bhi", 0xd8fe, 2, ARM_THUMB, do_t_branch9}, - {"bls", 0xd9fe, 2, ARM_THUMB, do_t_branch9}, - {"bge", 0xdafe, 2, ARM_THUMB, do_t_branch9}, - {"blt", 0xdbfe, 2, ARM_THUMB, do_t_branch9}, - {"bgt", 0xdcfe, 2, ARM_THUMB, do_t_branch9}, - {"ble", 0xddfe, 2, ARM_THUMB, do_t_branch9}, - {"bal", 0xdefe, 2, ARM_THUMB, do_t_branch9}, - {"bic", 0x4380, 2, ARM_THUMB, do_t_arit}, - {"bl", 0xf7fffffe, 4, ARM_THUMB, do_t_branch23}, - {"bx", 0x4700, 2, ARM_THUMB, do_t_bx}, - {"cmn", T_OPCODE_CMN, 2, ARM_THUMB, do_t_arit}, - {"cmp", 0x0000, 2, ARM_THUMB, do_t_compare}, - {"eor", 0x4040, 2, ARM_THUMB, do_t_arit}, - {"ldmia", 0xc800, 2, ARM_THUMB, do_t_ldmstm}, - {"ldr", 0x0000, 2, ARM_THUMB, do_t_ldr}, - {"ldrb", 0x0000, 2, ARM_THUMB, do_t_ldrb}, - {"ldrh", 0x0000, 2, ARM_THUMB, do_t_ldrh}, - {"ldrsb", 0x5600, 2, ARM_THUMB, do_t_lds}, - {"ldrsh", 0x5e00, 2, ARM_THUMB, do_t_lds}, - {"ldsb", 0x5600, 2, ARM_THUMB, do_t_lds}, - {"ldsh", 0x5e00, 2, ARM_THUMB, do_t_lds}, - {"lsl", 0x0000, 2, ARM_THUMB, do_t_lsl}, - {"lsr", 0x0000, 2, ARM_THUMB, do_t_lsr}, - {"mov", 0x0000, 2, ARM_THUMB, do_t_mov}, - {"mul", T_OPCODE_MUL, 2, ARM_THUMB, do_t_arit}, - {"mvn", T_OPCODE_MVN, 2, ARM_THUMB, do_t_arit}, - {"neg", T_OPCODE_NEG, 2, ARM_THUMB, do_t_arit}, - {"orr", 0x4300, 2, ARM_THUMB, do_t_arit}, - {"pop", 0xbc00, 2, ARM_THUMB, do_t_push_pop}, - {"push", 0xb400, 2, ARM_THUMB, do_t_push_pop}, - {"ror", 0x41c0, 2, ARM_THUMB, do_t_arit}, - {"sbc", 0x4180, 2, ARM_THUMB, do_t_arit}, - {"stmia", 0xc000, 2, ARM_THUMB, do_t_ldmstm}, - {"str", 0x0000, 2, ARM_THUMB, do_t_str}, - {"strb", 0x0000, 2, ARM_THUMB, do_t_strb}, - {"strh", 0x0000, 2, ARM_THUMB, do_t_strh}, - {"swi", 0xdf00, 2, ARM_THUMB, do_t_swi}, - {"sub", 0x0000, 2, ARM_THUMB, do_t_sub}, - {"tst", T_OPCODE_TST, 2, ARM_THUMB, do_t_arit}, - /* Pseudo ops: */ - {"adr", 0x0000, 2, ARM_THUMB, do_t_adr}, - {"nop", 0x46C0, 2, ARM_THUMB, do_t_nop}, /* mov r8,r8 */ + {"adc", 0x4140, 2, ARM_EXT_THUMB, do_t_arit}, + {"add", 0x0000, 2, ARM_EXT_THUMB, do_t_add}, + {"and", 0x4000, 2, ARM_EXT_THUMB, do_t_arit}, + {"asr", 0x0000, 2, ARM_EXT_THUMB, do_t_asr}, + {"b", T_OPCODE_BRANCH, 2, ARM_EXT_THUMB, do_t_branch12}, + {"beq", 0xd0fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bne", 0xd1fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bcs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bhs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bcc", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bul", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"blo", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bmi", 0xd4fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bpl", 0xd5fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bvs", 0xd6fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bvc", 0xd7fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bhi", 0xd8fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bls", 0xd9fe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bge", 0xdafe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"blt", 0xdbfe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bgt", 0xdcfe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"ble", 0xddfe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bal", 0xdefe, 2, ARM_EXT_THUMB, do_t_branch9}, + {"bic", 0x4380, 2, ARM_EXT_THUMB, do_t_arit}, + {"bl", 0xf7fffffe, 4, ARM_EXT_THUMB, do_t_branch23}, + {"blx", 0, 0, ARM_EXT_V5, do_t_blx}, + {"bkpt", 0xbe00, 2, ARM_EXT_V5, do_t_bkpt}, + {"bx", 0x4700, 2, ARM_EXT_THUMB, do_t_bx}, + {"cmn", T_OPCODE_CMN, 2, ARM_EXT_THUMB, do_t_arit}, + {"cmp", 0x0000, 2, ARM_EXT_THUMB, do_t_compare}, + {"eor", 0x4040, 2, ARM_EXT_THUMB, do_t_arit}, + {"ldmia", 0xc800, 2, ARM_EXT_THUMB, do_t_ldmstm}, + {"ldr", 0x0000, 2, ARM_EXT_THUMB, do_t_ldr}, + {"ldrb", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrb}, + {"ldrh", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrh}, + {"ldrsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds}, + {"ldrsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds}, + {"ldsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds}, + {"ldsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds}, + {"lsl", 0x0000, 2, ARM_EXT_THUMB, do_t_lsl}, + {"lsr", 0x0000, 2, ARM_EXT_THUMB, do_t_lsr}, + {"mov", 0x0000, 2, ARM_EXT_THUMB, do_t_mov}, + {"mul", T_OPCODE_MUL, 2, ARM_EXT_THUMB, do_t_arit}, + {"mvn", T_OPCODE_MVN, 2, ARM_EXT_THUMB, do_t_arit}, + {"neg", T_OPCODE_NEG, 2, ARM_EXT_THUMB, do_t_arit}, + {"orr", 0x4300, 2, ARM_EXT_THUMB, do_t_arit}, + {"pop", 0xbc00, 2, ARM_EXT_THUMB, do_t_push_pop}, + {"push", 0xb400, 2, ARM_EXT_THUMB, do_t_push_pop}, + {"ror", 0x41c0, 2, ARM_EXT_THUMB, do_t_arit}, + {"sbc", 0x4180, 2, ARM_EXT_THUMB, do_t_arit}, + {"stmia", 0xc000, 2, ARM_EXT_THUMB, do_t_ldmstm}, + {"str", 0x0000, 2, ARM_EXT_THUMB, do_t_str}, + {"strb", 0x0000, 2, ARM_EXT_THUMB, do_t_strb}, + {"strh", 0x0000, 2, ARM_EXT_THUMB, do_t_strh}, + {"swi", 0xdf00, 2, ARM_EXT_THUMB, do_t_swi}, + {"sub", 0x0000, 2, ARM_EXT_THUMB, do_t_sub}, + {"tst", T_OPCODE_TST, 2, ARM_EXT_THUMB, do_t_arit}, + /* Pseudo ops: */ + {"adr", 0x0000, 2, ARM_EXT_THUMB, do_t_adr}, + {"nop", 0x46C0, 2, ARM_EXT_THUMB, do_t_nop}, /* mov r8,r8 */ }; struct reg_entry @@ -871,7 +1117,7 @@ struct reg_entry #define REG_LR 14 #define REG_SP 13 -/* These are the standard names. Users can add aliases with .req */ +/* These are the standard names. Users can add aliases with .req. */ static CONST struct reg_entry reg_table[] = { /* Processor Register Numbers. */ @@ -911,13 +1157,14 @@ static CONST struct reg_entry reg_table[] = #define BAD_PC _("r15 not allowed here") #define BAD_FLAGS _("Instruction should not have flags") #define BAD_COND _("Instruction is not conditional") +#define ERR_NO_ACCUM _("acc0 expected") -static struct hash_control * arm_ops_hsh = NULL; -static struct hash_control * arm_tops_hsh = NULL; -static struct hash_control * arm_cond_hsh = NULL; +static struct hash_control * arm_ops_hsh = NULL; +static struct hash_control * arm_tops_hsh = NULL; +static struct hash_control * arm_cond_hsh = NULL; static struct hash_control * arm_shift_hsh = NULL; -static struct hash_control * arm_reg_hsh = NULL; -static struct hash_control * arm_psr_hsh = NULL; +static struct hash_control * arm_reg_hsh = NULL; +static struct hash_control * arm_psr_hsh = NULL; /* This table describes all the machine specific pseudo-ops the assembler has to support. The fields are: @@ -947,7 +1194,8 @@ static int my_get_expression PARAMS ((expressionS *, char **)); CONST pseudo_typeS md_pseudo_table[] = { - { "req", s_req, 0 }, /* Never called becasue '.req' does not start line */ + /* Never called becasue '.req' does not start line. */ + { "req", s_req, 0 }, { "bss", s_bss, 0 }, { "align", s_align, 0 }, { "arm", s_arm, 0 }, @@ -962,13 +1210,15 @@ CONST pseudo_typeS md_pseudo_table[] = /* Allow for the effect of section changes. */ { "text", arm_s_text, 0 }, { "data", arm_s_data, 0 }, -#ifdef OBJ_ELF +#ifdef OBJ_ELF { "section", arm_s_section, 0 }, { "section.s", arm_s_section, 0 }, { "sect", arm_s_section, 0 }, { "sect.s", arm_s_section, 0 }, { "word", s_arm_elf_cons, 4 }, { "long", s_arm_elf_cons, 4 }, + { "file", dwarf2_directive_file, 0 }, + { "loc", dwarf2_directive_loc, 0 }, #else { "word", cons, 4}, #endif @@ -991,19 +1241,24 @@ CONST pseudo_typeS md_pseudo_table[] = symbolS * last_label_seen; static int label_is_thumb_function_name = false; -/* Literal stuff */ +/* Literal stuff. */ #define MAX_LITERAL_POOL_SIZE 1024 typedef struct literalS { - struct expressionS exp; - struct arm_it * inst; + struct expressionS exp; + struct arm_it * inst; } literalT; -literalT literals[MAX_LITERAL_POOL_SIZE]; -int next_literal_pool_place = 0; /* Next free entry in the pool */ -int lit_pool_num = 1; /* Next literal pool number */ +literalT literals[MAX_LITERAL_POOL_SIZE]; + +/* Next free entry in the pool. */ +int next_literal_pool_place = 0; + +/* Next literal pool number. */ +int lit_pool_num = 1; + symbolS * current_poolP = NULL; static int @@ -1019,21 +1274,21 @@ add_to_lit_pool () while (lit_count < next_literal_pool_place) { if (literals[lit_count].exp.X_op == inst.reloc.exp.X_op - && inst.reloc.exp.X_op == O_constant - && literals[lit_count].exp.X_add_number - == inst.reloc.exp.X_add_number - && literals[lit_count].exp.X_unsigned == inst.reloc.exp.X_unsigned) - break; + && inst.reloc.exp.X_op == O_constant + && (literals[lit_count].exp.X_add_number + == inst.reloc.exp.X_add_number) + && literals[lit_count].exp.X_unsigned == inst.reloc.exp.X_unsigned) + break; lit_count++; } - if (lit_count == next_literal_pool_place) /* new entry */ + if (lit_count == next_literal_pool_place) /* New entry. */ { if (next_literal_pool_place > MAX_LITERAL_POOL_SIZE) - { - inst.error = _("Literal Pool Overflow"); - return FAIL; - } + { + inst.error = _("Literal Pool Overflow"); + return FAIL; + } literals[next_literal_pool_place].exp = inst.reloc.exp; lit_count = next_literal_pool_place++; @@ -1045,21 +1300,22 @@ add_to_lit_pool () return SUCCESS; } - + /* Can't use symbol_new here, so have to create a symbol and then at a later date assign it a value. Thats what these functions do. */ + static void symbol_locate (symbolP, name, segment, valu, frag) - symbolS * symbolP; - CONST char * name; /* It is copied, the caller can modify */ - segT segment; /* Segment identifier (SEG_) */ - valueT valu; /* Symbol value */ - fragS * frag; /* Associated fragment */ + symbolS * symbolP; + CONST char * name; /* It is copied, the caller can modify. */ + segT segment; /* Segment identifier (SEG_). */ + valueT valu; /* Symbol value. */ + fragS * frag; /* Associated fragment. */ { unsigned int name_length; char * preserved_copy_of_name; - name_length = strlen (name) + 1; /* +1 for \0 */ + name_length = strlen (name) + 1; /* +1 for \0. */ obstack_grow (¬es, name, name_length); preserved_copy_of_name = obstack_finish (¬es); #ifdef STRIP_UNDERSCORE @@ -1094,41 +1350,43 @@ symbol_locate (symbolP, name, segment, valu, frag) #ifdef tc_symbol_new_hook tc_symbol_new_hook (symbolP); #endif - + #ifdef DEBUG_SYMS verify_symbol_chain (symbol_rootP, symbol_lastP); -#endif /* DEBUG_SYMS */ +#endif /* DEBUG_SYMS */ } -/* Check that an immediate is valid, and if so, - convert it to the right format. */ +/* Check that an immediate is valid. + If so, convert it to the right format. */ + static unsigned int validate_immediate (val) unsigned int val; { unsigned int a; unsigned int i; - + #define rotate_left(v, n) (v << n | v >> (32 - n)) - + for (i = 0; i < 32; i += 2) if ((a = rotate_left (val, i)) <= 0xff) - return a | (i << 7); /* 12-bit pack: [shift-cnt,const] */ - + return a | (i << 7); /* 12-bit pack: [shift-cnt,const]. */ + return FAIL; } /* Check to see if an immediate can be computed as two seperate immediate values, added together. We already know that this value cannot be computed by just one ARM instruction. */ + static unsigned int validate_immediate_twopart (val, highpart) - unsigned int val; + unsigned int val; unsigned int * highpart; { unsigned int a; unsigned int i; - + for (i = 0; i < 32; i += 2) if (((a = rotate_left (val, i)) & 0xff) != 0) { @@ -1142,19 +1400,17 @@ validate_immediate_twopart (val, highpart) { if (a & 0xff000000) continue; - * highpart = (a >> 16) | ((i + 16) << 7); } else { assert (a & 0xff000000); - * highpart = (a >> 24) | ((i + 8) << 7); } return (a & 0xff) | (i << 7); } - + return FAIL; } @@ -1164,11 +1420,10 @@ validate_offset_imm (val, hwse) int hwse; { if ((hwse && val > 255) || val > 4095) - return FAIL; + return FAIL; return val; } - static void s_req (a) int a ATTRIBUTE_UNUSED; @@ -1181,7 +1436,7 @@ s_bss (ignore) int ignore ATTRIBUTE_UNUSED; { /* We don't support putting frags in the BSS segment, we fake it by - marking in_bss, then looking at s_skip for clues?.. */ + marking in_bss, then looking at s_skip for clues. */ subseg_set (bss_section, 0); demand_empty_rest_of_line (); } @@ -1190,11 +1445,12 @@ static void s_even (ignore) int ignore ATTRIBUTE_UNUSED; { - if (!need_pass_2) /* Never make frag if expect extra pass. */ + /* Never make frag if expect extra pass. */ + if (!need_pass_2) frag_align (1, 0, 0); - + record_alignment (now_seg, 1); - + demand_empty_rest_of_line (); } @@ -1208,8 +1464,8 @@ s_ltorg (ignored) if (current_poolP == NULL) return; - /* Align pool as you have word accesses */ - /* Only make a frag if we have to ... */ + /* Align pool as you have word accesses. + Only make a frag if we have to. */ if (!need_pass_2) frag_align (2, 0, 0); @@ -1222,21 +1478,23 @@ s_ltorg (ignored) symbol_table_insert (current_poolP); ARM_SET_THUMB (current_poolP, thumb_mode); - + #if defined OBJ_COFF || defined OBJ_ELF ARM_SET_INTERWORK (current_poolP, support_interwork); #endif - + while (lit_count < next_literal_pool_place) /* First output the expression in the instruction to the pool. */ - emit_expr (&(literals[lit_count++].exp), 4); /* .word */ + emit_expr (&(literals[lit_count++].exp), 4); /* .word */ next_literal_pool_place = 0; current_poolP = NULL; } +/* Same as s_align_ptwo but align 0 => align 2. */ + static void -s_align (unused) /* Same as s_align_ptwo but align 0 => align 2 */ +s_align (unused) int unused ATTRIBUTE_UNUSED; { register int temp; @@ -1263,7 +1521,7 @@ s_align (unused) /* Same as s_align_ptwo but align 0 => align 2 */ if (!temp) temp = 2; - /* Only make a frag if we HAVE to. . . */ + /* Only make a frag if we HAVE to. */ if (temp && !need_pass_2) frag_align (temp, (int) temp_fill, 0); demand_empty_rest_of_line (); @@ -1280,14 +1538,13 @@ s_force_thumb (ignore) This is used by gcc/config/arm/lib1funcs.asm for example to compile interworking support functions even if the target processor should not support interworking. */ - if (! thumb_mode) { thumb_mode = 2; - + record_alignment (now_seg, 1); } - + demand_empty_rest_of_line (); } @@ -1295,11 +1552,13 @@ static void s_thumb_func (ignore) int ignore ATTRIBUTE_UNUSED; { + if (! thumb_mode) + opcode_select (16); + /* The following label is the name/address of the start of a Thumb function. We need to know this for the interworking support. */ - label_is_thumb_function_name = true; - + demand_empty_rest_of_line (); } @@ -1318,16 +1577,14 @@ s_thumb_set (equiv) register char * end_name; register symbolS * symbolP; - /* - * Especial apologies for the random logic: - * this just grew, and could be parsed much more simply! - * Dean in haste. - */ + /* Especial apologies for the random logic: + This just grew, and could be parsed much more simply! + Dean - in haste. */ name = input_line_pointer; delim = get_symbol_end (); end_name = input_line_pointer; *end_name = delim; - + SKIP_WHITESPACE (); if (*input_line_pointer != ',') @@ -1344,7 +1601,7 @@ s_thumb_set (equiv) if (name[0] == '.' && name[1] == '\0') { - /* XXX - this should not happen to .thumb_set */ + /* XXX - this should not happen to .thumb_set. */ abort (); } @@ -1358,8 +1615,9 @@ s_thumb_set (equiv) if (listing & LISTING_SYMBOLS) { extern struct list_info_struct * listing_tail; - fragS * dummy_frag = (fragS *) xmalloc (sizeof(fragS)); - memset (dummy_frag, 0, sizeof(fragS)); + fragS * dummy_frag = (fragS *) xmalloc (sizeof (fragS)); + + memset (dummy_frag, 0, sizeof (fragS)); dummy_frag->fr_type = rs_fill; dummy_frag->line = listing_tail; symbolP = symbol_new (name, undefined_section, 0, dummy_frag); @@ -1367,13 +1625,13 @@ s_thumb_set (equiv) } else #endif - symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag); - + symbolP = symbol_new (name, undefined_section, 0, &zero_address_frag); + #ifdef OBJ_COFF - /* "set" symbols are local unless otherwise specified. */ + /* "set" symbols are local unless otherwise specified. */ SF_SET_LOCAL (symbolP); -#endif /* OBJ_COFF */ - } /* make a new symbol */ +#endif /* OBJ_COFF */ + } /* Make a new symbol. */ symbol_table_insert (symbolP); @@ -1385,11 +1643,11 @@ s_thumb_set (equiv) as_bad (_("symbol `%s' already defined"), S_GET_NAME (symbolP)); pseudo_set (symbolP); - + demand_empty_rest_of_line (); /* XXX Now we come to the Thumb specific bit of code. */ - + THUMB_SET_FUNC (symbolP, 1); ARM_SET_THUMB (symbolP, 1); #if defined OBJ_ELF || defined OBJ_COFF @@ -1398,13 +1656,14 @@ s_thumb_set (equiv) } /* If we change section we must dump the literal pool first. */ + static void arm_s_text (ignore) int ignore; { if (now_seg != text_section) s_ltorg (0); - + #ifdef OBJ_ELF obj_elf_text (ignore); #else @@ -1423,7 +1682,7 @@ arm_s_data (ignore) } else if (now_seg != data_section) s_ltorg (0); - + #ifdef OBJ_ELF obj_elf_data (ignore); #else @@ -1451,23 +1710,27 @@ opcode_select (width) case 16: if (! thumb_mode) { - if (! (cpu_variant & ARM_THUMB)) + if (! (cpu_variant & ARM_EXT_THUMB)) as_bad (_("selected processor does not support THUMB opcodes")); + thumb_mode = 1; - /* No need to force the alignment, since we will have been - coming from ARM mode, which is word-aligned. */ - record_alignment (now_seg, 1); + /* No need to force the alignment, since we will have been + coming from ARM mode, which is word-aligned. */ + record_alignment (now_seg, 1); } break; case 32: if (thumb_mode) { - if ((cpu_variant & ARM_ANY) == ARM_THUMB) + if ((cpu_variant & ARM_ANY) == ARM_EXT_THUMB) as_bad (_("selected processor does not support ARM opcodes")); + thumb_mode = 0; - if (!need_pass_2) + + if (!need_pass_2) frag_align (2, 0, 0); + record_alignment (now_seg, 1); } break; @@ -1526,9 +1789,9 @@ static int skip_past_comma (str) char ** str; { - char *p = *str, c; + char * p = * str, c; int comma = 0; - + while ((c = *p) == ' ' || c == ',') { p++; @@ -1544,17 +1807,18 @@ skip_past_comma (str) } /* A standard register must be given at this point. - Shift is the place to put it in inst.instruction. - Restores input start point on err. + SHIFT is the place to put it in inst.instruction. + Restores input start point on error. Returns the reg#, or FAIL. */ + static int reg_required_here (str, shift) char ** str; int shift; { - static char buff [128]; /* XXX */ - int reg; - char * start = *str; + static char buff [128]; /* XXX */ + int reg; + char * start = * str; if ((reg = arm_reg_parse (str)) != FAIL && int_register (reg)) { @@ -1565,7 +1829,7 @@ reg_required_here (str, shift) /* Restore the start point, we may have got a reg of the wrong class. */ *str = start; - + /* In the few cases where we might be able to accept something else this error can be overridden. */ sprintf (buff, _("Register expected, not '%.100s'"), start); @@ -1595,6 +1859,13 @@ arm_psr_parse (ccp) /* Terminate the word. */ *--p = 0; + /* CPSR's and SPSR's can now be lowercase. This is just a convenience + feature for ease of use and backwards compatibility. */ + if (!strncmp (start, "cpsr", 4)) + strncpy (start, "CPSR", 4); + else if (!strncmp (start, "spsr", 4)) + strncpy (start, "SPSR", 4); + /* Now locate the word in the psr hash table. */ psr = (CONST struct asm_psr *) hash_find (arm_psr_hsh, start); @@ -1609,13 +1880,14 @@ arm_psr_parse (ccp) } /* Parse the input looking for a PSR flag. */ + static int psr_required_here (str) char ** str; { - char * start = *str; + char * start = * str; CONST struct asm_psr * psr; - + psr = arm_psr_parse (str); if (psr) @@ -1626,7 +1898,7 @@ psr_required_here (str) /* Set the psr flags in the MSR instruction. */ inst.instruction |= psr->field << PSR_SHIFT; - + return SUCCESS; } @@ -1736,8 +2008,8 @@ fp_reg_required_here (str, where) char ** str; int where; { - int reg; - char * start = *str; + int reg; + char * start = * str; if ((reg = arm_reg_parse (str)) != FAIL && fp_register (reg)) { @@ -1770,14 +2042,14 @@ cp_address_offset (str) } (*str)++; - + if (my_get_expression (& inst.reloc.exp, str)) return FAIL; - + if (inst.reloc.exp.X_op == O_constant) { offset = inst.reloc.exp.X_add_number; - + if (offset & 3) { inst.error = _("co-processor address must be word aligned"); @@ -1826,12 +2098,12 @@ cp_address_required_here (str) if (*p == ']') { p++; - + if (skip_past_comma (& p) == SUCCESS) { - /* [Rn], #expr */ + /* [Rn], #expr */ write_back = WRITE_BACK; - + if (reg == REG_PC) { inst.error = _("pc may not be used in post-increment"); @@ -1846,7 +2118,7 @@ cp_address_required_here (str) } else { - /* '['Rn, #expr']'[!] */ + /* '['Rn, #expr']'[!] */ if (skip_past_comma (& p) == FAIL) { @@ -1855,7 +2127,7 @@ cp_address_required_here (str) } pre_inc = PRE_INDEX; - + if (cp_address_offset (& p) == FAIL) return FAIL; @@ -1888,7 +2160,7 @@ cp_address_required_here (str) return FAIL; inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM; - inst.reloc.exp.X_add_number -= 8; /* PC rel adjust */ + inst.reloc.exp.X_add_number -= 8; /* PC rel adjust. */ inst.reloc.pc_rel = 1; inst.instruction |= (REG_PC << 16); pre_inc = PRE_INDEX; @@ -1916,7 +2188,7 @@ do_mrs (str, flags) unsigned long flags; { int skip = 0; - + /* Only one syntax. */ skip_whitespace (str); @@ -1940,8 +2212,9 @@ do_mrs (str, flags) || strcmp (str, "cpsr") == 0 || strcmp (str, "spsr") == 0) skip = 4; + /* This is for backwards compatability with older toolchains. */ - else if (strcmp (str, "cpsr_all") == 0 + else if ( strcmp (str, "cpsr_all") == 0 || strcmp (str, "spsr_all") == 0) skip = 8; else @@ -1953,7 +2226,7 @@ do_mrs (str, flags) if (* str == 's' || * str == 'S') inst.instruction |= SPSR_BIT; str += skip; - + inst.instruction |= flags; end_of_line (str); } @@ -1961,6 +2234,7 @@ do_mrs (str, flags) /* Two possible forms: "{C|S}PSR_, Rm", "{C|S}PSR_f, #expression". */ + static void do_msr (str, flags) char * str; @@ -1970,7 +2244,7 @@ do_msr (str, flags) if (psr_required_here (& str) == FAIL) return; - + if (skip_past_comma (& str) == FAIL) { inst.error = _("comma missing after psr flags"); @@ -1981,7 +2255,7 @@ do_msr (str, flags) if (reg_required_here (& str, 0) != FAIL) { - inst.error = NULL; + inst.error = NULL; inst.instruction |= flags; end_of_line (str); return; @@ -1989,27 +2263,30 @@ do_msr (str, flags) if (! is_immediate_prefix (* str)) { - inst.error = _("only a register or immediate value can follow a psr flag"); + inst.error = + _("only a register or immediate value can follow a psr flag"); return; } str ++; inst.error = NULL; - + if (my_get_expression (& inst.reloc.exp, & str)) { - inst.error = _("only a register or immediate value can follow a psr flag"); + inst.error = + _("only a register or immediate value can follow a psr flag"); return; } - - if (inst.instruction & ((PSR_c | PSR_x | PSR_s) << PSR_SHIFT)) + + if ((cpu_variant & ARM_EXT_V5) != ARM_EXT_V5 + && inst.instruction & ((PSR_c | PSR_x | PSR_s) << PSR_SHIFT)) { - inst.error = _("only flag field of psr can be set with immediate value"); + inst.error = _("immediate value cannot be used to set this field"); return; } - + flags |= INST_IMMEDIATE; - + if (inst.reloc.exp.X_add_symbol) { inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE; @@ -2018,17 +2295,17 @@ do_msr (str, flags) else { unsigned value = validate_immediate (inst.reloc.exp.X_add_number); - + if (value == (unsigned) FAIL) { inst.error = _("Invalid constant"); return; } - + inst.instruction |= value; } - inst.error = NULL; + inst.error = NULL; inst.instruction |= flags; end_of_line (str); } @@ -2037,8 +2314,8 @@ do_msr (str, flags) UMULL RdLo, RdHi, Rm, Rs SMULL RdLo, RdHi, Rm, Rs UMLAL RdLo, RdHi, Rm, Rs - SMLAL RdLo, RdHi, Rm, Rs -*/ + SMLAL RdLo, RdHi, Rm, Rs. */ + static void do_mull (str, flags) char * str; @@ -2046,7 +2323,7 @@ do_mull (str, flags) { int rdlo, rdhi, rm, rs; - /* Only one format "rdlo, rdhi, rm, rs" */ + /* Only one format "rdlo, rdhi, rm, rs". */ skip_whitespace (str); if ((rdlo = reg_required_here (&str, 12)) == FAIL) @@ -2069,7 +2346,7 @@ do_mull (str, flags) return; } - /* rdhi, rdlo and rm must all be different */ + /* rdhi, rdlo and rm must all be different. */ if (rdlo == rdhi || rdlo == rm || rdhi == rm) as_tsktsk (_("rdhi, rdlo and rm must all be different")); @@ -2085,7 +2362,7 @@ do_mull (str, flags) inst.error = BAD_PC; return; } - + inst.instruction |= flags; end_of_line (str); return; @@ -2093,12 +2370,12 @@ do_mull (str, flags) static void do_mul (str, flags) - char * str; + char * str; unsigned long flags; { int rd, rm; - - /* Only one format "rd, rm, rs" */ + + /* Only one format "rd, rm, rs". */ skip_whitespace (str); if ((rd = reg_required_here (&str, 16)) == FAIL) @@ -2149,12 +2426,12 @@ do_mul (str, flags) static void do_mla (str, flags) - char * str; + char * str; unsigned long flags; { int rd, rm; - /* Only one format "rd, rm, rs, rn" */ + /* Only one format "rd, rm, rs, rn". */ skip_whitespace (str); if ((rd = reg_required_here (&str, 16)) == FAIL) @@ -2205,108 +2482,1175 @@ do_mla (str, flags) return; } -/* Returns the index into fp_values of a floating point number, or -1 if - not in the table. */ +/* Expects *str -> the characters "acc0", possibly with leading blanks. + Advances *str to the next non-alphanumeric. + Returns 0, or else FAIL (in which case sets inst.error). + + (In a future XScale, there may be accumulators other than zero. + At that time this routine and its callers can be upgraded to suit.) */ + static int -my_get_float_expression (str) +accum0_required_here (str) char ** str; { - LITTLENUM_TYPE words[MAX_LITTLENUMS]; - char * save_in; - expressionS exp; - int i; - int j; + static char buff [128]; /* Note the address is taken. Hence, static. */ + char * p = * str; + char c; + int result = 0; /* The accum number. */ - memset (words, 0, MAX_LITTLENUMS * sizeof (LITTLENUM_TYPE)); - /* Look for a raw floating point number */ - if ((save_in = atof_ieee (*str, 'x', words)) != NULL - && (is_end_of_line [(int)(*save_in)] || *save_in == '\0')) + skip_whitespace (p); + + *str = p; /* Advance caller's string pointer too. */ + c = *p++; + while (isalnum (c)) + c = *p++; + + *--p = 0; /* Aap nul into input buffer at non-alnum. */ + + if (! ( streq (*str, "acc0") || streq (*str, "ACC0"))) { - for (i = 0; i < NUM_FLOAT_VALS; i++) + sprintf (buff, _("acc0 expected, not '%.100s'"), *str); + inst.error = buff; + result = FAIL; + } + + *p = c; /* Unzap. */ + *str = p; /* Caller's string pointer to after match. */ + return result; +} + +/* Expects **str -> after a comma. May be leading blanks. + Advances *str, recognizing a load mode, and setting inst.instruction. + Returns rn, or else FAIL (in which case may set inst.error + and not advance str) + + Note: doesn't know Rd, so no err checks that require such knowledge. */ + +static int +ld_mode_required_here (string) + char ** string; +{ + char * str = * string; + int rn; + int pre_inc = 0; + + skip_whitespace (str); + + if (* str == '[') + { + str++; + + skip_whitespace (str); + + if ((rn = reg_required_here (& str, 16)) == FAIL) + return FAIL; + + skip_whitespace (str); + + if (* str == ']') { - for (j = 0; j < MAX_LITTLENUMS; j++) + str ++; + + if (skip_past_comma (& str) == SUCCESS) { - if (words[j] != fp_values[i][j]) - break; + /* [Rn],... (post inc) */ + if (ldst_extend (& str, 1) == FAIL) + return FAIL; } - - if (j == MAX_LITTLENUMS) + else /* [Rn] */ { - *str = save_in; - return i; + skip_whitespace (str); + + if (* str == '!') + { + str ++; + inst.instruction |= WRITE_BACK; + } + + inst.instruction |= INDEX_UP | HWOFFSET_IMM; + pre_inc = 1; } } - } - - /* Try and parse a more complex expression, this will probably fail - unless the code uses a floating point prefix (eg "0f") */ - save_in = input_line_pointer; - input_line_pointer = *str; - if (expression (&exp) == absolute_section - && exp.X_op == O_big - && exp.X_add_number < 0) - { - /* FIXME: 5 = X_PRECISION, should be #define'd where we can use it. - Ditto for 15. */ - if (gen_to_words (words, 5, (long)15) == 0) + else /* [Rn,...] */ { - for (i = 0; i < NUM_FLOAT_VALS; i++) + if (skip_past_comma (& str) == FAIL) { - for (j = 0; j < MAX_LITTLENUMS; j++) - { - if (words[j] != fp_values[i][j]) - break; - } + inst.error = _("pre-indexed expression expected"); + return FAIL; + } - if (j == MAX_LITTLENUMS) - { - *str = input_line_pointer; - input_line_pointer = save_in; - return i; - } + pre_inc = 1; + + if (ldst_extend (& str, 1) == FAIL) + return FAIL; + + skip_whitespace (str); + + if (* str ++ != ']') + { + inst.error = _("missing ]"); + return FAIL; + } + + skip_whitespace (str); + + if (* str == '!') + { + str ++; + inst.instruction |= WRITE_BACK; } } } + else if (* str == '=') /* ldr's "r,=label" syntax */ + /* We should never reach here, because = is + caught gas/read.c read_a_source_file() as a .set operation. */ + return FAIL; + else /* PC +- 8 bit immediate offset. */ + { + if (my_get_expression (& inst.reloc.exp, & str)) + return FAIL; - *str = input_line_pointer; - input_line_pointer = save_in; - return -1; -} - -/* Return true if anything in the expression is a bignum */ -static int -walk_no_bignums (sp) - symbolS * sp; -{ - if (symbol_get_value_expression (sp)->X_op == O_big) - return 1; + inst.instruction |= HWOFFSET_IMM; /* The I bit. */ + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; + inst.reloc.exp.X_add_number -= 8; /* PC rel adjust. */ + inst.reloc.pc_rel = 1; + inst.instruction |= (REG_PC << 16); - if (symbol_get_value_expression (sp)->X_add_symbol) - { - return (walk_no_bignums (symbol_get_value_expression (sp)->X_add_symbol) - || (symbol_get_value_expression (sp)->X_op_symbol - && walk_no_bignums (symbol_get_value_expression (sp)->X_op_symbol))); + rn = REG_PC; + pre_inc = 1; } - return 0; + inst.instruction |= (pre_inc ? PRE_INDEX : 0); + * string = str; + + return rn; } -static int -my_get_expression (ep, str) - expressionS * ep; - char ** str; +/* ARM V5E (El Segundo) signed-multiply-accumulate (argument parse) + SMLAxy{cond} Rd,Rm,Rs,Rn + SMLAWy{cond} Rd,Rm,Rs,Rn + Error if any register is R15. */ + +static void +do_smla (str, flags) + char * str; + unsigned long flags; { - char * save_in; - segT seg; - - save_in = input_line_pointer; - input_line_pointer = *str; - seg = expression (ep); + int rd, rm, rs, rn; -#ifdef OBJ_AOUT - if (seg != absolute_section - && seg != text_section - && seg != data_section + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 16)) == FAIL + || skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL + || skip_past_comma (& str) == FAIL + || (rs = reg_required_here (& str, 8)) == FAIL + || skip_past_comma (& str) == FAIL + || (rn = reg_required_here (& str, 12)) == FAIL) + inst.error = BAD_ARGS; + + else if (rd == REG_PC || rm == REG_PC || rs == REG_PC || rn == REG_PC) + inst.error = BAD_PC; + + else if (flags) + inst.error = BAD_FLAGS; + + else + end_of_line (str); +} + +/* ARM V5E (El Segundo) signed-multiply-accumulate-long (argument parse) + SMLALxy{cond} Rdlo,Rdhi,Rm,Rs + Error if any register is R15. + Warning if Rdlo == Rdhi. */ + +static void +do_smlal (str, flags) + char * str; + unsigned long flags; +{ + int rdlo, rdhi, rm, rs; + + skip_whitespace (str); + + if ((rdlo = reg_required_here (& str, 12)) == FAIL + || skip_past_comma (& str) == FAIL + || (rdhi = reg_required_here (& str, 16)) == FAIL + || skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL + || skip_past_comma (& str) == FAIL + || (rs = reg_required_here (& str, 8)) == FAIL) + { + inst.error = BAD_ARGS; + return; + } + + if (rdlo == REG_PC || rdhi == REG_PC || rm == REG_PC || rs == REG_PC) + { + inst.error = BAD_PC; + return; + } + + if (rdlo == rdhi) + as_tsktsk (_("rdhi and rdlo must be different")); + + if (flags) + inst.error = BAD_FLAGS; + else + end_of_line (str); +} + +/* ARM V5E (El Segundo) signed-multiply (argument parse) + SMULxy{cond} Rd,Rm,Rs + Error if any register is R15. */ + +static void +do_smul (str, flags) + char * str; + unsigned long flags; +{ + int rd, rm, rs; + + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 16)) == FAIL + || skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL + || skip_past_comma (& str) == FAIL + || (rs = reg_required_here (& str, 8)) == FAIL) + inst.error = BAD_ARGS; + + else if (rd == REG_PC || rm == REG_PC || rs == REG_PC) + inst.error = BAD_PC; + + else if (flags) + inst.error = BAD_FLAGS; + + else + end_of_line (str); +} + +/* ARM V5E (El Segundo) saturating-add/subtract (argument parse) + Q[D]{ADD,SUB}{cond} Rd,Rm,Rn + Error if any register is R15. */ + +static void +do_qadd (str, flags) + char * str; + unsigned long flags; +{ + int rd, rm, rn; + + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 12)) == FAIL + || skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL + || skip_past_comma (& str) == FAIL + || (rn = reg_required_here (& str, 16)) == FAIL) + inst.error = BAD_ARGS; + + else if (rd == REG_PC || rm == REG_PC || rn == REG_PC) + inst.error = BAD_PC; + + else if (flags) + inst.error = BAD_FLAGS; + + else + end_of_line (str); +} + +/* ARM V5E (el Segundo) + MCRRcc , , , , . + MRRCcc , , , , . + + These are equivalent to the XScale instructions MAR and MRA, + respectively, when coproc == 0, opcode == 0, and CRm == 0. + + Result unpredicatable if Rd or Rn is R15. */ + +static void +do_co_reg2c (str, flags) + char * str; + unsigned long flags; +{ + int rd, rn; + + skip_whitespace (str); + + if (co_proc_number (& str) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_opc_expr (& str, 4, 4) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || (rd = reg_required_here (& str, 12)) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || (rn = reg_required_here (& str, 16)) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + /* Unpredictable result if rd or rn is R15. */ + if (rd == REG_PC || rn == REG_PC) + as_tsktsk + (_("Warning: Instruction unpredictable when using r15")); + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 0) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (flags) + inst.error = BAD_COND; + + end_of_line (str); +} + +/* ARM V5 count-leading-zeroes instruction (argument parse) + CLZ{} , + Condition defaults to COND_ALWAYS. + Error if Rd or Rm are R15. */ + +static void +do_clz (str, flags) + char * str; + unsigned long flags; +{ + int rd, rm; + + if (flags) + { + as_bad (BAD_FLAGS); + return; + } + + skip_whitespace (str); + + if (((rd = reg_required_here (& str, 12)) == FAIL) + || (skip_past_comma (& str) == FAIL) + || ((rm = reg_required_here (& str, 0)) == FAIL)) + inst.error = BAD_ARGS; + + else if (rd == REG_PC || rm == REG_PC ) + inst.error = BAD_PC; + + else + end_of_line (str); +} + +/* ARM V5 (argument parse) + LDC2{L} , , + STC2{L} , , + Instruction is not conditional, and has 0xf in the codition field. + Otherwise, it's the same as LDC/STC. */ + +static void +do_lstc2 (str, flags) + char * str; + unsigned long flags; +{ + if (flags) + inst.error = BAD_COND; + + skip_whitespace (str); + + if (co_proc_number (& str) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + } + else if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 12) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + } + else if (skip_past_comma (& str) == FAIL + || cp_address_required_here (& str) == FAIL) + { + if (! inst.error) + inst.error = BAD_ARGS; + } + else + end_of_line (str); +} + +/* ARM V5 (argument parse) + CDP2 , , , , , + Instruction is not conditional, and has 0xf in the condition field. + Otherwise, it's the same as CDP. */ + +static void +do_cdp2 (str, flags) + char * str; + unsigned long flags; +{ + skip_whitespace (str); + + if (co_proc_number (& str) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_opc_expr (& str, 20,4) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 12) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 16) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 0) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == SUCCESS) + { + if (cp_opc_expr (& str, 5, 3) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + } + + if (flags) + inst.error = BAD_FLAGS; + + end_of_line (str); +} + +/* ARM V5 (argument parse) + MCR2 , , , , , + MRC2 , , , , , + Instruction is not conditional, and has 0xf in the condition field. + Otherwise, it's the same as MCR/MRC. */ + +static void +do_co_reg2 (str, flags) + char * str; + unsigned long flags; +{ + skip_whitespace (str); + + if (co_proc_number (& str) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_opc_expr (& str, 21, 3) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || reg_required_here (& str, 12) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 16) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || cp_reg_required_here (& str, 0) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == SUCCESS) + { + if (cp_opc_expr (& str, 5, 3) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + } + + if (flags) + inst.error = BAD_COND; + + end_of_line (str); +} + +/* THUMB V5 breakpoint instruction (argument parse) + BKPT . */ + +static void +do_t_bkpt (str) + char * str; +{ + expressionS expr; + unsigned long number; + + skip_whitespace (str); + + /* Allow optional leading '#'. */ + if (is_immediate_prefix (*str)) + str ++; + + memset (& expr, '\0', sizeof (expr)); + if (my_get_expression (& expr, & str) || (expr.X_op != O_constant)) + { + inst.error = _("bad or missing expression"); + return; + } + + number = expr.X_add_number; + + /* Check it fits an 8 bit unsigned. */ + if (number != (number & 0xff)) + { + inst.error = _("immediate value out of range"); + return; + } + + inst.instruction |= number; + + end_of_line (str); +} + +/* ARM V5 branch-link-exchange (argument parse) for BLX(1) only. + Expects inst.instruction is set for BLX(1). + Note: this is cloned from do_branch, and the reloc changed to be a + new one that can cope with setting one extra bit (the H bit). */ + +static void +do_branch25 (str, flags) + char * str; + unsigned long flags ATTRIBUTE_UNUSED; +{ + if (my_get_expression (& inst.reloc.exp, & str)) + return; + +#ifdef OBJ_ELF + { + char * save_in; + + /* ScottB: February 5, 1998 */ + /* Check to see of PLT32 reloc required for the instruction. */ + + /* arm_parse_reloc() works on input_line_pointer. + We actually want to parse the operands to the branch instruction + passed in 'str'. Save the input pointer and restore it later. */ + save_in = input_line_pointer; + input_line_pointer = str; + + if (inst.reloc.exp.X_op == O_symbol + && *str == '(' + && arm_parse_reloc () == BFD_RELOC_ARM_PLT32) + { + inst.reloc.type = BFD_RELOC_ARM_PLT32; + inst.reloc.pc_rel = 0; + /* Modify str to point to after parsed operands, otherwise + end_of_line() will complain about the (PLT) left in str. */ + str = input_line_pointer; + } + else + { + inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX; + inst.reloc.pc_rel = 1; + } + + input_line_pointer = save_in; + } +#else + inst.reloc.type = BFD_RELOC_ARM_PCREL_BLX; + inst.reloc.pc_rel = 1; +#endif /* OBJ_ELF */ + + end_of_line (str); +} + +/* ARM V5 branch-link-exchange instruction (argument parse) + BLX ie BLX(1) + BLX{} ie BLX(2) + Unfortunately, there are two different opcodes for this mnemonic. + So, the insns[].value is not used, and the code here zaps values + into inst.instruction. + Also, the can be 25 bits, hence has its own reloc. */ + +static void +do_blx (str, flags) + char * str; + unsigned long flags; +{ + char * mystr = str; + int rm; + + if (flags) + { + as_bad (BAD_FLAGS); + return; + } + + skip_whitespace (mystr); + rm = reg_required_here (& mystr, 0); + + /* The above may set inst.error. Ignore his opinion. */ + inst.error = 0; + + if (rm != FAIL) + { + /* Arg is a register. + Use the condition code our caller put in inst.instruction. + Pass ourselves off as a BX with a funny opcode. */ + inst.instruction |= 0x012fff30; + do_bx (str, flags); + } + else + { + /* This must be is BLX , no condition allowed. */ + if (inst.instruction != COND_ALWAYS) + { + inst.error = BAD_COND; + return; + } + + inst.instruction = 0xfafffffe; + + /* Process like a B/BL, but with a different reloc. + Note that B/BL expecte fffffe, not 0, offset in the opcode table. */ + do_branch25 (str, flags); + } +} + +/* ARM V5 Thumb BLX (argument parse) + BLX which is BLX(1) + BLX which is BLX(2) + Unfortunately, there are two different opcodes for this mnemonic. + So, the tinsns[].value is not used, and the code here zaps values + into inst.instruction. */ + +static void +do_t_blx (str) + char * str; +{ + char * mystr = str; + int rm; + + skip_whitespace (mystr); + inst.instruction = 0x4780; + + /* Note that this call is to the ARM register recognizer. BLX(2) + uses the ARM register space, not the Thumb one, so a call to + thumb_reg() would be wrong. */ + rm = reg_required_here (& mystr, 3); + inst.error = 0; + + if (rm != FAIL) + { + /* It's BLX(2). The .instruction was zapped with rm & is final. */ + inst.size = 2; + } + else + { + /* No ARM register. This must be BLX(1). Change the .instruction. */ + inst.instruction = 0xf7ffeffe; + inst.size = 4; + + if (my_get_expression (& inst.reloc.exp, & mystr)) + return; + + inst.reloc.type = BFD_RELOC_THUMB_PCREL_BLX; + inst.reloc.pc_rel = 1; + } + + end_of_line (mystr); +} + +/* ARM V5 breakpoint instruction (argument parse) + BKPT <16 bit unsigned immediate> + Instruction is not conditional. + The bit pattern given in insns[] has the COND_ALWAYS condition, + and it is an error if the caller tried to override that. + Note "flags" is nonzero if a flag was supplied (which is an error). */ + +static void +do_bkpt (str, flags) + char * str; + unsigned long flags; +{ + expressionS expr; + unsigned long number; + + skip_whitespace (str); + + /* Allow optional leading '#'. */ + if (is_immediate_prefix (* str)) + str++; + + memset (& expr, '\0', sizeof (expr)); + + if (my_get_expression (& expr, & str) || (expr.X_op != O_constant)) + { + inst.error = _("bad or missing expression"); + return; + } + + number = expr.X_add_number; + + /* Check it fits a 16 bit unsigned. */ + if (number != (number & 0xffff)) + { + inst.error = _("immediate value out of range"); + return; + } + + /* Top 12 of 16 bits to bits 19:8. */ + inst.instruction |= (number & 0xfff0) << 4; + + /* Bottom 4 of 16 bits to bits 3:0. */ + inst.instruction |= number & 0xf; + + end_of_line (str); + + if (flags) + inst.error = BAD_FLAGS; +} + +/* Xscale multiply-accumulate (argument parse) + MIAcc acc0,Rm,Rs + MIAPHcc acc0,Rm,Rs + MIAxycc acc0,Rm,Rs. */ + +static void +do_mia (str, flags) + char * str; + unsigned long flags; +{ + int rs; + int rm; + + if (flags) + as_bad (BAD_FLAGS); + + else if (accum0_required_here (& str) == FAIL) + inst.error = ERR_NO_ACCUM; + + else if (skip_past_comma (& str) == FAIL + || (rm = reg_required_here (& str, 0)) == FAIL) + inst.error = BAD_ARGS; + + else if (skip_past_comma (& str) == FAIL + || (rs = reg_required_here (& str, 12)) == FAIL) + inst.error = BAD_ARGS; + + /* inst.instruction has now been zapped with both rm and rs. */ + else if (rm == REG_PC || rs == REG_PC) + inst.error = BAD_PC; /* Undefined result if rm or rs is R15. */ + + else + end_of_line (str); +} + +/* Xscale move-accumulator-register (argument parse) + + MARcc acc0,RdLo,RdHi. */ + +static void +do_mar (str, flags) + char * str; + unsigned long flags; +{ + int rdlo, rdhi; + + if (flags) + as_bad (BAD_FLAGS); + + else if (accum0_required_here (& str) == FAIL) + inst.error = ERR_NO_ACCUM; + + else if (skip_past_comma (& str) == FAIL + || (rdlo = reg_required_here (& str, 12)) == FAIL) + inst.error = BAD_ARGS; + + else if (skip_past_comma (& str) == FAIL + || (rdhi = reg_required_here (& str, 16)) == FAIL) + inst.error = BAD_ARGS; + + /* inst.instruction has now been zapped with both rdlo and rdhi. */ + else if (rdlo == REG_PC || rdhi == REG_PC) + inst.error = BAD_PC; /* Undefined result if rdlo or rdhi is R15. */ + + else + end_of_line (str); +} + +/* Xscale move-register-accumulator (argument parse) + + MRAcc RdLo,RdHi,acc0. */ + +static void +do_mra (str, flags) + char * str; + unsigned long flags; +{ + int rdlo; + int rdhi; + + if (flags) + { + as_bad (BAD_FLAGS); + return; + } + + skip_whitespace (str); + + if ((rdlo = reg_required_here (& str, 12)) == FAIL) + inst.error = BAD_ARGS; + + else if (skip_past_comma (& str) == FAIL + || (rdhi = reg_required_here (& str, 16)) == FAIL) + inst.error = BAD_ARGS; + + else if (skip_past_comma (& str) == FAIL + || accum0_required_here (& str) == FAIL) + inst.error = ERR_NO_ACCUM; + + /* inst.instruction has now been zapped with both rdlo and rdhi. */ + else if (rdlo == rdhi) + inst.error = BAD_ARGS; /* Undefined result if 2 writes to same reg. */ + + else if (rdlo == REG_PC || rdhi == REG_PC) + inst.error = BAD_PC; /* Undefined result if rdlo or rdhi is R15. */ + else + end_of_line (str); +} + +/* Xscale: Preload-Cache + + PLD + + Syntactically, like LDR with B=1, W=0, L=1. */ + +static void +do_pld (str, flags) + char * str; + unsigned long flags; +{ + int rd; + + if (flags) + { + as_bad (BAD_FLAGS); + return; + } + + skip_whitespace (str); + + if (* str != '[') + { + inst.error = _("'[' expected after PLD mnemonic"); + return; + } + + ++ str; + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 16)) == FAIL) + return; + + skip_whitespace (str); + + if (* str == ']') + { + /* [Rn], ... ? */ + ++ str; + skip_whitespace (str); + + if (skip_past_comma (& str) == SUCCESS) + { + if (ldst_extend (& str, 0) == FAIL) + return; + } + else if (* str == '!') /* [Rn]! */ + { + inst.error = _("writeback used in preload instruction"); + ++ str; + } + else /* [Rn] */ + inst.instruction |= INDEX_UP | PRE_INDEX; + } + else /* [Rn, ...] */ + { + if (skip_past_comma (& str) == FAIL) + { + inst.error = _("pre-indexed expression expected"); + return; + } + + if (ldst_extend (& str, 0) == FAIL) + return; + + skip_whitespace (str); + + if (* str != ']') + { + inst.error = _("missing ]"); + return; + } + + ++ str; + skip_whitespace (str); + + if (* str == '!') /* [Rn]! */ + { + inst.error = _("writeback used in preload instruction"); + ++ str; + } + + inst.instruction |= PRE_INDEX; + } + + end_of_line (str); +} + +/* Xscale load-consecutive (argument parse) + Mode is like LDRH. + + LDRccD R, mode + STRccD R, mode. */ + +static void +do_ldrd (str, flags) + char * str; + unsigned long flags; +{ + int rd; + int rn; + + if (flags != DOUBLE_LOAD_FLAG) + { + /* Change instruction pattern to normal ldr/str. */ + if (inst.instruction & 0x20) + inst.instruction = (inst.instruction & COND_MASK) | 0x04000000; /* str */ + else + inst.instruction = (inst.instruction & COND_MASK) | 0x04100000; /* ldr */ + + /* Perform a normal load/store instruction parse. */ + do_ldst (str, flags); + + return; + } + + if ((cpu_variant & ARM_EXT_XSCALE) != ARM_EXT_XSCALE) + { + static char buff[128]; + + --str; + while (isspace (*str)) + --str; + str -= 4; + + /* Deny all knowledge. */ + sprintf (buff, _("bad instruction '%.100s'"), str); + inst.error = buff; + return; + } + + skip_whitespace (str); + + if ((rd = reg_required_here (& str, 12)) == FAIL) + { + inst.error = BAD_ARGS; + return; + } + + if (skip_past_comma (& str) == FAIL + || (rn = ld_mode_required_here (& str)) == FAIL) + { + if (!inst.error) + inst.error = BAD_ARGS; + return; + } + + /* inst.instruction has now been zapped with Rd and the addressing mode. */ + if (rd & 1) /* Unpredictable result if Rd is odd. */ + { + inst.error = _("Destination register must be even"); + return; + } + + if (rd == REG_LR || rd == 12) + { + inst.error = _("r12 or r14 not allowed here"); + return; + } + + if (((rd == rn) || (rd + 1 == rn)) + && + ((inst.instruction & WRITE_BACK) + || (!(inst.instruction & PRE_INDEX)))) + as_warn (_("pre/post-indexing used when modified address register is destination")); + + end_of_line (str); +} + +/* Returns the index into fp_values of a floating point number, + or -1 if not in the table. */ + +static int +my_get_float_expression (str) + char ** str; +{ + LITTLENUM_TYPE words[MAX_LITTLENUMS]; + char * save_in; + expressionS exp; + int i; + int j; + + memset (words, 0, MAX_LITTLENUMS * sizeof (LITTLENUM_TYPE)); + + /* Look for a raw floating point number. */ + if ((save_in = atof_ieee (*str, 'x', words)) != NULL + && is_end_of_line[(unsigned char) *save_in]) + { + for (i = 0; i < NUM_FLOAT_VALS; i++) + { + for (j = 0; j < MAX_LITTLENUMS; j++) + { + if (words[j] != fp_values[i][j]) + break; + } + + if (j == MAX_LITTLENUMS) + { + *str = save_in; + return i; + } + } + } + + /* Try and parse a more complex expression, this will probably fail + unless the code uses a floating point prefix (eg "0f"). */ + save_in = input_line_pointer; + input_line_pointer = *str; + if (expression (&exp) == absolute_section + && exp.X_op == O_big + && exp.X_add_number < 0) + { + /* FIXME: 5 = X_PRECISION, should be #define'd where we can use it. + Ditto for 15. */ + if (gen_to_words (words, 5, (long) 15) == 0) + { + for (i = 0; i < NUM_FLOAT_VALS; i++) + { + for (j = 0; j < MAX_LITTLENUMS; j++) + { + if (words[j] != fp_values[i][j]) + break; + } + + if (j == MAX_LITTLENUMS) + { + *str = input_line_pointer; + input_line_pointer = save_in; + return i; + } + } + } + } + + *str = input_line_pointer; + input_line_pointer = save_in; + return -1; +} + +/* Return true if anything in the expression is a bignum. */ + +static int +walk_no_bignums (sp) + symbolS * sp; +{ + if (symbol_get_value_expression (sp)->X_op == O_big) + return 1; + + if (symbol_get_value_expression (sp)->X_add_symbol) + { + return (walk_no_bignums (symbol_get_value_expression (sp)->X_add_symbol) + || (symbol_get_value_expression (sp)->X_op_symbol + && walk_no_bignums (symbol_get_value_expression (sp)->X_op_symbol))); + } + + return 0; +} + +static int +my_get_expression (ep, str) + expressionS * ep; + char ** str; +{ + char * save_in; + segT seg; + + save_in = input_line_pointer; + input_line_pointer = *str; + seg = expression (ep); + +#ifdef OBJ_AOUT + if (seg != absolute_section + && seg != text_section + && seg != data_section && seg != bss_section && seg != undefined_section) { @@ -2337,116 +3681,130 @@ my_get_expression (ep, str) return 0; } -/* unrestrict should be one if is permitted for this - instruction */ +/* UNRESTRICT should be one if is permitted for this + instruction. */ static int decode_shift (str, unrestrict) char ** str; int unrestrict; { - struct asm_shift * shft; + const struct asm_shift_name * shift; char * p; char c; - + skip_whitespace (* str); - - for (p = *str; isalpha (*p); p++) + + for (p = * str; isalpha (* p); p ++) ; - if (p == *str) + if (p == * str) { inst.error = _("Shift expression expected"); return FAIL; } - c = *p; - *p = '\0'; - shft = (struct asm_shift *) hash_find (arm_shift_hsh, *str); - *p = c; - if (shft) + c = * p; + * p = '\0'; + shift = (const struct asm_shift_name *) hash_find (arm_shift_hsh, * str); + * p = c; + + if (shift == NULL) { - if (!strncmp (*str, "rrx", 3) - || !strncmp (*str, "RRX", 3)) - { - *str = p; - inst.instruction |= shft->value; - return SUCCESS; - } + inst.error = _("Shift expression expected"); + return FAIL; + } - skip_whitespace (p); - - if (unrestrict && reg_required_here (&p, 8) != FAIL) - { - inst.instruction |= shft->value | SHIFT_BY_REG; - *str = p; - return SUCCESS; - } - else if (is_immediate_prefix (* p)) - { - inst.error = NULL; - p++; - if (my_get_expression (&inst.reloc.exp, &p)) - return FAIL; + assert (shift->properties->index == shift_properties[shift->properties->index].index); - /* Validate some simple #expressions */ - if (inst.reloc.exp.X_op == O_constant) - { - unsigned num = inst.reloc.exp.X_add_number; + if (shift->properties->index == SHIFT_RRX) + { + * str = p; + inst.instruction |= shift->properties->bit_field; + return SUCCESS; + } - /* Reject operations greater than 32, or lsl #32 */ - if (num > 32 || (num == 32 && shft->value == 0)) - { - inst.error = _("Invalid immediate shift"); - return FAIL; - } + skip_whitespace (p); - /* Shifts of zero should be converted to lsl (which is zero)*/ - if (num == 0) - { - *str = p; - return SUCCESS; - } + if (unrestrict && reg_required_here (& p, 8) != FAIL) + { + inst.instruction |= shift->properties->bit_field | SHIFT_BY_REG; + * str = p; + return SUCCESS; + } + else if (! is_immediate_prefix (* p)) + { + inst.error = (unrestrict + ? _("shift requires register or #expression") + : _("shift requires #expression")); + * str = p; + return FAIL; + } - /* Shifts of 32 are encoded as 0, for those shifts that - support it. */ - if (num == 32) - num = 0; + inst.error = NULL; + p ++; - inst.instruction |= (num << 7) | shft->value; - *str = p; - return SUCCESS; - } + if (my_get_expression (& inst.reloc.exp, & p)) + return FAIL; - inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM; - inst.reloc.pc_rel = 0; - inst.instruction |= shft->value; - *str = p; - return SUCCESS; - } - else + /* Validate some simple #expressions. */ + if (inst.reloc.exp.X_op == O_constant) + { + unsigned num = inst.reloc.exp.X_add_number; + + /* Reject operations greater than 32. */ + if (num > 32 + /* Reject a shift of 0 unless the mode allows it. */ + || (num == 0 && shift->properties->allows_0 == 0) + /* Reject a shift of 32 unless the mode allows it. */ + || (num == 32 && shift->properties->allows_32 == 0) + ) { - inst.error = unrestrict ? _("shift requires register or #expression") - : _("shift requires #expression"); - *str = p; - return FAIL; + /* As a special case we allow a shift of zero for + modes that do not support it to be recoded as an + logical shift left of zero (ie nothing). We warn + about this though. */ + if (num == 0) + { + as_warn (_("Shift of 0 ignored.")); + shift = & shift_names[0]; + assert (shift->properties->index == SHIFT_LSL); + } + else + { + inst.error = _("Invalid immediate shift"); + return FAIL; + } } + + /* Shifts of 32 are encoded as 0, for those shifts that + support it. */ + if (num == 32) + num = 0; + + inst.instruction |= (num << 7) | shift->properties->bit_field; + } + else + { + inst.reloc.type = BFD_RELOC_ARM_SHIFT_IMM; + inst.reloc.pc_rel = 0; + inst.instruction |= shift->properties->bit_field; } - inst.error = _("Shift expression expected"); - return FAIL; + * str = p; + return SUCCESS; } -/* Do those data_ops which can take a negative immediate constant */ -/* by altering the instuction. A bit of a hack really */ -/* MOV <-> MVN +/* Do those data_ops which can take a negative immediate constant + by altering the instuction. A bit of a hack really. + MOV <-> MVN AND <-> BIC ADC <-> SBC by inverting the second operand, and ADD <-> SUB CMP <-> CMN - by negating the second operand. -*/ + by negating the second operand. */ + static int negate_data_op (instruction, value) unsigned long * instruction; @@ -2461,60 +3819,60 @@ negate_data_op (instruction, value) op = (*instruction >> DATA_OP_SHIFT) & 0xf; switch (op) { - /* First negates */ - case OPCODE_SUB: /* ADD <-> SUB */ + /* First negates. */ + case OPCODE_SUB: /* ADD <-> SUB */ new_inst = OPCODE_ADD; value = negated; break; - case OPCODE_ADD: - new_inst = OPCODE_SUB; + case OPCODE_ADD: + new_inst = OPCODE_SUB; value = negated; break; - case OPCODE_CMP: /* CMP <-> CMN */ + case OPCODE_CMP: /* CMP <-> CMN */ new_inst = OPCODE_CMN; value = negated; break; - case OPCODE_CMN: - new_inst = OPCODE_CMP; + case OPCODE_CMN: + new_inst = OPCODE_CMP; value = negated; break; - /* Now Inverted ops */ - case OPCODE_MOV: /* MOV <-> MVN */ - new_inst = OPCODE_MVN; + /* Now Inverted ops. */ + case OPCODE_MOV: /* MOV <-> MVN */ + new_inst = OPCODE_MVN; value = inverted; break; - case OPCODE_MVN: + case OPCODE_MVN: new_inst = OPCODE_MOV; value = inverted; break; - case OPCODE_AND: /* AND <-> BIC */ - new_inst = OPCODE_BIC; + case OPCODE_AND: /* AND <-> BIC */ + new_inst = OPCODE_BIC; value = inverted; break; - case OPCODE_BIC: + case OPCODE_BIC: new_inst = OPCODE_AND; value = inverted; break; - case OPCODE_ADC: /* ADC <-> SBC */ - new_inst = OPCODE_SBC; + case OPCODE_ADC: /* ADC <-> SBC */ + new_inst = OPCODE_SBC; value = inverted; break; - case OPCODE_SBC: + case OPCODE_SBC: new_inst = OPCODE_ADC; value = inverted; break; - /* We cannot do anything */ - default: + /* We cannot do anything. */ + default: return FAIL; } @@ -2523,7 +3881,7 @@ negate_data_op (instruction, value) *instruction &= OPCODE_MASK; *instruction |= new_inst << DATA_OP_SHIFT; - return value; + return value; } static int @@ -2534,7 +3892,7 @@ data_op2 (str) expressionS expr; skip_whitespace (* str); - + if (reg_required_here (str, 0) != FAIL) { if (skip_past_comma (str) == SUCCESS) @@ -2545,12 +3903,12 @@ data_op2 (str) } else { - /* Immediate expression */ + /* Immediate expression. */ if (is_immediate_prefix (**str)) { (*str)++; inst.error = NULL; - + if (my_get_expression (&inst.reloc.exp, str)) return FAIL; @@ -2563,7 +3921,7 @@ data_op2 (str) { if (skip_past_comma (str) == SUCCESS) { - /* #x, y -- ie explicit rotation by Y */ + /* #x, y -- ie explicit rotation by Y. */ if (my_get_expression (&expr, str)) return FAIL; @@ -2572,8 +3930,8 @@ data_op2 (str) inst.error = _("Constant expression expected"); return FAIL; } - - /* Rotate must be a multiple of 2 */ + + /* Rotate must be a multiple of 2. */ if (((unsigned) expr.X_add_number) > 30 || (expr.X_add_number & 1) != 0 || ((unsigned) inst.reloc.exp.X_add_number) > 255) @@ -2587,13 +3945,13 @@ data_op2 (str) return SUCCESS; } - /* Implicit rotation, select a suitable one */ + /* Implicit rotation, select a suitable one. */ value = validate_immediate (inst.reloc.exp.X_add_number); if (value == FAIL) { - /* Can't be done, perhaps the code reads something like - "add Rd, Rn, #-n", where "sub Rd, Rn, #n" would be ok */ + /* Can't be done. Perhaps the code reads something like + "add Rd, Rn, #-n", where "sub Rd, Rn, #n" would be OK. */ if ((value = negate_data_op (&inst.instruction, inst.reloc.exp.X_add_number)) == FAIL) @@ -2626,7 +3984,7 @@ fp_op2 (str) return SUCCESS; else { - /* Immediate expression */ + /* Immediate expression. */ if (*((*str)++) == '#') { int i; @@ -2635,8 +3993,8 @@ fp_op2 (str) skip_whitespace (* str); - /* First try and match exact strings, this is to guarantee that - some formats will work even for cross assembly */ + /* First try and match exact strings, this is to guarantee + that some formats will work even for cross assembly. */ for (i = 0; fp_const[i]; i++) { @@ -2645,7 +4003,7 @@ fp_op2 (str) char *start = *str; *str += strlen (fp_const[i]); - if (is_end_of_line[(int)**str] || **str == '\0') + if (is_end_of_line[(unsigned char) **str]) { inst.instruction |= i + 8; return SUCCESS; @@ -2667,14 +4025,15 @@ fp_op2 (str) inst.error = _("Invalid floating point immediate expression"); return FAIL; } - inst.error = _("Floating point register or immediate expression expected"); + inst.error = + _("Floating point register or immediate expression expected"); return FAIL; } } static void do_arit (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -2697,7 +4056,7 @@ do_arit (str, flags) static void do_adr (str, flags) - char * str; + char * str; unsigned long flags; { /* This is a pseudo-op of the form "adr rd, label" to be converted @@ -2712,26 +4071,26 @@ do_adr (str, flags) inst.error = BAD_ARGS; return; } - + /* Frag hacking will turn this into a sub instruction if the offset turns out to be negative. */ inst.reloc.type = BFD_RELOC_ARM_IMMEDIATE; inst.reloc.exp.X_add_number -= 8; /* PC relative adjust. */ inst.reloc.pc_rel = 1; inst.instruction |= flags; + end_of_line (str); - return; } static void do_adrl (str, flags) - char * str; + char * str; unsigned long flags; { /* This is a pseudo-op of the form "adrl rd, label" to be converted into a relative address of the form: add rd, pc, #low(label-.-8)" - add rd, rd, #high(label-.-8)" */ + add rd, rd, #high(label-.-8)" */ skip_whitespace (str); @@ -2743,23 +4102,23 @@ do_adrl (str, flags) inst.error = BAD_ARGS; return; } - + end_of_line (str); - + /* Frag hacking will turn this into a sub instruction if the offset turns out to be negative. */ inst.reloc.type = BFD_RELOC_ARM_ADRL_IMMEDIATE; - inst.reloc.exp.X_add_number -= 8; /* PC relative adjust */ + inst.reloc.exp.X_add_number -= 8; /* PC relative adjust */ inst.reloc.pc_rel = 1; inst.instruction |= flags; inst.size = INSN_SIZE * 2; - + return; } static void do_cmp (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -2789,7 +4148,7 @@ do_cmp (str, flags) static void do_mov (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -2833,8 +4192,8 @@ ldst_extend (str, hwse) { int value = inst.reloc.exp.X_add_number; - if ((hwse && (value < -255 || value > 255)) - || (value < -4095 || value > 4095)) + if ((hwse && (value < -255 || value > 255)) + || (value < -4095 || value > 4095)) { inst.error = _("address offset too large"); return FAIL; @@ -2846,42 +4205,47 @@ ldst_extend (str, hwse) add = 0; } - /* Halfword and signextension instructions have the - immediate value split across bits 11..8 and bits 3..0 */ - if (hwse) - inst.instruction |= add | HWOFFSET_IMM | ((value >> 4) << 8) | (value & 0xF); - else - inst.instruction |= add | value; + /* Halfword and signextension instructions have the + immediate value split across bits 11..8 and bits 3..0. */ + if (hwse) + inst.instruction |= (add | HWOFFSET_IMM + | ((value >> 4) << 8) | (value & 0xF)); + else + inst.instruction |= add | value; } else { - if (hwse) - { - inst.instruction |= HWOFFSET_IMM; - inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; - } - else - inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM; + if (hwse) + { + inst.instruction |= HWOFFSET_IMM; + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; + } + else + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM; inst.reloc.pc_rel = 0; } return SUCCESS; case '-': - add = 0; /* and fall through */ + add = 0; + /* Fall through. */ + case '+': - (*str)++; /* and fall through */ + (*str)++; + /* Fall through. */ + default: if (reg_required_here (str, 0) == FAIL) return FAIL; if (hwse) - inst.instruction |= add; + inst.instruction |= add; else - { - inst.instruction |= add | OFFSET_REG; - if (skip_past_comma (str) == SUCCESS) - return decode_shift (str, SHIFT_RESTRICT); - } + { + inst.instruction |= add | OFFSET_REG; + if (skip_past_comma (str) == SUCCESS) + return decode_shift (str, SHIFT_RESTRICT); + } return SUCCESS; } @@ -2899,27 +4263,27 @@ do_ldst (str, flags) /* This is not ideal, but it is the simplest way of dealing with the ARM7T halfword instructions (since they use a different - encoding, but the same mnemonic): */ + encoding, but the same mnemonic): */ halfword = (flags & 0x80000000) != 0; if (halfword) { /* This is actually a load/store of a halfword, or a - signed-extension load */ - if ((cpu_variant & ARM_HALFWORD) == 0) - { - inst.error + signed-extension load. */ + if ((cpu_variant & ARM_EXT_HALFWORD) == 0) + { + inst.error = _("Processor does not support halfwords or signed bytes"); - return; - } + return; + } - inst.instruction = (inst.instruction & COND_MASK) - | (flags & ~COND_MASK); + inst.instruction = ((inst.instruction & COND_MASK) + | (flags & ~COND_MASK)); flags = 0; } skip_whitespace (str); - + if ((conflict_reg = reg_required_here (& str, 12)) == FAIL) { if (!inst.error) @@ -2952,41 +4316,57 @@ do_ldst (str, flags) if (*str == ']') { str ++; - + if (skip_past_comma (&str) == SUCCESS) { - /* [Rn],... (post inc) */ + /* [Rn],... (post inc) */ if (ldst_extend (&str, halfword) == FAIL) return; if (conflict_reg) - as_warn (_("%s register same as write-back base"), - (inst.instruction & LOAD_BIT) ? _("destination") : _("source") ); + { + if (flags & TRANS_BIT) + as_warn (_("Rn and Rd must be different in %s"), + ((inst.instruction & LOAD_BIT) + ? "LDRT" : "STRT")); + else + as_warn (_("%s register same as write-back base"), + ((inst.instruction & LOAD_BIT) + ? _("destination") : _("source"))); + } } else { - /* [Rn] */ - if (halfword) - inst.instruction |= HWOFFSET_IMM; + /* [Rn] */ + if (halfword) + inst.instruction |= HWOFFSET_IMM; - skip_whitespace (str); + skip_whitespace (str); - if (*str == '!') - { - if (conflict_reg) - as_warn (_("%s register same as write-back base"), - (inst.instruction & LOAD_BIT) ? _("destination") : _("source") ); - str++; - inst.instruction |= WRITE_BACK; - } + if (*str == '!') + { + if (conflict_reg) + as_warn (_("%s register same as write-back base"), + ((inst.instruction & LOAD_BIT) + ? _("destination") : _("source"))); + str++; + inst.instruction |= WRITE_BACK; + } flags |= INDEX_UP; - if (! (flags & TRANS_BIT)) - pre_inc = 1; + if (flags & TRANS_BIT) + { + if (conflict_reg) + as_warn (_("Rn and Rd must be different in %s"), + ((inst.instruction & LOAD_BIT) + ? "LDRT" : "STRT")); + } + else + pre_inc = 1; } } else { - /* [Rn,...] */ + /* [Rn,...] */ if (skip_past_comma (&str) == FAIL) { inst.error = _("pre-indexed expression expected"); @@ -3011,7 +4391,8 @@ do_ldst (str, flags) { if (conflict_reg) as_warn (_("%s register same as write-back base"), - (inst.instruction & LOAD_BIT) ? _("destination") : _("source") ); + ((inst.instruction & LOAD_BIT) + ? _("destination") : _("source"))); str++; inst.instruction |= WRITE_BACK; } @@ -3019,7 +4400,7 @@ do_ldst (str, flags) } else if (*str == '=') { - /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op */ + /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */ str++; skip_whitespace (str); @@ -3035,36 +4416,36 @@ do_ldst (str, flags) } if (inst.reloc.exp.X_op == O_constant - && (value = validate_immediate(inst.reloc.exp.X_add_number)) != FAIL) + && (value = validate_immediate (inst.reloc.exp.X_add_number)) != FAIL) { - /* This can be done with a mov instruction */ + /* This can be done with a mov instruction. */ inst.instruction &= LITERAL_MASK; inst.instruction |= INST_IMMEDIATE | (OPCODE_MOV << DATA_OP_SHIFT); inst.instruction |= (flags & COND_MASK) | (value & 0xfff); - end_of_line(str); - return; + end_of_line (str); + return; } else { - /* Insert into literal pool */ + /* Insert into literal pool. */ if (add_to_lit_pool () == FAIL) { if (!inst.error) - inst.error = _("literal pool insertion failed"); + inst.error = _("literal pool insertion failed"); return; } - /* Change the instruction exp to point to the pool */ - if (halfword) - { - inst.instruction |= HWOFFSET_IMM; - inst.reloc.type = BFD_RELOC_ARM_HWLITERAL; - } - else + /* Change the instruction exp to point to the pool. */ + if (halfword) + { + inst.instruction |= HWOFFSET_IMM; + inst.reloc.type = BFD_RELOC_ARM_HWLITERAL; + } + else inst.reloc.type = BFD_RELOC_ARM_LITERAL; inst.reloc.pc_rel = 1; inst.instruction |= (REG_PC << 16); - pre_inc = 1; + pre_inc = 1; } } else @@ -3073,20 +4454,21 @@ do_ldst (str, flags) return; if (halfword) - { - inst.instruction |= HWOFFSET_IMM; - inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; - } + { + inst.instruction |= HWOFFSET_IMM; + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8; + } else - inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM; + inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM; #ifndef TE_WINCE - inst.reloc.exp.X_add_number -= 8; /* PC rel adjust */ + /* PC rel adjust. */ + inst.reloc.exp.X_add_number -= 8; #endif inst.reloc.pc_rel = 1; inst.instruction |= (REG_PC << 16); pre_inc = 1; } - + if (pre_inc && (flags & TRANS_BIT)) inst.error = _("Pre-increment instruction with translate"); @@ -3099,11 +4481,11 @@ static long reg_list (strp) char ** strp; { - char * str = *strp; + char * str = * strp; long range = 0; int another_range; - /* We come back here if we get ranges concatenated by '+' or '|' */ + /* We come back here if we get ranges concatenated by '+' or '|'. */ do { another_range = 0; @@ -3112,21 +4494,21 @@ reg_list (strp) { int in_range = 0; int cur_reg = -1; - + str++; do { int reg; - + skip_whitespace (str); if ((reg = reg_required_here (& str, -1)) == FAIL) return FAIL; - + if (in_range) { int i; - + if (reg <= cur_reg) { inst.error = _("Bad range in register list"); @@ -3136,7 +4518,7 @@ reg_list (strp) for (i = cur_reg + 1; i < reg; i++) { if (range & (1 << i)) - as_tsktsk + as_tsktsk (_("Warning: Duplicated register (r%d) in register list"), i); else @@ -3153,8 +4535,9 @@ reg_list (strp) range |= 1 << reg; cur_reg = reg; - } while (skip_past_comma (&str) != FAIL - || (in_range = 1, *str++ == '-')); + } + while (skip_past_comma (&str) != FAIL + || (in_range = 1, *str++ == '-')); str--; skip_whitespace (str); @@ -3173,7 +4556,7 @@ reg_list (strp) if (expr.X_op == O_constant) { - if (expr.X_add_number + if (expr.X_add_number != (expr.X_add_number & 0x0000ffff)) { inst.error = _("invalid register mask"); @@ -3186,7 +4569,7 @@ reg_list (strp) regno &= -regno; regno = (1 << regno) - 1; - as_tsktsk + as_tsktsk (_("Warning: Duplicated register (r%d) in register list"), regno); } @@ -3214,7 +4597,8 @@ reg_list (strp) str++; another_range = 1; } - } while (another_range); + } + while (another_range); *strp = str; return range; @@ -3222,7 +4606,7 @@ reg_list (strp) static void do_ldmstm (str, flags) - char * str; + char * str; unsigned long flags; { int base_reg; @@ -3268,11 +4652,11 @@ do_ldmstm (str, flags) static void do_swi (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); - + /* Allow optional leading '#'. */ if (is_immediate_prefix (*str)) str++; @@ -3283,19 +4667,19 @@ do_swi (str, flags) inst.reloc.type = BFD_RELOC_ARM_SWI; inst.reloc.pc_rel = 0; inst.instruction |= flags; - + end_of_line (str); - + return; } static void do_swap (str, flags) - char * str; + char * str; unsigned long flags; { int reg; - + skip_whitespace (str); if ((reg = reg_required_here (&str, 12)) == FAIL) @@ -3354,20 +4738,20 @@ do_swap (str, flags) static void do_branch (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { if (my_get_expression (&inst.reloc.exp, &str)) return; - + #ifdef OBJ_ELF { char * save_in; - - /* ScottB: February 5, 1998 */ - /* Check to see of PLT32 reloc required for the instruction. */ - - /* arm_parse_reloc() works on input_line_pointer. + + /* ScottB: February 5, 1998 - Check to see of PLT32 reloc + required for the instruction. */ + + /* arm_parse_reloc () works on input_line_pointer. We actually want to parse the operands to the branch instruction passed in 'str'. Save the input pointer and restore it later. */ save_in = input_line_pointer; @@ -3392,15 +4776,15 @@ do_branch (str, flags) #else inst.reloc.type = BFD_RELOC_ARM_PCREL_BRANCH; inst.reloc.pc_rel = 1; -#endif /* OBJ_ELF */ - +#endif /* OBJ_ELF */ + end_of_line (str); return; } static void do_bx (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { int reg; @@ -3413,15 +4797,16 @@ do_bx (str, flags) return; } + /* Note - it is not illegal to do a "bx pc". Useless, but not illegal. */ if (reg == REG_PC) - inst.error = BAD_PC; + as_tsktsk (_("Use of r15 in bx in ARM mode is not really useful")); end_of_line (str); } static void do_cdp (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { /* Co-processor data operation. @@ -3483,7 +4868,7 @@ do_cdp (str, flags) static void do_lstc (str, flags) - char * str; + char * str; unsigned long flags; { /* Co-processor register load/store. @@ -3521,7 +4906,7 @@ do_lstc (str, flags) static void do_co_reg (str, flags) - char * str; + char * str; unsigned long flags; { /* Co-processor register transfer. @@ -3588,7 +4973,7 @@ do_co_reg (str, flags) static void do_fp_ctrl (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { /* FP control registers. @@ -3609,7 +4994,7 @@ do_fp_ctrl (str, flags) static void do_fp_ldst (str, flags) - char * str; + char * str; unsigned long flags ATTRIBUTE_UNUSED; { skip_whitespace (str); @@ -3651,7 +5036,7 @@ do_fp_ldst (str, flags) static void do_fp_ldmstm (str, flags) - char * str; + char * str; unsigned long flags; { int num_regs; @@ -3665,7 +5050,7 @@ do_fp_ldmstm (str, flags) return; } - /* Get Number of registers to transfer */ + /* Get Number of registers to transfer. */ if (skip_past_comma (&str) == FAIL || my_get_expression (&inst.reloc.exp, &str)) { @@ -3744,7 +5129,8 @@ do_fp_ldmstm (str, flags) str++; if (reg == REG_PC) { - inst.error = _("R15 not allowed as base register with write-back"); + inst.error = + _("R15 not allowed as base register with write-back"); return; } } @@ -3753,14 +5139,14 @@ do_fp_ldmstm (str, flags) if (flags & CP_T_Pre) { - /* Pre-decrement */ + /* Pre-decrement. */ offset = 3 * num_regs; if (write_back) flags |= CP_T_WB; } else { - /* Post-increment */ + /* Post-increment. */ if (write_back) { flags |= CP_T_WB; @@ -3790,7 +5176,7 @@ do_fp_ldmstm (str, flags) static void do_fp_dyadic (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3839,7 +5225,7 @@ do_fp_dyadic (str, flags) static void do_fp_monadic (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3880,7 +5266,7 @@ do_fp_monadic (str, flags) static void do_fp_cmp (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3907,7 +5293,7 @@ do_fp_cmp (str, flags) static void do_fp_from_reg (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3948,7 +5334,7 @@ do_fp_from_reg (str, flags) static void do_fp_to_reg (str, flags) - char * str; + char * str; unsigned long flags; { skip_whitespace (str); @@ -3969,13 +5355,14 @@ do_fp_to_reg (str, flags) return; } -/* Thumb specific routines */ +/* Thumb specific routines. */ /* Parse and validate that a register is of the right form, this saves - repeated checking of this information in many similar cases. - Unlike the 32-bit case we do not insert the register into the opcode - here, since the position is often unknown until the full instruction + repeated checking of this information in many similar cases. + Unlike the 32-bit case we do not insert the register into the opcode + here, since the position is often unknown until the full instruction has been parsed. */ + static int thumb_reg (strp, hi_lo) char ** strp; @@ -4013,6 +5400,7 @@ thumb_reg (strp, hi_lo) /* Parse an add or subtract instruction, SUBTRACT is non-zero if the opcode was SUB. */ + static void thumb_add_sub (str, subtract) char * str; @@ -4044,8 +5432,8 @@ thumb_add_sub (str, subtract) if (skip_past_comma (&str) == FAIL) { - /* Two operand format, shuffle the registers and pretend there - are 3 */ + /* Two operand format, shuffle the registers + and pretend there are 3. */ Rn = Rs; Rs = Rd; } @@ -4060,7 +5448,7 @@ thumb_add_sub (str, subtract) } /* We now have Rd and Rs set to registers, and Rn set to a register or FAIL; - for the latter case, EXPR contains the immediate that was found. */ + for the latter case, EXPR contains the immediate that was found. */ if (Rn != FAIL) { /* All register format. */ @@ -4072,7 +5460,7 @@ thumb_add_sub (str, subtract) return; } - /* Can't do this for SUB */ + /* Can't do this for SUB. */ if (subtract) { inst.error = _("subtract valid only on lo regs"); @@ -4106,7 +5494,7 @@ thumb_add_sub (str, subtract) if (inst.reloc.exp.X_op != O_constant) { /* Value isn't known yet, all we can do is store all the fragments - we know about in the instruction and let the reloc hacking + we know about in the instruction and let the reloc hacking work it all out. */ inst.instruction = (subtract ? 0x8000 : 0) | (Rd << 4) | Rs; inst.reloc.type = BFD_RELOC_ARM_THUMB_ADD; @@ -4123,7 +5511,7 @@ thumb_add_sub (str, subtract) offset = -offset; subtract = 1; - /* Quick check, in case offset is MIN_INT */ + /* Quick check, in case offset is MIN_INT. */ if (offset < 0) { inst.error = _("immediate value out of range"); @@ -4177,7 +5565,7 @@ thumb_add_sub (str, subtract) } } } - + end_of_line (str); } @@ -4208,13 +5596,13 @@ thumb_shift (str, shift) } else { - if ((Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL) + if ((Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL) return; if (skip_past_comma (&str) == FAIL) { - /* Two operand format, shuffle the registers and pretend there - are 3 */ + /* Two operand format, shuffle the registers + and pretend there are 3. */ Rn = Rs; Rs = Rd; } @@ -4229,7 +5617,7 @@ thumb_shift (str, shift) } /* We now have Rd and Rs set to registers, and Rn set to a register or FAIL; - for the latter case, EXPR contains the immediate that was found. */ + for the latter case, EXPR contains the immediate that was found. */ if (Rn != FAIL) { @@ -4260,8 +5648,7 @@ thumb_shift (str, shift) if (inst.reloc.exp.X_op != O_constant) { /* Value isn't known yet, create a dummy reloc and let reloc - hacking fix it up */ - + hacking fix it up. */ inst.reloc.type = BFD_RELOC_ARM_THUMB_SHIFT; } else @@ -4274,11 +5661,11 @@ thumb_shift (str, shift) return; } - /* Shifts of zero are handled by converting to LSL */ + /* Shifts of zero are handled by converting to LSL. */ if (shift_value == 0) inst.instruction = T_OPCODE_LSL_I; - /* Shifts of 32 are encoded as a shift of zero */ + /* Shifts of 32 are encoded as a shift of zero. */ if (shift_value == 32) shift_value = 0; @@ -4287,7 +5674,7 @@ thumb_shift (str, shift) inst.instruction |= Rd | (Rs << 3); } - + end_of_line (str); } @@ -4323,7 +5710,7 @@ thumb_mov_compare (str, move) { if (move == THUMB_MOVE) /* A move of two lowregs is encoded as ADD Rd, Rs, #0 - since a MOV instruction produces unpredictable results */ + since a MOV instruction produces unpredictable results. */ inst.instruction = T_OPCODE_ADD_I3; else inst.instruction = T_OPCODE_CMP_LR; @@ -4429,7 +5816,7 @@ thumb_load_store (str, load_store, size) } else if (*str == '=') { - /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op */ + /* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */ str++; skip_whitespace (str); @@ -4438,7 +5825,7 @@ thumb_load_store (str, load_store, size) return; end_of_line (str); - + if ( inst.reloc.exp.X_op != O_constant && inst.reloc.exp.X_op != O_symbol) { @@ -4449,25 +5836,26 @@ thumb_load_store (str, load_store, size) if (inst.reloc.exp.X_op == O_constant && ((inst.reloc.exp.X_add_number & ~0xFF) == 0)) { - /* This can be done with a mov instruction */ + /* This can be done with a mov instruction. */ inst.instruction = T_OPCODE_MOV_I8 | (Rd << 8); inst.instruction |= inst.reloc.exp.X_add_number; - return; + return; } - /* Insert into literal pool */ + /* Insert into literal pool. */ if (add_to_lit_pool () == FAIL) { if (!inst.error) - inst.error = "literal pool insertion failed"; + inst.error = "literal pool insertion failed"; return; } inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET; inst.reloc.pc_rel = 1; inst.instruction = T_OPCODE_LDR_PC | (Rd << 8); - inst.reloc.exp.X_add_number += 4; /* Adjust ARM pipeline offset to Thumb */ + /* Adjust ARM pipeline offset to Thumb. */ + inst.reloc.exp.X_add_number += 4; return; } @@ -4478,7 +5866,7 @@ thumb_load_store (str, load_store, size) inst.instruction = T_OPCODE_LDR_PC | (Rd << 8); inst.reloc.pc_rel = 1; - inst.reloc.exp.X_add_number -= 4; /* Pipeline offset */ + inst.reloc.exp.X_add_number -= 4; /* Pipeline offset. */ inst.reloc.type = BFD_RELOC_ARM_THUMB_OFFSET; end_of_line (str); return; @@ -4532,7 +5920,7 @@ thumb_load_store (str, load_store, size) } else if (Ro == FAIL) { - /* Immediate offset */ + /* Immediate offset. */ if (size == THUMB_WORD) inst.instruction = (load_store == THUMB_LOAD ? T_OPCODE_LDR_IW : T_OPCODE_STR_IW); @@ -4548,7 +5936,7 @@ thumb_load_store (str, load_store, size) if (inst.reloc.exp.X_op == O_constant) { unsigned offset = inst.reloc.exp.X_add_number; - + if (offset & ~(0x1f << size)) { inst.error = _("Invalid offset"); @@ -4561,7 +5949,7 @@ thumb_load_store (str, load_store, size) } else { - /* Register offset */ + /* Register offset. */ if (size == THUMB_WORD) inst.instruction = (load_store == THUMB_LOAD ? T_OPCODE_LDR_RW : T_OPCODE_STR_RW); @@ -4582,14 +5970,15 @@ static void do_t_nop (str) char * str; { - /* Do nothing */ + /* Do nothing. */ end_of_line (str); return; } -/* Handle the Format 4 instructions that do not have equivalents in other +/* Handle the Format 4 instructions that do not have equivalents in other formats. That is, ADC, AND, EOR, SBC, ROR, TST, NEG, CMN, ORR, MUL, BIC and MVN. */ + static void do_t_arit (str) char * str; @@ -4602,8 +5991,8 @@ do_t_arit (str) || skip_past_comma (&str) == FAIL || (Rs = thumb_reg (&str, THUMB_REG_LO)) == FAIL) { - inst.error = BAD_ARGS; - return; + inst.error = BAD_ARGS; + return; } if (skip_past_comma (&str) != FAIL) @@ -4614,7 +6003,7 @@ do_t_arit (str) if (inst.instruction == T_OPCODE_TST || inst.instruction == T_OPCODE_CMN || inst.instruction == T_OPCODE_NEG - || inst.instruction == T_OPCODE_MVN) + || inst.instruction == T_OPCODE_MVN) { inst.error = BAD_ARGS; return; @@ -4685,23 +6074,23 @@ find_real_start (symbolP) const char * name = S_GET_NAME (symbolP); symbolS * new_target; - /* This definiton must agree with the one in gcc/config/arm/thumb.c */ + /* This definiton must agree with the one in gcc/config/arm/thumb.c. */ #define STUB_NAME ".real_start_of" if (name == NULL) - abort(); + abort (); /* Names that start with '.' are local labels, not function entry points. The compiler may generate BL instructions to these labels because it needs to perform a branch to a far away location. */ if (name[0] == '.') return symbolP; - + real_start = malloc (strlen (name) + strlen (STUB_NAME) + 1); sprintf (real_start, "%s%s", STUB_NAME, name); new_target = symbol_find (real_start); - + if (new_target == NULL) { as_warn ("Failed to find real start of function: %s\n", name); @@ -4713,14 +6102,13 @@ find_real_start (symbolP) return new_target; } - static void do_t_branch23 (str) char * str; { if (my_get_expression (& inst.reloc.exp, & str)) return; - + inst.reloc.type = BFD_RELOC_THUMB_PCREL_BRANCH23; inst.reloc.pc_rel = 1; end_of_line (str); @@ -4733,7 +6121,8 @@ do_t_branch23 (str) && inst.reloc.exp.X_add_symbol != NULL && S_IS_DEFINED (inst.reloc.exp.X_add_symbol) && ! THUMB_IS_FUNC (inst.reloc.exp.X_add_symbol)) - inst.reloc.exp.X_add_symbol = find_real_start (inst.reloc.exp.X_add_symbol); + inst.reloc.exp.X_add_symbol = + find_real_start (inst.reloc.exp.X_add_symbol); } static void @@ -4791,7 +6180,7 @@ do_t_ldmstm (str) if (inst.reloc.type != BFD_RELOC_NONE) { - /* This really doesn't seem worth it. */ + /* This really doesn't seem worth it. */ inst.reloc.type = BFD_RELOC_NONE; inst.error = _("Expression too complex"); return; @@ -4891,7 +6280,7 @@ do_t_push_pop (str) if (inst.reloc.type != BFD_RELOC_NONE) { - /* This really doesn't seem worth it. */ + /* This really doesn't seem worth it. */ inst.reloc.type = BFD_RELOC_NONE; inst.error = _("Expression too complex"); return; @@ -4985,7 +6374,7 @@ do_t_adr (str) inst.reloc.exp.X_add_number -= 4; /* PC relative adjust. */ inst.reloc.pc_rel = 1; inst.instruction |= REG_PC; /* Rd is already placed into the instruction. */ - + end_of_line (str); } @@ -4993,10 +6382,10 @@ static void insert_reg (entry) int entry; { - int len = strlen (reg_table[entry].name) + 2; - char * buf = (char *) xmalloc (len); + int len = strlen (reg_table[entry].name) + 2; + char * buf = (char *) xmalloc (len); char * buf2 = (char *) xmalloc (len); - int i = 0; + int i = 0; #ifdef REGISTER_PREFIX buf[i++] = REGISTER_PREFIX; @@ -5009,8 +6398,8 @@ insert_reg (entry) buf2[i] = '\0'; - hash_insert (arm_reg_hsh, buf, (PTR) ®_table[entry]); - hash_insert (arm_reg_hsh, buf2, (PTR) ®_table[entry]); + hash_insert (arm_reg_hsh, buf, (PTR) & reg_table[entry]); + hash_insert (arm_reg_hsh, buf2, (PTR) & reg_table[entry]); } static void @@ -5019,7 +6408,7 @@ insert_reg_alias (str, regnum) int regnum; { struct reg_entry *new = - (struct reg_entry *)xmalloc (sizeof (struct reg_entry)); + (struct reg_entry *) xmalloc (sizeof (struct reg_entry)); char *name = xmalloc (strlen (str) + 1); strcpy (name, str); @@ -5035,7 +6424,7 @@ set_constant_flonums () int i; for (i = 0; i < NUM_FLOAT_VALS; i++) - if (atof_ieee ((char *)fp_const[i], 'x', fp_values[i]) == NULL) + if (atof_ieee ((char *) fp_const[i], 'x', fp_values[i]) == NULL) abort (); } @@ -5044,7 +6433,7 @@ md_begin () { unsigned mach; unsigned int i; - + if ( (arm_ops_hsh = hash_new ()) == NULL || (arm_tops_hsh = hash_new ()) == NULL || (arm_cond_hsh = hash_new ()) == NULL @@ -5052,15 +6441,15 @@ md_begin () || (arm_reg_hsh = hash_new ()) == NULL || (arm_psr_hsh = hash_new ()) == NULL) as_fatal (_("Virtual memory exhausted")); - + for (i = 0; i < sizeof (insns) / sizeof (struct asm_opcode); i++) hash_insert (arm_ops_hsh, insns[i].template, (PTR) (insns + i)); for (i = 0; i < sizeof (tinsns) / sizeof (struct thumb_opcode); i++) hash_insert (arm_tops_hsh, tinsns[i].template, (PTR) (tinsns + i)); for (i = 0; i < sizeof (conds) / sizeof (struct asm_cond); i++) hash_insert (arm_cond_hsh, conds[i].template, (PTR) (conds + i)); - for (i = 0; i < sizeof (shift) / sizeof (struct asm_shift); i++) - hash_insert (arm_shift_hsh, shift[i].template, (PTR) (shift + i)); + for (i = 0; i < sizeof (shift_names) / sizeof (struct asm_shift_name); i++) + hash_insert (arm_shift_hsh, shift_names[i].name, (PTR) (shift_names + i)); for (i = 0; i < sizeof (psrs) / sizeof (struct asm_psr); i++) hash_insert (arm_psr_hsh, psrs[i].template, (PTR) (psrs + i)); @@ -5072,7 +6461,7 @@ md_begin () #if defined OBJ_COFF || defined OBJ_ELF { unsigned int flags = 0; - + /* Set the flags in the private structure. */ if (uses_apcs_26) flags |= F_APCS26; if (support_interwork) flags |= F_INTERWORK; @@ -5081,45 +6470,73 @@ md_begin () if ((cpu_variant & FPU_ALL) == FPU_NONE) flags |= F_SOFT_FLOAT; bfd_set_private_flags (stdoutput, flags); + + /* We have run out flags in the COFF header to encode the + status of ATPCS support, so instead we create a dummy, + empty, debug section called .arm.atpcs. */ + if (atpcs) + { + asection * sec; + + sec = bfd_make_section (stdoutput, ".arm.atpcs"); + + if (sec != NULL) + { + bfd_set_section_flags + (stdoutput, sec, SEC_READONLY | SEC_DEBUGGING /* | SEC_HAS_CONTENTS */); + bfd_set_section_size (stdoutput, sec, 0); + bfd_set_section_contents (stdoutput, sec, NULL, 0, 0); + } + } } #endif - + /* Record the CPU type as well. */ switch (cpu_variant & ARM_CPU_MASK) { case ARM_2: mach = bfd_mach_arm_2; break; - + case ARM_3: /* Also ARM_250. */ mach = bfd_mach_arm_2a; break; - + default: case ARM_6 | ARM_3 | ARM_2: /* Actually no CPU type defined. */ mach = bfd_mach_arm_4; break; - + case ARM_7: /* Also ARM_6. */ mach = bfd_mach_arm_3; break; } - + /* Catch special cases. */ if (cpu_variant != (FPU_DEFAULT | CPU_DEFAULT)) { - if (cpu_variant & (ARM_EXT_V5 & ARM_THUMB)) - mach = bfd_mach_arm_5T; + 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) - mach = bfd_mach_arm_5; - else if (cpu_variant & ARM_THUMB) - mach = bfd_mach_arm_4T; - else if ((cpu_variant & ARM_ARCH_V4) == ARM_ARCH_V4) - mach = bfd_mach_arm_4; - else if (cpu_variant & ARM_LONGMUL) + { + 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; } - + bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach); } @@ -5129,6 +6546,7 @@ md_begin () THE RIGHT THING, whatever it is. Possible values for n are 1 (byte) 2 (short) and 4 (long) Floating numbers are put out as a series of LITTLENUMS (shorts, here at least). */ + void md_number_to_chars (buf, val, n) char * buf; @@ -5141,10 +6559,10 @@ md_number_to_chars (buf, val, n) number_to_chars_littleendian (buf, val, n); } -static valueT +static valueT md_chars_to_number (buf, n) char * buf; - int n; + int n; { valueT result = 0; unsigned char * where = (unsigned char *) buf; @@ -5170,8 +6588,8 @@ md_chars_to_number (buf, n) } /* Turn a string in input_line_pointer into a floating point constant - of type TYPE, and store the appropriate bytes in *litP. The number - of LITTLENUMS emitted is stored in *sizeP . An error message is + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is returned, or NULL on OK. Note that fp constants aren't represent in the normal way on the ARM. @@ -5253,16 +6671,18 @@ md_atof (type, litP, sizeP) return 0; } -/* The knowledge of the PC's pipeline offset is built into the insns themselves. */ +/* The knowledge of the PC's pipeline offset is built into the insns + themselves. */ + long md_pcrel_from (fixP) fixS * fixP; { - if ( fixP->fx_addsy + if (fixP->fx_addsy && S_GET_SEGMENT (fixP->fx_addsy) == undefined_section && fixP->fx_subsy == NULL) return 0; - + if (fixP->fx_pcrel && (fixP->fx_r_type == BFD_RELOC_ARM_THUMB_ADD)) { /* PC relative addressing on the Thumb is slightly odd @@ -5280,7 +6700,8 @@ md_pcrel_from (fixP) #endif } -/* Round up a section size to the appropriate boundary. */ +/* Round up a section size to the appropriate boundary. */ + valueT md_section_align (segment, size) segT segment ATTRIBUTE_UNUSED; @@ -5289,15 +6710,14 @@ md_section_align (segment, size) #ifdef OBJ_ELF return size; #else - /* Round all sects to multiple of 4 */ + /* Round all sects to multiple of 4. */ return (size + 3) & ~3; #endif } -/* Under ELF we need to default _GLOBAL_OFFSET_TABLE. Otherwise - we have no need to default values of symbols. */ +/* Under ELF we need to default _GLOBAL_OFFSET_TABLE. + Otherwise we have no need to default values of symbols. */ -/* ARGSUSED */ symbolS * md_undefined_symbol (name) char * name ATTRIBUTE_UNUSED; @@ -5310,20 +6730,20 @@ md_undefined_symbol (name) { if (symbol_find (name)) as_bad ("GOT already in the symbol table"); - + GOT_symbol = symbol_new (name, undefined_section, - (valueT)0, & zero_address_frag); + (valueT) 0, & zero_address_frag); } - + return GOT_symbol; } #endif - + return 0; } -/* arm_reg_parse () := if it looks like a register, return its token and - advance the pointer. */ +/* arm_reg_parse () := if it looks like a register, return its token and + advance the pointer. */ static int arm_reg_parse (ccp) @@ -5355,7 +6775,7 @@ arm_reg_parse (ccp) *--p = 0; reg = (struct reg_entry *) hash_find (arm_reg_hsh, start); *p = c; - + if (reg) { *ccp = p; @@ -5367,9 +6787,9 @@ arm_reg_parse (ccp) int md_apply_fix3 (fixP, val, seg) - fixS * fixP; - valueT * val; - segT seg; + fixS * fixP; + valueT * val; + segT seg; { offsetT value = * val; offsetT newval; @@ -5382,7 +6802,9 @@ md_apply_fix3 (fixP, val, seg) assert (fixP->fx_r_type < BFD_RELOC_UNUSED); /* Note whether this will delete the relocation. */ -#if 0 /* patch from REarnshaw to JDavis (disabled for the moment, since it doesn't work fully) */ +#if 0 + /* Patch from REarnshaw to JDavis (disabled for the moment, since it + doesn't work fully.) */ if ((fixP->fx_addsy == 0 || symbol_constant_p (fixP->fx_addsy)) && !fixP->fx_pcrel) #else @@ -5401,14 +6823,16 @@ md_apply_fix3 (fixP, val, seg) { if (target_oabi && (fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH - )) + || fixP->fx_r_type == BFD_RELOC_ARM_PCREL_BLX + )) value = 0; else value += md_pcrel_from (fixP); } } - fixP->fx_addnumber = value; /* Remember value for emit_reloc. */ + /* Remember value for emit_reloc. */ + fixP->fx_addnumber = value; switch (fixP->fx_r_type) { @@ -5434,7 +6858,7 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_ADRL_IMMEDIATE: { unsigned int highpart = 0; - unsigned int newinsn = 0xe1a00000; /* nop */ + unsigned int newinsn = 0xe1a00000; /* nop. */ newimm = validate_immediate (value); temp = md_chars_to_number (buf, INSN_SIZE); @@ -5443,26 +6867,30 @@ md_apply_fix3 (fixP, val, seg) if (newimm == (unsigned int) FAIL && (newimm = negate_data_op (& temp, value)) == (unsigned int) FAIL) { - /* No ? OK - try using two ADD instructions to generate the value. */ + /* No ? OK - try using two ADD instructions to generate + the value. */ newimm = validate_immediate_twopart (value, & highpart); - /* Yes - then make sure that the second instruction is also an add. */ + /* Yes - then make sure that the second instruction is + also an add. */ if (newimm != (unsigned int) FAIL) newinsn = temp; /* Still No ? Try using a negated value. */ else if ((newimm = validate_immediate_twopart (- value, & highpart)) != (unsigned int) FAIL) - temp = newinsn = (temp & OPCODE_MASK) | OPCODE_SUB << DATA_OP_SHIFT; + temp = newinsn = (temp & OPCODE_MASK) | OPCODE_SUB << DATA_OP_SHIFT; /* Otherwise - give up. */ else { as_bad_where (fixP->fx_file, fixP->fx_line, - _("Unable to compute ADRL instructions for PC offset of 0x%x"), value); + _("Unable to compute ADRL instructions for PC offset of 0x%lx"), + value); break; } - /* Replace the first operand in the 2nd instruction (which is the PC) - with the destination register. We have already added in the PC in the - first instruction and we do not want to do it again. */ + /* Replace the first operand in the 2nd instruction (which + is the PC) with the destination register. We have + already added in the PC in the first instruction and we + do not want to do it again. */ newinsn &= ~ 0xf0000; newinsn |= ((newinsn & 0x0f000) << 4); } @@ -5477,16 +6905,17 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_OFFSET_IMM: sign = value >= 0; - + if (value < 0) value = - value; - + if (validate_offset_imm (value, 0) == FAIL) - { - as_bad_where (fixP->fx_file, fixP->fx_line, - _("bad immediate value for offset (%ld)"), (long) value); - break; - } + { + as_bad_where (fixP->fx_file, fixP->fx_line, + _("bad immediate value for offset (%ld)"), + (long) value); + break; + } newval = md_chars_to_number (buf, INSN_SIZE); newval &= 0xff7ff000; @@ -5494,23 +6923,23 @@ md_apply_fix3 (fixP, val, seg) md_number_to_chars (buf, newval, INSN_SIZE); break; - case BFD_RELOC_ARM_OFFSET_IMM8: - case BFD_RELOC_ARM_HWLITERAL: + case BFD_RELOC_ARM_OFFSET_IMM8: + case BFD_RELOC_ARM_HWLITERAL: sign = value >= 0; - + if (value < 0) value = - value; if (validate_offset_imm (value, 1) == FAIL) - { - if (fixP->fx_r_type == BFD_RELOC_ARM_HWLITERAL) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("invalid literal constant: pool needs to be closer")); - else - as_bad (_("bad immediate value for half-word offset (%ld)"), + { + if (fixP->fx_r_type == BFD_RELOC_ARM_HWLITERAL) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("invalid literal constant: pool needs to be closer")); + else + as_bad (_("bad immediate value for half-word offset (%ld)"), (long) value); - break; - } + break; + } newval = md_chars_to_number (buf, INSN_SIZE); newval &= 0xff7ff0f0; @@ -5520,13 +6949,13 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_LITERAL: sign = value >= 0; - + if (value < 0) value = - value; if (validate_offset_imm (value, 0) == FAIL) { - as_bad_where (fixP->fx_file, fixP->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("invalid literal constant: pool needs to be closer")); break; } @@ -5540,7 +6969,7 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_SHIFT_IMM: newval = md_chars_to_number (buf, INSN_SIZE); if (((unsigned long) value) > 32 - || (value == 32 + || (value == 32 && (((newval & 0x60) == 0) || (newval & 0x60) == 0x60))) { as_bad_where (fixP->fx_file, fixP->fx_line, @@ -5549,12 +6978,13 @@ md_apply_fix3 (fixP, val, seg) } if (value == 0) - newval &= ~0x60; /* Shifts of zero must be done as lsl */ + /* Shifts of zero must be done as lsl. */ + newval &= ~0x60; else if (value == 32) value = 0; newval &= 0xfffff07f; newval |= (value & 0x1f) << 7; - md_number_to_chars (buf, newval , INSN_SIZE); + md_number_to_chars (buf, newval, INSN_SIZE); break; case BFD_RELOC_ARM_SWI: @@ -5570,11 +7000,11 @@ md_apply_fix3 (fixP, val, seg) else { if (((unsigned long) value) > 0x00ffffff) - as_bad_where (fixP->fx_file, fixP->fx_line, + as_bad_where (fixP->fx_file, fixP->fx_line, _("Invalid swi expression")); newval = md_chars_to_number (buf, INSN_SIZE) & 0xff000000; newval |= value; - md_number_to_chars (buf, newval , INSN_SIZE); + md_number_to_chars (buf, newval, INSN_SIZE); } break; @@ -5601,8 +7031,8 @@ md_apply_fix3 (fixP, val, seg) instruction, in a 24 bit, signed field. Thus we need to check that none of the top 8 bits of the shifted value (top 7 bits of the unshifted, unsigned value) are set, or that they are all set. */ - if ((value & 0xfe000000UL) != 0 - && ((value & 0xfe000000UL) != 0xfe000000UL)) + if ((value & ~ ((offsetT) 0x1ffffff)) != 0 + && ((value & ~ ((offsetT) 0x1ffffff)) != ~ ((offsetT) 0x1ffffff))) { #ifdef OBJ_ELF /* Normally we would be stuck at this point, since we cannot store @@ -5611,7 +7041,7 @@ md_apply_fix3 (fixP, val, seg) that the destination of the branch is in the same section as the branch instruciton itself, then we can compute the relocation for ourselves and not have to bother the linker with it. - + FIXME: The tests for OBJ_ELF and ! target_oabi are only here because I have not worked out how to do this for OBJ_COFF or target_oabi. */ @@ -5623,13 +7053,14 @@ md_apply_fix3 (fixP, val, seg) /* Get pc relative value to go into the branch. */ value = * val; - /* Permit a backward branch provided that enough bits are set. - Allow a forwards branch, provided that enough bits are clear. */ - if ((value & 0xfe000000UL) == 0xfe000000UL - || (value & 0xfe000000UL) == 0) + /* Permit a backward branch provided that enough bits + are set. Allow a forwards branch, provided that + enough bits are clear. */ + if ( (value & ~ ((offsetT) 0x1ffffff)) == ~ ((offsetT) 0x1ffffff) + || (value & ~ ((offsetT) 0x1ffffff)) == 0) fixP->fx_done = 1; } - + if (! fixP->fx_done) #endif as_bad_where (fixP->fx_file, fixP->fx_line, @@ -5638,71 +7069,88 @@ md_apply_fix3 (fixP, val, seg) value >>= 2; value += SEXT24 (newval); - - if ((value & 0xff000000UL) != 0 - && ((value & 0xff000000UL) != 0xff000000UL)) + + if ( (value & ~ ((offsetT) 0xffffff)) != 0 + && ((value & ~ ((offsetT) 0xffffff)) != ~ ((offsetT) 0xffffff))) as_bad_where (fixP->fx_file, fixP->fx_line, _("out of range branch")); - + newval = (value & 0x00ffffff) | (newval & 0xff000000); md_number_to_chars (buf, newval, INSN_SIZE); break; + case BFD_RELOC_ARM_PCREL_BLX: + { + offsetT hbit; + newval = md_chars_to_number (buf, INSN_SIZE); + +#ifdef OBJ_ELF + if (! target_oabi) + value = fixP->fx_offset; +#endif + hbit = (value >> 1) & 1; + value = (value >> 2) & 0x00ffffff; + value = (value + (newval & 0x00ffffff)) & 0x00ffffff; + newval = value | (newval & 0xfe000000) | (hbit << 24); + md_number_to_chars (buf, newval, INSN_SIZE); + } + break; - case BFD_RELOC_THUMB_PCREL_BRANCH9: /* conditional branch */ + case BFD_RELOC_THUMB_PCREL_BRANCH9: /* Conditional branch. */ newval = md_chars_to_number (buf, THUMB_SIZE); { - addressT diff = (newval & 0xff) << 1; - if (diff & 0x100) - diff |= ~0xff; - - value += diff; - if ((value & ~0xff) && ((value & ~0xff) != ~0xff)) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Branch out of range")); - newval = (newval & 0xff00) | ((value & 0x1ff) >> 1); + addressT diff = (newval & 0xff) << 1; + if (diff & 0x100) + diff |= ~0xff; + + value += diff; + if ((value & ~0xff) && ((value & ~0xff) != ~0xff)) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Branch out of range")); + newval = (newval & 0xff00) | ((value & 0x1ff) >> 1); } md_number_to_chars (buf, newval, THUMB_SIZE); break; - case BFD_RELOC_THUMB_PCREL_BRANCH12: /* unconditional branch */ + case BFD_RELOC_THUMB_PCREL_BRANCH12: /* Unconditional branch. */ newval = md_chars_to_number (buf, THUMB_SIZE); { - addressT diff = (newval & 0x7ff) << 1; - if (diff & 0x800) - diff |= ~0x7ff; - - value += diff; - if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff)) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Branch out of range")); - newval = (newval & 0xf800) | ((value & 0xfff) >> 1); + addressT diff = (newval & 0x7ff) << 1; + if (diff & 0x800) + diff |= ~0x7ff; + + value += diff; + if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff)) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Branch out of range")); + newval = (newval & 0xf800) | ((value & 0xfff) >> 1); } md_number_to_chars (buf, newval, THUMB_SIZE); break; + case BFD_RELOC_THUMB_PCREL_BLX: case BFD_RELOC_THUMB_PCREL_BRANCH23: { - offsetT newval2; - addressT diff; + offsetT newval2; + addressT diff; newval = md_chars_to_number (buf, THUMB_SIZE); - newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE); - diff = ((newval & 0x7ff) << 12) | ((newval2 & 0x7ff) << 1); - if (diff & 0x400000) + newval2 = md_chars_to_number (buf + THUMB_SIZE, THUMB_SIZE); + diff = ((newval & 0x7ff) << 12) | ((newval2 & 0x7ff) << 1); + if (diff & 0x400000) diff |= ~0x3fffff; #ifdef OBJ_ELF value = fixP->fx_offset; #endif - value += diff; - if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff)) + value += diff; + if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff)) as_bad_where (fixP->fx_file, fixP->fx_line, _("Branch with link out of range")); - newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12); - newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1); - md_number_to_chars (buf, newval, THUMB_SIZE); - md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE); + newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12); + newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1); + md_number_to_chars (buf, newval, THUMB_SIZE); + md_number_to_chars (buf + THUMB_SIZE, newval2, THUMB_SIZE); } break; @@ -5711,10 +7159,10 @@ md_apply_fix3 (fixP, val, seg) md_number_to_chars (buf, value, 1); #ifdef OBJ_ELF else if (!target_oabi) - { - value = fixP->fx_offset; - md_number_to_chars (buf, value, 1); - } + { + value = fixP->fx_offset; + md_number_to_chars (buf, value, 1); + } #endif break; @@ -5723,18 +7171,18 @@ md_apply_fix3 (fixP, val, seg) md_number_to_chars (buf, value, 2); #ifdef OBJ_ELF else if (!target_oabi) - { - value = fixP->fx_offset; - md_number_to_chars (buf, value, 2); - } + { + value = fixP->fx_offset; + md_number_to_chars (buf, value, 2); + } #endif break; #ifdef OBJ_ELF case BFD_RELOC_ARM_GOT32: case BFD_RELOC_ARM_GOTOFF: - md_number_to_chars (buf, 0, 4); - break; + md_number_to_chars (buf, 0, 4); + break; #endif case BFD_RELOC_RVA: @@ -5743,23 +7191,23 @@ md_apply_fix3 (fixP, val, seg) md_number_to_chars (buf, value, 4); #ifdef OBJ_ELF else if (!target_oabi) - { - value = fixP->fx_offset; - md_number_to_chars (buf, value, 4); - } + { + value = fixP->fx_offset; + md_number_to_chars (buf, value, 4); + } #endif break; #ifdef OBJ_ELF case BFD_RELOC_ARM_PLT32: - /* It appears the instruction is fully prepared at this point. */ + /* It appears the instruction is fully prepared at this point. */ break; #endif case BFD_RELOC_ARM_GOTPC: md_number_to_chars (buf, value, 4); break; - + case BFD_RELOC_ARM_CP_OFF_IMM: sign = value >= 0; if (value < -1023 || value > 1023 || (value & 3)) @@ -5768,17 +7216,18 @@ md_apply_fix3 (fixP, val, seg) if (value < 0) value = -value; newval = md_chars_to_number (buf, INSN_SIZE) & 0xff7fff00; - newval |= (value >> 2) | (sign ? INDEX_UP : 0); - md_number_to_chars (buf, newval , INSN_SIZE); + newval |= (value >> 2) | (sign ? INDEX_UP : 0); + md_number_to_chars (buf, newval, INSN_SIZE); break; case BFD_RELOC_ARM_THUMB_OFFSET: newval = md_chars_to_number (buf, THUMB_SIZE); - /* Exactly what ranges, and where the offset is inserted depends on - the type of instruction, we can establish this from the top 4 bits */ + /* Exactly what ranges, and where the offset is inserted depends + on the type of instruction, we can establish this from the + top 4 bits. */ switch (newval >> 12) { - case 4: /* PC load */ + case 4: /* PC load. */ /* Thumb PC loads are somewhat odd, bit 1 of the PC is forced to zero for these loads, so we will need to round up the offset if the instruction address is not word @@ -5788,42 +7237,43 @@ md_apply_fix3 (fixP, val, seg) if ((fixP->fx_frag->fr_address + fixP->fx_where + value) & 3) as_bad_where (fixP->fx_file, fixP->fx_line, _("Invalid offset, target not word aligned (0x%08X)"), - (unsigned int)(fixP->fx_frag->fr_address + fixP->fx_where + value)); + (unsigned int) (fixP->fx_frag->fr_address + + fixP->fx_where + value)); if ((value + 2) & ~0x3fe) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); + _("Invalid offset, value too big (0x%08lX)"), value); - /* Round up, since pc will be rounded down. */ + /* Round up, since pc will be rounded down. */ newval |= (value + 2) >> 2; break; - case 9: /* SP load/store */ + case 9: /* SP load/store. */ if (value & ~0x3fc) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); + _("Invalid offset, value too big (0x%08lX)"), value); newval |= value >> 2; break; - case 6: /* Word load/store */ + case 6: /* Word load/store. */ if (value & ~0x7c) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); - newval |= value << 4; /* 6 - 2 */ + _("Invalid offset, value too big (0x%08lX)"), value); + newval |= value << 4; /* 6 - 2. */ break; - case 7: /* Byte load/store */ + case 7: /* Byte load/store. */ if (value & ~0x1f) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); + _("Invalid offset, value too big (0x%08lX)"), value); newval |= value << 6; break; - case 8: /* Halfword load/store */ + case 8: /* Halfword load/store. */ if (value & ~0x3e) as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid offset, value too big (0x%08X)"), value); - newval |= value << 5; /* 6 - 1 */ + _("Invalid offset, value too big (0x%08lX)"), value); + newval |= value << 5; /* 6 - 1. */ break; default: @@ -5838,89 +7288,91 @@ md_apply_fix3 (fixP, val, seg) case BFD_RELOC_ARM_THUMB_ADD: /* This is a complicated relocation, since we use it for all of the following immediate relocations: - 3bit ADD/SUB - 8bit ADD/SUB - 9bit ADD/SUB SP word-aligned - 10bit ADD PC/SP word-aligned + + 3bit ADD/SUB + 8bit ADD/SUB + 9bit ADD/SUB SP word-aligned + 10bit ADD PC/SP word-aligned The type of instruction being processed is encoded in the instruction field: - 0x8000 SUB - 0x00F0 Rd - 0x000F Rs + + 0x8000 SUB + 0x00F0 Rd + 0x000F Rs */ newval = md_chars_to_number (buf, THUMB_SIZE); { - int rd = (newval >> 4) & 0xf; - int rs = newval & 0xf; - int subtract = newval & 0x8000; - - if (rd == REG_SP) - { - if (value & ~0x1fc) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid immediate for stack address calculation")); - newval = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST; - newval |= value >> 2; - } - else if (rs == REG_PC || rs == REG_SP) - { - if (subtract || - value & ~0x3fc) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid immediate for address calculation (value = 0x%08lX)"), + int rd = (newval >> 4) & 0xf; + int rs = newval & 0xf; + int subtract = newval & 0x8000; + + if (rd == REG_SP) + { + if (value & ~0x1fc) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid immediate for stack address calculation")); + newval = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST; + newval |= value >> 2; + } + else if (rs == REG_PC || rs == REG_SP) + { + if (subtract || + value & ~0x3fc) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid immediate for address calculation (value = 0x%08lX)"), (unsigned long) value); - newval = (rs == REG_PC ? T_OPCODE_ADD_PC : T_OPCODE_ADD_SP); - newval |= rd << 8; - newval |= value >> 2; - } - else if (rs == rd) - { - if (value & ~0xff) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid 8bit immediate")); - newval = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8; - newval |= (rd << 8) | value; - } - else - { - if (value & ~0x7) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid 3bit immediate")); - newval = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3; - newval |= rd | (rs << 3) | (value << 6); - } + newval = (rs == REG_PC ? T_OPCODE_ADD_PC : T_OPCODE_ADD_SP); + newval |= rd << 8; + newval |= value >> 2; + } + else if (rs == rd) + { + if (value & ~0xff) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid 8bit immediate")); + newval = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8; + newval |= (rd << 8) | value; + } + else + { + if (value & ~0x7) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid 3bit immediate")); + newval = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3; + newval |= rd | (rs << 3) | (value << 6); + } } - md_number_to_chars (buf, newval , THUMB_SIZE); + md_number_to_chars (buf, newval, THUMB_SIZE); break; case BFD_RELOC_ARM_THUMB_IMM: newval = md_chars_to_number (buf, THUMB_SIZE); switch (newval >> 11) - { - case 0x04: /* 8bit immediate MOV */ - case 0x05: /* 8bit immediate CMP */ - if (value < 0 || value > 255) - as_bad_where (fixP->fx_file, fixP->fx_line, - _("Invalid immediate: %ld is too large"), + { + case 0x04: /* 8bit immediate MOV. */ + case 0x05: /* 8bit immediate CMP. */ + if (value < 0 || value > 255) + as_bad_where (fixP->fx_file, fixP->fx_line, + _("Invalid immediate: %ld is too large"), (long) value); - newval |= value; - break; + newval |= value; + break; - default: - abort (); - } - md_number_to_chars (buf, newval , THUMB_SIZE); + default: + abort (); + } + md_number_to_chars (buf, newval, THUMB_SIZE); break; case BFD_RELOC_ARM_THUMB_SHIFT: - /* 5bit shift value (0..31) */ + /* 5bit shift value (0..31). */ if (value < 0 || value > 31) as_bad_where (fixP->fx_file, fixP->fx_line, _("Illegal Thumb shift value: %ld"), (long) value); newval = md_chars_to_number (buf, THUMB_SIZE) & 0xf03f; newval |= value << 6; - md_number_to_chars (buf, newval , THUMB_SIZE); + md_number_to_chars (buf, newval, THUMB_SIZE); break; case BFD_RELOC_VTABLE_INHERIT: @@ -5939,6 +7391,7 @@ md_apply_fix3 (fixP, val, seg) /* Translate internal representation of relocation info to BFD target format. */ + arelent * tc_gen_reloc (section, fixp) asection * section ATTRIBUTE_UNUSED; @@ -5987,10 +7440,12 @@ tc_gen_reloc (section, fixp) } case BFD_RELOC_ARM_PCREL_BRANCH: - case BFD_RELOC_RVA: + case BFD_RELOC_ARM_PCREL_BLX: + case BFD_RELOC_RVA: case BFD_RELOC_THUMB_PCREL_BRANCH9: case BFD_RELOC_THUMB_PCREL_BRANCH12: case BFD_RELOC_THUMB_PCREL_BRANCH23: + case BFD_RELOC_THUMB_PCREL_BLX: case BFD_RELOC_VTABLE_ENTRY: case BFD_RELOC_VTABLE_INHERIT: code = fixp->fx_r_type; @@ -5999,7 +7454,7 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_ARM_LITERAL: case BFD_RELOC_ARM_HWLITERAL: /* If this is called then the a literal has been referenced across - a section boundary - possibly due to an implicit dump */ + a section boundary - possibly due to an implicit dump. */ as_bad_where (fixp->fx_file, fixp->fx_line, _("Literal referenced across section boundary (Implicit dump?)")); return NULL; @@ -6008,8 +7463,8 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_ARM_GOT32: case BFD_RELOC_ARM_GOTOFF: case BFD_RELOC_ARM_PLT32: - code = fixp->fx_r_type; - break; + code = fixp->fx_r_type; + break; #endif case BFD_RELOC_ARM_IMMEDIATE: @@ -6020,8 +7475,7 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_ARM_ADRL_IMMEDIATE: as_bad_where (fixp->fx_file, fixp->fx_line, - _("ADRL used for a symbol not defined in the same file"), - fixp->fx_r_type); + _("ADRL used for a symbol not defined in the same file")); return NULL; case BFD_RELOC_ARM_OFFSET_IMM: @@ -6033,6 +7487,7 @@ tc_gen_reloc (section, fixp) default: { char * type; + switch (fixp->fx_r_type) { case BFD_RELOC_ARM_IMMEDIATE: type = "IMMEDIATE"; break; @@ -6049,22 +7504,22 @@ tc_gen_reloc (section, fixp) default: type = _(""); break; } as_bad_where (fixp->fx_file, fixp->fx_line, - _("Can not represent %s relocation in this object file format (%d)"), - type, fixp->fx_pcrel); + _("Cannot represent %s relocation in this object file format"), + type); return NULL; } } #ifdef OBJ_ELF - if (code == BFD_RELOC_32_PCREL - && GOT_symbol - && fixp->fx_addsy == GOT_symbol) - { - code = BFD_RELOC_ARM_GOTPC; - reloc->addend = fixp->fx_offset = reloc->address; - } + if (code == BFD_RELOC_32_PCREL + && GOT_symbol + && fixp->fx_addsy == GOT_symbol) + { + code = BFD_RELOC_ARM_GOTPC; + reloc->addend = fixp->fx_offset = reloc->address; + } #endif - + reloc->howto = bfd_reloc_type_lookup (stdoutput, code); if (reloc->howto == NULL) @@ -6075,10 +7530,10 @@ tc_gen_reloc (section, fixp) return NULL; } - /* HACK: Since arm ELF uses Rel instead of Rela, encode the - vtable entry to be used in the relocation's section offset. */ - if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) - reloc->address = fixp->fx_offset; + /* HACK: Since arm ELF uses Rel instead of Rela, encode the + vtable entry to be used in the relocation's section offset. */ + if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) + reloc->address = fixp->fx_offset; return reloc; } @@ -6096,7 +7551,7 @@ static void output_inst PARAMS ((void)) { char * to = NULL; - + if (inst.error) { as_bad (inst.error); @@ -6104,7 +7559,7 @@ output_inst PARAMS ((void)) } to = frag_more (inst.size); - + if (thumb_mode && (inst.size > THUMB_SIZE)) { assert (inst.size == (2 * THUMB_SIZE)); @@ -6125,7 +7580,9 @@ output_inst PARAMS ((void)) inst.size, & inst.reloc.exp, inst.reloc.pc_rel, inst.reloc.type); - return; +#ifdef OBJ_ELF + dwarf2_emit_insn (inst.size); +#endif } void @@ -6138,9 +7595,11 @@ md_assemble (str) char * start; /* Align the instruction. - This may not be the right thing to do but ... */ - /* arm_align (2, 0); */ - listing_prev_line (); /* Defined in listing.h */ + This may not be the right thing to do but ... */ +#if 0 + arm_align (2, 0); +#endif + listing_prev_line (); /* Defined in listing.h. */ /* Align the previous label if needed. */ if (last_label_seen != NULL) @@ -6154,13 +7613,13 @@ md_assemble (str) inst.reloc.type = BFD_RELOC_NONE; skip_whitespace (str); - + /* Scan up to the end of the op-code, which must end in white space or end of string. */ for (start = p = str; *p != '\0'; p++) if (*p == ' ') break; - + if (p == str) { as_bad (_("No operator -- statement `%s'\n"), str); @@ -6175,19 +7634,19 @@ md_assemble (str) *p = '\0'; opcode = (CONST struct thumb_opcode *) hash_find (arm_tops_hsh, str); *p = c; - + if (opcode) { /* Check that this instruction is supported for this CPU. */ if (thumb_mode == 1 && (opcode->variants & cpu_variant) == 0) - { - as_bad (_("selected processor does not support this opcode")); - return; - } + { + as_bad (_("selected processor does not support this opcode")); + return; + } inst.instruction = opcode->value; inst.size = opcode->size; - (*opcode->parms)(p); + (*opcode->parms) (p); output_inst (); return; } @@ -6198,18 +7657,20 @@ md_assemble (str) unsigned long cond_code; inst.size = INSN_SIZE; - /* p now points to the end of the opcode, probably white space, but we + /* P now points to the end of the opcode, probably white space, but we have to break the opcode up in case it contains condionals and flags; keep trying with progressively smaller basic instructions until one matches, or we run out of opcode. */ q = (p - str > LONGEST_INST) ? str + LONGEST_INST : p; + for (; q != str; q--) { c = *q; *q = '\0'; + opcode = (CONST struct asm_opcode *) hash_find (arm_ops_hsh, str); *q = c; - + if (opcode && opcode->template) { unsigned long flag_bits = 0; @@ -6224,24 +7685,25 @@ md_assemble (str) { if (opcode->comp_suffix) { - if (*opcode->comp_suffix != '\0') - as_bad (_("Opcode `%s' must have suffix from list: <%s>"), - str, opcode->comp_suffix); - else - /* Not a conditional instruction. */ - (*opcode->parms)(q, 0); + if (*opcode->comp_suffix != '\0') + as_bad (_("Opcode `%s' must have suffix from list: <%s>"), + str, opcode->comp_suffix); + else + /* Not a conditional instruction. */ + (*opcode->parms) (q, 0); } else { - /* A conditional instruction with default condition. */ + /* A conditional instruction with default condition. */ inst.instruction |= COND_ALWAYS; - (*opcode->parms)(q, 0); + (*opcode->parms) (q, 0); } output_inst (); return; } - /* Not just a simple opcode. Check if extra is a conditional. */ + /* Not just a simple opcode. Check if extra is a + conditional. */ r = q; if (p - r >= 2) { @@ -6266,23 +7728,22 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); else cond_code = COND_ALWAYS; - /* Apply the conditional, or complain it's not allowed. */ + /* Apply the conditional, or complain it's not allowed. */ if (opcode->comp_suffix && *opcode->comp_suffix == '\0') { - /* Instruction isn't conditional */ - if (cond_code != COND_ALWAYS) - { - as_bad (_("Opcode `%s' is unconditional\n"), str); - return; - } + /* Instruction isn't conditional. */ + if (cond_code != COND_ALWAYS) + { + as_bad (_("Opcode `%s' is unconditional\n"), str); + return; + } } else - /* Instruction is conditional: set the condition into it. */ - inst.instruction |= cond_code; + /* Instruction is conditional: set the condition into it. */ + inst.instruction |= cond_code; - - /* If there is a compulsory suffix, it should come here, before - any optional flags. */ + /* If there is a compulsory suffix, it should come here + before any optional flags. */ if (opcode->comp_suffix && *opcode->comp_suffix != '\0') { CONST char *s = opcode->comp_suffix; @@ -6297,8 +7758,8 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); if (*s == '\0') { - as_bad (_("Opcode `%s' must have suffix from <%s>\n"), str, - opcode->comp_suffix); + as_bad (_("Opcode `%s' must have suffix from <%s>\n"), + str, opcode->comp_suffix); return; } @@ -6347,26 +7808,31 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); } /* It wasn't an instruction, but it might be a register alias of the form - alias .req reg */ + alias .req reg. */ q = p; skip_whitespace (q); c = *p; *p = '\0'; - + if (*q && !strncmp (q, ".req ", 4)) { int reg; - char * copy_of_str = str; + char * copy_of_str; char * r; - + +#ifdef IGNORE_OPCODE_CASE + str = original_case_string; +#endif + copy_of_str = str; + q += 4; skip_whitespace (q); for (r = q; *r != '\0'; r++) if (*r == ' ') break; - + if (r != q) { int regnum; @@ -6377,7 +7843,7 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); *r = d; reg = arm_reg_parse (& str); - + if (reg == FAIL) { if (regnum != FAIL) @@ -6389,8 +7855,8 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); { if (reg != regnum) as_warn (_("ignoring redefinition of register alias '%s'"), - copy_of_str ); - + copy_of_str); + /* Do not warn about redefinitions to the same alias. */ } else @@ -6399,7 +7865,7 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); } else as_warn (_("ignoring incomplete .req pseuso op")); - + *p = c; return; } @@ -6408,38 +7874,39 @@ _("Warning: Use of the 'nv' conditional is deprecated\n")); as_bad (_("bad instruction `%s'"), start); } -/* - * md_parse_option - * Invocation line includes a switch not recognized by the base assembler. - * See if it's a processor-specific option. These are: - * Cpu variants, the arm part is optional: - * -m[arm]1 Currently not supported. - * -m[arm]2, -m[arm]250 Arm 2 and Arm 250 processor - * -m[arm]3 Arm 3 processor - * -m[arm]6[xx], Arm 6 processors - * -m[arm]7[xx][t][[d]m] Arm 7 processors - * -m[arm]8[10] Arm 8 processors - * -m[arm]9[20][tdmi] Arm 9 processors - * -mstrongarm[110[0]] StrongARM processors - * -m[arm]v[2345[t]] Arm architectures - * -mall All (except the ARM1) - * FP variants: - * -mfpa10, -mfpa11 FPA10 and 11 co-processor instructions - * -mfpe-old (No float load/store multiples) - * -mno-fpu Disable all floating point instructions - * Run-time endian selection: - * -EB big endian cpu - * -EL little endian cpu - * ARM Procedure Calling Standard: - * -mapcs-32 32 bit APCS - * -mapcs-26 26 bit APCS - * -mapcs-float Pass floats in float regs - * -mapcs-reentrant Position independent code - * -mthumb-interwork Code supports Arm/Thumb interworking - * -moabi Old ELF ABI - */ +/* md_parse_option + Invocation line includes a switch not recognized by the base assembler. + See if it's a processor-specific option. These are: + Cpu variants, the arm part is optional: + -m[arm]1 Currently not supported. + -m[arm]2, -m[arm]250 Arm 2 and Arm 250 processor + -m[arm]3 Arm 3 processor + -m[arm]6[xx], Arm 6 processors + -m[arm]7[xx][t][[d]m] Arm 7 processors + -m[arm]8[10] Arm 8 processors + -m[arm]9[20][tdmi] Arm 9 processors + -mstrongarm[110[0]] StrongARM processors + -mxscale XScale processors + -m[arm]v[2345[t[e]]] Arm architectures + -mall All (except the ARM1) + FP variants: + -mfpa10, -mfpa11 FPA10 and 11 co-processor instructions + -mfpe-old (No float load/store multiples) + -mno-fpu Disable all floating point instructions + Run-time endian selection: + -EB big endian cpu + -EL little endian cpu + ARM Procedure Calling Standard: + -mapcs-32 32 bit APCS + -mapcs-26 26 bit APCS + -mapcs-float Pass floats in float regs + -mapcs-reentrant Position independent code + -mthumb-interwork Code supports Arm/Thumb interworking + -matpcs ARM/Thumb Procedure Call Standard + -moabi Old ELF ABI */ CONST char * md_shortopts = "m:k"; + struct option md_longopts[] = { #ifdef ARM_BI_ENDIAN @@ -6454,6 +7921,7 @@ struct option md_longopts[] = #endif {NULL, no_argument, NULL, 0} }; + size_t md_longopts_size = sizeof (md_longopts); int @@ -6494,31 +7962,31 @@ md_parse_option (c, arg) break; #ifdef OBJ_ELF - case 'o': - if (streq (str, "oabi")) - target_oabi = true; - break; + case 'o': + if (streq (str, "oabi")) + target_oabi = true; + break; #endif - - case 't': - /* Limit assembler to generating only Thumb instructions: */ - if (streq (str, "thumb")) - { - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_THUMB; - cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_NONE; - thumb_mode = 1; - } - else if (streq (str, "thumb-interwork")) - { - if ((cpu_variant & ARM_THUMB) == 0) + + case 't': + /* Limit assembler to generating only Thumb instructions: */ + if (streq (str, "thumb")) + { + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_EXT_THUMB; + cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_NONE; + thumb_mode = 1; + } + else if (streq (str, "thumb-interwork")) + { + if ((cpu_variant & ARM_EXT_THUMB) == 0) cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4T; #if defined OBJ_COFF || defined OBJ_ELF - support_interwork = true; + support_interwork = true; #endif - } - else + } + else goto bad; - break; + break; default: if (streq (str, "all")) @@ -6533,7 +8001,7 @@ md_parse_option (c, arg) to us, so we must parse them here. */ str += 5; - + if (streq (str, "32")) { uses_apcs_26 = false; @@ -6573,16 +8041,22 @@ md_parse_option (c, arg) { /* Reentrant code has been generated. This does affect linking, since there is no point in linking reentrant/ - position independent code with absolute position code. */ + position independent code with absolute position code. */ pic_code = true; return 1; } - + as_bad (_("Unrecognised APCS switch -m%s"), arg); return 0; - } + } + + if (! strcmp (str, "atpcs")) + { + atpcs = true; + return 1; + } #endif - /* Strip off optional "arm" */ + /* Strip off optional "arm". */ if (! strncmp (str, "arm", 3)) str += 3; @@ -6627,7 +8101,8 @@ md_parse_option (c, arg) break; case '7': - switch (strtol (str, & str, 10)) /* Eat the processor name */ + /* Eat the processor name. */ + switch (strtol (str, & str, 10)) { case 7: case 70: @@ -6640,75 +8115,82 @@ md_parse_option (c, arg) default: goto bad; } - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7; - for (; *str; str++) - { - switch (* str) - { - case 't': - cpu_variant |= (ARM_THUMB | ARM_ARCH_V4); - break; - - case 'm': - cpu_variant |= ARM_LONGMUL; - break; - - case 'f': /* fe => fp enabled cpu. */ - if (str[1] == 'e') - ++ str; - else + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7; + for (; *str; str++) + { + switch (*str) + { + case 't': + cpu_variant |= ARM_ARCH_V4T; + break; + + case 'm': + cpu_variant |= ARM_EXT_LONGMUL; + break; + + case 'f': /* fe => fp enabled cpu. */ + if (str[1] == 'e') + ++ str; + else + goto bad; + + case 'c': /* Left over from 710c processor name. */ + case 'd': /* Debug. */ + case 'i': /* Embedded ICE. */ + /* Included for completeness in ARM processor naming. */ + break; + + default: goto bad; - - case 'c': /* Left over from 710c processor name. */ - case 'd': /* Debug */ - case 'i': /* Embedded ICE */ - /* Included for completeness in ARM processor naming. */ - break; - - default: - goto bad; - } - } + } + } break; case '8': if (streq (str, "8") || streq (str, "810")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_8 | ARM_ARCH_V4 | ARM_LONGMUL; + | ARM_8 | ARM_ARCH_V4; else goto bad; break; - + case '9': if (streq (str, "9")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB; + | ARM_9 | ARM_ARCH_V4T; else if (streq (str, "920")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL; + | ARM_9 | ARM_ARCH_V4; else if (streq (str, "920t")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB; + | ARM_9 | ARM_ARCH_V4T; else if (streq (str, "9tdmi")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_9 | ARM_ARCH_V4 | ARM_LONGMUL | ARM_THUMB; + | ARM_9 | ARM_ARCH_V4T; else goto bad; break; - case 's': if (streq (str, "strongarm") || streq (str, "strongarm110") || streq (str, "strongarm1100")) cpu_variant = (cpu_variant & ~ARM_ANY) - | ARM_8 | ARM_ARCH_V4 | ARM_LONGMUL; + | ARM_8 | ARM_ARCH_V4; else goto bad; break; - + + case 'x': + if (streq (str, "xscale")) + cpu_variant = ARM_9 | ARM_ARCH_XSCALE; + else + goto bad; + break; + case 'v': - /* Select variant based on architecture rather than processor. */ + /* Select variant based on architecture rather than + processor. */ switch (*++str) { case '2': @@ -6725,26 +8207,26 @@ md_parse_option (c, arg) break; } break; - + case '3': - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7; - + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7; + switch (*++str) { - case 'm': cpu_variant |= ARM_LONGMUL; break; + case 'm': cpu_variant |= ARM_EXT_LONGMUL; break; case 0: break; default: as_bad (_("Invalid architecture variant -m%s"), arg); break; } break; - + case '4': - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4; - + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7 | ARM_ARCH_V4; + switch (*++str) { - case 't': cpu_variant |= ARM_THUMB; break; + case 't': cpu_variant |= ARM_EXT_THUMB; break; case 0: break; default: as_bad (_("Invalid architecture variant -m%s"), arg); @@ -6753,10 +8235,10 @@ md_parse_option (c, arg) break; case '5': - cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V5; + cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_9 | ARM_ARCH_V5; switch (*++str) { - case 't': cpu_variant |= ARM_THUMB; break; + case 't': cpu_variant |= ARM_EXT_THUMB; break; case 'e': cpu_variant |= ARM_EXT_V5E; break; case 0: break; default: @@ -6764,13 +8246,13 @@ md_parse_option (c, arg) break; } break; - + default: as_bad (_("Invalid architecture variant -m%s"), arg); break; } break; - + default: bad: as_bad (_("Invalid processor variant -m%s"), arg); @@ -6784,12 +8266,12 @@ md_parse_option (c, arg) pic_code = 1; break; #endif - + default: return 0; } - return 1; + return 1; } void @@ -6810,9 +8292,10 @@ md_show_usage (fp) #if defined OBJ_COFF || defined OBJ_ELF fprintf (fp, _("\ -mapcs-32, -mapcs-26 specify which ARM Procedure Calling Standard to use\n\ + -matpcs use ARM/Thumb Procedure Calling Standard\n\ -mapcs-float floating point args are passed in FP regs\n\ -mapcs-reentrant the code is position independent/reentrant\n")); - #endif +#endif #ifdef OBJ_ELF fprintf (fp, _("\ -moabi support the old ELF ABI\n")); @@ -6840,8 +8323,8 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc) int pc_rel; int reloc; { - fixS * new_fix; - arm_fix_data * arm_data; + fixS * new_fix; + arm_fix_data * arm_data; switch (exp->X_op) { @@ -6858,7 +8341,8 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc) break; } - /* Mark whether the fix is to a THUMB instruction, or an ARM instruction */ + /* Mark whether the fix is to a THUMB instruction, or an ARM + instruction. */ arm_data = (arm_fix_data *) obstack_alloc (& notes, sizeof (arm_fix_data)); new_fix->tc_fix_data = (PTR) arm_data; arm_data->thumb_mode = thumb_mode; @@ -6866,8 +8350,8 @@ fix_new_arm (frag, where, size, exp, pc_rel, reloc) return; } - /* This fix_new is called by cons via TC_CONS_FIX_NEW. */ + void cons_fix_new_arm (frag, where, size, exp) fragS * frag; @@ -6877,10 +8361,10 @@ cons_fix_new_arm (frag, where, size, exp) { bfd_reloc_code_real_type type; int pcrel = 0; - + /* Pick a reloc. FIXME: @@ Should look at CPU word size. */ - switch (size) + switch (size) { case 1: type = BFD_RELOC_8; @@ -6896,20 +8380,22 @@ cons_fix_new_arm (frag, where, size, exp) type = BFD_RELOC_64; break; } - + fix_new_exp (frag, where, (int) size, exp, pcrel, type); } /* A good place to do this, although this was probably not intended for this kind of use. We need to dump the literal pool before references are made to a null symbol pointer. */ + void arm_cleanup () { if (current_poolP == NULL) return; - - subseg_set (text_section, 0); /* Put it at the end of text section. */ + + /* Put it at the end of text section. */ + subseg_set (text_section, 0); s_ltorg (0); listing_prev_line (); } @@ -6925,13 +8411,13 @@ arm_frob_label (sym) symbolS * sym; { last_label_seen = sym; - + ARM_SET_THUMB (sym, thumb_mode); - + #if defined OBJ_COFF || defined OBJ_ELF ARM_SET_INTERWORK (sym, support_interwork); #endif - + if (label_is_thumb_function_name) { /* When the address of a Thumb function is taken the bottom @@ -6940,7 +8426,7 @@ arm_frob_label (sym) correctly. */ THUMB_SET_FUNC (sym, 1); - + label_is_thumb_function_name = false; } } @@ -6957,12 +8443,12 @@ arm_adjust_symtab () for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym)) { if (ARM_IS_THUMB (sym)) - { + { if (THUMB_IS_FUNC (sym)) { /* Mark the symbol as a Thumb function. */ if ( S_GET_STORAGE_CLASS (sym) == C_STAT - || S_GET_STORAGE_CLASS (sym) == C_LABEL) /* This can happen! */ + || S_GET_STORAGE_CLASS (sym) == C_LABEL) /* This can happen! */ S_SET_STORAGE_CLASS (sym, C_THUMBSTATFUNC); else if (S_GET_STORAGE_CLASS (sym) == C_EXT) @@ -6972,38 +8458,39 @@ arm_adjust_symtab () S_GET_NAME (sym), S_GET_STORAGE_CLASS (sym)); } else switch (S_GET_STORAGE_CLASS (sym)) - { - case C_EXT: - S_SET_STORAGE_CLASS (sym, C_THUMBEXT); - break; - case C_STAT: - S_SET_STORAGE_CLASS (sym, C_THUMBSTAT); - break; - case C_LABEL: - S_SET_STORAGE_CLASS (sym, C_THUMBLABEL); - break; - default: /* do nothing */ - break; - } - } + { + case C_EXT: + S_SET_STORAGE_CLASS (sym, C_THUMBEXT); + break; + case C_STAT: + S_SET_STORAGE_CLASS (sym, C_THUMBSTAT); + break; + case C_LABEL: + S_SET_STORAGE_CLASS (sym, C_THUMBLABEL); + break; + default: + /* Do nothing. */ + break; + } + } if (ARM_IS_INTERWORK (sym)) coffsymbol (symbol_get_bfdsym (sym))->native->u.syment.n_flags = 0xFF; } #endif #ifdef OBJ_ELF - symbolS * sym; - char bind; + symbolS * sym; + char bind; for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym)) { if (ARM_IS_THUMB (sym)) - { + { elf_symbol_type * elf_sym; - + elf_sym = elf_symbol (symbol_get_bfdsym (sym)); bind = ELF_ST_BIND (elf_sym); - + /* If it's a .thumb_func, declare it as so, otherwise tag label as .code 16. */ if (THUMB_IS_FUNC (sym)) @@ -7012,8 +8499,8 @@ arm_adjust_symtab () else elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_16BIT); - } - } + } + } #endif } @@ -7027,7 +8514,7 @@ arm_data_in_code () *input_line_pointer = 0; return 1; } - + return 0; } @@ -7052,7 +8539,7 @@ arm_validate_fix (fixP) the THUMB_FUNC attribute, then we must be calling a function which has the (interfacearm) attribute. We look for the Thumb entry point to that function and change the branch to refer to that function instead. */ - if ( fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23 + if (fixP->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23 && fixP->fx_addsy != NULL && S_IS_DEFINED (fixP->fx_addsy) && ! THUMB_IS_FUNC (fixP->fx_addsy)) @@ -7064,6 +8551,22 @@ arm_validate_fix (fixP) return false; } +#ifdef OBJ_COFF +/* This is a little hack to help the gas/arm/adrl.s test. It prevents + local labels from being added to the output symbol table when they + are used with the ADRL pseudo op. The ADRL relocation should always + be resolved before the binbary is emitted, so it is safe to say that + it is adjustable. */ + +boolean +arm_fix_adjustable (fixP) + fixS * fixP; +{ + if (fixP->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE) + return 1; + return 0; +} +#endif #ifdef OBJ_ELF /* Relocations against Thumb function names must be left unadjusted, so that the linker can use this information to correctly set the @@ -7077,26 +8580,26 @@ arm_validate_fix (fixP) than a function) and then later jumping to that address. Such addresses also ought to have their bottom bit set (assuming that they reside in Thumb code), but at the moment they will not. */ - + boolean arm_fix_adjustable (fixP) fixS * fixP; { if (fixP->fx_addsy == NULL) return 1; - - /* Prevent all adjustments to global symbols. */ + + /* Prevent all adjustments to global symbols. */ if (S_IS_EXTERN (fixP->fx_addsy)) return 0; - + if (S_IS_WEAK (fixP->fx_addsy)) return 0; if (THUMB_IS_FUNC (fixP->fx_addsy) && fixP->fx_subsy == NULL) return 0; - - /* We need the symbol name for the VTABLE entries */ + + /* We need the symbol name for the VTABLE entries. */ if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 0; @@ -7108,24 +8611,28 @@ const char * elf32_arm_target_format () { if (target_big_endian) - if (target_oabi) - return "elf32-bigarm-oabi"; - else - return "elf32-bigarm"; + { + if (target_oabi) + return "elf32-bigarm-oabi"; + else + return "elf32-bigarm"; + } else - if (target_oabi) - return "elf32-littlearm-oabi"; - else - return "elf32-littlearm"; + { + if (target_oabi) + return "elf32-littlearm-oabi"; + else + return "elf32-littlearm"; + } } void armelf_frob_symbol (symp, puntp) symbolS * symp; - int * puntp; + int * puntp; { elf_frob_symbol (symp, puntp); -} +} int arm_force_relocation (fixp) @@ -7134,17 +8641,19 @@ arm_force_relocation (fixp) if ( fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY || fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BRANCH - || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23) + || fixp->fx_r_type == BFD_RELOC_ARM_PCREL_BLX + || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BLX + || fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23) return 1; - + return 0; } static bfd_reloc_code_real_type arm_parse_reloc () { - char id[16]; - char * ip; + char id [16]; + char * ip; unsigned int i; static struct { @@ -7154,28 +8663,27 @@ arm_parse_reloc () } reloc_map[] = { -#define MAP(str,reloc) { str, sizeof (str)-1, reloc } +#define MAP(str,reloc) { str, sizeof (str) - 1, reloc } MAP ("(got)", BFD_RELOC_ARM_GOT32), MAP ("(gotoff)", BFD_RELOC_ARM_GOTOFF), - /* ScottB: Jan 30, 1998 */ - /* Added support for parsing "var(PLT)" branch instructions */ - /* generated by GCC for PLT relocs */ + /* ScottB: Jan 30, 1998 - Added support for parsing "var(PLT)" + branch instructions generated by GCC for PLT relocs. */ MAP ("(plt)", BFD_RELOC_ARM_PLT32), { NULL, 0, BFD_RELOC_UNUSED } -#undef MAP +#undef MAP }; for (i = 0, ip = input_line_pointer; i < sizeof (id) && (isalnum (*ip) || ispunct (*ip)); i++, ip++) id[i] = tolower (*ip); - + for (i = 0; reloc_map[i].str; i++) if (strncmp (id, reloc_map[i].str, reloc_map[i].len) == 0) break; - + input_line_pointer += reloc_map[i].len; - + return reloc_map[i].reloc; } @@ -7202,34 +8710,35 @@ s_arm_elf_cons (nbytes) do { bfd_reloc_code_real_type reloc; - + expression (& exp); if (exp.X_op == O_symbol - && * input_line_pointer == '(' - && (reloc = arm_parse_reloc()) != BFD_RELOC_UNUSED) - { - reloc_howto_type * howto = bfd_reloc_type_lookup (stdoutput, reloc); - int size = bfd_get_reloc_size (howto); - - if (size > nbytes) - as_bad ("%s relocations do not fit in %d bytes", + && * input_line_pointer == '(' + && (reloc = arm_parse_reloc ()) != BFD_RELOC_UNUSED) + { + reloc_howto_type *howto = bfd_reloc_type_lookup (stdoutput, reloc); + int size = bfd_get_reloc_size (howto); + + if (size > nbytes) + as_bad ("%s relocations do not fit in %d bytes", howto->name, nbytes); - else - { - register char * p = frag_more ((int) nbytes); - int offset = nbytes - size; - - fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size, - & exp, 0, reloc); - } - } + else + { + register char *p = frag_more ((int) nbytes); + int offset = nbytes - size; + + fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size, + &exp, 0, reloc); + } + } else - emit_expr (& exp, (unsigned int) nbytes); + emit_expr (&exp, (unsigned int) nbytes); } while (*input_line_pointer++ == ','); - input_line_pointer--; /* Put terminator back into stream. */ + /* Put terminator back into stream. */ + input_line_pointer --; demand_empty_rest_of_line (); } diff --git a/contrib/binutils/gas/config/tc-arm.h b/contrib/binutils/gas/config/tc-arm.h index c5ab887..0a823dd 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 + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org) Modified by David Taylor (dtaylor@armltd.co.uk) @@ -68,12 +68,12 @@ #if defined OBJ_COFF || defined OBJ_ELF # define ARM_BI_ENDIAN - + # define TC_VALIDATE_FIX(fixP, segType, Label) \ if (arm_validate_fix (fixP)) add_symbolP = fixP->fx_addsy extern boolean arm_validate_fix PARAMS ((struct fix *)); #endif - + #ifdef OBJ_COFF # if defined TE_PE # define TC_FORCE_RELOCATION(x) ((x)->fx_r_type == BFD_RELOC_RVA) @@ -90,7 +90,7 @@ #ifdef OBJ_ELF # define TARGET_FORMAT elf32_arm_target_format() extern const char * elf32_arm_target_format PARAMS ((void)); - + # define TC_FORCE_RELOCATION(fixp) arm_force_relocation (fixp) extern int arm_force_relocation PARAMS ((struct fix *)); #endif @@ -116,10 +116,14 @@ #define TC_FIX_TYPE PTR #define TC_INIT_FIX_DATA(FIXP) ((FIXP)->tc_fix_data = NULL) -#ifdef OBJ_ELF +#if defined OBJ_ELF || defined OBJ_COFF #include "write.h" /* For definition of fixS */ #define obj_fix_adjustable(fixP) arm_fix_adjustable (fixP) boolean arm_fix_adjustable PARAMS ((fixS *)); + +/* This arranges for gas/write.c to not apply a relocation if + obj_fix_adjustable() says it is not adjustable. */ +#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP) #else #define obj_fix_adjustable(fixP) 0 #endif @@ -143,7 +147,6 @@ boolean arm_fix_adjustable PARAMS ((fixS *)); #define ARM_SET_INTERWORK(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_INTERWORK) : ARM_RESET_FLAG (s, ARM_FLAG_INTERWORK)) #define THUMB_SET_FUNC(s,t) ((t) ? ARM_SET_FLAG (s, THUMB_FLAG_FUNC) : ARM_RESET_FLAG (s, THUMB_FLAG_FUNC)) - #define TC_START_LABEL(C,STR) \ (c == ':' || (c == '/' && arm_data_in_code ())) int arm_data_in_code PARAMS ((void)); @@ -194,18 +197,20 @@ void armelf_frob_symbol PARAMS ((symbolS *, int *)); extern void cons_fix_new_arm PARAMS ((fragS *, int, int, expressionS *)); /* Don't allow symbols to be discarded on GOT related relocs, - nor on globals. */ + nor on globals. */ #define tc_fix_adjustable(x) (\ ((x)->fx_r_type == BFD_RELOC_ARM_PLT32 \ || (x)->fx_r_type == BFD_RELOC_ARM_GOT32 \ || (x)->fx_r_type == BFD_RELOC_ARM_GOTOFF \ || S_IS_EXTERN ((x)->fx_addsy) \ || S_IS_WEAK ((x)->fx_addsy)) ? 0 : 1) - + #ifdef OBJ_ELF #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_" #else #define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_" #endif - -/* end of tc-arm.h */ + +#ifdef OBJ_ELF +#define DWARF2_LINE_MIN_INSN_LENGTH 2 +#endif diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c index 17b1f79..05bdcdc 100644 --- a/contrib/binutils/gas/config/tc-i386.c +++ b/contrib/binutils/gas/config/tc-i386.c @@ -1,6 +1,6 @@ /* i386.c -- Assemble code for the Intel 80386 - Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 - Free Software Foundation. + Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -19,17 +19,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - Intel 80386 machine specific gas. - Written by Eliot Dresselhaus (eliot@mgm.mit.edu). - Bugs & suggestions are completely welcome. This is free software. - Please help us make it better. - */ +/* Intel 80386 machine specific gas. + Written by Eliot Dresselhaus (eliot@mgm.mit.edu). + x86_64 support by Jan Hubicka (jh@suse.cz) + Bugs & suggestions are completely welcome. This is free software. + Please help us make it better. */ #include #include "as.h" #include "subsegs.h" +#include "dwarf2dbg.h" #include "opcode/i386.h" #ifndef REGISTER_WARNINGS @@ -52,23 +52,32 @@ #define false 0 static unsigned int mode_from_disp_size PARAMS ((unsigned int)); -static int fits_in_signed_byte PARAMS ((long)); -static int fits_in_unsigned_byte PARAMS ((long)); -static int fits_in_unsigned_word PARAMS ((long)); -static int fits_in_signed_word PARAMS ((long)); -static int smallest_imm_type PARAMS ((long)); +static int fits_in_signed_byte PARAMS ((offsetT)); +static int fits_in_unsigned_byte PARAMS ((offsetT)); +static int fits_in_unsigned_word PARAMS ((offsetT)); +static int fits_in_signed_word PARAMS ((offsetT)); +static int fits_in_unsigned_long PARAMS ((offsetT)); +static int fits_in_signed_long PARAMS ((offsetT)); +static int smallest_imm_type PARAMS ((offsetT)); +static offsetT offset_in_range PARAMS ((offsetT, int)); static int add_prefix PARAMS ((unsigned int)); -static void set_16bit_code_flag PARAMS ((int)); -static void set_16bit_gcc_code_flag PARAMS((int)); +static void set_code_flag PARAMS ((int)); +static void set_16bit_gcc_code_flag PARAMS ((int)); static void set_intel_syntax PARAMS ((int)); +static void set_cpu_arch PARAMS ((int)); #ifdef BFD_ASSEMBLER static bfd_reloc_code_real_type reloc - PARAMS ((int, int, bfd_reloc_code_real_type)); + PARAMS ((int, int, int, bfd_reloc_code_real_type)); #endif +#ifndef DEFAULT_ARCH +#define DEFAULT_ARCH "i386" +#endif +static char *default_arch = DEFAULT_ARCH; + /* 'md_assemble ()' gathers together information and puts it into a - i386_insn. */ + i386_insn. */ union i386_op { @@ -79,19 +88,19 @@ union i386_op struct _i386_insn { - /* TM holds the template for the insn were currently assembling. */ + /* TM holds the template for the insn were currently assembling. */ template tm; /* SUFFIX holds the instruction mnemonic suffix if given. (e.g. 'l' for 'movl') */ char suffix; - /* OPERANDS gives the number of given operands. */ + /* OPERANDS gives the number of given operands. */ unsigned int operands; /* REG_OPERANDS, DISP_OPERANDS, MEM_OPERANDS, IMM_OPERANDS give the number of given register, displacement, memory operands and immediate - operands. */ + operands. */ unsigned int reg_operands, disp_operands, mem_operands, imm_operands; /* TYPES [i] is the type (see above #defines) which tells us how to @@ -102,6 +111,10 @@ struct _i386_insn operand. */ union i386_op op[MAX_OPERANDS]; + /* Flags for operands. */ + unsigned int flags[MAX_OPERANDS]; +#define Operand_PCrel 1 + /* Relocation type for operand */ #ifdef BFD_ASSEMBLER enum bfd_reloc_code_real disp_reloc[MAX_OPERANDS]; @@ -116,8 +129,8 @@ struct _i386_insn unsigned int log2_scale_factor; /* SEG gives the seg_entries of this insn. They are zero unless - explicit segment overrides are given. */ - const seg_entry *seg[2]; /* segments for memory operands (if given) */ + explicit segment overrides are given. */ + const seg_entry *seg[2]; /* PREFIX holds all the given prefix opcodes (usually null). PREFIXES is the number of prefix opcodes. */ @@ -128,6 +141,7 @@ struct _i386_insn addressing modes of this insn are encoded. */ modrm_byte rm; + rex_byte rex; sib_byte sib; }; @@ -142,8 +156,8 @@ const char extra_symbol_chars[] = "*%-("; #endif /* This array holds the chars that always start a comment. If the - pre-processor is disabled, these aren't very useful */ -#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (TE_LINUX) && !defined(TE_FreeBSD)) + pre-processor is disabled, these aren't very useful. */ +#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX) && !defined(TE_FreeBSD)) /* Putting '/' here makes it impossible to use the divide operator. However, we need it for compatibility with SVR4 systems. */ const char comment_chars[] = "#/"; @@ -155,36 +169,37 @@ const char comment_chars[] = "#"; /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' - .line and .file directives will appear in the pre-processed output */ -/* Note that input_file.c hand checks for '#' at the beginning of the + .line and .file directives will appear in the pre-processed output. + Note that input_file.c hand checks for '#' at the beginning of the first line of the input file. This is because the compiler outputs - #NO_APP at the beginning of its output. */ -/* Also note that comments started like this one will always work if + #NO_APP at the beginning of its output. + Also note that comments started like this one will always work if '/' isn't otherwise defined. */ -#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (TE_LINUX) && !defined(TE_FreeBSD)) +#if defined (TE_I386AIX) || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && ! defined (TE_LINUX) && !defined(TE_FreeBSD)) const char line_comment_chars[] = ""; #else const char line_comment_chars[] = "/"; #endif -const char line_separator_chars[] = ""; +const char line_separator_chars[] = ";"; -/* Chars that can be used to separate mant from exp in floating point nums */ +/* Chars that can be used to separate mant from exp in floating point + nums. */ const char EXP_CHARS[] = "eE"; -/* Chars that mean this number is a floating point constant */ -/* As in 0f12.456 */ -/* or 0d1.2345e12 */ +/* Chars that mean this number is a floating point constant + As in 0f12.456 + or 0d1.2345e12. */ const char FLT_CHARS[] = "fFdDxX"; -/* tables for lexical analysis */ +/* Tables for lexical analysis. */ static char mnemonic_chars[256]; static char register_chars[256]; static char operand_chars[256]; static char identifier_chars[256]; static char digit_chars[256]; -/* lexical macros */ +/* Lexical macros. */ #define is_mnemonic_char(x) (mnemonic_chars[(unsigned char) x]) #define is_operand_char(x) (operand_chars[(unsigned char) x]) #define is_register_char(x) (register_chars[(unsigned char) x]) @@ -192,43 +207,71 @@ static char digit_chars[256]; #define is_identifier_char(x) (identifier_chars[(unsigned char) x]) #define is_digit_char(x) (digit_chars[(unsigned char) x]) -/* put here all non-digit non-letter charcters that may occur in an operand */ +/* All non-digit non-letter charcters that may occur in an operand. */ static char operand_special_chars[] = "%$-+(,)*._~/<>|&^!:[@]"; /* md_assemble() always leaves the strings it's passed unaltered. To effect this we maintain a stack of saved characters that we've smashed with '\0's (indicating end of strings for various sub-fields of the - assembler instruction). */ + assembler instruction). */ static char save_stack[32]; -static char *save_stack_p; /* stack pointer */ +static char *save_stack_p; #define END_STRING_AND_SAVE(s) \ do { *save_stack_p++ = *(s); *(s) = '\0'; } while (0) #define RESTORE_END_STRING(s) \ do { *(s) = *--save_stack_p; } while (0) -/* The instruction we're assembling. */ +/* The instruction we're assembling. */ static i386_insn i; /* Possible templates for current insn. */ static const templates *current_templates; -/* Per instruction expressionS buffers: 2 displacements & 2 immediate max. */ +/* Per instruction expressionS buffers: 2 displacements & 2 immediate max. */ static expressionS disp_expressions[2], im_expressions[2]; -static int this_operand; /* current operand we are working on */ +/* Current operand we are working on. */ +static int this_operand; + +/* We support four different modes. FLAG_CODE variable is used to distinguish + these. */ + +enum flag_code { + CODE_32BIT, + CODE_16BIT, + CODE_64BIT }; + +static enum flag_code flag_code; +static int use_rela_relocations = 0; + +/* The names used to print error messages. */ +static const char *flag_code_names[] = + { + "32", + "16", + "64" + }; + +/* 1 for intel syntax, + 0 if att syntax. */ +static int intel_syntax = 0; -static int flag_do_long_jump; /* FIXME what does this do? */ +/* 1 if register prefix % not required. */ +static int allow_naked_reg = 0; -static int flag_16bit_code; /* 1 if we're writing 16-bit code, 0 if 32-bit */ +/* Used in 16 bit gcc mode to add an l suffix to call, ret, enter, + leave, push, and pop instructions so that gcc has the same stack + frame as in 32 bit mode. */ +static char stackop_size = '\0'; -static int intel_syntax = 0; /* 1 for intel syntax, 0 if att syntax */ +/* Non-zero to quieten some warnings. */ +static int quiet_warnings = 0; -static int allow_naked_reg = 0; /* 1 if register prefix % not required */ +/* CPU name. */ +static const char *cpu_arch_name = NULL; -static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l - suffix to call, ret, enter, leave, push, - and pop instructions so that gcc has the - same stack frame as in 32 bit mode. */ +/* CPU feature flags. */ +static unsigned int cpu_arch_flags = CpuUnknownFlags|CpuNo64; /* Interface to relax_segment. There are 2 relax states for 386 jump insns: one for conditional & @@ -236,10 +279,10 @@ static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l jumps add different sizes to frags when we're figuring out what sort of jump to choose to reach a given label. */ -/* types */ -#define COND_JUMP 1 /* conditional jump */ -#define UNCOND_JUMP 2 /* unconditional jump */ -/* sizes */ +/* Types. */ +#define COND_JUMP 1 +#define UNCOND_JUMP 2 +/* Sizes. */ #define CODE16 1 #define SMALL 0 #define SMALL16 (SMALL|CODE16) @@ -255,7 +298,7 @@ static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l #endif #define ENCODE_RELAX_STATE(type,size) \ - ((relax_substateT)((type<<2) | (size))) + ((relax_substateT) ((type<<2) | (size))) #define SIZE_FROM_RELAX_STATE(s) \ ( (((s) & 0x3) == BIG ? 4 : (((s) & 0x3) == BIG16 ? 2 : 1)) ) @@ -273,8 +316,7 @@ const relax_typeS md_relax_table[] = 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 - 4) which index into the table to try if we can't fit into this one. - */ + 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}, @@ -300,15 +342,31 @@ const relax_typeS md_relax_table[] = }; +static const arch_entry cpu_arch[] = { + {"i8086", Cpu086 }, + {"i186", Cpu086|Cpu186 }, + {"i286", Cpu086|Cpu186|Cpu286 }, + {"i386", Cpu086|Cpu186|Cpu286|Cpu386 }, + {"i486", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486 }, + {"i586", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuMMX }, + {"i686", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuSSE }, + {"pentium", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuMMX }, + {"pentiumpro",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuSSE }, + {"pentium4", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX|CpuSSE|CpuSSE2 }, + {"k6", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX|Cpu3dnow }, + {"athlon", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuMMX|Cpu3dnow }, + {"sledgehammer",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuSledgehammer|CpuMMX|Cpu3dnow|CpuSSE|CpuSSE2 }, + {NULL, 0 } +}; void i386_align_code (fragP, count) fragS *fragP; int count; { - /* Various efficient no-op patterns for aligning code labels. */ - /* Note: Don't try to assemble the instructions in the comments. */ - /* 0L and 0w are not legal */ + /* Various efficient no-op patterns for aligning code labels. + Note: Don't try to assemble the instructions in the comments. + 0L and 0w are not legal. */ static const char f32_1[] = {0x90}; /* nop */ static const char f32_2[] = @@ -373,18 +431,24 @@ i386_align_code (fragP, count) f32_15, f32_15, f32_15, f32_15, f32_15, f32_15, f32_15 }; + /* ??? We can't use these fillers for x86_64, since they often kills the + upper halves. Solve later. */ + if (flag_code == CODE_64BIT) + count = 1; + if (count > 0 && count <= 15) { - if (flag_16bit_code) + if (flag_code == CODE_16BIT) { - memcpy(fragP->fr_literal + fragP->fr_fix, - f16_patt[count - 1], count); - if (count > 8) /* adjust jump offset */ + memcpy (fragP->fr_literal + fragP->fr_fix, + f16_patt[count - 1], count); + if (count > 8) + /* Adjust jump offset. */ fragP->fr_literal[fragP->fr_fix + 1] = count - 2; } else - memcpy(fragP->fr_literal + fragP->fr_fix, - f32_patt[count - 1], count); + memcpy (fragP->fr_literal + fragP->fr_fix, + f32_patt[count - 1], count); fragP->fr_var = count; } } @@ -399,65 +463,125 @@ static const reg_entry *parse_register PARAMS ((char *reg_string, static void s_bss PARAMS ((int)); #endif -symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */ +symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_". */ static INLINE unsigned int mode_from_disp_size (t) unsigned int t; { - return (t & Disp8) ? 1 : (t & (Disp16|Disp32)) ? 2 : 0; + return (t & Disp8) ? 1 : (t & (Disp16 | Disp32 | Disp32S)) ? 2 : 0; } static INLINE int fits_in_signed_byte (num) - long num; + offsetT num; { return (num >= -128) && (num <= 127); -} /* fits_in_signed_byte() */ +} static INLINE int fits_in_unsigned_byte (num) - long num; + offsetT num; { return (num & 0xff) == num; -} /* fits_in_unsigned_byte() */ +} static INLINE int fits_in_unsigned_word (num) - long num; + offsetT num; { return (num & 0xffff) == num; -} /* fits_in_unsigned_word() */ +} static INLINE int fits_in_signed_word (num) - long num; + offsetT num; { return (-32768 <= num) && (num <= 32767); -} /* fits_in_signed_word() */ +} +static INLINE int +fits_in_signed_long (num) + offsetT num ATTRIBUTE_UNUSED; +{ +#ifndef BFD64 + return 1; +#else + return (!(((offsetT) -1 << 31) & num) + || (((offsetT) -1 << 31) & num) == ((offsetT) -1 << 31)); +#endif +} /* fits_in_signed_long() */ +static INLINE int +fits_in_unsigned_long (num) + offsetT num ATTRIBUTE_UNUSED; +{ +#ifndef BFD64 + return 1; +#else + return (num & (((offsetT) 2 << 31) - 1)) == num; +#endif +} /* fits_in_unsigned_long() */ static int smallest_imm_type (num) - long num; + offsetT num; { -#if 0 - /* This code is disabled because all the Imm1 forms in the opcode table - are slower on the i486, and they're the versions with the implicitly - specified single-position displacement, which has another syntax if - you really want to use that form. If you really prefer to have the - one-byte-shorter Imm1 form despite these problems, re-enable this - code. */ - if (num == 1) - return Imm1 | Imm8 | Imm8S | Imm16 | Imm32; -#endif + if (cpu_arch_flags != (Cpu086 | Cpu186 | Cpu286 | Cpu386 | Cpu486 | CpuNo64) + && !(cpu_arch_flags & (CpuUnknown))) + { + /* This code is disabled on the 486 because all the Imm1 forms + in the opcode table are slower on the i486. They're the + versions with the implicitly specified single-position + displacement, which has another syntax if you really want to + use that form. */ + if (num == 1) + return Imm1 | Imm8 | Imm8S | Imm16 | Imm32 | Imm32S | Imm64; + } return (fits_in_signed_byte (num) - ? (Imm8S | Imm8 | Imm16 | Imm32) + ? (Imm8S | Imm8 | Imm16 | Imm32 | Imm32S | Imm64) : fits_in_unsigned_byte (num) - ? (Imm8 | Imm16 | Imm32) + ? (Imm8 | Imm16 | Imm32 | Imm32S | Imm64) : (fits_in_signed_word (num) || fits_in_unsigned_word (num)) - ? (Imm16 | Imm32) - : (Imm32)); -} /* smallest_imm_type() */ + ? (Imm16 | Imm32 | Imm32S | Imm64) + : fits_in_signed_long (num) + ? (Imm32 | Imm32S | Imm64) + : fits_in_unsigned_long (num) + ? (Imm32 | Imm64) + : Imm64); +} + +static offsetT +offset_in_range (val, size) + offsetT val; + int size; +{ + addressT mask; + + switch (size) + { + case 1: mask = ((addressT) 1 << 8) - 1; break; + case 2: mask = ((addressT) 1 << 16) - 1; break; + case 4: mask = ((addressT) 2 << 31) - 1; break; +#ifdef BFD64 + case 8: mask = ((addressT) 2 << 63) - 1; break; +#endif + default: abort (); + } + + /* If BFD64, sign extend val. */ + if (!use_rela_relocations) + if ((val & ~(((addressT) 2 << 31) - 1)) == 0) + val = (val ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31); + + if ((val & ~mask) != 0 && (val & ~mask) != ~mask) + { + char buf1[40], buf2[40]; + + sprint_value (buf1, val); + sprint_value (buf2, val & mask); + as_warn (_("%s shortened to %s"), buf1, buf2); + } + return val & mask; +} /* Returns 0 if attempting to add a prefix where one from the same class already exists, 1 if non rep/repne added, 2 if rep/repne @@ -469,40 +593,43 @@ add_prefix (prefix) int ret = 1; int q; - switch (prefix) - { - default: - abort (); - - case CS_PREFIX_OPCODE: - case DS_PREFIX_OPCODE: - case ES_PREFIX_OPCODE: - case FS_PREFIX_OPCODE: - case GS_PREFIX_OPCODE: - case SS_PREFIX_OPCODE: - q = SEG_PREFIX; - break; - - case REPNE_PREFIX_OPCODE: - case REPE_PREFIX_OPCODE: - ret = 2; - /* fall thru */ - case LOCK_PREFIX_OPCODE: - q = LOCKREP_PREFIX; - break; - - case FWAIT_OPCODE: - q = WAIT_PREFIX; - break; - - case ADDR_PREFIX_OPCODE: - q = ADDR_PREFIX; - break; - - case DATA_PREFIX_OPCODE: - q = DATA_PREFIX; - break; - } + if (prefix >= 0x40 && prefix < 0x50 && flag_code == CODE_64BIT) + q = REX_PREFIX; + else + switch (prefix) + { + default: + abort (); + + case CS_PREFIX_OPCODE: + case DS_PREFIX_OPCODE: + case ES_PREFIX_OPCODE: + case FS_PREFIX_OPCODE: + case GS_PREFIX_OPCODE: + case SS_PREFIX_OPCODE: + q = SEG_PREFIX; + break; + + case REPNE_PREFIX_OPCODE: + case REPE_PREFIX_OPCODE: + ret = 2; + /* fall thru */ + case LOCK_PREFIX_OPCODE: + q = LOCKREP_PREFIX; + break; + + case FWAIT_OPCODE: + q = WAIT_PREFIX; + break; + + case ADDR_PREFIX_OPCODE: + q = ADDR_PREFIX; + break; + + case DATA_PREFIX_OPCODE: + q = DATA_PREFIX; + break; + } if (i.prefix[q]) { @@ -516,19 +643,31 @@ add_prefix (prefix) } static void -set_16bit_code_flag (new_16bit_code_flag) - int new_16bit_code_flag; +set_code_flag (value) + int value; { - flag_16bit_code = new_16bit_code_flag; + flag_code = value; + cpu_arch_flags &= ~(Cpu64 | CpuNo64); + cpu_arch_flags |= (flag_code == CODE_64BIT ? Cpu64 : CpuNo64); + if (value == CODE_64BIT && !(cpu_arch_flags & CpuSledgehammer)) + { + as_bad (_("64bit mode not supported on this CPU.")); + } + if (value == CODE_32BIT && !(cpu_arch_flags & Cpu386)) + { + as_bad (_("32bit mode not supported on this CPU.")); + } stackop_size = '\0'; } static void -set_16bit_gcc_code_flag (new_16bit_code_flag) - int new_16bit_code_flag; +set_16bit_gcc_code_flag (new_code_flag) + int new_code_flag; { - flag_16bit_code = new_16bit_code_flag; - stackop_size = new_16bit_code_flag ? 'l' : '\0'; + flag_code = new_code_flag; + cpu_arch_flags &= ~(Cpu64 | CpuNo64); + cpu_arch_flags |= (flag_code == CODE_64BIT ? Cpu64 : CpuNo64); + stackop_size = 'l'; } static void @@ -544,9 +683,9 @@ set_intel_syntax (syntax_flag) char *string = input_line_pointer; int e = get_symbol_end (); - if (strcmp(string, "prefix") == 0) + if (strcmp (string, "prefix") == 0) ask_naked_reg = 1; - else if (strcmp(string, "noprefix") == 0) + else if (strcmp (string, "noprefix") == 0) ask_naked_reg = -1; else as_bad (_("bad argument to syntax directive.")); @@ -562,59 +701,110 @@ set_intel_syntax (syntax_flag) allow_naked_reg = (intel_syntax && (bfd_get_symbol_leading_char (stdoutput) != '\0')); #else - allow_naked_reg = 0; /* conservative default */ + /* Conservative default. */ + allow_naked_reg = 0; #endif } else allow_naked_reg = (ask_naked_reg < 0); } +static void +set_cpu_arch (dummy) + int dummy ATTRIBUTE_UNUSED; +{ + SKIP_WHITESPACE (); + + if (! is_end_of_line[(unsigned char) *input_line_pointer]) + { + char *string = input_line_pointer; + int e = get_symbol_end (); + int i; + + for (i = 0; cpu_arch[i].name; i++) + { + 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); + break; + } + } + if (!cpu_arch[i].name) + as_bad (_("no such architecture: `%s'"), string); + + *input_line_pointer = e; + } + else + as_bad (_("missing cpu architecture")); + + demand_empty_rest_of_line (); +} + const pseudo_typeS md_pseudo_table[] = { -#ifndef I386COFF - {"bss", s_bss, 0}, -#endif #if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO) {"align", s_align_bytes, 0}, #else {"align", s_align_ptwo, 0}, #endif + {"arch", set_cpu_arch, 0}, +#ifndef I386COFF + {"bss", s_bss, 0}, +#endif {"ffloat", float_cons, 'f'}, {"dfloat", float_cons, 'd'}, {"tfloat", float_cons, 'x'}, {"value", cons, 2}, {"noopt", s_ignore, 0}, {"optim", s_ignore, 0}, - {"code16gcc", set_16bit_gcc_code_flag, 1}, - {"code16", set_16bit_code_flag, 1}, - {"code32", set_16bit_code_flag, 0}, + {"code16gcc", set_16bit_gcc_code_flag, CODE_16BIT}, + {"code16", set_code_flag, CODE_16BIT}, + {"code32", set_code_flag, CODE_32BIT}, + {"code64", set_code_flag, CODE_64BIT}, {"intel_syntax", set_intel_syntax, 1}, {"att_syntax", set_intel_syntax, 0}, + {"file", dwarf2_directive_file, 0}, + {"loc", dwarf2_directive_loc, 0}, {0, 0, 0} }; -/* for interface with expression () */ +/* For interface with expression (). */ extern char *input_line_pointer; -/* hash table for instruction mnemonic lookup */ +/* Hash table for instruction mnemonic lookup. */ static struct hash_control *op_hash; -/* hash table for register lookup */ + +/* Hash table for register lookup. */ static struct hash_control *reg_hash; - +#ifdef BFD_ASSEMBLER +unsigned long +i386_mach () +{ + if (!strcmp (default_arch, "x86_64")) + return bfd_mach_x86_64; + else if (!strcmp (default_arch, "i386")) + return bfd_mach_i386_i386; + else + as_fatal (_("Unknown architecture")); +} +#endif + void md_begin () { const char *hash_err; - /* initialize op_hash hash table */ + /* Initialize op_hash hash table. */ op_hash = hash_new (); { register const template *optab; register templates *core_optab; - optab = i386_optab; /* setup for loop */ + /* Setup for loop. */ + optab = i386_optab; core_optab = (templates *) xmalloc (sizeof (templates)); core_optab->start = optab; @@ -625,14 +815,13 @@ md_begin () || strcmp (optab->name, (optab - 1)->name) != 0) { /* different name --> ship out current template list; - add to hash table; & begin anew */ + add to hash table; & begin anew. */ core_optab->end = optab; hash_err = hash_insert (op_hash, (optab - 1)->name, (PTR) core_optab); if (hash_err) { - hash_error: as_fatal (_("Internal Error: Can't hash %s: %s"), (optab - 1)->name, hash_err); @@ -645,7 +834,7 @@ md_begin () } } - /* initialize reg_hash hash table */ + /* Initialize reg_hash hash table. */ reg_hash = hash_new (); { register const reg_entry *regtab; @@ -656,11 +845,13 @@ md_begin () { hash_err = hash_insert (reg_hash, regtab->reg_name, (PTR) regtab); if (hash_err) - goto hash_error; + as_fatal (_("Internal Error: Can't hash %s: %s"), + regtab->reg_name, + hash_err); } } - /* fill in lexical tables: mnemonic_chars, operand_chars. */ + /* Fill in lexical tables: mnemonic_chars, operand_chars. */ { register int c; register char *p; @@ -725,10 +916,9 @@ i386_print_statistics (file) hash_print_statistics (file, "i386 register", reg_hash); } - #ifdef DEBUG386 -/* debugging routines for md_assemble */ +/* Debugging routines for md_assemble. */ static void pi PARAMS ((char *, i386_insn *)); static void pte PARAMS ((template *)); static void pt PARAMS ((unsigned int)); @@ -740,15 +930,20 @@ pi (line, x) char *line; i386_insn *x; { - register template *p; - int i; + unsigned int i; fprintf (stdout, "%s: template ", line); pte (&x->tm); - fprintf (stdout, " modrm: mode %x reg %x reg/mem %x", + fprintf (stdout, " address: base %s index %s scale %x\n", + x->base_reg ? x->base_reg->reg_name : "none", + x->index_reg ? x->index_reg->reg_name : "none", + x->log2_scale_factor); + fprintf (stdout, " modrm: mode %x reg %x reg/mem %x\n", x->rm.mode, x->rm.reg, x->rm.regmem); - fprintf (stdout, " base %x index %x scale %x\n", - x->bi.base, x->bi.index, x->bi.scale); + fprintf (stdout, " sib: base %x index %x scale %x\n", + x->sib.base, x->sib.index, x->sib.scale); + fprintf (stdout, " rex: 64bit %x extX %x extY %x extZ %x\n", + x->rex.mode64, x->rex.extX, x->rex.extY, x->rex.extZ); for (i = 0; i < x->operands; i++) { fprintf (stdout, " #%d: ", i + 1); @@ -768,10 +963,9 @@ static void pte (t) template *t; { - int i; + unsigned int i; fprintf (stdout, " %d operands ", t->operands); - fprintf (stdout, "opcode %x ", - t->base_opcode); + fprintf (stdout, "opcode %x ", t->base_opcode); if (t->extension_opcode != None) fprintf (stdout, "ext %x ", t->extension_opcode); if (t->opcode_modifier & D) @@ -829,15 +1023,20 @@ type_names[] = { Reg8, "r8" }, { Reg16, "r16" }, { Reg32, "r32" }, + { Reg64, "r64" }, { Imm8, "i8" }, { Imm8S, "i8s" }, { Imm16, "i16" }, { Imm32, "i32" }, + { Imm32S, "i32s" }, + { Imm64, "i64" }, { Imm1, "i1" }, { BaseIndex, "BaseIndex" }, { Disp8, "d8" }, { Disp16, "d16" }, { Disp32, "d32" }, + { Disp32S, "d32s" }, + { Disp64, "d64" }, { InOutPortReg, "InOutPortReg" }, { ShiftCount, "ShiftCount" }, { Control, "control reg" }, @@ -861,16 +1060,9 @@ pt (t) { register struct type_name *ty; - if (t == Unknown) - { - fprintf (stdout, _("Unknown")); - } - else - { - for (ty = type_names; ty->mask; ty++) - if (t & ty->mask) - fprintf (stdout, "%s, ", ty->tname); - } + for (ty = type_names; ty->mask; ty++) + if (t & ty->mask) + fprintf (stdout, "%s, ", ty->tname); fflush (stdout); } @@ -886,25 +1078,27 @@ tc_i386_force_relocation (fixp) return 1; return 0; #else - /* For COFF */ + /* For COFF. */ return fixp->fx_r_type == 7; #endif } #ifdef BFD_ASSEMBLER -static bfd_reloc_code_real_type reloc - PARAMS ((int, int, bfd_reloc_code_real_type)); static bfd_reloc_code_real_type -reloc (size, pcrel, other) +reloc (size, pcrel, sign, other) int size; int pcrel; + int sign; bfd_reloc_code_real_type other; { - if (other != NO_RELOC) return other; + if (other != NO_RELOC) + return other; if (pcrel) { + if (!sign) + as_bad (_("There are no unsigned pc-relative relocations")); switch (size) { case 1: return BFD_RELOC_8_PCREL; @@ -915,64 +1109,76 @@ reloc (size, pcrel, other) } else { - switch (size) - { - case 1: return BFD_RELOC_8; - case 2: return BFD_RELOC_16; - case 4: return BFD_RELOC_32; - } - as_bad (_("can not do %d byte relocation"), size); + if (sign) + switch (size) + { + case 4: return BFD_RELOC_X86_64_32S; + } + else + switch (size) + { + case 1: return BFD_RELOC_8; + case 2: return BFD_RELOC_16; + case 4: return BFD_RELOC_32; + case 8: return BFD_RELOC_64; + } + as_bad (_("can not do %s %d byte relocation"), + sign ? "signed" : "unsigned", size); } + abort (); return BFD_RELOC_NONE; } -/* - * Here we decide which fixups can be adjusted to make them relative to - * the beginning of the section instead of the symbol. Basically we need - * to make sure that the dynamic relocations are done correctly, so in - * some cases we force the original symbol to be used. - */ +/* Here we decide which fixups can be adjusted to make them relative to + the beginning of the section instead of the symbol. Basically we need + to make sure that the dynamic relocations are done correctly, so in + some cases we force the original symbol to be used. */ + int tc_i386_fix_adjustable (fixP) fixS *fixP; { -#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined (TE_PE) +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) /* Prevent all adjustments to global symbols, or else dynamic linking will not work correctly. */ if (S_IS_EXTERNAL (fixP->fx_addsy) || S_IS_WEAK (fixP->fx_addsy)) return 0; #endif - /* adjust_reloc_syms doesn't know about the GOT */ + /* adjust_reloc_syms doesn't know about the GOT. */ if (fixP->fx_r_type == BFD_RELOC_386_GOTOFF || fixP->fx_r_type == BFD_RELOC_386_PLT32 || fixP->fx_r_type == BFD_RELOC_386_GOT32 - || fixP->fx_r_type == BFD_RELOC_RVA + || fixP->fx_r_type == BFD_RELOC_X86_64_PLT32 + || fixP->fx_r_type == BFD_RELOC_X86_64_GOT32 + || fixP->fx_r_type == BFD_RELOC_X86_64_GOTPCREL || fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 0; return 1; } #else -#define reloc(SIZE,PCREL,OTHER) 0 -#define BFD_RELOC_16 0 -#define BFD_RELOC_32 0 -#define BFD_RELOC_16_PCREL 0 -#define BFD_RELOC_32_PCREL 0 -#define BFD_RELOC_386_PLT32 0 -#define BFD_RELOC_386_GOT32 0 -#define BFD_RELOC_386_GOTOFF 0 +#define reloc(SIZE,PCREL,SIGN,OTHER) 0 +#define BFD_RELOC_16 0 +#define BFD_RELOC_32 0 +#define BFD_RELOC_16_PCREL 0 +#define BFD_RELOC_32_PCREL 0 +#define BFD_RELOC_386_PLT32 0 +#define BFD_RELOC_386_GOT32 0 +#define BFD_RELOC_386_GOTOFF 0 +#define BFD_RELOC_X86_64_PLT32 0 +#define BFD_RELOC_X86_64_GOT32 0 +#define BFD_RELOC_X86_64_GOTPCREL 0 #endif -static int -intel_float_operand PARAMS ((char *mnemonic)); +static int intel_float_operand PARAMS ((char *mnemonic)); static int intel_float_operand (mnemonic) char *mnemonic; { - if (mnemonic[0] == 'f' && mnemonic[1] =='i') + if (mnemonic[0] == 'f' && mnemonic[1] == 'i') return 2; if (mnemonic[0] == 'f') @@ -989,7 +1195,7 @@ void md_assemble (line) char *line; { - /* Points to template once we've found it. */ + /* Points to template once we've found it. */ const template *t; /* Count the size of the instruction generated. */ @@ -999,23 +1205,23 @@ md_assemble (line) char mnemonic[MAX_MNEM_SIZE]; - /* Initialize globals. */ + /* Initialize globals. */ memset (&i, '\0', sizeof (i)); for (j = 0; j < MAX_OPERANDS; j++) i.disp_reloc[j] = NO_RELOC; memset (disp_expressions, '\0', sizeof (disp_expressions)); memset (im_expressions, '\0', sizeof (im_expressions)); - save_stack_p = save_stack; /* reset stack pointer */ + save_stack_p = save_stack; /* First parse an instruction mnemonic & call i386_operand for the operands. We assume that the scrubber has arranged it so that line[0] is the valid - start of a (possibly prefixed) mnemonic. */ + start of a (possibly prefixed) mnemonic. */ { char *l = line; char *token_start = l; char *mnem_p; - /* Non-zero if we found a prefix only acceptable with string insns. */ + /* Non-zero if we found a prefix only acceptable with string insns. */ const char *expecting_string_instruction = NULL; while (1) @@ -1026,7 +1232,7 @@ md_assemble (line) mnem_p++; if (mnem_p >= mnemonic + sizeof (mnemonic)) { - as_bad (_("no such 386 instruction: `%s'"), token_start); + as_bad (_("no such instruction: `%s'"), token_start); return; } l++; @@ -1060,7 +1266,7 @@ md_assemble (line) Similarly, in 32-bit mode, do not allow addr32 or data32. */ if ((current_templates->start->opcode_modifier & (Size16 | Size32)) && (((current_templates->start->opcode_modifier & Size32) != 0) - ^ flag_16bit_code)) + ^ (flag_code == CODE_16BIT))) { as_bad (_("redundant %s prefix"), current_templates->start->name); @@ -1072,8 +1278,7 @@ md_assemble (line) case 0: return; case 2: - expecting_string_instruction = - current_templates->start->name; + expecting_string_instruction = current_templates->start->name; break; } /* Skip past PREFIX_SEPARATOR and reset token_start. */ @@ -1090,31 +1295,57 @@ md_assemble (line) { case WORD_MNEM_SUFFIX: case BYTE_MNEM_SUFFIX: - case SHORT_MNEM_SUFFIX: - case LONG_MNEM_SUFFIX: + case QWORD_MNEM_SUFFIX: i.suffix = mnem_p[-1]; mnem_p[-1] = '\0'; current_templates = hash_find (op_hash, mnemonic); break; + case SHORT_MNEM_SUFFIX: + case LONG_MNEM_SUFFIX: + if (!intel_syntax) + { + i.suffix = mnem_p[-1]; + mnem_p[-1] = '\0'; + current_templates = hash_find (op_hash, mnemonic); + } + break; - /* Intel Syntax */ - case DWORD_MNEM_SUFFIX: + /* Intel Syntax. */ + case 'd': if (intel_syntax) { - i.suffix = mnem_p[-1]; + if (intel_float_operand (mnemonic)) + i.suffix = SHORT_MNEM_SUFFIX; + else + i.suffix = LONG_MNEM_SUFFIX; mnem_p[-1] = '\0'; current_templates = hash_find (op_hash, mnemonic); - break; } + break; } if (!current_templates) { - as_bad (_("no such 386 instruction: `%s'"), token_start); + as_bad (_("no such instruction: `%s'"), token_start); return; } } - /* check for rep/repne without a string instruction */ + /* Check if instruction is supported on specified architecture. */ + if (cpu_arch_flags != 0) + { + if ((current_templates->start->cpu_flags & ~(Cpu64 | CpuNo64)) + & ~(cpu_arch_flags & ~(Cpu64 | CpuNo64))) + { + as_warn (_("`%s' is not supported on `%s'"), + current_templates->start->name, cpu_arch_name); + } + else if ((Cpu386 & ~cpu_arch_flags) && (flag_code != CODE_16BIT)) + { + as_warn (_("use .code16 to ensure correct addressing mode")); + } + } + + /* Check for rep/repne without a string instruction. */ if (expecting_string_instruction && !(current_templates->start->opcode_modifier & IsString)) { @@ -1123,20 +1354,18 @@ md_assemble (line) return; } - /* There may be operands to parse. */ + /* There may be operands to parse. */ if (*l != END_OF_INSN) { - /* parse operands */ - - /* 1 if operand is pending after ','. */ + /* 1 if operand is pending after ','. */ unsigned int expecting_operand = 0; - /* Non-zero if operand parens not balanced. */ + /* Non-zero if operand parens not balanced. */ unsigned int paren_not_balanced; do { - /* skip optional white space before operand */ + /* Skip optional white space before operand. */ if (is_space_char (*l)) ++l; if (!is_operand_char (*l) && *l != END_OF_INSN) @@ -1189,7 +1418,7 @@ md_assemble (line) l++; } if (l != token_start) - { /* yes, we've read in another operand */ + { /* Yes, we've read in another operand. */ unsigned int operand_ok; this_operand = i.operands++; if (i.operands > MAX_OPERANDS) @@ -1198,15 +1427,17 @@ md_assemble (line) MAX_OPERANDS); return; } - /* now parse operand adding info to 'i' as we go along */ + /* Now parse operand adding info to 'i' as we go along. */ END_STRING_AND_SAVE (l); if (intel_syntax) - operand_ok = i386_intel_operand (token_start, intel_float_operand (mnemonic)); + operand_ok = + i386_intel_operand (token_start, + intel_float_operand (mnemonic)); else operand_ok = i386_operand (token_start); - RESTORE_END_STRING (l); /* restore old contents */ + RESTORE_END_STRING (l); if (!operand_ok) return; } @@ -1225,17 +1456,18 @@ md_assemble (line) } } - /* now *l must be either ',' or END_OF_INSN */ + /* Now *l must be either ',' or END_OF_INSN. */ if (*l == ',') { if (*++l == END_OF_INSN) - { /* just skip it, if it's \n complain */ + { + /* Just skip it, if it's \n complain. */ goto expecting_operand_after_comma; } expecting_operand = 1; } } - while (*l != END_OF_INSN); /* until we get end of insn */ + while (*l != END_OF_INSN); } } @@ -1244,7 +1476,7 @@ md_assemble (line) Next, we find a template that matches the given insn, making sure the overlap of the given operands types is consistent - with the template operand types. */ + with the template operand types. */ #define MATCH(overlap, given, template) \ ((overlap & ~JumpAbsolute) \ @@ -1276,6 +1508,11 @@ 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 int xchg1 = 0; int xchg2 = 0; @@ -1295,6 +1532,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; if (i.mem_operands == 2) { @@ -1320,45 +1560,131 @@ md_assemble (line) We can't do this properly yet, ie. excluding InOutPortReg, but the following works for instructions with immediates. In any case, we can't set i.suffix yet. */ - for (op = i.operands; --op >= 0; ) + for (op = i.operands; --op >= 0;) if (i.types[op] & Reg) { if (i.types[op] & Reg8) guess_suffix = BYTE_MNEM_SUFFIX; else if (i.types[op] & Reg16) guess_suffix = WORD_MNEM_SUFFIX; + else if (i.types[op] & Reg32) + guess_suffix = LONG_MNEM_SUFFIX; + else if (i.types[op] & Reg64) + guess_suffix = QWORD_MNEM_SUFFIX; break; } } - else if (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) + else if ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) guess_suffix = WORD_MNEM_SUFFIX; - for (op = i.operands; --op >= 0; ) - if ((i.types[op] & Imm) - && i.op[op].imms->X_op == O_constant) + for (op = i.operands; --op >= 0;) + if (i.types[op] & Imm) { - /* If a suffix is given, this operand may be shortened. */ - switch (guess_suffix) + switch (i.op[op].imms->X_op) { - case WORD_MNEM_SUFFIX: - i.types[op] |= Imm16; - break; - case BYTE_MNEM_SUFFIX: - i.types[op] |= Imm16 | Imm8 | Imm8S; - break; + case O_constant: + /* If a suffix is given, this operand may be shortened. */ + switch (guess_suffix) + { + case LONG_MNEM_SUFFIX: + i.types[op] |= Imm32 | Imm64; + break; + case WORD_MNEM_SUFFIX: + i.types[op] |= Imm16 | Imm32S | Imm32 | Imm64; + break; + case BYTE_MNEM_SUFFIX: + i.types[op] |= Imm16 | Imm8 | Imm8S | Imm32S | Imm32 | Imm64; + break; + } + + /* If this operand is at most 16 bits, convert it + to a signed 16 bit number before trying to see + whether it will fit in an even smaller size. + This allows a 16-bit operand such as $0xffe0 to + be recognised as within Imm8S range. */ + if ((i.types[op] & Imm16) + && (i.op[op].imms->X_add_number & ~(offsetT) 0xffff) == 0) + { + i.op[op].imms->X_add_number = + (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000); + } + if ((i.types[op] & Imm32) + && (i.op[op].imms->X_add_number & ~(((offsetT) 2 << 31) - 1)) == 0) + { + i.op[op].imms->X_add_number = + (i.op[op].imms->X_add_number ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31); + } + i.types[op] |= smallest_imm_type (i.op[op].imms->X_add_number); + /* We must avoid matching of Imm32 templates when 64bit only immediate is available. */ + if (guess_suffix == QWORD_MNEM_SUFFIX) + i.types[op] &= ~Imm32; + break; + case O_absent: + case O_register: + abort (); + /* Symbols and expressions. */ + default: + /* Convert symbolic operand to proper sizes for matching. */ + switch (guess_suffix) + { + case QWORD_MNEM_SUFFIX: + i.types[op] = Imm64 | Imm32S; + break; + case LONG_MNEM_SUFFIX: + i.types[op] = Imm32 | Imm64; + break; + case WORD_MNEM_SUFFIX: + i.types[op] = Imm16 | Imm32 | Imm64; + break; + break; + case BYTE_MNEM_SUFFIX: + i.types[op] = Imm8 | Imm8S | Imm16 | Imm32S | Imm32; + break; + break; + } + break; } + } + } - /* If this operand is at most 16 bits, convert it to a - signed 16 bit number before trying to see whether it will - fit in an even smaller size. This allows a 16-bit operand - such as $0xffe0 to be recognised as within Imm8S range. */ - if ((i.types[op] & Imm16) - && (i.op[op].imms->X_add_number & ~(offsetT)0xffff) == 0) + if (i.disp_operands) + { + /* Try to use the smallest displacement type too. */ + int op; + + for (op = i.operands; --op >= 0;) + if ((i.types[op] & Disp) + && i.op[op].imms->X_op == O_constant) + { + offsetT disp = i.op[op].disps->X_add_number; + + if (i.types[op] & Disp16) + { + /* We know this operand is at most 16 bits, so + convert to a signed 16 bit number before trying + to see whether it will fit in an even smaller + size. */ + + disp = (((disp & 0xffff) ^ 0x8000) - 0x8000); + } + else if (i.types[op] & Disp32) + { + /* We know this operand is at most 32 bits, so convert to a + signed 32 bit number before trying to see whether it will + fit in an even smaller size. */ + disp &= (((offsetT) 2 << 31) - 1); + disp = (disp ^ ((offsetT) 1 << 31)) - ((addressT) 1 << 31); + } + if (flag_code == CODE_64BIT) { - i.op[op].imms->X_add_number = - (((i.op[op].imms->X_add_number & 0xffff) ^ 0x8000) - 0x8000); + if (fits_in_signed_long (disp)) + i.types[op] |= Disp32S; + if (fits_in_unsigned_long (disp)) + i.types[op] |= Disp32; } - i.types[op] |= smallest_imm_type ((long) i.op[op].imms->X_add_number); + if ((i.types[op] & (Disp32 | Disp32S | Disp16)) + && fits_in_signed_byte (disp)) + i.types[op] |= Disp8; } } @@ -1374,28 +1700,36 @@ md_assemble (line) ? No_sSuf : (i.suffix == LONG_MNEM_SUFFIX ? No_lSuf - : (i.suffix == DWORD_MNEM_SUFFIX - ? No_dSuf + : (i.suffix == QWORD_MNEM_SUFFIX + ? No_qSuf : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0)))))); for (t = current_templates->start; t < current_templates->end; t++) { - /* Must have right number of operands. */ + /* Must have right number of operands. */ if (i.operands != t->operands) continue; /* Check the suffix, except for some instructions in intel mode. */ if ((t->opcode_modifier & suffix_check) && !(intel_syntax + && (t->opcode_modifier & IgnoreSize)) + && !(intel_syntax && t->base_opcode == 0xd9 - && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */ - || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */ + && (t->extension_opcode == 5 /* 0xd9,5 "fldcw" */ + || t->extension_opcode == 7))) /* 0xd9,7 "f{n}stcw" */ continue; + /* Do not verify operands when there are none. */ else if (!t->operands) - break; /* 0 operands always matches */ + { + if (t->cpu_flags & ~cpu_arch_flags) + continue; + /* We've found a match; break out of loop. */ + break; + } overlap0 = i.types[0] & t->operand_types[0]; switch (t->operands) @@ -1414,12 +1748,11 @@ md_assemble (line) overlap1, i.types[1], t->operand_types[1])) { - - /* check if other direction is valid ... */ + /* Check if other direction is valid ... */ if ((t->opcode_modifier & (D|FloatD)) == 0) continue; - /* try reversing direction of operands */ + /* Try reversing direction of operands. */ overlap0 = i.types[0] & t->operand_types[1]; overlap1 = i.types[1] & t->operand_types[0]; if (!MATCH (overlap0, i.types[0], t->operand_types[1]) @@ -1429,16 +1762,15 @@ md_assemble (line) overlap1, i.types[1], t->operand_types[0])) { - /* does not match either direction */ + /* Does not match either direction. */ continue; } /* found_reverse_match holds which of D or FloatDR we've found. */ found_reverse_match = t->opcode_modifier & (D|FloatDR); - break; } - /* found a forward 2 operand match here */ - if (t->operands == 3) + /* Found a forward 2 operand match here. */ + else if (t->operands == 3) { /* Here we make use of the fact that there are no reverse match 3 operand instructions, and all 3 @@ -1453,29 +1785,41 @@ md_assemble (line) continue; } - /* found either forward/reverse 2 or 3 operand match here: - slip through to break */ + /* Found either forward/reverse 2 or 3 operand match here: + slip through to break. */ + } + if (t->cpu_flags & ~cpu_arch_flags) + { + found_reverse_match = 0; + continue; } - break; /* we've found a match; break out of loop */ - } /* for (t = ... */ + /* We've found a match; break out of loop. */ + break; + } if (t == current_templates->end) - { /* we found no match */ + { + /* We found no match. */ as_bad (_("suffix or operands invalid for `%s'"), current_templates->start->name); return; } - if (!intel_syntax - && (i.types[0] & JumpAbsolute) != (t->operand_types[0] & JumpAbsolute)) + if (!quiet_warnings) { - as_warn (_("indirect %s without `*'"), t->name); - } + if (!intel_syntax + && ((i.types[0] & JumpAbsolute) + != (t->operand_types[0] & JumpAbsolute))) + { + as_warn (_("indirect %s without `*'"), t->name); + } - if ((t->opcode_modifier & (IsPrefix|IgnoreSize)) == (IsPrefix|IgnoreSize)) - { - /* Warn them that a data or address size prefix doesn't affect - assembly of the next line of code. */ - as_warn (_("stand-alone `%s' prefix"), t->name); + if ((t->opcode_modifier & (IsPrefix|IgnoreSize)) + == (IsPrefix|IgnoreSize)) + { + /* Warn them that a data or address size prefix doesn't + affect assembly of the next line of code. */ + as_warn (_("stand-alone `%s' prefix"), t->name); + } } /* Copy the template we found. */ @@ -1493,16 +1837,16 @@ md_assemble (line) } /* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */ - if (SYSV386_COMPAT - && intel_syntax - && (i.tm.base_opcode & 0xfffffde0) == 0xdce0) - i.tm.base_opcode ^= FloatR; + if (SYSV386_COMPAT + && intel_syntax + && (i.tm.base_opcode & 0xfffffde0) == 0xdce0) + i.tm.base_opcode ^= FloatR; if (i.tm.opcode_modifier & FWait) if (! add_prefix (FWAIT_OPCODE)) return; - /* Check string instruction segment overrides */ + /* Check string instruction segment overrides. */ if ((i.tm.opcode_modifier & IsString) != 0 && i.mem_operands != 0) { int mem_op = (i.types[0] & AnyMem) ? 0 : 1; @@ -1533,31 +1877,47 @@ md_assemble (line) } } + if (i.reg_operands && flag_code < CODE_64BIT) + { + int op; + for (op = i.operands; --op >= 0;) + if ((i.types[op] & Reg) + && (i.op[op].regs->reg_flags & (RegRex64|RegRex))) + { + as_bad (_("Extended register `%%%s' available only in 64bit mode."), + i.op[op].regs->reg_name); + return; + } + } + /* If matched instruction specifies an explicit instruction mnemonic suffix, use it. */ - if (i.tm.opcode_modifier & (Size16 | Size32)) + if (i.tm.opcode_modifier & (Size16 | Size32 | Size64)) { if (i.tm.opcode_modifier & Size16) i.suffix = WORD_MNEM_SUFFIX; + else if (i.tm.opcode_modifier & Size64) + i.suffix = QWORD_MNEM_SUFFIX; else i.suffix = LONG_MNEM_SUFFIX; } else if (i.reg_operands) { /* If there's no instruction mnemonic suffix we try to invent one - based on register operands. */ + based on register operands. */ if (!i.suffix) { /* We take i.suffix from the last register operand specified, Destination register type is more significant than source register type. */ int op; - for (op = i.operands; --op >= 0; ) + for (op = i.operands; --op >= 0;) if ((i.types[op] & Reg) && !(i.tm.operand_types[op] & InOutPortReg)) { i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX : (i.types[op] & Reg16) ? WORD_MNEM_SUFFIX : + (i.types[op] & Reg64) ? QWORD_MNEM_SUFFIX : LONG_MNEM_SUFFIX); break; } @@ -1565,18 +1925,19 @@ md_assemble (line) else if (i.suffix == BYTE_MNEM_SUFFIX) { int op; - for (op = i.operands; --op >= 0; ) + for (op = i.operands; --op >= 0;) { /* If this is an eight bit register, it's OK. If it's the 16 or 32 bit version of an eight bit register, - we will just use the low portion, and that's OK too. */ + we will just use the low portion, and that's OK too. */ if (i.types[op] & Reg8) continue; - /* movzx and movsx should not generate this warning. */ + /* movzx and movsx should not generate this warning. */ if (intel_syntax && (i.tm.base_opcode == 0xfb7 || i.tm.base_opcode == 0xfb6 + || i.tm.base_opcode == 0x63 || i.tm.base_opcode == 0xfbe || i.tm.base_opcode == 0xfbf)) continue; @@ -1590,16 +1951,27 @@ md_assemble (line) #endif ) { + /* Prohibit these changes in the 64bit mode, since + the lowering is more complicated. */ + if (flag_code == CODE_64BIT + && (i.tm.operand_types[op] & InOutPortReg) == 0) + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); #if REGISTER_WARNINGS - if ((i.tm.operand_types[op] & InOutPortReg) == 0) + if (!quiet_warnings + && (i.tm.operand_types[op] & InOutPortReg) == 0) as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), - (i.op[op].regs - (i.types[op] & Reg16 ? 8 : 16))->reg_name, + (i.op[op].regs + + (i.types[op] & Reg16 + ? REGNAM_AL - REGNAM_AX + : REGNAM_AL - REGNAM_EAX))->reg_name, i.op[op].regs->reg_name, i.suffix); #endif continue; } - /* Any other register is bad */ + /* Any other register is bad. */ if (i.types[op] & (Reg | RegMMX | RegXMM | SReg2 | SReg3 | Control | Debug | Test @@ -1616,6 +1988,51 @@ md_assemble (line) else if (i.suffix == LONG_MNEM_SUFFIX) { int op; + + for (op = i.operands; --op >= 0;) + /* Reject eight bit registers, except where the template + requires them. (eg. movzb) */ + if ((i.types[op] & Reg8) != 0 + && (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0) + { + as_bad (_("`%%%s' not allowed with `%s%c'"), + i.op[op].regs->reg_name, + i.tm.name, + i.suffix); + return; + } + /* Warn if the e prefix on a general reg is missing. */ + else if ((!quiet_warnings || flag_code == CODE_64BIT) + && (i.types[op] & Reg16) != 0 + && (i.tm.operand_types[op] & (Reg32|Acc)) != 0) + { + /* Prohibit these changes in the 64bit mode, since + the lowering is more complicated. */ + if (flag_code == CODE_64BIT) + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); +#if REGISTER_WARNINGS + else + as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), + (i.op[op].regs + REGNAM_EAX - REGNAM_AX)->reg_name, + i.op[op].regs->reg_name, + i.suffix); +#endif + } + /* Warn if the r prefix on a general reg is missing. */ + else if ((i.types[op] & Reg64) != 0 + && (i.tm.operand_types[op] & (Reg32|Acc)) != 0) + { + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); + } + } + else if (i.suffix == QWORD_MNEM_SUFFIX) + { + int op; + for (op = i.operands; --op >= 0; ) /* Reject eight bit registers, except where the template requires them. (eg. movzb) */ @@ -1628,22 +2045,22 @@ md_assemble (line) i.suffix); return; } -#if REGISTER_WARNINGS /* Warn if the e prefix on a general reg is missing. */ - else if ((i.types[op] & Reg16) != 0 + else if (((i.types[op] & Reg16) != 0 + || (i.types[op] & Reg32) != 0) && (i.tm.operand_types[op] & (Reg32|Acc)) != 0) { - as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), - (i.op[op].regs + 8)->reg_name, - i.op[op].regs->reg_name, - i.suffix); + /* Prohibit these changes in the 64bit mode, since + the lowering is more complicated. */ + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); } -#endif } else if (i.suffix == WORD_MNEM_SUFFIX) { int op; - for (op = i.operands; --op >= 0; ) + for (op = i.operands; --op >= 0;) /* Reject eight bit registers, except where the template requires them. (eg. movzb) */ if ((i.types[op] & Reg8) != 0 @@ -1655,65 +2072,87 @@ md_assemble (line) i.suffix); return; } -#if REGISTER_WARNINGS /* Warn if the e prefix on a general reg is present. */ - else if ((i.types[op] & Reg32) != 0 + else if ((!quiet_warnings || flag_code == CODE_64BIT) + && (i.types[op] & Reg32) != 0 && (i.tm.operand_types[op] & (Reg16|Acc)) != 0) { - as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), - (i.op[op].regs - 8)->reg_name, - i.op[op].regs->reg_name, - i.suffix); - } + /* Prohibit these changes in the 64bit mode, since + the lowering is more complicated. */ + if (flag_code == CODE_64BIT) + as_bad (_("Incorrect register `%%%s' used with`%c' suffix"), + i.op[op].regs->reg_name, + i.suffix); + else +#if REGISTER_WARNINGS + as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"), + (i.op[op].regs + REGNAM_AX - REGNAM_EAX)->reg_name, + i.op[op].regs->reg_name, + i.suffix); #endif + } } + else if (intel_syntax && (i.tm.opcode_modifier & IgnoreSize)) + /* Do nothing if the instruction is going to ignore the prefix. */ + ; else - abort(); + abort (); } else if ((i.tm.opcode_modifier & DefaultSize) && !i.suffix) { i.suffix = stackop_size; } - /* Make still unresolved immediate matches conform to size of immediate given in i.suffix. Note: overlap2 cannot be an immediate! */ - if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32)) + if ((overlap0 & (Imm8 | Imm8S | Imm16 | Imm32 | Imm32S)) && overlap0 != Imm8 && overlap0 != Imm8S - && overlap0 != Imm16 && overlap0 != Imm32) + && overlap0 != Imm16 && overlap0 != Imm32S + && overlap0 != Imm32 && overlap0 != Imm64) { if (i.suffix) { overlap0 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) : - (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : Imm32)); + (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : + (i.suffix == QWORD_MNEM_SUFFIX ? Imm64 | Imm32S : Imm32))); } - else if (overlap0 == (Imm16 | Imm32)) + else if (overlap0 == (Imm16 | Imm32S | Imm32) + || overlap0 == (Imm16 | Imm32) + || overlap0 == (Imm16 | Imm32S)) { overlap0 = - (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32; + ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32S; } - else + if (overlap0 != Imm8 && overlap0 != Imm8S + && overlap0 != Imm16 && overlap0 != Imm32S + && overlap0 != Imm32 && overlap0 != Imm64) { as_bad (_("no instruction mnemonic suffix given; can't determine immediate size")); return; } } - if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32)) + if ((overlap1 & (Imm8 | Imm8S | Imm16 | Imm32S | Imm32)) && overlap1 != Imm8 && overlap1 != Imm8S - && overlap1 != Imm16 && overlap1 != Imm32) + && overlap1 != Imm16 && overlap1 != Imm32S + && overlap1 != Imm32 && overlap1 != Imm64) { if (i.suffix) { overlap1 &= (i.suffix == BYTE_MNEM_SUFFIX ? (Imm8 | Imm8S) : - (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : Imm32)); + (i.suffix == WORD_MNEM_SUFFIX ? Imm16 : + (i.suffix == QWORD_MNEM_SUFFIX ? Imm64 | Imm32S : Imm32))); } - else if (overlap1 == (Imm16 | Imm32)) + else if (overlap1 == (Imm16 | Imm32 | Imm32S) + || overlap1 == (Imm16 | Imm32) + || overlap1 == (Imm16 | Imm32S)) { overlap1 = - (flag_16bit_code ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32; + ((flag_code == CODE_16BIT) ^ (i.prefix[DATA_PREFIX] != 0)) ? Imm16 : Imm32S; } - else + if (overlap1 != Imm8 && overlap1 != Imm8S + && overlap1 != Imm16 && overlap1 != Imm32S + && overlap1 != Imm32 && overlap1 != Imm64) { - as_bad (_("no instruction mnemonic suffix given; can't determine immediate size")); + as_bad (_("no instruction mnemonic suffix given; can't determine immediate size %x %c"),overlap1, i.suffix); return; } } @@ -1723,7 +2162,7 @@ md_assemble (line) if (overlap0 & ImplicitRegister) i.reg_operands--; if (overlap0 & Imm1) - i.imm_operands = 0; /* kludge for shift insns */ + i.imm_operands = 0; /* kludge for shift insns. */ i.types[1] = overlap1; if (overlap1 & ImplicitRegister) @@ -1742,7 +2181,7 @@ md_assemble (line) return; } - /* For movzx and movsx, need to check the register type */ + /* For movzx and movsx, need to check the register type. */ if (intel_syntax && (i.tm.base_opcode == 0xfb6 || i.tm.base_opcode == 0xfbe)) if (i.suffix && i.suffix == BYTE_MNEM_SUFFIX) @@ -1767,8 +2206,8 @@ md_assemble (line) /* Now select between word & dword operations via the operand size prefix, except for instructions that will ignore this prefix anyway. */ - if (((intel_syntax && (i.suffix == DWORD_MNEM_SUFFIX)) - || i.suffix == LONG_MNEM_SUFFIX) == flag_16bit_code + if (i.suffix != QWORD_MNEM_SUFFIX + && (i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT) && !(i.tm.opcode_modifier & IgnoreSize)) { unsigned int prefix = DATA_PREFIX_OPCODE; @@ -1778,9 +2217,21 @@ md_assemble (line) if (! add_prefix (prefix)) return; } + + /* Set mode64 for an operand. */ + if (i.suffix == QWORD_MNEM_SUFFIX + && !(i.tm.opcode_modifier & NoRex64)) + { + i.rex.mode64 = 1; + if (flag_code < CODE_64BIT) + { + as_bad (_("64bit operations available only in 64bit modes.")); + return; + } + } + /* Size floating point instruction. */ - if (i.suffix == LONG_MNEM_SUFFIX - || (intel_syntax && i.suffix == DWORD_MNEM_SUFFIX)) + if (i.suffix == LONG_MNEM_SUFFIX) { if (i.tm.opcode_modifier & FloatMF) i.tm.base_opcode ^= 4; @@ -1796,7 +2247,7 @@ md_assemble (line) expressionS *exp; - assert(i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS); + assert (i.imm_operands == 0 && i.operands <= 2 && 2 < MAX_OPERANDS); exp = &im_expressions[i.imm_operands++]; i.op[i.operands].imms = exp; @@ -1806,7 +2257,7 @@ md_assemble (line) i.tm.extension_opcode = None; } - /* For insns with operands there are more diddles to do to the opcode. */ + /* For insns with operands there are more diddles to do to the opcode. */ if (i.operands) { /* Default segment register this instruction will use @@ -1820,33 +2271,35 @@ md_assemble (line) if (i.tm.opcode_modifier & regKludge) { unsigned int first_reg_op = (i.types[0] & Reg) ? 0 : 1; - /* Pretend we saw the extra register operand. */ - assert (i.op[first_reg_op+1].regs == 0); - i.op[first_reg_op+1].regs = i.op[first_reg_op].regs; - i.types[first_reg_op+1] = i.types[first_reg_op]; + /* Pretend we saw the extra register operand. */ + assert (i.op[first_reg_op + 1].regs == 0); + i.op[first_reg_op + 1].regs = i.op[first_reg_op].regs; + i.types[first_reg_op + 1] = i.types[first_reg_op]; i.reg_operands = 2; } if (i.tm.opcode_modifier & ShortForm) { - /* The register or float register operand is in operand 0 or 1. */ + /* The register or float register operand is in operand 0 or 1. */ unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1; - /* Register goes in low 3 bits of opcode. */ + /* Register goes in low 3 bits of opcode. */ i.tm.base_opcode |= i.op[op].regs->reg_num; - if ((i.tm.opcode_modifier & Ugh) != 0) + if (i.op[op].regs->reg_flags & RegRex) + i.rex.extZ = 1; + if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0) { /* Warn about some common errors, but press on regardless. The first case can be generated by gcc (<= 2.8.1). */ if (i.operands == 2) { - /* reversed arguments on faddp, fsubp, etc. */ + /* Reversed arguments on faddp, fsubp, etc. */ as_warn (_("translating to `%s %%%s,%%%s'"), i.tm.name, i.op[1].regs->reg_name, i.op[0].regs->reg_name); } else { - /* extraneous `l' suffix on fp insn */ + /* Extraneous `l' suffix on fp insn. */ as_warn (_("translating to `%s %%%s'"), i.tm.name, i.op[0].regs->reg_name); } @@ -1857,10 +2310,10 @@ md_assemble (line) /* The opcode is completed (modulo i.tm.extension_opcode which must be put into the modrm byte). Now, we make the modrm & index base bytes based on all the - info we've collected. */ + info we've collected. */ /* i.reg_operands MUST be the number of real register operands; - implicit registers do not count. */ + implicit registers do not count. */ if (i.reg_operands == 2) { unsigned int source, dest; @@ -1883,15 +2336,23 @@ md_assemble (line) { i.rm.reg = i.op[dest].regs->reg_num; i.rm.regmem = i.op[source].regs->reg_num; + if (i.op[dest].regs->reg_flags & RegRex) + i.rex.extX = 1; + if (i.op[source].regs->reg_flags & RegRex) + i.rex.extZ = 1; } else { i.rm.reg = i.op[source].regs->reg_num; i.rm.regmem = i.op[dest].regs->reg_num; + if (i.op[dest].regs->reg_flags & RegRex) + i.rex.extZ = 1; + if (i.op[source].regs->reg_flags & RegRex) + i.rex.extX = 1; } } else - { /* if it's not 2 reg operands... */ + { /* If it's not 2 reg operands... */ if (i.mem_operands) { unsigned int fake_zero_displacement = 0; @@ -1908,65 +2369,104 @@ md_assemble (line) fake_zero_displacement = 1; if (! i.index_reg) { - /* Operand is just */ - if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0)) + /* Operand is just */ + if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)) { i.rm.regmem = NO_BASE_REGISTER_16; i.types[op] &= ~Disp; i.types[op] |= Disp16; } - else + else if (flag_code != CODE_64BIT) { i.rm.regmem = NO_BASE_REGISTER; i.types[op] &= ~Disp; i.types[op] |= Disp32; } + else + { + /* 64bit mode overwrites the 32bit + absolute addressing by RIP relative + addressing and absolute addressing + is encoded by one of the redundant + SIB forms. */ + + i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; + i.sib.base = NO_BASE_REGISTER; + i.sib.index = NO_INDEX_REGISTER; + i.types[op] &= ~Disp; + i.types[op] |= Disp32S; + } } - else /* ! i.base_reg && i.index_reg */ + else /* ! i.base_reg && i.index_reg */ { i.sib.index = i.index_reg->reg_num; i.sib.base = NO_BASE_REGISTER; i.sib.scale = i.log2_scale_factor; i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; i.types[op] &= ~Disp; - i.types[op] |= Disp32; /* Must be 32 bit */ + if (flag_code != CODE_64BIT) + i.types[op] |= Disp32; /* Must be 32 bit */ + else + i.types[op] |= Disp32S; + if (i.index_reg->reg_flags & RegRex) + i.rex.extY = 1; } } + /* RIP addressing for 64bit mode. */ + else if (i.base_reg->reg_type == BaseIndex) + { + i.rm.regmem = NO_BASE_REGISTER; + i.types[op] &= ~Disp; + i.types[op] |= Disp32S; + i.flags[op] = Operand_PCrel; + } else if (i.base_reg->reg_type & Reg16) { switch (i.base_reg->reg_num) { - case 3: /* (%bx) */ + case 3: /* (%bx) */ if (! i.index_reg) i.rm.regmem = 7; - else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */ + else /* (%bx,%si) -> 0, or (%bx,%di) -> 1 */ i.rm.regmem = i.index_reg->reg_num - 6; break; - case 5: /* (%bp) */ + case 5: /* (%bp) */ default_seg = &ss; if (! i.index_reg) { i.rm.regmem = 6; if ((i.types[op] & Disp) == 0) { - /* fake (%bp) into 0(%bp) */ + /* fake (%bp) into 0(%bp) */ i.types[op] |= Disp8; fake_zero_displacement = 1; } } - else /* (%bp,%si) -> 2, or (%bp,%di) -> 3 */ + else /* (%bp,%si) -> 2, or (%bp,%di) -> 3 */ i.rm.regmem = i.index_reg->reg_num - 6 + 2; break; - default: /* (%si) -> 4 or (%di) -> 5 */ + default: /* (%si) -> 4 or (%di) -> 5 */ i.rm.regmem = i.base_reg->reg_num - 6 + 4; } i.rm.mode = mode_from_disp_size (i.types[op]); } - else /* i.base_reg and 32 bit mode */ + else /* i.base_reg and 32/64 bit mode */ { - i.rm.regmem = i.base_reg->reg_num; + if (flag_code == CODE_64BIT + && (i.types[op] & Disp)) + { + if (i.types[op] & Disp8) + i.types[op] = Disp8 | Disp32S; + else + i.types[op] = Disp32S; + } + i.rm.regmem = i.base_reg->reg_num; + if (i.base_reg->reg_flags & RegRex) + i.rex.extZ = 1; i.sib.base = i.base_reg->reg_num; - if (i.base_reg->reg_num == EBP_REG_NUM) + /* x86-64 ignores REX prefix bit here to avoid + decoder complications. */ + if ((i.base_reg->reg_num & 7) == EBP_REG_NUM) { default_seg = &ss; if (i.disp_operands == 0) @@ -2000,6 +2500,8 @@ md_assemble (line) { i.sib.index = i.index_reg->reg_num; i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING; + if (i.index_reg->reg_flags & RegRex) + i.rex.extY = 1; } i.rm.mode = mode_from_disp_size (i.types[op]); } @@ -2007,7 +2509,7 @@ md_assemble (line) if (fake_zero_displacement) { /* Fakes a zero displacement assuming that i.types[op] - holds the correct displacement size. */ + holds the correct displacement size. */ expressionS *exp; assert (i.op[op].disps == 0); @@ -2024,7 +2526,7 @@ md_assemble (line) operand (if any) based on i.tm.extension_opcode. Again, we must be careful to make sure that segment/control/debug/test/MMX registers are coded - into the i.rm.reg field. */ + into the i.rm.reg field. */ if (i.reg_operands) { unsigned int op = @@ -2040,11 +2542,19 @@ md_assemble (line) ? 1 : 2)); /* If there is an extension opcode to put here, the - register number must be put into the regmem field. */ + register number must be put into the regmem field. */ if (i.tm.extension_opcode != None) - i.rm.regmem = i.op[op].regs->reg_num; + { + i.rm.regmem = i.op[op].regs->reg_num; + if (i.op[op].regs->reg_flags & RegRex) + i.rex.extZ = 1; + } else - i.rm.reg = i.op[op].regs->reg_num; + { + i.rm.reg = i.op[op].regs->reg_num; + if (i.op[op].regs->reg_flags & RegRex) + i.rex.extX = 1; + } /* Now, if no memory operand has set i.rm.mode = 0, 1, 2 we must set it to 3 to indicate this is a register @@ -2053,19 +2563,22 @@ md_assemble (line) i.rm.mode = 3; } - /* Fill in i.rm.reg field with extension opcode (if any). */ + /* Fill in i.rm.reg field with extension opcode (if any). */ if (i.tm.extension_opcode != None) i.rm.reg = i.tm.extension_opcode; } } else if (i.tm.opcode_modifier & (Seg2ShortForm | Seg3ShortForm)) { - if (i.tm.base_opcode == POP_SEG_SHORT && i.op[0].regs->reg_num == 1) + if (i.tm.base_opcode == POP_SEG_SHORT + && i.op[0].regs->reg_num == 1) { as_bad (_("you can't `pop %%cs'")); return; } i.tm.base_opcode |= (i.op[0].regs->reg_num << 3); + if (i.op[0].regs->reg_flags & RegRex) + i.rex.extZ = 1; } else if ((i.tm.base_opcode & ~(D|W)) == MOV_AX_DISP32) { @@ -2090,14 +2603,14 @@ md_assemble (line) return; } } - else if ((i.tm.opcode_modifier & Ugh) != 0) + else if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0) { /* UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. */ as_warn (_("translating to `%sp'"), i.tm.name); } } - /* Handle conversion of 'int $3' --> special int3 insn. */ + /* Handle conversion of 'int $3' --> special int3 insn. */ if (i.tm.base_opcode == INT_OPCODE && i.op[0].imms->X_add_number == 3) { i.tm.base_opcode = INT3_OPCODE; @@ -2114,11 +2627,52 @@ md_assemble (line) i.op[0].disps->X_op = O_symbol; } - /* We are ready to output the insn. */ + if (i.tm.opcode_modifier & Rex64) + i.rex.mode64 = 1; + + /* For 8bit registers we would need an empty rex prefix. + Also in the case instruction is already having prefix, + we need to convert old registers to new ones. */ + + if (((i.types[0] & Reg8) && (i.op[0].regs->reg_flags & RegRex64)) + || ((i.types[1] & Reg8) && (i.op[1].regs->reg_flags & RegRex64)) + || ((i.rex.mode64 || i.rex.extX || i.rex.extY || i.rex.extZ || i.rex.empty) + && ((i.types[0] & Reg8) || (i.types[1] & Reg8)))) + { + int x; + i.rex.empty = 1; + for (x = 0; x < 2; x++) + { + /* Look for 8bit operand that does use old registers. */ + if (i.types[x] & Reg8 + && !(i.op[x].regs->reg_flags & RegRex64)) + { + /* In case it is "hi" register, give up. */ + if (i.op[x].regs->reg_num > 3) + as_bad (_("Can't encode registers '%%%s' in the instruction requiring REX prefix.\n"), + i.op[x].regs->reg_name); + + /* Otherwise it is equivalent to the extended register. + Since the encoding don't change this is merely cosmetical + cleanup for debug output. */ + + i.op[x].regs = i.op[x].regs + 8; + } + } + } + + if (i.rex.mode64 || i.rex.extX || i.rex.extY || i.rex.extZ || i.rex.empty) + add_prefix (0x40 + | (i.rex.mode64 ? 8 : 0) + | (i.rex.extX ? 4 : 0) + | (i.rex.extY ? 2 : 0) + | (i.rex.extZ ? 1 : 0)); + + /* We are ready to output the insn. */ { register char *p; - /* Output jumps. */ + /* Output jumps. */ if (i.tm.opcode_modifier & Jump) { int size; @@ -2126,7 +2680,7 @@ md_assemble (line) int prefix; code16 = 0; - if (flag_16bit_code) + if (flag_code == CODE_16BIT) code16 = CODE16; prefix = 0; @@ -2136,6 +2690,11 @@ md_assemble (line) i.prefixes -= 1; code16 ^= CODE16; } + if (i.prefix[REX_PREFIX]) + { + prefix++; + i.prefixes--; + } size = 4; if (code16) @@ -2153,8 +2712,10 @@ md_assemble (line) insn_size += prefix + 1; /* Prefix and 1 opcode byte go in fr_fix. */ p = frag_more (prefix + 1); - if (prefix) + if (i.prefix[DATA_PREFIX]) *p++ = DATA_PREFIX_OPCODE; + 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. */ @@ -2188,7 +2749,7 @@ md_assemble (line) int code16; code16 = 0; - if (flag_16bit_code) + if (flag_code == CODE_16BIT) code16 = CODE16; if (i.prefix[DATA_PREFIX]) @@ -2204,6 +2765,13 @@ md_assemble (line) size = 2; } + 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")); @@ -2214,7 +2782,7 @@ md_assemble (line) } else { - /* opcode can be at most two bytes */ + /* Opcode can be at most two bytes. */ insn_size += 2 + size; p = frag_more (2 + size); *p++ = (i.tm.base_opcode >> 8) & 0xff; @@ -2222,7 +2790,7 @@ md_assemble (line) *p++ = i.tm.base_opcode & 0xff; fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[0].disps, 1, reloc (size, 1, i.disp_reloc[0])); + i.op[0].disps, 1, reloc (size, 1, 1, i.disp_reloc[0])); } else if (i.tm.opcode_modifier & JumpInterSegment) { @@ -2231,7 +2799,7 @@ md_assemble (line) int code16; code16 = 0; - if (flag_16bit_code) + if (flag_code == CODE_16BIT) code16 = CODE16; prefix = 0; @@ -2241,6 +2809,11 @@ md_assemble (line) i.prefixes -= 1; code16 ^= CODE16; } + if (i.prefix[REX_PREFIX]) + { + prefix++; + i.prefixes -= 1; + } size = 4; if (code16) @@ -2249,14 +2822,20 @@ md_assemble (line) if (i.prefixes != 0 && !intel_syntax) as_warn (_("skipping prefixes on this instruction")); - insn_size += prefix + 1 + 2 + size; /* 1 opcode; 2 segment; offset */ + /* 1 opcode; 2 segment; offset */ + insn_size += prefix + 1 + 2 + size; p = frag_more (prefix + 1 + 2 + size); - if (prefix) + + if (i.prefix[DATA_PREFIX]) *p++ = DATA_PREFIX_OPCODE; + + if (i.prefix[REX_PREFIX]) + *p++ = i.prefix[REX_PREFIX]; + *p++ = i.tm.base_opcode; if (i.op[1].imms->X_op == O_constant) { - long n = (long) i.op[1].imms->X_add_number; + offsetT n = i.op[1].imms->X_add_number; if (size == 2 && !fits_in_unsigned_word (n) @@ -2265,11 +2844,11 @@ md_assemble (line) as_bad (_("16-bit jump out of range")); return; } - md_number_to_chars (p, (valueT) n, size); + md_number_to_chars (p, n, size); } else fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[1].imms, 0, reloc (size, 0, i.disp_reloc[0])); + i.op[1].imms, 0, reloc (size, 0, 0, i.disp_reloc[0])); if (i.op[0].imms->X_op != O_constant) as_bad (_("can't handle non absolute segment in `%s'"), i.tm.name); @@ -2277,10 +2856,15 @@ md_assemble (line) } else { - /* Output normal instructions here. */ + /* Output normal instructions here. */ unsigned char *q; - /* The prefix bytes. */ + /* All opcodes on i386 have eighter 1 or 2 bytes. We may use third + byte for the SSE instructions to specify prefix they require. */ + if (i.tm.base_opcode & 0xff0000) + add_prefix ((i.tm.base_opcode >> 16) & 0xff); + + /* The prefix bytes. */ for (q = i.prefix; q < i.prefix + sizeof (i.prefix) / sizeof (i.prefix[0]); q++) @@ -2293,37 +2877,20 @@ md_assemble (line) } } - /* Now the opcode; be careful about word order here! */ + /* 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 if (fits_in_unsigned_word (i.tm.base_opcode)) + else { insn_size += 2; p = frag_more (2); - /* put out high byte first: can't use md_number_to_chars! */ + /* Put out high byte first: can't use md_number_to_chars! */ *p++ = (i.tm.base_opcode >> 8) & 0xff; *p = i.tm.base_opcode & 0xff; } - else - { /* opcode is either 3 or 4 bytes */ - if (i.tm.base_opcode & 0xff000000) - { - insn_size += 4; - p = frag_more (4); - *p++ = (i.tm.base_opcode >> 24) & 0xff; - } - else - { - insn_size += 3; - p = frag_more (3); - } - *p++ = (i.tm.base_opcode >> 16) & 0xff; - *p++ = (i.tm.base_opcode >> 8) & 0xff; - *p = (i.tm.base_opcode) & 0xff; - } /* Now the modrm byte and sib byte (if present). */ if (i.tm.opcode_modifier & Modrm) @@ -2363,47 +2930,78 @@ md_assemble (line) { if (i.op[n].disps->X_op == O_constant) { - int size = 4; - long val = (long) i.op[n].disps->X_add_number; + int size; + offsetT val; - if (i.types[n] & (Disp8 | Disp16)) + size = 4; + if (i.types[n] & (Disp8 | Disp16 | Disp64)) { - long mask; - size = 2; - mask = ~ (long) 0xffff; if (i.types[n] & Disp8) - { - size = 1; - mask = ~ (long) 0xff; - } - - if ((val & mask) != 0 && (val & mask) != mask) - as_warn (_("%ld shortened to %ld"), - val, val & ~mask); + size = 1; + if (i.types[n] & Disp64) + size = 8; } + val = offset_in_range (i.op[n].disps->X_add_number, + size); insn_size += size; p = frag_more (size); - md_number_to_chars (p, (valueT) val, size); + md_number_to_chars (p, val, size); } else { int size = 4; + int sign = 0; + int pcrel = (i.flags[n] & Operand_PCrel) != 0; + + /* The PC relative address is computed relative + to the instruction boundary, so in case immediate + fields follows, we need to adjust the value. */ + if (pcrel && i.imm_operands) + { + int imm_size = 4; + register unsigned int n1; + + for (n1 = 0; n1 < i.operands; n1++) + if (i.types[n1] & Imm) + { + if (i.types[n1] & (Imm8 | Imm8S | Imm16 | Imm64)) + { + imm_size = 2; + if (i.types[n1] & (Imm8 | Imm8S)) + imm_size = 1; + if (i.types[n1] & Imm64) + imm_size = 8; + } + break; + } + /* We should find the immediate. */ + if (n1 == i.operands) + abort (); + i.op[n].disps->X_add_number -= imm_size; + } - if (i.types[n] & Disp16) - size = 2; + if (i.types[n] & Disp32S) + sign = 1; + + if (i.types[n] & (Disp16 | Disp64)) + { + size = 2; + if (i.types[n] & Disp64) + size = 8; + } insn_size += size; p = frag_more (size); fix_new_exp (frag_now, p - frag_now->fr_literal, size, - i.op[n].disps, 0, - reloc (size, 0, i.disp_reloc[n])); + i.op[n].disps, pcrel, + reloc (size, pcrel, sign, i.disp_reloc[n])); } } } - } /* end displacement output */ + } - /* output immediate */ + /* Output immediate. */ if (i.imm_operands) { register unsigned int n; @@ -2414,48 +3012,53 @@ md_assemble (line) { if (i.op[n].imms->X_op == O_constant) { - int size = 4; - long val = (long) i.op[n].imms->X_add_number; + int size; + offsetT val; - if (i.types[n] & (Imm8 | Imm8S | Imm16)) + size = 4; + if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64)) { - long mask; - size = 2; - mask = ~ (long) 0xffff; if (i.types[n] & (Imm8 | Imm8S)) - { - size = 1; - mask = ~ (long) 0xff; - } - if ((val & mask) != 0 && (val & mask) != mask) - as_warn (_("%ld shortened to %ld"), - val, val & ~mask); + size = 1; + else if (i.types[n] & Imm64) + size = 8; } + val = offset_in_range (i.op[n].imms->X_add_number, + size); insn_size += size; p = frag_more (size); - md_number_to_chars (p, (valueT) val, size); + md_number_to_chars (p, val, size); } else - { /* not absolute_section */ - /* Need a 32-bit fixup (don't support 8bit + { + /* Not absolute_section. + Need a 32-bit fixup (don't support 8bit non-absolute imms). Try to support other - sizes ... */ + sizes ... */ #ifdef BFD_ASSEMBLER enum bfd_reloc_code_real reloc_type; #else int reloc_type; #endif int size = 4; + int sign = 0; - if (i.types[n] & Imm16) - size = 2; - else if (i.types[n] & (Imm8 | Imm8S)) - size = 1; + if ((i.types[n] & (Imm32S)) + && i.suffix == QWORD_MNEM_SUFFIX) + sign = 1; + if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64)) + { + size = 2; + if (i.types[n] & (Imm8 | Imm8S)) + size = 1; + if (i.types[n] & Imm64) + size = 8; + } insn_size += size; p = frag_more (size); - reloc_type = reloc (size, 0, i.disp_reloc[0]); + reloc_type = reloc (size, 0, sign, i.disp_reloc[0]); #ifdef BFD_ASSEMBLER if (reloc_type == BFD_RELOC_32 && GOT_symbol @@ -2466,6 +3069,9 @@ md_assemble (line) (i.op[n].imms->X_op_symbol)->X_op) == O_subtract)))) { + /* We don't support dynamic linking on x86-64 yet. */ + if (flag_code == CODE_64BIT) + abort (); reloc_type = BFD_RELOC_386_GOTPC; i.op[n].imms->X_add_number += 3; } @@ -2475,15 +3081,17 @@ md_assemble (line) } } } - } /* end immediate output */ + } } + dwarf2_emit_insn (insn_size); + #ifdef DEBUG386 if (flag_debug) { pi (line, &i); } -#endif /* DEBUG386 */ +#endif /* DEBUG386 */ } } @@ -2495,7 +3103,7 @@ i386_immediate (imm_start) { char *save_input_line_pointer; segT exp_seg = 0; - expressionS * exp; + expressionS *exp; if (i.imm_operands == MAX_IMMEDIATE_OPERANDS) { @@ -2514,12 +3122,10 @@ i386_immediate (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... - */ + /* 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, '@'); @@ -2529,8 +3135,8 @@ i386_immediate (imm_start) int len = 0; int first; - /* GOT relocations are not supported in 16 bit mode */ - if (flag_16bit_code) + /* 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) @@ -2538,17 +3144,33 @@ i386_immediate (imm_start) if (strncmp (cp + 1, "PLT", 3) == 0) { - i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; + 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) { - i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; + 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 @@ -2557,7 +3179,7 @@ i386_immediate (imm_start) /* 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)); + tmpbuf = (char *) alloca (strlen (input_line_pointer)); memcpy (tmpbuf, input_line_pointer, first); tmpbuf[first] = ' '; strcpy (tmpbuf + first + 1, cp + 1 + len); @@ -2576,7 +3198,7 @@ i386_immediate (imm_start) if (exp->X_op == O_absent || exp->X_op == O_big) { - /* missing or bad expr becomes absolute 0 */ + /* Missing or bad expr becomes absolute 0. */ as_bad (_("missing or invalid immediate expression `%s' taken as 0"), imm_start); exp->X_op = O_constant; @@ -2584,17 +3206,21 @@ i386_immediate (imm_start) exp->X_add_symbol = (symbolS *) 0; exp->X_op_symbol = (symbolS *) 0; } - - if (exp->X_op == O_constant) + else if (exp->X_op == O_constant) { - i.types[this_operand] |= Imm32; /* Size it properly later. */ + /* Size it properly later. */ + i.types[this_operand] |= Imm64; + /* If BFD64, sign extend val. */ + if (!use_rela_relocations) + if ((exp->X_add_number & ~(((addressT) 2 << 31) - 1)) == 0) + exp->X_add_number = (exp->X_add_number ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31); } #if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT)) - else if ( + else if (1 #ifdef BFD_ASSEMBLER - OUTPUT_FLAVOR == bfd_target_aout_flavour && + && OUTPUT_FLAVOR == bfd_target_aout_flavour #endif - exp_seg != text_section + && exp_seg != text_section && exp_seg != data_section && exp_seg != bss_section && exp_seg != undefined_section @@ -2615,10 +3241,8 @@ i386_immediate (imm_start) { /* This is an address. The size of the address will be determined later, depending on destination register, - suffix, or the default for the section. We exclude - Imm8S here so that `push $foo' and other instructions - with an Imm8S form will use Imm16 or Imm32. */ - i.types[this_operand] |= (Imm8 | Imm16 | Imm32); + suffix, or the default for the section. */ + i.types[this_operand] |= Imm8 | Imm16 | Imm32 | Imm32S | Imm64; } return 1; @@ -2677,8 +3301,10 @@ i386_displacement (disp_start, disp_end) char *save_input_line_pointer; int bigdisp = Disp32; - if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0)) + if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)) bigdisp = Disp16; + if (flag_code == CODE_64BIT) + bigdisp = Disp64; i.types[this_operand] |= bigdisp; exp = &disp_expressions[i.disp_operands]; @@ -2727,20 +3353,17 @@ i386_displacement (disp_start, disp_end) rorl $16,%edx #NO_APP - So here we provide the missing zero. - */ + So here we provide the missing zero. */ *displacement_string_end = '0'; } #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... - */ + /* 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, '@'); @@ -2750,8 +3373,8 @@ i386_displacement (disp_start, disp_end) int len = 0; int first; - /* GOT relocations are not supported in 16 bit mode */ - if (flag_16bit_code) + /* 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) @@ -2759,17 +3382,32 @@ i386_displacement (disp_start, disp_end) if (strncmp (cp + 1, "PLT", 3) == 0) { - i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; + 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) { - i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; + 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 @@ -2778,7 +3416,7 @@ i386_displacement (disp_start, disp_end) /* 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)); + tmpbuf = (char *) alloca (strlen (input_line_pointer)); memcpy (tmpbuf, input_line_pointer, first); tmpbuf[first] = ' '; strcpy (tmpbuf + first + 1, cp + 1 + len); @@ -2792,16 +3430,20 @@ i386_displacement (disp_start, disp_end) #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) + 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 (S_IS_LOCAL(exp->X_add_symbol) + 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; - i.disp_reloc[this_operand] = BFD_RELOC_32; + if (i.disp_reloc[this_operand] == BFD_RELOC_X86_64_GOTPCREL) + i.disp_reloc[this_operand] = BFD_RELOC_32_PCREL; + else + i.disp_reloc[this_operand] = BFD_RELOC_32; } #endif @@ -2817,7 +3459,7 @@ i386_displacement (disp_start, disp_end) if (exp->X_op == O_absent || exp->X_op == O_big) { - /* missing or bad expr becomes absolute 0 */ + /* Missing or bad expr becomes absolute 0. */ as_bad (_("missing or invalid displacement expression `%s' taken as 0"), disp_start); exp->X_op = O_constant; @@ -2826,28 +3468,15 @@ i386_displacement (disp_start, disp_end) exp->X_op_symbol = (symbolS *) 0; } - if (exp->X_op == O_constant) - { - if (i.types[this_operand] & Disp16) - { - /* We know this operand is at most 16 bits, so convert to a - signed 16 bit number before trying to see whether it will - fit in an even smaller size. */ - exp->X_add_number = - (((exp->X_add_number & 0xffff) ^ 0x8000) - 0x8000); - } - if (fits_in_signed_byte (exp->X_add_number)) - i.types[this_operand] |= Disp8; - } #if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT)) - else if ( + if (exp->X_op != O_constant #ifdef BFD_ASSEMBLER - OUTPUT_FLAVOR == bfd_target_aout_flavour && + && OUTPUT_FLAVOR == bfd_target_aout_flavour #endif - exp_seg != text_section - && exp_seg != data_section - && exp_seg != bss_section - && exp_seg != undefined_section) + && exp_seg != text_section + && exp_seg != data_section + && exp_seg != bss_section + && exp_seg != undefined_section) { #ifdef BFD_ASSEMBLER as_bad (_("unimplemented segment %s in operand"), exp_seg->name); @@ -2857,239 +3486,72 @@ i386_displacement (disp_start, disp_end) return 0; } #endif + else if (flag_code == CODE_64BIT) + i.types[this_operand] |= Disp32S | Disp32; return 1; } -static int i386_operand_modifier PARAMS ((char **, int)); - -static int -i386_operand_modifier (op_string, got_a_float) - char **op_string; - int got_a_float; -{ - if (!strncasecmp (*op_string, "BYTE PTR", 8)) - { - i.suffix = BYTE_MNEM_SUFFIX; - *op_string += 8; - return BYTE_PTR; - - } - else if (!strncasecmp (*op_string, "WORD PTR", 8)) - { - if (got_a_float == 2) /* "fi..." */ - i.suffix = SHORT_MNEM_SUFFIX; - else - i.suffix = WORD_MNEM_SUFFIX; - *op_string += 8; - return WORD_PTR; - } - - else if (!strncasecmp (*op_string, "DWORD PTR", 9)) - { - if (got_a_float == 1) /* "f..." */ - i.suffix = SHORT_MNEM_SUFFIX; - else - i.suffix = LONG_MNEM_SUFFIX; - *op_string += 9; - return DWORD_PTR; - } - - else if (!strncasecmp (*op_string, "QWORD PTR", 9)) - { - i.suffix = DWORD_MNEM_SUFFIX; - *op_string += 9; - return QWORD_PTR; - } - - else if (!strncasecmp (*op_string, "XWORD PTR", 9)) - { - i.suffix = LONG_DOUBLE_MNEM_SUFFIX; - *op_string += 9; - return XWORD_PTR; - } - - else if (!strncasecmp (*op_string, "SHORT", 5)) - { - *op_string += 5; - return SHORT; - } - - else if (!strncasecmp (*op_string, "OFFSET FLAT:", 12)) - { - *op_string += 12; - return OFFSET_FLAT; - } - - else if (!strncasecmp (*op_string, "FLAT", 4)) - { - *op_string += 4; - return FLAT; - } - - else return NONE_FOUND; -} - -static char * build_displacement_string PARAMS ((int, char *)); - -static char * -build_displacement_string (initial_disp, op_string) - int initial_disp; - char *op_string; -{ - char *temp_string = (char *) malloc (strlen (op_string) + 1); - char *end_of_operand_string; - char *tc; - char *temp_disp; - - temp_string[0] = '\0'; - tc = end_of_operand_string = strchr (op_string, '['); - if (initial_disp && !end_of_operand_string) - { - strcpy (temp_string, op_string); - return temp_string; - } - - /* Build the whole displacement string */ - if (initial_disp) - { - strncpy (temp_string, op_string, end_of_operand_string - op_string); - temp_string[end_of_operand_string - op_string] = '\0'; - temp_disp = tc; - } - else - temp_disp = op_string; - - while (*temp_disp != '\0') - { - char *end_op; - int add_minus = (*temp_disp == '-'); - - if (*temp_disp == '+' || *temp_disp == '-' || *temp_disp == '[') - temp_disp++; - - if (is_space_char (*temp_disp)) - temp_disp++; - - /* Don't consider registers */ - if ( !((*temp_disp == REGISTER_PREFIX || allow_naked_reg) - && parse_register (temp_disp, &end_op)) ) - { - char *string_start = temp_disp; - - while (*temp_disp != ']' - && *temp_disp != '+' - && *temp_disp != '-' - && *temp_disp != '*') - ++temp_disp; - - if (add_minus) - strcat (temp_string, "-"); - else - strcat (temp_string, "+"); - - strncat (temp_string, string_start, temp_disp - string_start); - if (*temp_disp == '+' || *temp_disp == '-') - --temp_disp; - } - - while (*temp_disp != '\0' - && *temp_disp != '+' - && *temp_disp != '-') - ++temp_disp; - } - - return temp_string; -} - -static int i386_parse_seg PARAMS ((char *)); - -static int -i386_parse_seg (op_string) - char *op_string; -{ - if (is_space_char (*op_string)) - ++op_string; - - /* Should be one of es, cs, ss, ds fs or gs */ - switch (*op_string++) - { - case 'e': - i.seg[i.mem_operands] = &es; - break; - case 'c': - i.seg[i.mem_operands] = &cs; - break; - case 's': - i.seg[i.mem_operands] = &ss; - break; - case 'd': - i.seg[i.mem_operands] = &ds; - break; - case 'f': - i.seg[i.mem_operands] = &fs; - break; - case 'g': - i.seg[i.mem_operands] = &gs; - break; - default: - as_bad (_("bad segment name `%s'"), op_string); - return 0; - } - - if (*op_string++ != 's') - { - as_bad (_("bad segment name `%s'"), op_string); - return 0; - } - - if (is_space_char (*op_string)) - ++op_string; - - if (*op_string != ':') - { - as_bad (_("bad segment name `%s'"), op_string); - return 0; - } - - return 1; - -} - -static int i386_index_check PARAMS((const char *)); +static int i386_index_check PARAMS ((const char *)); /* Make sure the memory operand we've been dealt is valid. - Returns 1 on success, 0 on a failure. -*/ + Return 1 on success, 0 on a failure. */ + static int i386_index_check (operand_string) const char *operand_string; { + int ok; #if INFER_ADDR_PREFIX int fudged = 0; tryprefix: #endif - if (flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0) - /* 16 bit mode checks */ - ? ((i.base_reg - && ((i.base_reg->reg_type & (Reg16|BaseIndex)) - != (Reg16|BaseIndex))) - || (i.index_reg - && (((i.index_reg->reg_type & (Reg16|BaseIndex)) - != (Reg16|BaseIndex)) - || ! (i.base_reg - && i.base_reg->reg_num < 6 - && i.index_reg->reg_num >= 6 - && i.log2_scale_factor == 0)))) - /* 32 bit mode checks */ - : ((i.base_reg - && (i.base_reg->reg_type & Reg32) == 0) - || (i.index_reg - && ((i.index_reg->reg_type & (Reg32|BaseIndex)) - != (Reg32|BaseIndex))))) + ok = 1; + if (flag_code == CODE_64BIT) + { + /* 64bit checks. */ + if ((i.base_reg + && ((i.base_reg->reg_type & Reg64) == 0) + && (i.base_reg->reg_type != BaseIndex + || i.index_reg)) + || (i.index_reg + && ((i.index_reg->reg_type & (Reg64|BaseIndex)) + != (Reg64|BaseIndex)))) + ok = 0; + } + else + { + if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)) + { + /* 16bit checks. */ + if ((i.base_reg + && ((i.base_reg->reg_type & (Reg16|BaseIndex|RegRex)) + != (Reg16|BaseIndex))) + || (i.index_reg + && (((i.index_reg->reg_type & (Reg16|BaseIndex)) + != (Reg16|BaseIndex)) + || ! (i.base_reg + && i.base_reg->reg_num < 6 + && i.index_reg->reg_num >= 6 + && i.log2_scale_factor == 0)))) + ok = 0; + } + else + { + /* 32bit checks. */ + if ((i.base_reg + && (i.base_reg->reg_type & (Reg32 | RegRex)) != Reg32) + || (i.index_reg + && ((i.index_reg->reg_type & (Reg32|BaseIndex|RegRex)) + != (Reg32|BaseIndex)))) + ok = 0; + } + } + if (!ok) { #if INFER_ADDR_PREFIX - if (i.prefix[ADDR_PREFIX] == 0 && stackop_size != '\0') + if (flag_code != CODE_64BIT + && i.prefix[ADDR_PREFIX] == 0 && stackop_size != '\0') { i.prefix[ADDR_PREFIX] = ADDR_PREFIX_OPCODE; i.prefixes += 1; @@ -3097,8 +3559,7 @@ i386_index_check (operand_string) Disp16 or Disp32 is set. FIXME. There doesn't seem to be any real need for separate Disp16 and Disp32 flags. The same goes for Imm16 and Imm32. - Removing them would probably clean up the code quite a lot. - */ + Removing them would probably clean up the code quite a lot. */ if (i.types[this_operand] & (Disp16|Disp32)) i.types[this_operand] ^= (Disp16|Disp32); fudged = 1; @@ -3111,313 +3572,67 @@ i386_index_check (operand_string) #endif as_bad (_("`%s' is not a valid %s bit base/index expression"), operand_string, - flag_16bit_code ^ (i.prefix[ADDR_PREFIX] != 0) ? "16" : "32"); + flag_code_names[flag_code]); return 0; } return 1; } -static int i386_intel_memory_operand PARAMS ((char *)); +/* Parse OPERAND_STRING into the i386_insn structure I. Returns non-zero + on error. */ static int -i386_intel_memory_operand (operand_string) +i386_operand (operand_string) char *operand_string; { + const reg_entry *r; + char *end_op; char *op_string = operand_string; - char *end_of_operand_string; - - if ((i.mem_operands == 1 - && (current_templates->start->opcode_modifier & IsString) == 0) - || i.mem_operands == 2) - { - as_bad (_("too many memory references for `%s'"), - current_templates->start->name); - return 0; - } - - /* First check for a segment override. */ - if (*op_string != '[') - { - char *end_seg; - end_seg = strchr (op_string, ':'); - if (end_seg) - { - if (!i386_parse_seg (op_string)) - return 0; - op_string = end_seg + 1; - } - } + if (is_space_char (*op_string)) + ++op_string; - /* Look for displacement preceding open bracket */ - if (*op_string != '[') + /* We check for an absolute prefix (differentiating, + for example, 'jmp pc_relative_label' from 'jmp *absolute_label'. */ + if (*op_string == ABSOLUTE_PREFIX) { - char *temp_string; - - if (i.disp_operands) - return 0; - - temp_string = build_displacement_string (true, op_string); - - if (!i386_displacement (temp_string, temp_string + strlen (temp_string))) - { - free (temp_string); - return 0; - } - free (temp_string); - - end_of_operand_string = strchr (op_string, '['); - if (!end_of_operand_string) - end_of_operand_string = op_string + strlen (op_string); - - if (is_space_char (*end_of_operand_string)) - --end_of_operand_string; - - op_string = end_of_operand_string; + ++op_string; + if (is_space_char (*op_string)) + ++op_string; + i.types[this_operand] |= JumpAbsolute; } - if (*op_string == '[') + /* Check if operand is a register. */ + if ((*op_string == REGISTER_PREFIX || allow_naked_reg) + && (r = parse_register (op_string, &end_op)) != NULL) { - ++op_string; - - /* Pick off each component and figure out where it belongs */ - - end_of_operand_string = op_string; - - while (*op_string != ']') + /* Check for a segment override by searching for ':' after a + segment register. */ + op_string = end_op; + if (is_space_char (*op_string)) + ++op_string; + if (*op_string == ':' && (r->reg_type & (SReg2 | SReg3))) { - const reg_entry *temp_reg; - char *end_op; - char *temp_string; - - while (*end_of_operand_string != '+' - && *end_of_operand_string != '-' - && *end_of_operand_string != '*' - && *end_of_operand_string != ']') - end_of_operand_string++; - - temp_string = op_string; - if (*temp_string == '+') + switch (r->reg_num) { - ++temp_string; - if (is_space_char (*temp_string)) - ++temp_string; - } - - if ((*temp_string == REGISTER_PREFIX || allow_naked_reg) - && (temp_reg = parse_register (temp_string, &end_op)) != NULL) - { - if (i.base_reg == NULL) - i.base_reg = temp_reg; - else - i.index_reg = temp_reg; - - i.types[this_operand] |= BaseIndex; - } - else if (*temp_string == REGISTER_PREFIX) - { - as_bad (_("bad register name `%s'"), temp_string); - return 0; - } - else if (is_digit_char (*op_string) - || *op_string == '+' || *op_string == '-') - { - char *temp_str; - - if (i.disp_operands != 0) - return 0; - - temp_string = build_displacement_string (false, op_string); - - temp_str = temp_string; - if (*temp_str == '+') - ++temp_str; - - if (!i386_displacement (temp_str, temp_str + strlen (temp_str))) - { - free (temp_string); - return 0; - } - free (temp_string); - - ++op_string; - end_of_operand_string = op_string; - while (*end_of_operand_string != ']' - && *end_of_operand_string != '+' - && *end_of_operand_string != '-' - && *end_of_operand_string != '*') - ++end_of_operand_string; - } - else if (*op_string == '*') - { - ++op_string; - - if (i.base_reg && !i.index_reg) - { - i.index_reg = i.base_reg; - i.base_reg = 0; - } - - if (!i386_scale (op_string)) - return 0; - } - op_string = end_of_operand_string; - ++end_of_operand_string; - } - } - - if (i386_index_check (operand_string) == 0) - return 0; - - i.mem_operands++; - return 1; -} - -static int -i386_intel_operand (operand_string, got_a_float) - char *operand_string; - int got_a_float; -{ - const reg_entry * r; - char *end_op; - char *op_string = operand_string; - - int operand_modifier = i386_operand_modifier (&op_string, got_a_float); - if (is_space_char (*op_string)) - ++op_string; - - switch (operand_modifier) - { - case BYTE_PTR: - case WORD_PTR: - case DWORD_PTR: - case QWORD_PTR: - case XWORD_PTR: - if (!i386_intel_memory_operand (op_string)) - return 0; - break; - - case FLAT: - case OFFSET_FLAT: - if (!i386_immediate (op_string)) - return 0; - break; - - case SHORT: - case NONE_FOUND: - /* Should be register or immediate */ - if (is_digit_char (*op_string) - && strchr (op_string, '[') == 0) - { - if (!i386_immediate (op_string)) - return 0; - } - else if ((*op_string == REGISTER_PREFIX || allow_naked_reg) - && (r = parse_register (op_string, &end_op)) != NULL) - { - /* Check for a segment override by searching for ':' after a - segment register. */ - op_string = end_op; - if (is_space_char (*op_string)) - ++op_string; - if (*op_string == ':' && (r->reg_type & (SReg2 | SReg3))) - { - switch (r->reg_num) - { - case 0: - i.seg[i.mem_operands] = &es; - break; - case 1: - i.seg[i.mem_operands] = &cs; - break; - case 2: - i.seg[i.mem_operands] = &ss; - break; - case 3: - i.seg[i.mem_operands] = &ds; - break; - case 4: - i.seg[i.mem_operands] = &fs; - break; - case 5: - i.seg[i.mem_operands] = &gs; - break; - } - - } - i.types[this_operand] |= r->reg_type & ~BaseIndex; - i.op[this_operand].regs = r; - i.reg_operands++; - } - else if (*op_string == REGISTER_PREFIX) - { - as_bad (_("bad register name `%s'"), op_string); - return 0; - } - else if (!i386_intel_memory_operand (op_string)) - return 0; - - break; - } /* end switch */ - - return 1; -} - -/* Parse OPERAND_STRING into the i386_insn structure I. Returns non-zero - on error. */ - -static int -i386_operand (operand_string) - char *operand_string; -{ - const reg_entry *r; - char *end_op; - char *op_string = operand_string; - - if (is_space_char (*op_string)) - ++op_string; - - /* We check for an absolute prefix (differentiating, - for example, 'jmp pc_relative_label' from 'jmp *absolute_label'. */ - if (*op_string == ABSOLUTE_PREFIX) - { - ++op_string; - if (is_space_char (*op_string)) - ++op_string; - i.types[this_operand] |= JumpAbsolute; - } - - /* Check if operand is a register. */ - if ((*op_string == REGISTER_PREFIX || allow_naked_reg) - && (r = parse_register (op_string, &end_op)) != NULL) - { - /* Check for a segment override by searching for ':' after a - segment register. */ - op_string = end_op; - if (is_space_char (*op_string)) - ++op_string; - if (*op_string == ':' && (r->reg_type & (SReg2 | SReg3))) - { - switch (r->reg_num) - { - case 0: - i.seg[i.mem_operands] = &es; - break; - case 1: - i.seg[i.mem_operands] = &cs; - break; - case 2: - i.seg[i.mem_operands] = &ss; - break; - case 3: - i.seg[i.mem_operands] = &ds; - break; - case 4: - i.seg[i.mem_operands] = &fs; - break; - case 5: - i.seg[i.mem_operands] = &gs; - break; + case 0: + i.seg[i.mem_operands] = &es; + break; + case 1: + i.seg[i.mem_operands] = &cs; + break; + case 2: + i.seg[i.mem_operands] = &ss; + break; + case 3: + i.seg[i.mem_operands] = &ds; + break; + case 4: + i.seg[i.mem_operands] = &fs; + break; + case 5: + i.seg[i.mem_operands] = &gs; + break; } /* Skip the ':' and whitespace. */ @@ -3433,7 +3648,7 @@ i386_operand (operand_string) as_bad (_("bad memory operand `%s'"), op_string); return 0; } - /* Handle case of %es:*foo. */ + /* Handle case of %es:*foo. */ if (*op_string == ABSOLUTE_PREFIX) { ++op_string; @@ -3458,7 +3673,7 @@ i386_operand (operand_string) return 0; } else if (*op_string == IMMEDIATE_PREFIX) - { /* ... or an immediate */ + { ++op_string; if (i.types[this_operand] & JumpAbsolute) { @@ -3470,12 +3685,12 @@ i386_operand (operand_string) } else if (is_digit_char (*op_string) || is_identifier_char (*op_string) - || *op_string == '(' ) + || *op_string == '(') { - /* This is a memory reference of some sort. */ + /* This is a memory reference of some sort. */ char *base_string; - /* Start and end of displacement string expression (if found). */ + /* Start and end of displacement string expression (if found). */ char *displacement_string_start; char *displacement_string_end; @@ -3499,7 +3714,7 @@ i386_operand (operand_string) if (is_space_char (*base_string)) --base_string; - /* If we only have a displacement, set-up for it to be parsed later. */ + /* If we only have a displacement, set-up for it to be parsed later. */ displacement_string_start = op_string; displacement_string_end = base_string + 1; @@ -3508,7 +3723,7 @@ i386_operand (operand_string) char *temp_string; unsigned int parens_balanced = 1; /* We've already checked that the number of left & right ()'s are - equal, so this loop will not be infinite. */ + equal, so this loop will not be infinite. */ do { base_string--; @@ -3560,7 +3775,7 @@ i386_operand (operand_string) if (is_space_char (*base_string)) ++base_string; } - else if (*base_string != ')' ) + else if (*base_string != ')') { as_bad (_("expecting `,' or `)' after index register in `%s'"), operand_string); @@ -3573,7 +3788,7 @@ i386_operand (operand_string) return 0; } - /* Check for scale factor. */ + /* Check for scale factor. */ if (isdigit ((unsigned char) *base_string)) { if (!i386_scale (base_string)) @@ -3637,14 +3852,15 @@ i386_operand (operand_string) i.mem_operands++; } else - { /* it's not a memory operand; argh! */ + { + /* It's not a memory operand; argh! */ as_bad (_("invalid char %s beginning operand %d `%s'"), output_invalid (*op_string), this_operand + 1, op_string); return 0; } - return 1; /* normal return */ + return 1; /* Normal return. */ } /* md_estimate_size_before_relax() @@ -3670,7 +3886,7 @@ md_estimate_size_before_relax (fragP, segment) an externally visible symbol, because it may be overridden by a shared library. */ if (S_GET_SEGMENT (fragP->fr_symbol) != segment -#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined (TE_PE) +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || S_IS_EXTERNAL (fragP->fr_symbol) || S_IS_WEAK (fragP->fr_symbol) #endif @@ -3699,8 +3915,9 @@ md_estimate_size_before_relax (fragP, segment) switch (opcode[0]) { - case JUMP_PC_RELATIVE: /* make jmp (0xeb) a dword displacement jump */ - opcode[0] = 0xe9; /* dword disp jmp */ + case JUMP_PC_RELATIVE: + /* Make jmp (0xeb) a dword displacement jump. */ + opcode[0] = 0xe9; fragP->fr_fix += size; fix_new (fragP, old_fr_fix, size, fragP->fr_symbol, @@ -3713,7 +3930,8 @@ md_estimate_size_before_relax (fragP, segment) to the dword-displacement jump 0x0f,0x8N. */ opcode[1] = opcode[0] + 0x10; opcode[0] = TWO_BYTE_OPCODE_ESCAPE; - fragP->fr_fix += 1 + size; /* we've added an opcode byte */ + /* We've added an opcode byte. */ + fragP->fr_fix += 1 + size; fix_new (fragP, old_fr_fix + 1, size, fragP->fr_symbol, fragP->fr_offset, 1, @@ -3723,20 +3941,19 @@ md_estimate_size_before_relax (fragP, segment) frag_wane (fragP); return fragP->fr_fix - old_fr_fix; } - return 1; /* Guess a short jump. */ + /* Guess a short jump. */ + return 1; } -/* - * md_convert_frag(); - * - * Called after relax() is finished. - * In: Address of frag. - * fr_type == rs_machine_dependent. - * fr_subtype is what the address relaxed to. - * - * Out: Any fixSs and constants are set up. - * Caller will turn frag into a ".space 0". - */ +/* Called after relax() is finished. + + In: Address of frag. + fr_type == rs_machine_dependent. + fr_subtype is what the address relaxed to. + + Out: Any fixSs and constants are set up. + Caller will turn frag into a ".space 0". */ + #ifndef BFD_ASSEMBLER void md_convert_frag (headers, sec, fragP) @@ -3753,23 +3970,29 @@ md_convert_frag (abfd, sec, fragP) { register unsigned char *opcode; unsigned char *where_to_put_displacement = NULL; - unsigned int target_address; - unsigned int opcode_address; + offsetT target_address; + offsetT opcode_address; unsigned int extension = 0; - int displacement_from_opcode_start; + offsetT displacement_from_opcode_start; opcode = (unsigned char *) fragP->fr_opcode; - /* Address we want to reach in file space. */ + /* Address we want to reach in file space. */ target_address = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset; -#ifdef BFD_ASSEMBLER /* not needed otherwise? */ - target_address += symbol_get_frag (fragP->fr_symbol)->fr_address; +#ifdef BFD_ASSEMBLER + /* Not needed otherwise? */ + { + /* Local symbols which have already been resolved have a NULL frags. */ + fragS *sym_frag = symbol_get_frag (fragP->fr_symbol); + if (sym_frag) + target_address += sym_frag->fr_address; + } #endif - /* Address opcode resides at in file space. */ + /* Address opcode resides at in file space. */ opcode_address = fragP->fr_address + fragP->fr_fix; - /* Displacement from opcode start to fill into instruction. */ + /* Displacement from opcode start to fill into instruction. */ displacement_from_opcode_start = target_address - opcode_address; switch (fragP->fr_subtype) @@ -3778,33 +4001,33 @@ md_convert_frag (abfd, sec, fragP) 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 */ + /* Don't have to change opcode. */ + extension = 1; /* 1 opcode + 1 displacement */ where_to_put_displacement = &opcode[1]; break; case ENCODE_RELAX_STATE (COND_JUMP, BIG): - extension = 5; /* 2 opcode + 4 displacement */ + 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, BIG): - extension = 4; /* 1 opcode + 4 displacement */ + extension = 4; /* 1 opcode + 4 displacement */ opcode[0] = 0xe9; where_to_put_displacement = &opcode[1]; break; case ENCODE_RELAX_STATE (COND_JUMP, BIG16): - extension = 3; /* 2 opcode + 2 displacement */ + 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 (UNCOND_JUMP, BIG16): - extension = 2; /* 1 opcode + 2 displacement */ + extension = 2; /* 1 opcode + 2 displacement */ opcode[0] = 0xe9; where_to_put_displacement = &opcode[1]; break; @@ -3813,17 +4036,21 @@ md_convert_frag (abfd, sec, fragP) BAD_CASE (fragP->fr_subtype); break; } - /* now put displacement after opcode */ + /* 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)); fragP->fr_fix += extension; } +/* Size of byte displacement jmp. */ +int md_short_jump_size = 2; + +/* Size of dword displacement jmp. */ +int md_long_jump_size = 5; -int md_short_jump_size = 2; /* size of byte displacement jmp */ -int md_long_jump_size = 5; /* size of dword displacement jmp */ -const int md_reloc_size = 8; /* Size of relocation record */ +/* Size of relocation record. */ +const int md_reloc_size = 8; void md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol) @@ -3832,10 +4059,11 @@ md_create_short_jump (ptr, from_addr, to_addr, frag, to_symbol) fragS *frag ATTRIBUTE_UNUSED; symbolS *to_symbol ATTRIBUTE_UNUSED; { - long offset; + offsetT offset; offset = to_addr - (from_addr + 2); - md_number_to_chars (ptr, (valueT) 0xeb, 1); /* opcode for byte-disp jump */ + /* Opcode for byte-disp jump. */ + md_number_to_chars (ptr, (valueT) 0xeb, 1); md_number_to_chars (ptr + 1, (valueT) offset, 1); } @@ -3843,25 +4071,14 @@ void md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol) char *ptr; addressT from_addr, to_addr; - fragS *frag; - symbolS *to_symbol; + fragS *frag ATTRIBUTE_UNUSED; + symbolS *to_symbol ATTRIBUTE_UNUSED; { - long offset; + offsetT offset; - if (flag_do_long_jump) - { - offset = to_addr - S_GET_VALUE (to_symbol); - md_number_to_chars (ptr, (valueT) 0xe9, 1);/* opcode for long jmp */ - md_number_to_chars (ptr + 1, (valueT) offset, 4); - fix_new (frag, (ptr + 1) - frag->fr_literal, 4, - to_symbol, (offsetT) 0, 0, BFD_RELOC_32); - } - else - { - offset = to_addr - (from_addr + 5); - md_number_to_chars (ptr, (valueT) 0xe9, 1); - md_number_to_chars (ptr + 1, (valueT) offset, 4); - } + offset = to_addr - (from_addr + 5); + md_number_to_chars (ptr, (valueT) 0xe9, 1); + md_number_to_chars (ptr + 1, (valueT) offset, 4); } /* Apply a fixup (fixS) to segment data, once it has been determined @@ -3873,9 +4090,14 @@ md_create_long_jump (ptr, from_addr, to_addr, frag, to_symbol) int md_apply_fix3 (fixP, valp, seg) - fixS *fixP; /* The fix we're to put in. */ - valueT *valp; /* Pointer to the value of the bits. */ - segT seg ATTRIBUTE_UNUSED; /* Segment fix is from. */ + /* The fix we're to put in. */ + fixS *fixP; + + /* Pointer to the value of the bits. */ + valueT *valp; + + /* Segment fix is from. */ + segT seg ATTRIBUTE_UNUSED; { register char *p = fixP->fx_where + fixP->fx_frag->fr_literal; valueT value = *valp; @@ -3907,7 +4129,7 @@ md_apply_fix3 (fixP, valp, seg) if ((fixP->fx_r_type == BFD_RELOC_32_PCREL || fixP->fx_r_type == BFD_RELOC_16_PCREL || fixP->fx_r_type == BFD_RELOC_8_PCREL) - && fixP->fx_addsy) + && fixP->fx_addsy && !use_rela_relocations) { #ifndef OBJ_AOUT if (OUTPUT_FLAVOR == bfd_target_elf_flavour @@ -3943,49 +4165,25 @@ md_apply_fix3 (fixP, valp, seg) address offset for a PC relative symbol. */ if (S_GET_SEGMENT (fixP->fx_addsy) != seg) value += md_pcrel_from (fixP); - else if (S_IS_EXTERNAL (fixP->fx_addsy) - || S_IS_WEAK (fixP->fx_addsy)) - { - /* We are generating an external relocation for this defined - symbol. We add the address, because - bfd_install_relocation will subtract it. VALUE already - holds the symbol value, because fixup_segment added it - in. We subtract it out, and then we subtract it out - again because bfd_install_relocation will add it in - again. */ - value += md_pcrel_from (fixP); - value -= 2 * S_GET_VALUE (fixP->fx_addsy); - } #endif } -#ifdef TE_PE - else if (fixP->fx_addsy != NULL - && S_IS_DEFINED (fixP->fx_addsy) - && (S_IS_EXTERNAL (fixP->fx_addsy) - || S_IS_WEAK (fixP->fx_addsy))) - { - /* We are generating an external relocation for this defined - symbol. VALUE already holds the symbol value, and - bfd_install_relocation will add it in again. We don't want - either addition. */ - value -= 2 * S_GET_VALUE (fixP->fx_addsy); - } -#endif /* Fix a few things - the dynamic linker expects certain values here, - and we must not dissappoint it. */ + and we must not dissappoint it. */ #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) if (OUTPUT_FLAVOR == bfd_target_elf_flavour && fixP->fx_addsy) - switch (fixP->fx_r_type) { - case BFD_RELOC_386_PLT32: - /* Make the jump instruction point to the address of the operand. At - runtime we merely add the offset to the actual PLT entry. */ - value = 0xfffffffc; - break; - case BFD_RELOC_386_GOTPC: -/* - * This is tough to explain. We end up with this one if we have + switch (fixP->fx_r_type) + { + case BFD_RELOC_386_PLT32: + case BFD_RELOC_X86_64_PLT32: + /* Make the jump instruction point to the address of the operand. At + runtime we merely add the offset to the actual PLT entry. */ + value = -4; + break; + case BFD_RELOC_386_GOTPC: + +/* This is tough to explain. We end up with this one if we have * operands that look like "_GLOBAL_OFFSET_TABLE_+[.-.L284]". The goal * here is to obtain the absolute address of the GOT, and it is strongly * preferable from a performance point of view to avoid using a runtime @@ -4020,55 +4218,55 @@ md_apply_fix3 (fixP, valp, seg) * explicitly mentioned, and I wonder whether it would simplify matters * to do it this way. Who knows. In earlier versions of the PIC patches, * the pcrel_adjust field was used to store the correction, but since the - * expression is not pcrel, I felt it would be confusing to do it this way. - */ - value -= 1; - break; - case BFD_RELOC_386_GOT32: - value = 0; /* Fully resolved at runtime. No addend. */ - break; - case BFD_RELOC_386_GOTOFF: - break; - - case BFD_RELOC_VTABLE_INHERIT: - case BFD_RELOC_VTABLE_ENTRY: - fixP->fx_done = 0; - return 1; + * expression is not pcrel, I felt it would be confusing to do it this + * way. */ + + value -= 1; + break; + case BFD_RELOC_386_GOT32: + case BFD_RELOC_X86_64_GOT32: + value = 0; /* Fully resolved at runtime. No addend. */ + break; + case BFD_RELOC_386_GOTOFF: + case BFD_RELOC_X86_64_GOTPCREL: + break; + + case BFD_RELOC_VTABLE_INHERIT: + case BFD_RELOC_VTABLE_ENTRY: + fixP->fx_done = 0; + return 1; + + default: + break; + } +#endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */ + *valp = value; +#endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */ - default: - break; +#ifndef BFD_ASSEMBLER + md_number_to_chars (p, value, fixP->fx_size); +#else + /* Are we finished with this relocation now? */ + if (fixP->fx_addsy == 0 && fixP->fx_pcrel == 0) + fixP->fx_done = 1; + else if (use_rela_relocations) + { + fixP->fx_no_overflow = 1; + value = 0; } -#endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */ - *valp = value; -#endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */ md_number_to_chars (p, value, fixP->fx_size); +#endif return 1; } - -#if 0 -/* This is never used. */ -long /* Knows about the byte order in a word. */ -md_chars_to_number (con, nbytes) - unsigned char con[]; /* Low order byte 1st. */ - int nbytes; /* Number of bytes in the input. */ -{ - long retval; - for (retval = 0, con += nbytes - 1; nbytes--; con--) - { - retval <<= BITS_PER_CHAR; - retval |= *con; - } - return retval; -} -#endif /* 0 */ - #define MAX_LITTLENUMS 6 -/* Turn the string pointed to by litP into a floating point constant of type - type, and emit the appropriate bytes. The number of LITTLENUMS emitted - is stored in *sizeP . An error message is returned, or NULL on OK. */ +/* Turn the string pointed to by litP into a floating point constant + of type TYPE, and emit the appropriate bytes. The number of + LITTLENUMS emitted is stored in *SIZEP. An error message is + returned, or NULL on OK. */ + char * md_atof (type, litP, sizeP) int type; @@ -4118,8 +4316,6 @@ md_atof (type, litP, sizeP) char output_invalid_buf[8]; -static char * output_invalid PARAMS ((int)); - static char * output_invalid (c) int c; @@ -4131,7 +4327,6 @@ output_invalid (c) return output_invalid_buf; } - /* REG_STRING starts *before* REGISTER_PREFIX. */ static const reg_entry * @@ -4159,12 +4354,18 @@ parse_register (reg_string, end_op) s++; } + /* For naked regs, make sure that we are not dealing with an identifier. + This prevents confusing an identifier like `eax_var' with register + `eax'. */ + if (allow_naked_reg && identifier_chars[(unsigned char) *s]) + return (const reg_entry *) NULL; + *end_op = s; r = (const reg_entry *) hash_find (reg_hash, reg_name_given); /* Handle floating point regs, allowing spaces in the (i) part. */ - if (r == i386_regtab /* %st is first entry of table */) + if (r == i386_regtab /* %st is first entry of table */) { if (is_space_char (*s)) ++s; @@ -4185,7 +4386,7 @@ parse_register (reg_string, end_op) return r; } } - /* We have "%st(" then garbage */ + /* We have "%st(" then garbage. */ return (const reg_entry *) NULL; } } @@ -4194,11 +4395,18 @@ parse_register (reg_string, end_op) } #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) -CONST char *md_shortopts = "kmVQ:sq"; +const char *md_shortopts = "kVQ:sq"; #else -CONST char *md_shortopts = "m"; +const char *md_shortopts = "q"; #endif + struct option md_longopts[] = { +#define OPTION_32 (OPTION_MD_BASE + 0) + {"32", no_argument, NULL, OPTION_32}, +#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) +#define OPTION_64 (OPTION_MD_BASE + 1) + {"64", no_argument, NULL, OPTION_64}, +#endif {NULL, no_argument, NULL, 0} }; size_t md_longopts_size = sizeof (md_longopts); @@ -4210,13 +4418,14 @@ md_parse_option (c, arg) { switch (c) { - case 'm': - flag_do_long_jump = 1; + case 'q': + quiet_warnings = 1; break; #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) - /* -k: Ignore for FreeBSD compatibility. */ - case 'k': + /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section + should be emitted or not. FIXME: Not implemented. */ + case 'Q': break; /* -V: SVR4 argument to print version ID. */ @@ -4224,9 +4433,8 @@ md_parse_option (c, arg) print_version_id (); break; - /* -Qy, -Qn: SVR4 arguments controlling whether a .comment section - should be emitted or not. FIXME: Not implemented. */ - case 'Q': + /* -k: Ignore for FreeBSD compatibility. */ + case 'k': break; case 's': @@ -4234,12 +4442,28 @@ md_parse_option (c, arg) .stab instead of .stab.excl. We always use .stab anyhow. */ break; - case 'q': - /* -q: On i386 Solaris, this tells the native assembler does - fewer checks. */ + case OPTION_64: + { + const char **list, **l; + + list = bfd_target_list (); + for (l = list; *l != NULL; l++) + if (strcmp (*l, "elf64-x86-64") == 0) + { + default_arch = "x86_64"; + break; + } + if (*l == NULL) + as_fatal (_("No compiled in support for x86_64")); + free (list); + } break; #endif + case OPTION_32: + default_arch = "i386"; + break; + default: return 0; } @@ -4250,41 +4474,51 @@ void md_show_usage (stream) FILE *stream; { - fprintf (stream, _("\ - -m do long jump\n")); #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) fprintf (stream, _("\ - -V print assembler version number\n\ - -k ignored\n\ - -Qy, -Qn ignored\n\ - -q ignored\n\ - -s ignored\n")); + -Q ignored\n\ + -V print assembler version number\n\ + -k ignored\n\ + -q quieten some warnings\n\ + -s ignored\n")); +#else + fprintf (stream, _("\ + -q quieten some warnings\n")); #endif } #ifdef BFD_ASSEMBLER -#if ((defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_COFF)) \ - || (defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_AOUT)) \ - || (defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT))) +#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ + || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) /* Pick the target format to use. */ -const char * +const char * i386_target_format () { + if (!strcmp (default_arch, "x86_64")) + set_code_flag (CODE_64BIT); + else if (!strcmp (default_arch, "i386")) + set_code_flag (CODE_32BIT); + else + as_fatal (_("Unknown architecture")); switch (OUTPUT_FLAVOR) { #ifdef OBJ_MAYBE_AOUT case bfd_target_aout_flavour: - return AOUT_TARGET_FORMAT; + return AOUT_TARGET_FORMAT; #endif #ifdef OBJ_MAYBE_COFF case bfd_target_coff_flavour: return "coff-i386"; #endif -#ifdef OBJ_MAYBE_ELF +#if defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF) case bfd_target_elf_flavour: - return "elf32-i386"; + { + if (flag_code == CODE_64BIT) + use_rela_relocations = 1; + return flag_code == CODE_64BIT ? "elf64-x86-64" : "elf32-i386"; + } #endif default: abort (); @@ -4292,8 +4526,8 @@ i386_target_format () } } -#endif /* OBJ_MAYBE_ more than one */ -#endif /* BFD_ASSEMBLER */ +#endif /* OBJ_MAYBE_ more than one */ +#endif /* BFD_ASSEMBLER */ symbolS * md_undefined_symbol (name) @@ -4317,6 +4551,7 @@ md_undefined_symbol (name) } /* Round up a section size to the appropriate boundary. */ + valueT md_section_align (segment, size) segT segment ATTRIBUTE_UNUSED; @@ -4368,7 +4603,6 @@ s_bss (ignore) #endif - #ifdef BFD_ASSEMBLER void @@ -4377,7 +4611,19 @@ i386_validate_fix (fixp) { if (fixp->fx_subsy && fixp->fx_subsy == GOT_symbol) { - fixp->fx_r_type = BFD_RELOC_386_GOTOFF; + /* GOTOFF relocation are nonsense in 64bit mode. */ + if (fixp->fx_r_type == BFD_RELOC_32_PCREL) + { + if (flag_code != CODE_64BIT) + abort (); + fixp->fx_r_type = BFD_RELOC_X86_64_GOTPCREL; + } + else + { + if (flag_code == CODE_64BIT) + abort (); + fixp->fx_r_type = BFD_RELOC_386_GOTOFF; + } fixp->fx_subsy = 0; } } @@ -4392,10 +4638,14 @@ tc_gen_reloc (section, fixp) switch (fixp->fx_r_type) { + case BFD_RELOC_X86_64_PLT32: + case BFD_RELOC_X86_64_GOT32: + case BFD_RELOC_X86_64_GOTPCREL: case BFD_RELOC_386_PLT32: case BFD_RELOC_386_GOT32: case BFD_RELOC_386_GOTOFF: case BFD_RELOC_386_GOTPC: + case BFD_RELOC_X86_64_32S: case BFD_RELOC_RVA: case BFD_RELOC_VTABLE_ENTRY: case BFD_RELOC_VTABLE_INHERIT: @@ -4427,6 +4677,7 @@ tc_gen_reloc (section, fixp) case 1: code = BFD_RELOC_8; break; case 2: code = BFD_RELOC_16; break; case 4: code = BFD_RELOC_32; break; + case 8: code = BFD_RELOC_64; break; } } break; @@ -4435,22 +4686,37 @@ tc_gen_reloc (section, fixp) if (code == BFD_RELOC_32 && GOT_symbol && fixp->fx_addsy == GOT_symbol) - code = BFD_RELOC_386_GOTPC; + { + /* We don't support GOTPC on 64bit targets. */ + if (flag_code == CODE_64BIT) + abort (); + code = BFD_RELOC_386_GOTPC; + } rel = (arelent *) xmalloc (sizeof (arelent)); rel->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); *rel->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); rel->address = fixp->fx_frag->fr_address + fixp->fx_where; - /* HACK: Since i386 ELF uses Rel instead of Rela, encode the - vtable entry to be used in the relocation's section offset. */ - if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) - rel->address = fixp->fx_offset; + if (!use_rela_relocations) + { + /* HACK: Since i386 ELF uses Rel instead of Rela, encode the + vtable entry to be used in the relocation's section offset. */ + if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) + rel->address = fixp->fx_offset; - if (fixp->fx_pcrel) - rel->addend = fixp->fx_addnumber; + if (fixp->fx_pcrel) + rel->addend = fixp->fx_addnumber; + else + rel->addend = 0; + } + /* Use the rela in 64bit mode. */ else - rel->addend = 0; + { + rel->addend = fixp->fx_offset; + if (fixp->fx_pcrel) + rel->addend -= fixp->fx_size; + } rel->howto = bfd_reloc_type_lookup (stdoutput, code); if (rel->howto == NULL) @@ -4466,7 +4732,7 @@ tc_gen_reloc (section, fixp) return rel; } -#else /* ! BFD_ASSEMBLER */ +#else /* ! BFD_ASSEMBLER */ #if (defined(OBJ_AOUT) | defined(OBJ_BOUT)) void @@ -4475,12 +4741,10 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file) fixS *fixP; relax_addressT segment_address_in_file; { - /* - * In: length of relocation (or of address) in chars: 1, 2 or 4. - * Out: GNU LD relocation length code: 0, 1, or 2. - */ + /* In: length of relocation (or of address) in chars: 1, 2 or 4. + Out: GNU LD relocation length code: 0, 1, or 2. */ - static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2}; + static const unsigned char nbytes_r_length[] = { 42, 0, 1, 42, 2 }; long r_symbolnum; know (fixP->fx_addsy != NULL); @@ -4502,7 +4766,7 @@ tc_aout_fix_to_chars (where, fixP, segment_address_in_file) | (((fixP->fx_pcrel << 0) & 0x01) & 0x0f)); } -#endif /* OBJ_AOUT or OBJ_BOUT */ +#endif /* OBJ_AOUT or OBJ_BOUT. */ #if defined (I386COFF) @@ -4532,8 +4796,956 @@ tc_coff_sizemachdep (frag) return 0; } -#endif /* I386COFF */ +#endif /* I386COFF */ -#endif /* ! BFD_ASSEMBLER */ +#endif /* ! BFD_ASSEMBLER */ -/* end of tc-i386.c */ +/* Parse operands using Intel syntax. This implements a recursive descent + parser based on the BNF grammar published in Appendix B of the MASM 6.1 + Programmer's Guide. + + FIXME: We do not recognize the full operand grammar defined in the MASM + documentation. In particular, all the structure/union and + high-level macro operands are missing. + + Uppercase words are terminals, lower case words are non-terminals. + Objects surrounded by double brackets '[[' ']]' are optional. Vertical + bars '|' denote choices. Most grammar productions are implemented in + functions called 'intel_'. + + Initial production is 'expr'. + + addOp + | - + + alpha [a-zA-Z] + + byteRegister AL | AH | BL | BH | CL | CH | DL | DH + + constant digits [[ radixOverride ]] + + dataType BYTE | WORD | DWORD | QWORD | XWORD + + digits decdigit + | digits decdigit + | digits hexdigit + + decdigit [0-9] + + e05 e05 addOp e06 + | e06 + + e06 e06 mulOp e09 + | e09 + + e09 OFFSET e10 + | e09 PTR e10 + | e09 : e10 + | e10 + + e10 e10 [ expr ] + | e11 + + e11 ( expr ) + | [ expr ] + | constant + | dataType + | id + | $ + | register + + => expr SHORT e05 + | e05 + + gpRegister AX | EAX | BX | EBX | CX | ECX | DX | EDX + | BP | EBP | SP | ESP | DI | EDI | SI | ESI + + hexdigit a | b | c | d | e | f + | A | B | C | D | E | F + + id alpha + | id alpha + | id decdigit + + mulOp * | / | MOD + + quote " | ' + + register specialRegister + | gpRegister + | byteRegister + + segmentRegister CS | DS | ES | FS | GS | SS + + specialRegister CR0 | CR2 | CR3 + | DR0 | DR1 | DR2 | DR3 | DR6 | DR7 + | TR3 | TR4 | TR5 | TR6 | TR7 + + We simplify the grammar in obvious places (e.g., register parsing is + done by calling parse_register) and eliminate immediate left recursion + to implement a recursive-descent parser. + + expr SHORT e05 + | e05 + + e05 e06 e05' + + e05' addOp e06 e05' + | Empty + + e06 e09 e06' + + e06' mulOp e09 e06' + | Empty + + e09 OFFSET e10 e09' + | e10 e09' + + e09' PTR e10 e09' + | : e10 e09' + | Empty + + e10 e11 e10' + + e10' [ expr ] e10' + | Empty + + e11 ( expr ) + | [ expr ] + | BYTE + | WORD + | DWORD + | QWORD + | XWORD + | . + | $ + | register + | id + | constant */ + +/* Parsing structure for the intel syntax parser. Used to implement the + semantic actions for the operand grammar. */ +struct intel_parser_s + { + char *op_string; /* The string being parsed. */ + int got_a_float; /* Whether the operand is a float. */ + int op_modifier; /* Operand modifier. */ + int is_mem; /* 1 if operand is memory reference. */ + const reg_entry *reg; /* Last register reference found. */ + char *disp; /* Displacement string being built. */ + }; + +static struct intel_parser_s intel_parser; + +/* Token structure for parsing intel syntax. */ +struct intel_token + { + int code; /* Token code. */ + const reg_entry *reg; /* Register entry for register tokens. */ + char *str; /* String representation. */ + }; + +static struct intel_token cur_token, prev_token; + +/* Token codes for the intel parser. Since T_SHORT is already used + by COFF, undefine it first to prevent a warning. */ +#define T_NIL -1 +#define T_CONST 1 +#define T_REG 2 +#define T_BYTE 3 +#define T_WORD 4 +#define T_DWORD 5 +#define T_QWORD 6 +#define T_XWORD 7 +#undef T_SHORT +#define T_SHORT 8 +#define T_OFFSET 9 +#define T_PTR 10 +#define T_ID 11 + +/* Prototypes for intel parser functions. */ +static int intel_match_token PARAMS ((int code)); +static void intel_get_token PARAMS ((void)); +static void intel_putback_token PARAMS ((void)); +static int intel_expr PARAMS ((void)); +static int intel_e05 PARAMS ((void)); +static int intel_e05_1 PARAMS ((void)); +static int intel_e06 PARAMS ((void)); +static int intel_e06_1 PARAMS ((void)); +static int intel_e09 PARAMS ((void)); +static int intel_e09_1 PARAMS ((void)); +static int intel_e10 PARAMS ((void)); +static int intel_e10_1 PARAMS ((void)); +static int intel_e11 PARAMS ((void)); + +static int +i386_intel_operand (operand_string, got_a_float) + char *operand_string; + int got_a_float; +{ + int ret; + char *p; + + /* Initialize token holders. */ + cur_token.code = prev_token.code = T_NIL; + cur_token.reg = prev_token.reg = NULL; + cur_token.str = prev_token.str = NULL; + + /* Initialize parser structure. */ + p = intel_parser.op_string = (char *) malloc (strlen (operand_string) + 1); + if (p == NULL) + abort (); + strcpy (intel_parser.op_string, operand_string); + intel_parser.got_a_float = got_a_float; + intel_parser.op_modifier = -1; + intel_parser.is_mem = 0; + intel_parser.reg = NULL; + intel_parser.disp = (char *) malloc (strlen (operand_string) + 1); + if (intel_parser.disp == NULL) + abort (); + intel_parser.disp[0] = '\0'; + + /* Read the first token and start the parser. */ + intel_get_token (); + ret = intel_expr (); + + if (ret) + { + /* If we found a memory reference, hand it over to i386_displacement + to fill in the rest of the operand fields. */ + if (intel_parser.is_mem) + { + if ((i.mem_operands == 1 + && (current_templates->start->opcode_modifier & IsString) == 0) + || i.mem_operands == 2) + { + as_bad (_("too many memory references for '%s'"), + current_templates->start->name); + ret = 0; + } + else + { + char *s = intel_parser.disp; + i.mem_operands++; + + /* Add the displacement expression. */ + if (*s != '\0') + ret = i386_displacement (s, s + strlen (s)) + && i386_index_check (s); + } + } + + /* Constant and OFFSET expressions are handled by i386_immediate. */ + else if (intel_parser.op_modifier == OFFSET_FLAT + || intel_parser.reg == NULL) + ret = i386_immediate (intel_parser.disp); + } + + free (p); + free (intel_parser.disp); + + return ret; +} + +/* expr SHORT e05 + | e05 */ +static int +intel_expr () +{ + /* expr SHORT e05 */ + if (cur_token.code == T_SHORT) + { + intel_parser.op_modifier = SHORT; + intel_match_token (T_SHORT); + + return (intel_e05 ()); + } + + /* expr e05 */ + else + return intel_e05 (); +} + +/* e05 e06 e05' + + e05' addOp e06 e05' + | Empty */ +static int +intel_e05 () +{ + return (intel_e06 () && intel_e05_1 ()); +} + +static int +intel_e05_1 () +{ + /* e05' addOp e06 e05' */ + if (cur_token.code == '+' || cur_token.code == '-') + { + strcat (intel_parser.disp, cur_token.str); + intel_match_token (cur_token.code); + + return (intel_e06 () && intel_e05_1 ()); + } + + /* e05' Empty */ + else + return 1; +} + +/* e06 e09 e06' + + e06' mulOp e09 e06' + | Empty */ +static int +intel_e06 () +{ + return (intel_e09 () && intel_e06_1 ()); +} + +static int +intel_e06_1 () +{ + /* e06' mulOp e09 e06' */ + if (cur_token.code == '*' || cur_token.code == '/') + { + strcat (intel_parser.disp, cur_token.str); + intel_match_token (cur_token.code); + + return (intel_e09 () && intel_e06_1 ()); + } + + /* e06' Empty */ + else + return 1; +} + +/* e09 OFFSET e10 e09' + | e10 e09' + + e09' PTR e10 e09' + | : e10 e09' + | Empty */ +static int +intel_e09 () +{ + /* e09 OFFSET e10 e09' */ + if (cur_token.code == T_OFFSET) + { + intel_parser.is_mem = 0; + intel_parser.op_modifier = OFFSET_FLAT; + intel_match_token (T_OFFSET); + + return (intel_e10 () && intel_e09_1 ()); + } + + /* e09 e10 e09' */ + else + return (intel_e10 () && intel_e09_1 ()); +} + +static int +intel_e09_1 () +{ + /* e09' PTR e10 e09' */ + if (cur_token.code == T_PTR) + { + if (prev_token.code == T_BYTE) + i.suffix = BYTE_MNEM_SUFFIX; + + else if (prev_token.code == T_WORD) + { + if (intel_parser.got_a_float == 2) /* "fi..." */ + i.suffix = SHORT_MNEM_SUFFIX; + else + i.suffix = WORD_MNEM_SUFFIX; + } + + else if (prev_token.code == T_DWORD) + { + if (intel_parser.got_a_float == 1) /* "f..." */ + i.suffix = SHORT_MNEM_SUFFIX; + else + i.suffix = LONG_MNEM_SUFFIX; + } + + else if (prev_token.code == T_QWORD) + { + if (intel_parser.got_a_float == 1) /* "f..." */ + i.suffix = LONG_MNEM_SUFFIX; + else + i.suffix = QWORD_MNEM_SUFFIX; + } + + else if (prev_token.code == T_XWORD) + i.suffix = LONG_DOUBLE_MNEM_SUFFIX; + + else + { + as_bad (_("Unknown operand modifier `%s'\n"), prev_token.str); + return 0; + } + + intel_match_token (T_PTR); + + return (intel_e10 () && intel_e09_1 ()); + } + + /* e09 : e10 e09' */ + else if (cur_token.code == ':') + { + /* Mark as a memory operand only if it's not already known to be an + offset expression. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + + return (intel_match_token (':') && intel_e10 () && intel_e09_1 ()); + } + + /* e09' Empty */ + else + return 1; +} + +/* e10 e11 e10' + + e10' [ expr ] e10' + | Empty */ +static int +intel_e10 () +{ + return (intel_e11 () && intel_e10_1 ()); +} + +static int +intel_e10_1 () +{ + /* e10' [ expr ] e10' */ + if (cur_token.code == '[') + { + intel_match_token ('['); + + /* Mark as a memory operand only if it's not already known to be an + offset expression. If it's an offset expression, we need to keep + the brace in. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + else + strcat (intel_parser.disp, "["); + + /* Add a '+' to the displacement string if necessary. */ + if (*intel_parser.disp != '\0' + && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+') + strcat (intel_parser.disp, "+"); + + if (intel_expr () && intel_match_token (']')) + { + /* Preserve brackets when the operand is an offset expression. */ + if (intel_parser.op_modifier == OFFSET_FLAT) + strcat (intel_parser.disp, "]"); + + return intel_e10_1 (); + } + else + return 0; + } + + /* e10' Empty */ + else + return 1; +} + +/* e11 ( expr ) + | [ expr ] + | BYTE + | WORD + | DWORD + | QWORD + | XWORD + | $ + | . + | register + | id + | constant */ +static int +intel_e11 () +{ + /* e11 ( expr ) */ + if (cur_token.code == '(') + { + intel_match_token ('('); + strcat (intel_parser.disp, "("); + + if (intel_expr () && intel_match_token (')')) + { + strcat (intel_parser.disp, ")"); + return 1; + } + else + return 0; + } + + /* e11 [ expr ] */ + else if (cur_token.code == '[') + { + intel_match_token ('['); + + /* Mark as a memory operand only if it's not already known to be an + offset expression. If it's an offset expression, we need to keep + the brace in. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + else + strcat (intel_parser.disp, "["); + + /* Operands for jump/call inside brackets denote absolute addresses. */ + if (current_templates->start->opcode_modifier & Jump + || current_templates->start->opcode_modifier & JumpDword + || current_templates->start->opcode_modifier & JumpByte + || current_templates->start->opcode_modifier & JumpInterSegment) + i.types[this_operand] |= JumpAbsolute; + + /* Add a '+' to the displacement string if necessary. */ + if (*intel_parser.disp != '\0' + && *(intel_parser.disp + strlen (intel_parser.disp) - 1) != '+') + strcat (intel_parser.disp, "+"); + + if (intel_expr () && intel_match_token (']')) + { + /* Preserve brackets when the operand is an offset expression. */ + if (intel_parser.op_modifier == OFFSET_FLAT) + strcat (intel_parser.disp, "]"); + + return 1; + } + else + return 0; + } + + /* e11 BYTE + | WORD + | DWORD + | QWORD + | XWORD */ + else if (cur_token.code == T_BYTE + || cur_token.code == T_WORD + || cur_token.code == T_DWORD + || cur_token.code == T_QWORD + || cur_token.code == T_XWORD) + { + intel_match_token (cur_token.code); + + return 1; + } + + /* e11 $ + | . */ + else if (cur_token.code == '$' || cur_token.code == '.') + { + strcat (intel_parser.disp, cur_token.str); + intel_match_token (cur_token.code); + + /* Mark as a memory operand only if it's not already known to be an + offset expression. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + + return 1; + } + + /* e11 register */ + else if (cur_token.code == T_REG) + { + const reg_entry *reg = intel_parser.reg = cur_token.reg; + + intel_match_token (T_REG); + + /* Check for segment change. */ + if (cur_token.code == ':') + { + if (reg->reg_type & (SReg2 | SReg3)) + { + switch (reg->reg_num) + { + case 0: + i.seg[i.mem_operands] = &es; + break; + case 1: + i.seg[i.mem_operands] = &cs; + break; + case 2: + i.seg[i.mem_operands] = &ss; + break; + case 3: + i.seg[i.mem_operands] = &ds; + break; + case 4: + i.seg[i.mem_operands] = &fs; + break; + case 5: + i.seg[i.mem_operands] = &gs; + break; + } + } + else + { + as_bad (_("`%s' is not a valid segment register"), reg->reg_name); + return 0; + } + } + + /* Not a segment register. Check for register scaling. */ + else if (cur_token.code == '*') + { + if (!intel_parser.is_mem) + { + as_bad (_("Register scaling only allowed in memory operands.")); + return 0; + } + + /* What follows must be a valid scale. */ + if (intel_match_token ('*') + && strchr ("01248", *cur_token.str)) + { + i.index_reg = reg; + i.types[this_operand] |= BaseIndex; + + /* Set the scale after setting the register (otherwise, + i386_scale will complain) */ + i386_scale (cur_token.str); + intel_match_token (T_CONST); + } + else + { + as_bad (_("expecting scale factor of 1, 2, 4, or 8: got `%s'"), + cur_token.str); + return 0; + } + } + + /* No scaling. If this is a memory operand, the register is either a + base register (first occurrence) or an index register (second + occurrence). */ + else if (intel_parser.is_mem && !(reg->reg_type & (SReg2 | SReg3))) + { + if (i.base_reg && i.index_reg) + { + as_bad (_("Too many register references in memory operand.\n")); + return 0; + } + + if (i.base_reg == NULL) + i.base_reg = reg; + else + i.index_reg = reg; + + i.types[this_operand] |= BaseIndex; + } + + /* Offset modifier. Add the register to the displacement string to be + parsed as an immediate expression after we're done. */ + else if (intel_parser.op_modifier == OFFSET_FLAT) + strcat (intel_parser.disp, reg->reg_name); + + /* It's neither base nor index nor offset. */ + else + { + i.types[this_operand] |= reg->reg_type & ~BaseIndex; + i.op[this_operand].regs = reg; + i.reg_operands++; + } + + /* Since registers are not part of the displacement string (except + when we're parsing offset operands), we may need to remove any + preceding '+' from the displacement string. */ + if (*intel_parser.disp != '\0' + && intel_parser.op_modifier != OFFSET_FLAT) + { + char *s = intel_parser.disp; + s += strlen (s) - 1; + if (*s == '+') + *s = '\0'; + } + + return 1; + } + + /* e11 id */ + else if (cur_token.code == T_ID) + { + /* Add the identifier to the displacement string. */ + strcat (intel_parser.disp, cur_token.str); + intel_match_token (T_ID); + + /* The identifier represents a memory reference only if it's not + preceded by an offset modifier. */ + if (intel_parser.op_modifier != OFFSET_FLAT) + intel_parser.is_mem = 1; + + return 1; + } + + /* e11 constant */ + else if (cur_token.code == T_CONST + || cur_token.code == '-' + || cur_token.code == '+') + { + char *save_str; + + /* Allow constants that start with `+' or `-'. */ + if (cur_token.code == '-' || cur_token.code == '+') + { + strcat (intel_parser.disp, cur_token.str); + intel_match_token (cur_token.code); + if (cur_token.code != T_CONST) + { + as_bad (_("Syntax error. Expecting a constant. Got `%s'.\n"), + cur_token.str); + return 0; + } + } + + save_str = (char *) malloc (strlen (cur_token.str) + 1); + if (save_str == NULL) + abort (); + strcpy (save_str, cur_token.str); + + /* Get the next token to check for register scaling. */ + intel_match_token (cur_token.code); + + /* Check if this constant is a scaling factor for an index register. */ + if (cur_token.code == '*') + { + if (intel_match_token ('*') && cur_token.code == T_REG) + { + if (!intel_parser.is_mem) + { + as_bad (_("Register scaling only allowed in memory operands.")); + return 0; + } + + /* The constant is followed by `* reg', so it must be + a valid scale. */ + if (strchr ("01248", *save_str)) + { + i.index_reg = cur_token.reg; + i.types[this_operand] |= BaseIndex; + + /* Set the scale after setting the register (otherwise, + i386_scale will complain) */ + i386_scale (save_str); + intel_match_token (T_REG); + + /* Since registers are not part of the displacement + string, we may need to remove any preceding '+' from + the displacement string. */ + if (*intel_parser.disp != '\0') + { + char *s = intel_parser.disp; + s += strlen (s) - 1; + if (*s == '+') + *s = '\0'; + } + + free (save_str); + + return 1; + } + else + return 0; + } + + /* The constant was not used for register scaling. Since we have + already consumed the token following `*' we now need to put it + back in the stream. */ + else + intel_putback_token (); + } + + /* Add the constant to the displacement string. */ + strcat (intel_parser.disp, save_str); + free (save_str); + + return 1; + } + + as_bad (_("Unrecognized token '%s'"), cur_token.str); + return 0; +} + +/* Match the given token against cur_token. If they match, read the next + token from the operand string. */ +static int +intel_match_token (code) + int code; +{ + if (cur_token.code == code) + { + intel_get_token (); + return 1; + } + else + { + as_bad (_("Unexpected token `%s'\n"), cur_token.str); + return 0; + } +} + +/* Read a new token from intel_parser.op_string and store it in cur_token. */ +static void +intel_get_token () +{ + char *end_op; + const reg_entry *reg; + struct intel_token new_token; + + new_token.code = T_NIL; + new_token.reg = NULL; + new_token.str = NULL; + + /* Free the memory allocated to the previous token and move + cur_token to prev_token. */ + if (prev_token.str) + free (prev_token.str); + + prev_token = cur_token; + + /* Skip whitespace. */ + while (is_space_char (*intel_parser.op_string)) + intel_parser.op_string++; + + /* Return an empty token if we find nothing else on the line. */ + if (*intel_parser.op_string == '\0') + { + cur_token = new_token; + return; + } + + /* The new token cannot be larger than the remainder of the operand + string. */ + new_token.str = (char *) malloc (strlen (intel_parser.op_string) + 1); + if (new_token.str == NULL) + abort (); + new_token.str[0] = '\0'; + + if (strchr ("0123456789", *intel_parser.op_string)) + { + char *p = new_token.str; + char *q = intel_parser.op_string; + new_token.code = T_CONST; + + /* Allow any kind of identifier char to encompass floating point and + hexadecimal numbers. */ + while (is_identifier_char (*q)) + *p++ = *q++; + *p = '\0'; + + /* Recognize special symbol names [0-9][bf]. */ + if (strlen (intel_parser.op_string) == 2 + && (intel_parser.op_string[1] == 'b' + || intel_parser.op_string[1] == 'f')) + new_token.code = T_ID; + } + + else if (strchr ("+-/*:[]()", *intel_parser.op_string)) + { + new_token.code = *intel_parser.op_string; + new_token.str[0] = *intel_parser.op_string; + new_token.str[1] = '\0'; + } + + else if ((*intel_parser.op_string == REGISTER_PREFIX || allow_naked_reg) + && ((reg = parse_register (intel_parser.op_string, &end_op)) != NULL)) + { + new_token.code = T_REG; + new_token.reg = reg; + + if (*intel_parser.op_string == REGISTER_PREFIX) + { + new_token.str[0] = REGISTER_PREFIX; + new_token.str[1] = '\0'; + } + + strcat (new_token.str, reg->reg_name); + } + + else if (is_identifier_char (*intel_parser.op_string)) + { + char *p = new_token.str; + char *q = intel_parser.op_string; + + /* A '.' or '$' followed by an identifier char is an identifier. + Otherwise, it's operator '.' followed by an expression. */ + if ((*q == '.' || *q == '$') && !is_identifier_char (*(q + 1))) + { + new_token.code = *q; + new_token.str[0] = *q; + new_token.str[1] = '\0'; + } + else + { + while (is_identifier_char (*q) || *q == '@') + *p++ = *q++; + *p = '\0'; + + if (strcasecmp (new_token.str, "BYTE") == 0) + new_token.code = T_BYTE; + + else if (strcasecmp (new_token.str, "WORD") == 0) + new_token.code = T_WORD; + + else if (strcasecmp (new_token.str, "DWORD") == 0) + new_token.code = T_DWORD; + + else if (strcasecmp (new_token.str, "QWORD") == 0) + new_token.code = T_QWORD; + + else if (strcasecmp (new_token.str, "XWORD") == 0) + new_token.code = T_XWORD; + + else if (strcasecmp (new_token.str, "PTR") == 0) + new_token.code = T_PTR; + + else if (strcasecmp (new_token.str, "SHORT") == 0) + new_token.code = T_SHORT; + + else if (strcasecmp (new_token.str, "OFFSET") == 0) + { + new_token.code = T_OFFSET; + + /* ??? This is not mentioned in the MASM grammar but gcc + makes use of it with -mintel-syntax. OFFSET may be + followed by FLAT: */ + if (strncasecmp (q, " FLAT:", 6) == 0) + strcat (new_token.str, " FLAT:"); + } + + /* ??? This is not mentioned in the MASM grammar. */ + else if (strcasecmp (new_token.str, "FLAT") == 0) + new_token.code = T_OFFSET; + + else + new_token.code = T_ID; + } + } + + else + as_bad (_("Unrecognized token `%s'\n"), intel_parser.op_string); + + intel_parser.op_string += strlen (new_token.str); + cur_token = new_token; +} + +/* Put cur_token back into the token stream and make cur_token point to + prev_token. */ +static void +intel_putback_token () +{ + intel_parser.op_string -= strlen (cur_token.str); + free (cur_token.str); + cur_token = prev_token; + + /* Forget prev_token. */ + prev_token.code = T_NIL; + prev_token.reg = NULL; + prev_token.str = NULL; +} diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h index 2bf9a7f..a68d5e4 100644 --- a/contrib/binutils/gas/config/tc-i386.h +++ b/contrib/binutils/gas/config/tc-i386.h @@ -1,5 +1,5 @@ /* tc-i386.h -- Header file for tc-i386.c - Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -41,21 +41,25 @@ struct fix; #define tc_fix_adjustable(X) tc_i386_fix_adjustable(X) extern int tc_i386_fix_adjustable PARAMS ((struct fix *)); -/* This is the relocation type for direct references to GLOBAL_OFFSET_TABLE. - * It comes up in complicated expressions such as - * _GLOBAL_OFFSET_TABLE_+[.-.L284], which cannot be expressed normally with - * the regular expressions. The fixup specified here when used at runtime - * implies that we should add the address of the GOT to the specified location, - * and as a result we have simplified the expression into something we can use. - */ -#define TC_RELOC_GLOBAL_OFFSET_TABLE BFD_RELOC_386_GOTPC +#if (defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF) || defined (OBJ_MAYBE_COFF) || defined (OBJ_COFF)) && !defined (TE_PE) +/* This arranges for gas/write.c to not apply a relocation if + tc_fix_adjustable() says it is not adjustable. + The "! symbol_used_in_reloc_p" test is there specifically to cover + the case of non-global symbols in linkonce sections. It's the + generally correct thing to do though; If a reloc is going to be + emitted against a symbol then we don't want to adjust the fixup by + applying the reloc during assembly. The reloc will be applied by + the linker during final link. */ +#define TC_FIX_ADJUSTABLE(fixP) \ + (! symbol_used_in_reloc_p ((fixP)->fx_addsy) && tc_fix_adjustable (fixP)) +#endif /* This expression evaluates to false if the relocation is for a local object for which we still want to do the relocation at runtime. True if we are willing to perform this relocation while building the .o file. This is only used for pcrel relocations, so GOTOFF does not need to be checked here. I am not sure if some of the others are ever used with - pcrel, but it is easier to be safe than sorry. */ + pcrel, but it is easier to be safe than sorry. */ #define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \ ((FIX)->fx_r_type != BFD_RELOC_386_PLT32 \ @@ -68,7 +72,12 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *)); && ! S_IS_COMMON ((FIX)->fx_addsy)))) #define TARGET_ARCH bfd_arch_i386 +#define TARGET_MACH (i386_mach ()) +extern unsigned long i386_mach PARAMS ((void)); +#ifdef TE_FreeBSD +#define AOUT_TARGET_FORMAT "a.out-i386-freebsd" +#endif #ifdef TE_NetBSD #define AOUT_TARGET_FORMAT "a.out-i386-netbsd" #endif @@ -88,9 +97,8 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *)); #define AOUT_TARGET_FORMAT "a.out-i386" #endif -#if ((defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_COFF)) \ - || (defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_AOUT)) \ - || (defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT))) +#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \ + || defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) extern const char *i386_target_format PARAMS ((void)); #define TARGET_FORMAT i386_target_format () #else @@ -134,7 +142,6 @@ extern int tc_coff_sizemachdep PARAMS ((fragS *frag)); /* Need this for PIC relocations */ #define NEED_FX_R_TYPE - #ifdef TE_386BSD /* The BSDI linker apparently rejects objects with a machine type of M_386 (100). */ @@ -184,13 +191,14 @@ extern const char extra_symbol_chars[]; /* Prefixes will be emitted in the order defined below. WAIT_PREFIX must be the first prefix since FWAIT is really is an - instruction, and so must come before any prefixes. */ + instruction, and so must come before any prefixes. */ #define WAIT_PREFIX 0 #define LOCKREP_PREFIX 1 #define ADDR_PREFIX 2 #define DATA_PREFIX 3 #define SEG_PREFIX 4 -#define MAX_PREFIXES 5 /* max prefixes per opcode */ +#define REX_PREFIX 5 /* must come last. */ +#define MAX_PREFIXES 6 /* max prefixes per opcode */ /* we define the syntax here (modulo base,index,scale syntax) */ #define REGISTER_PREFIX '%' @@ -217,10 +225,9 @@ extern const char extra_symbol_chars[]; #define BYTE_MNEM_SUFFIX 'b' #define SHORT_MNEM_SUFFIX 's' #define LONG_MNEM_SUFFIX 'l' +#define QWORD_MNEM_SUFFIX 'q' /* Intel Syntax */ #define LONG_DOUBLE_MNEM_SUFFIX 'x' -/* Intel Syntax */ -#define DWORD_MNEM_SUFFIX 'd' /* modrm.mode = REGMEM_FIELD_HAS_REG when a register is in there */ #define REGMEM_FIELD_HAS_REG 0x3/* always = 0x3 */ @@ -239,77 +246,6 @@ extern const char extra_symbol_chars[]; #define OFFSET_FLAT 6 #define FLAT 7 #define NONE_FOUND 8 -/* - When an operand is read in it is classified by its type. This type includes - all the possible ways an operand can be used. Thus, '%eax' is both 'register - # 0' and 'The Accumulator'. In our language this is expressed by OR'ing - 'Reg32' (any 32 bit register) and 'Acc' (the accumulator). - Operands are classified so that we can match given operand types with - the opcode table in opcode/i386.h. - */ -/* register */ -#define Reg8 0x1 /* 8 bit reg */ -#define Reg16 0x2 /* 16 bit reg */ -#define Reg32 0x4 /* 32 bit reg */ -/* immediate */ -#define Imm8 0x8 /* 8 bit immediate */ -#define Imm8S 0x10 /* 8 bit immediate sign extended */ -#define Imm16 0x20 /* 16 bit immediate */ -#define Imm32 0x40 /* 32 bit immediate */ -#define Imm1 0x80 /* 1 bit immediate */ -/* memory */ -#define BaseIndex 0x100 -/* Disp8,16,32 are used in different ways, depending on the - instruction. For jumps, they specify the size of the PC relative - displacement, for baseindex type instructions, they specify the - size of the offset relative to the base register, and for memory - offset instructions such as `mov 1234,%al' they specify the size of - the offset relative to the segment base. */ -#define Disp8 0x200 /* 8 bit displacement */ -#define Disp16 0x400 /* 16 bit displacement */ -#define Disp32 0x800 /* 32 bit displacement */ -/* specials */ -#define InOutPortReg 0x1000 /* register to hold in/out port addr = dx */ -#define ShiftCount 0x2000 /* register to hold shift cound = cl */ -#define Control 0x4000 /* Control register */ -#define Debug 0x8000 /* Debug register */ -#define Test 0x10000 /* Test register */ -#define FloatReg 0x20000 /* Float register */ -#define FloatAcc 0x40000 /* Float stack top %st(0) */ -#define SReg2 0x80000 /* 2 bit segment register */ -#define SReg3 0x100000 /* 3 bit segment register */ -#define Acc 0x200000 /* Accumulator %al or %ax or %eax */ -#define JumpAbsolute 0x400000 -#define RegMMX 0x800000 /* MMX register */ -#define RegXMM 0x1000000 /* XMM registers in PIII */ -#define EsSeg 0x2000000 /* String insn operand with fixed es segment */ -/* InvMem is for instructions with a modrm byte that only allow a - general register encoding in the i.tm.mode and i.tm.regmem fields, - eg. control reg moves. They really ought to support a memory form, - but don't, so we add an InvMem flag to the register operand to - indicate that it should be encoded in the i.tm.regmem field. */ -#define InvMem 0x4000000 - -#define Reg (Reg8|Reg16|Reg32) /* gen'l register */ -#define WordReg (Reg16|Reg32) -#define ImplicitRegister (InOutPortReg|ShiftCount|Acc|FloatAcc) -#define Imm (Imm8|Imm8S|Imm16|Imm32) /* gen'l immediate */ -#define Disp (Disp8|Disp16|Disp32) /* General displacement */ -#define AnyMem (Disp|BaseIndex|InvMem) /* General memory */ -/* The following aliases are defined because the opcode table - carefully specifies the allowed memory types for each instruction. - At the moment we can only tell a memory reference size by the - instruction suffix, so there's not much point in defining Mem8, - Mem16, Mem32 and Mem64 opcode modifiers - We might as well just use - the suffix directly to check memory operands. */ -#define LLongMem AnyMem /* 64 bits (or more) */ -#define LongMem AnyMem /* 32 bit memory ref */ -#define ShortMem AnyMem /* 16 bit memory ref */ -#define WordMem AnyMem /* 16 or 32 bit memory ref */ -#define ByteMem AnyMem /* 8 bit memory ref */ - -#define SMALLEST_DISP_TYPE(num) \ - (fits_in_signed_byte(num) ? (Disp8|Disp32) : Disp32) typedef struct { @@ -328,7 +264,33 @@ typedef struct AMD 3DNow! instructions. If this template has no extension opcode (the usual case) use None */ unsigned int extension_opcode; -#define None 0xffff /* If no extension_opcode is possible. */ +#define None 0xffff /* If no extension_opcode is possible. */ + + /* cpu feature flags */ + unsigned int cpu_flags; +#define Cpu086 0x1 /* Any old cpu will do, 0 does the same */ +#define Cpu186 0x2 /* i186 or better required */ +#define Cpu286 0x4 /* i286 or better required */ +#define Cpu386 0x8 /* i386 or better required */ +#define Cpu486 0x10 /* i486 or better required */ +#define Cpu586 0x20 /* i585 or better required */ +#define Cpu686 0x40 /* i686 or better required */ +#define CpuP4 0x80 /* Pentium4 or better required */ +#define CpuK6 0x100 /* AMD K6 or better required*/ +#define CpuAthlon 0x200 /* AMD Athlon or better required*/ +#define CpuSledgehammer 0x400 /* Sledgehammer or better required */ +#define CpuMMX 0x800 /* MMX support required */ +#define CpuSSE 0x1000 /* Streaming SIMD extensions required */ +#define CpuSSE2 0x2000 /* Streaming SIMD extensions 2 required */ +#define Cpu3dnow 0x4000 /* 3dnow! support required */ +#define CpuUnknown 0x8000 /* The CPU is unknown, be on the safe side. */ + + /* These flags are set by gas depending on the flag_code. */ +#define Cpu64 0x4000000 /* 64bit support required */ +#define CpuNo64 0x8000000 /* Not supported in the 64bit mode */ + + /* The default value for unknown CPUs - enable all features to avoid problems. */ +#define CpuUnknownFlags (Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuSledgehammer|CpuMMX|CpuSSE|CpuSSE2|Cpu3dnow|CpuK6|CpuAthlon) /* the bits in opcode_modifier are used to generate the final opcode from the base_opcode. These bits also are used to detect alternate forms of @@ -344,35 +306,107 @@ typedef struct #define FloatR 0x8 /* src/dest swap for floats: MUST BE 0x8 */ #define ShortForm 0x10 /* register is in low 3 bits of opcode */ #define FloatMF 0x20 /* FP insn memory format bit, sized by 0x4 */ -#define Jump 0x40 /* special case for jump insns. */ +#define Jump 0x40 /* special case for jump insns. */ #define JumpDword 0x80 /* call and jump */ #define JumpByte 0x100 /* loop and jecxz */ #define JumpInterSegment 0x200 /* special case for intersegment leaps/calls */ #define FloatD 0x400 /* direction for float insns: MUST BE 0x400 */ #define Seg2ShortForm 0x800 /* encoding of load segment reg insns */ -#define Seg3ShortForm 0x1000 /* fs/gs segment register insns. */ +#define Seg3ShortForm 0x1000 /* fs/gs segment register insns. */ #define Size16 0x2000 /* needs size prefix if in 32-bit mode */ #define Size32 0x4000 /* needs size prefix if in 16-bit mode */ -#define IgnoreSize 0x8000 /* instruction ignores operand size prefix */ -#define DefaultSize 0x10000 /* default insn size depends on mode */ -#define No_bSuf 0x20000 /* b suffix on instruction illegal */ -#define No_wSuf 0x40000 /* w suffix on instruction illegal */ -#define No_lSuf 0x80000 /* l suffix on instruction illegal */ -#define No_sSuf 0x100000 /* s suffix on instruction illegal */ -#define No_dSuf 0x200000 /* d suffix on instruction illegal */ -#define No_xSuf 0x400000 /* x suffix on instruction illegal */ -#define FWait 0x800000 /* instruction needs FWAIT */ -#define IsString 0x1000000 /* quick test for string instructions */ -#define regKludge 0x2000000 /* fake an extra reg operand for clr, imul */ -#define IsPrefix 0x4000000 /* opcode is a prefix */ -#define ImmExt 0x8000000 /* instruction has extension in 8 bit imm */ +#define Size64 0x8000 /* needs size prefix if in 16-bit mode */ +#define IgnoreSize 0x10000 /* instruction ignores operand size prefix */ +#define DefaultSize 0x20000 /* default insn size depends on mode */ +#define No_bSuf 0x40000 /* b suffix on instruction illegal */ +#define No_wSuf 0x80000 /* w suffix on instruction illegal */ +#define No_lSuf 0x100000 /* l suffix on instruction illegal */ +#define No_sSuf 0x200000 /* s suffix on instruction illegal */ +#define No_qSuf 0x400000 /* q suffix on instruction illegal */ +#define No_xSuf 0x800000 /* x suffix on instruction illegal */ +#define FWait 0x1000000 /* instruction needs FWAIT */ +#define IsString 0x2000000 /* quick test for string instructions */ +#define regKludge 0x4000000 /* fake an extra reg operand for clr, imul */ +#define IsPrefix 0x8000000 /* opcode is a prefix */ +#define ImmExt 0x10000000 /* instruction has extension in 8 bit imm */ +#define NoRex64 0x20000000 /* instruction don't need Rex64 prefix. */ +#define Rex64 0x40000000 /* instruction require Rex64 prefix. */ #define Ugh 0x80000000 /* deprecated fp insn, gets a warning */ /* operand_types[i] describes the type of operand i. This is made by OR'ing together all of the possible type masks. (e.g. 'operand_types[i] = Reg|Imm' specifies that operand i can be - either a register or an immediate operand */ + either a register or an immediate operand. */ unsigned int operand_types[3]; + + /* operand_types[i] bits */ + /* register */ +#define Reg8 0x1 /* 8 bit reg */ +#define Reg16 0x2 /* 16 bit reg */ +#define Reg32 0x4 /* 32 bit reg */ +#define Reg64 0x8 /* 64 bit reg */ + /* immediate */ +#define Imm8 0x10 /* 8 bit immediate */ +#define Imm8S 0x20 /* 8 bit immediate sign extended */ +#define Imm16 0x40 /* 16 bit immediate */ +#define Imm32 0x80 /* 32 bit immediate */ +#define Imm32S 0x100 /* 32 bit immediate sign extended */ +#define Imm64 0x200 /* 64 bit immediate */ +#define Imm1 0x400 /* 1 bit immediate */ + /* memory */ +#define BaseIndex 0x800 + /* Disp8,16,32 are used in different ways, depending on the + instruction. For jumps, they specify the size of the PC relative + displacement, for baseindex type instructions, they specify the + size of the offset relative to the base register, and for memory + offset instructions such as `mov 1234,%al' they specify the size of + the offset relative to the segment base. */ +#define Disp8 0x1000 /* 8 bit displacement */ +#define Disp16 0x2000 /* 16 bit displacement */ +#define Disp32 0x4000 /* 32 bit displacement */ +#define Disp32S 0x8000 /* 32 bit signed displacement */ +#define Disp64 0x10000 /* 64 bit displacement */ + /* specials */ +#define InOutPortReg 0x20000 /* register to hold in/out port addr = dx */ +#define ShiftCount 0x40000 /* register to hold shift cound = cl */ +#define Control 0x80000 /* Control register */ +#define Debug 0x100000 /* Debug register */ +#define Test 0x200000 /* Test register */ +#define FloatReg 0x400000 /* Float register */ +#define FloatAcc 0x800000 /* Float stack top %st(0) */ +#define SReg2 0x1000000 /* 2 bit segment register */ +#define SReg3 0x2000000 /* 3 bit segment register */ +#define Acc 0x4000000 /* Accumulator %al or %ax or %eax */ +#define JumpAbsolute 0x8000000 +#define RegMMX 0x10000000 /* MMX register */ +#define RegXMM 0x20000000 /* XMM registers in PIII */ +#define EsSeg 0x40000000 /* String insn operand with fixed es segment */ + + /* InvMem is for instructions with a modrm byte that only allow a + general register encoding in the i.tm.mode and i.tm.regmem fields, + eg. control reg moves. They really ought to support a memory form, + but don't, so we add an InvMem flag to the register operand to + indicate that it should be encoded in the i.tm.regmem field. */ +#define InvMem 0x80000000 + +#define Reg (Reg8|Reg16|Reg32|Reg64) /* gen'l register */ +#define WordReg (Reg16|Reg32|Reg64) +#define ImplicitRegister (InOutPortReg|ShiftCount|Acc|FloatAcc) +#define Imm (Imm8|Imm8S|Imm16|Imm32S|Imm32|Imm64) /* gen'l immediate */ +#define EncImm (Imm8|Imm16|Imm32|Imm32S) /* Encodable gen'l immediate */ +#define Disp (Disp8|Disp16|Disp32|Disp32S|Disp64) /* General displacement */ +#define AnyMem (Disp8|Disp16|Disp32|Disp32S|BaseIndex|InvMem) /* General memory */ + /* The following aliases are defined because the opcode table + carefully specifies the allowed memory types for each instruction. + At the moment we can only tell a memory reference size by the + instruction suffix, so there's not much point in defining Mem8, + Mem16, Mem32 and Mem64 opcode modifiers - We might as well just use + the suffix directly to check memory operands. */ +#define LLongMem AnyMem /* 64 bits (or more) */ +#define LongMem AnyMem /* 32 bit memory ref */ +#define ShortMem AnyMem /* 16 bit memory ref */ +#define WordMem AnyMem /* 16 or 32 bit memory ref */ +#define ByteMem AnyMem /* 8 bit memory ref */ } template; @@ -384,47 +418,70 @@ template; END. */ typedef struct - { - const template *start; - const template *end; - } templates; +{ + const template *start; + const template *end; +} +templates; /* these are for register name --> number & type hash lookup */ typedef struct - { - char *reg_name; - unsigned int reg_type; - unsigned int reg_num; - } +{ + char *reg_name; + unsigned int reg_type; + unsigned int reg_flags; +#define RegRex 0x1 /* Extended register. */ +#define RegRex64 0x2 /* Extended 8 bit register. */ + unsigned int reg_num; +} reg_entry; typedef struct - { - char *seg_name; - unsigned int seg_prefix; - } +{ + char *seg_name; + unsigned int seg_prefix; +} seg_entry; -/* 386 operand encoding bytes: see 386 book for details of this. */ +/* 386 operand encoding bytes: see 386 book for details of this. */ typedef struct - { - unsigned int regmem; /* codes register or memory operand */ - unsigned int reg; /* codes register operand (or extended opcode) */ - unsigned int mode; /* how to interpret regmem & reg */ - } +{ + unsigned int regmem; /* codes register or memory operand */ + unsigned int reg; /* codes register operand (or extended opcode) */ + unsigned int mode; /* how to interpret regmem & reg */ +} modrm_byte; -/* 386 opcode byte to code indirect addressing. */ +/* x86-64 extension prefix. */ typedef struct { - unsigned base; - unsigned index; - unsigned scale; + unsigned int mode64; + unsigned int extX; /* Used to extend modrm reg field. */ + unsigned int extY; /* Used to extend SIB index field. */ + unsigned int extZ; /* Used to extend modrm reg/mem, SIB base, modrm base fields. */ + unsigned int empty; /* Used to old-style byte registers to new style. */ } +rex_byte; + +/* 386 opcode byte to code indirect addressing. */ +typedef struct +{ + unsigned base; + unsigned index; + unsigned scale; +} sib_byte; +/* x86 arch names and features */ +typedef struct +{ + const char *name; /* arch name */ + unsigned int flags; /* cpu feature flags */ +} +arch_entry; + /* The name of the global offset table generated by the compiler. Allow - this to be overridden if need be. */ + this to be overridden if need be. */ #ifndef GLOBAL_OFFSET_TABLE_NAME #define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_" #endif @@ -446,13 +503,12 @@ if ((n) && !need_pass_2 \ && (!(fill) || ((char)*(fill) == (char)0x90 && (len) == 1)) \ && subseg_text_p (now_seg)) \ { \ - char *p; \ - p = frag_var (rs_align_code, 15, 1, (relax_substateT) max, \ - (symbolS *) 0, (offsetT) (n), (char *) 0); \ - *p = 0x90; \ + frag_align_code ((n), (max)); \ goto around; \ } +#define MAX_MEM_FOR_RS_ALIGN_CODE 15 + extern void i386_align_code PARAMS ((fragS *, int)); #define HANDLE_ALIGN(fragP) \ @@ -475,5 +531,3 @@ extern void sco_id PARAMS ((void)); #endif #define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */ - -/* end of tc-i386.h */ diff --git a/contrib/binutils/gas/config/tc-m68851.h b/contrib/binutils/gas/config/tc-m68851.h index 0f6d741..398e1d2 100644 --- a/contrib/binutils/gas/config/tc-m68851.h +++ b/contrib/binutils/gas/config/tc-m68851.h @@ -1,22 +1,23 @@ /* This file is tc-m68851.h - Copyright (C) 1987-1992 Free Software Foundation, Inc. - + Copyright (C) 1987-1992, 2000 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. */ + 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. */ /* * pmmu.h @@ -26,16 +27,16 @@ to us as part of the changes for the m68851 Memory Management Unit */ /* Copyright (C) 1987 Free Software Foundation, Inc. - + This file is part of Gas, the GNU Assembler. - + The GNU assembler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. Refer to the GNU Assembler General Public License for full details. - + Everyone is granted permission to copy, modify and redistribute the GNU Assembler, but only under the conditions described in the GNU Assembler General Public License. A copy of this license is @@ -47,10 +48,10 @@ #ifdef m68851 /* - I didn't use much imagination in choosing the + I didn't use much imagination in choosing the following codes, so many of them aren't very mnemonic. -rab - + P pmmu register Possible values: 000 TC Translation Control reg @@ -58,28 +59,28 @@ 101 VAL Validate Access Level 110 SCC Stack Change Control 111 AC Access Control - + W wide pmmu registers Possible values: 001 DRP Dma Root Pointer 010 SRP Supervisor Root Pointer 011 CRP Cpu Root Pointer - + f function code register 0 SFC 1 DFC - + V VAL register only - + X BADx, BACx 100 BAD Breakpoint Acknowledge Data 101 BAC Breakpoint Acknowledge Control - + Y PSR Z PCSR - + | memory (modes 2-6, 7.*) - + */ /* @@ -136,8 +137,7 @@ {"pbwcw", one(0xf089), one(0xffbf), "Bc"}, {"pbws", one(0xf0c8), one(0xffbf), "Bc"}, {"pbwsw", one(0xf088), one(0xffbf), "Bc"}, - - + {"pdbac", two(0xf048, 0x0007), two(0xfff8, 0xffff), "DsBw"}, {"pdbas", two(0xf048, 0x0006), two(0xfff8, 0xffff), "DsBw"}, {"pdbbc", two(0xf048, 0x0001), two(0xfff8, 0xffff), "DsBw"}, @@ -154,53 +154,53 @@ {"pdbss", two(0xf048, 0x0004), two(0xfff8, 0xffff), "DsBw"}, {"pdbwc", two(0xf048, 0x0009), two(0xfff8, 0xffff), "DsBw"}, {"pdbws", two(0xf048, 0x0008), two(0xfff8, 0xffff), "DsBw"}, - + {"pflusha", two(0xf000, 0x2400), two(0xffff, 0xffff), "" }, - + {"pflush", two(0xf000, 0x3010), two(0xffc0, 0xfe10), "T3T9" }, {"pflush", two(0xf000, 0x3810), two(0xffc0, 0xfe10), "T3T9&s" }, {"pflush", two(0xf000, 0x3008), two(0xffc0, 0xfe18), "D3T9" }, {"pflush", two(0xf000, 0x3808), two(0xffc0, 0xfe18), "D3T9&s" }, {"pflush", two(0xf000, 0x3000), two(0xffc0, 0xfe1e), "f3T9" }, {"pflush", two(0xf000, 0x3800), two(0xffc0, 0xfe1e), "f3T9&s" }, - + {"pflushs", two(0xf000, 0x3410), two(0xfff8, 0xfe10), "T3T9" }, {"pflushs", two(0xf000, 0x3c00), two(0xfff8, 0xfe00), "T3T9&s" }, {"pflushs", two(0xf000, 0x3408), two(0xfff8, 0xfe18), "D3T9" }, {"pflushs", two(0xf000, 0x3c08), two(0xfff8, 0xfe18), "D3T9&s" }, {"pflushs", two(0xf000, 0x3400), two(0xfff8, 0xfe1e), "f3T9" }, {"pflushs", two(0xf000, 0x3c00), two(0xfff8, 0xfe1e), "f3T9&s"}, - + {"pflushr", two(0xf000, 0xa000), two(0xffc0, 0xffff), "|s" }, - + {"ploadr", two(0xf000, 0x2210), two(0xffc0, 0xfff0), "T3&s" }, {"ploadr", two(0xf000, 0x2208), two(0xffc0, 0xfff8), "D3&s" }, {"ploadr", two(0xf000, 0x2200), two(0xffc0, 0xfffe), "f3&s" }, {"ploadw", two(0xf000, 0x2010), two(0xffc0, 0xfff0), "T3&s" }, {"ploadw", two(0xf000, 0x2008), two(0xffc0, 0xfff8), "D3&s" }, {"ploadw", two(0xf000, 0x2000), two(0xffc0, 0xfffe), "f3&s" }, - + /* TC, CRP, DRP, SRP, CAL, VAL, SCC, AC */ {"pmove", two(0xf000, 0x4000), two(0xffc0, 0xe3ff), "*sP8" }, {"pmove", two(0xf000, 0x4200), two(0xffc0, 0xe3ff), "P8%s" }, {"pmove", two(0xf000, 0x4000), two(0xffc0, 0xe3ff), "|sW8" }, {"pmove", two(0xf000, 0x4200), two(0xffc0, 0xe3ff), "W8~s" }, - + /* BADx, BACx */ {"pmove", two(0xf000, 0x6200), two(0xffc0, 0xe3e3), "*sX3" }, {"pmove", two(0xf000, 0x6000), two(0xffc0, 0xe3e3), "X3%s" }, - + /* PSR, PCSR */ /* {"pmove", two(0xf000, 0x6100), two(oxffc0, oxffff), "*sZ8" }, */ {"pmove", two(0xf000, 0x6000), two(0xffc0, 0xffff), "*sY8" }, {"pmove", two(0xf000, 0x6200), two(0xffc0, 0xffff), "Y8%s" }, {"pmove", two(0xf000, 0x6600), two(0xffc0, 0xffff), "Z8%s" }, - + {"prestore", one(0xf140), one(0xffc0), "&s"}, {"prestore", one(0xf158), one(0xfff8), "+s"}, {"psave", one(0xf100), one(0xffc0), "&s"}, {"psave", one(0xf100), one(0xffc0), "+s"}, - + {"psac", two(0xf040, 0x0007), two(0xffc0, 0xffff), "@s"}, {"psas", two(0xf040, 0x0006), two(0xffc0, 0xffff), "@s"}, {"psbc", two(0xf040, 0x0001), two(0xffc0, 0xffff), "@s"}, @@ -217,88 +217,86 @@ {"psss", two(0xf040, 0x0004), two(0xffc0, 0xffff), "@s"}, {"pswc", two(0xf040, 0x0009), two(0xffc0, 0xffff), "@s"}, {"psws", two(0xf040, 0x0008), two(0xffc0, 0xffff), "@s"}, - + {"ptestr", two(0xf000, 0x8210), two(0xffc0, 0xe3f0), "T3&sQ8" }, {"ptestr", two(0xf000, 0x8310), two(0xffc0, 0xe310), "T3&sQ8A9" }, {"ptestr", two(0xf000, 0x8208), two(0xffc0, 0xe3f8), "D3&sQ8" }, {"ptestr", two(0xf000, 0x8308), two(0xffc0, 0xe318), "D3&sQ8A9" }, {"ptestr", two(0xf000, 0x8200), two(0xffc0, 0xe3fe), "f3&sQ8" }, {"ptestr", two(0xf000, 0x8300), two(0xffc0, 0xe31e), "f3&sQ8A9" }, - + {"ptestw", two(0xf000, 0x8010), two(0xffc0, 0xe3f0), "T3&sQ8" }, {"ptestw", two(0xf000, 0x8110), two(0xffc0, 0xe310), "T3&sQ8A9" }, {"ptestw", two(0xf000, 0x8008), two(0xffc0, 0xe3f8), "D3&sQ8" }, {"ptestw", two(0xf000, 0x8108), two(0xffc0, 0xe318), "D3&sQ8A9" }, {"ptestw", two(0xf000, 0x8000), two(0xffc0, 0xe3fe), "f3&sQ8" }, {"ptestw", two(0xf000, 0x8100), two(0xffc0, 0xe31e), "f3&sQ8A9" }, - + {"ptrapacw", two(0xf07a, 0x0007), two(0xffff, 0xffff), "#w"}, {"ptrapacl", two(0xf07b, 0x0007), two(0xffff, 0xffff), "#l"}, {"ptrapac", two(0xf07c, 0x0007), two(0xffff, 0xffff), ""}, - + {"ptrapasw", two(0xf07a, 0x0006), two(0xffff, 0xffff), "#w"}, {"ptrapasl", two(0xf07b, 0x0006), two(0xffff, 0xffff), "#l"}, {"ptrapas", two(0xf07c, 0x0006), two(0xffff, 0xffff), ""}, - + {"ptrapbcw", two(0xf07a, 0x0001), two(0xffff, 0xffff), "#w"}, {"ptrapbcl", two(0xf07b, 0x0001), two(0xffff, 0xffff), "#l"}, {"ptrapbc", two(0xf07c, 0x0001), two(0xffff, 0xffff), ""}, - + {"ptrapbsw", two(0xf07a, 0x0000), two(0xffff, 0xffff), "#w"}, {"ptrapbsl", two(0xf07b, 0x0000), two(0xffff, 0xffff), "#l"}, {"ptrapbs", two(0xf07c, 0x0000), two(0xffff, 0xffff), ""}, - + {"ptrapccw", two(0xf07a, 0x000f), two(0xffff, 0xffff), "#w"}, {"ptrapccl", two(0xf07b, 0x000f), two(0xffff, 0xffff), "#l"}, {"ptrapcc", two(0xf07c, 0x000f), two(0xffff, 0xffff), ""}, - + {"ptrapcsw", two(0xf07a, 0x000e), two(0xffff, 0xffff), "#w"}, {"ptrapcsl", two(0xf07b, 0x000e), two(0xffff, 0xffff), "#l"}, {"ptrapcs", two(0xf07c, 0x000e), two(0xffff, 0xffff), ""}, - + {"ptrapgcw", two(0xf07a, 0x000d), two(0xffff, 0xffff), "#w"}, {"ptrapgcl", two(0xf07b, 0x000d), two(0xffff, 0xffff), "#l"}, {"ptrapgc", two(0xf07c, 0x000d), two(0xffff, 0xffff), ""}, - + {"ptrapgsw", two(0xf07a, 0x000c), two(0xffff, 0xffff), "#w"}, {"ptrapgsl", two(0xf07b, 0x000c), two(0xffff, 0xffff), "#l"}, {"ptrapgs", two(0xf07c, 0x000c), two(0xffff, 0xffff), ""}, - + {"ptrapicw", two(0xf07a, 0x000b), two(0xffff, 0xffff), "#w"}, {"ptrapicl", two(0xf07b, 0x000b), two(0xffff, 0xffff), "#l"}, {"ptrapic", two(0xf07c, 0x000b), two(0xffff, 0xffff), ""}, - + {"ptrapisw", two(0xf07a, 0x000a), two(0xffff, 0xffff), "#w"}, {"ptrapisl", two(0xf07b, 0x000a), two(0xffff, 0xffff), "#l"}, {"ptrapis", two(0xf07c, 0x000a), two(0xffff, 0xffff), ""}, - + {"ptraplcw", two(0xf07a, 0x0003), two(0xffff, 0xffff), "#w"}, {"ptraplcl", two(0xf07b, 0x0003), two(0xffff, 0xffff), "#l"}, {"ptraplc", two(0xf07c, 0x0003), two(0xffff, 0xffff), ""}, - + {"ptraplsw", two(0xf07a, 0x0002), two(0xffff, 0xffff), "#w"}, {"ptraplsl", two(0xf07b, 0x0002), two(0xffff, 0xffff), "#l"}, {"ptrapls", two(0xf07c, 0x0002), two(0xffff, 0xffff), ""}, - + {"ptrapscw", two(0xf07a, 0x0005), two(0xffff, 0xffff), "#w"}, {"ptrapscl", two(0xf07b, 0x0005), two(0xffff, 0xffff), "#l"}, {"ptrapsc", two(0xf07c, 0x0005), two(0xffff, 0xffff), ""}, - + {"ptrapssw", two(0xf07a, 0x0004), two(0xffff, 0xffff), "#w"}, {"ptrapssl", two(0xf07b, 0x0004), two(0xffff, 0xffff), "#l"}, {"ptrapss", two(0xf07c, 0x0004), two(0xffff, 0xffff), ""}, - + {"ptrapwcw", two(0xf07a, 0x0009), two(0xffff, 0xffff), "#w"}, {"ptrapwcl", two(0xf07b, 0x0009), two(0xffff, 0xffff), "#l"}, {"ptrapwc", two(0xf07c, 0x0009), two(0xffff, 0xffff), ""}, - + {"ptrapwsw", two(0xf07a, 0x0008), two(0xffff, 0xffff), "#w"}, {"ptrapwsl", two(0xf07b, 0x0008), two(0xffff, 0xffff), "#l"}, {"ptrapws", two(0xf07c, 0x0008), two(0xffff, 0xffff), ""}, - + {"pvalid", two(0xf000, 0x2800), two(0xffc0, 0xffff), "Vs&s"}, {"pvalid", two(0xf000, 0x2c00), two(0xffc0, 0xfff8), "A3&s" }, - -#endif /* m68851 */ -/* end of tc-m68851.h */ +#endif /* m68851 */ diff --git a/contrib/binutils/gas/config/tc-ppc.c b/contrib/binutils/gas/config/tc-ppc.c index 365a535..2b826cb 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 (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. @@ -18,7 +18,7 @@ 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. */ + 02111-1307, USA. */ #include #include @@ -29,6 +29,7 @@ #ifdef OBJ_ELF #include "elf/ppc.h" +#include "dwarf2dbg.h" #endif #ifdef TE_PE @@ -86,6 +87,7 @@ static void ppc_stabx PARAMS ((int)); static void ppc_rename PARAMS ((int)); static void ppc_toc PARAMS ((int)); static void ppc_xcoff_cons PARAMS ((int)); +static void ppc_machine PARAMS ((int)); static void ppc_vbyte PARAMS ((int)); #endif @@ -182,9 +184,11 @@ const pseudo_typeS md_pseudo_table[] = { "text", ppc_section, 't' }, { "toc", ppc_toc, 0 }, { "long", ppc_xcoff_cons, 2 }, + { "llong", ppc_xcoff_cons, 3 }, { "word", ppc_xcoff_cons, 1 }, { "short", ppc_xcoff_cons, 1 }, { "vbyte", ppc_vbyte, 0 }, + { "machine", ppc_machine, 0 }, #endif #ifdef OBJ_ELF @@ -194,6 +198,8 @@ const pseudo_typeS md_pseudo_table[] = { "rdata", ppc_elf_rdata, 0 }, { "rodata", ppc_elf_rdata, 0 }, { "lcomm", ppc_elf_lcomm, 0 }, + { "file", dwarf2_directive_file, 0 }, + { "loc", dwarf2_directive_loc, 0 }, #endif #ifdef TE_PE @@ -236,11 +242,14 @@ struct pd_reg 1. r which has the value . 2. r. which has the value . - Each floating point register has predefined names of the form: 1. f which has the value . 2. f. which has the value . + Each vector unit register has predefined names of the form: + 1. v which has the value . + 2. v. which has the value . + Each condition register has predefined names of the form: 1. cr which has the value . 2. cr. which has the value . @@ -260,7 +269,7 @@ struct pd_reg srr0 has the value 26 srr1 has the value 27 - The table is sorted. Suitable for searching by a binary search. */ + The table is sorted. Suitable for searching by a binary search. */ static const struct pd_reg pre_defined_registers[] = { @@ -289,70 +298,70 @@ static const struct pd_reg pre_defined_registers[] = { "dsisr", 18 }, /* Data Storage Interrupt Status Register */ { "f.0", 0 }, /* Floating point registers */ - { "f.1", 1 }, - { "f.10", 10 }, - { "f.11", 11 }, - { "f.12", 12 }, - { "f.13", 13 }, - { "f.14", 14 }, - { "f.15", 15 }, - { "f.16", 16 }, - { "f.17", 17 }, - { "f.18", 18 }, - { "f.19", 19 }, - { "f.2", 2 }, - { "f.20", 20 }, - { "f.21", 21 }, - { "f.22", 22 }, - { "f.23", 23 }, - { "f.24", 24 }, - { "f.25", 25 }, - { "f.26", 26 }, - { "f.27", 27 }, - { "f.28", 28 }, - { "f.29", 29 }, - { "f.3", 3 }, + { "f.1", 1 }, + { "f.10", 10 }, + { "f.11", 11 }, + { "f.12", 12 }, + { "f.13", 13 }, + { "f.14", 14 }, + { "f.15", 15 }, + { "f.16", 16 }, + { "f.17", 17 }, + { "f.18", 18 }, + { "f.19", 19 }, + { "f.2", 2 }, + { "f.20", 20 }, + { "f.21", 21 }, + { "f.22", 22 }, + { "f.23", 23 }, + { "f.24", 24 }, + { "f.25", 25 }, + { "f.26", 26 }, + { "f.27", 27 }, + { "f.28", 28 }, + { "f.29", 29 }, + { "f.3", 3 }, { "f.30", 30 }, { "f.31", 31 }, - { "f.4", 4 }, - { "f.5", 5 }, - { "f.6", 6 }, - { "f.7", 7 }, - { "f.8", 8 }, - { "f.9", 9 }, - - { "f0", 0 }, - { "f1", 1 }, - { "f10", 10 }, - { "f11", 11 }, - { "f12", 12 }, - { "f13", 13 }, - { "f14", 14 }, - { "f15", 15 }, - { "f16", 16 }, - { "f17", 17 }, - { "f18", 18 }, - { "f19", 19 }, - { "f2", 2 }, - { "f20", 20 }, - { "f21", 21 }, - { "f22", 22 }, - { "f23", 23 }, - { "f24", 24 }, - { "f25", 25 }, - { "f26", 26 }, - { "f27", 27 }, - { "f28", 28 }, - { "f29", 29 }, - { "f3", 3 }, + { "f.4", 4 }, + { "f.5", 5 }, + { "f.6", 6 }, + { "f.7", 7 }, + { "f.8", 8 }, + { "f.9", 9 }, + + { "f0", 0 }, + { "f1", 1 }, + { "f10", 10 }, + { "f11", 11 }, + { "f12", 12 }, + { "f13", 13 }, + { "f14", 14 }, + { "f15", 15 }, + { "f16", 16 }, + { "f17", 17 }, + { "f18", 18 }, + { "f19", 19 }, + { "f2", 2 }, + { "f20", 20 }, + { "f21", 21 }, + { "f22", 22 }, + { "f23", 23 }, + { "f24", 24 }, + { "f25", 25 }, + { "f26", 26 }, + { "f27", 27 }, + { "f28", 28 }, + { "f29", 29 }, + { "f3", 3 }, { "f30", 30 }, { "f31", 31 }, - { "f4", 4 }, - { "f5", 5 }, - { "f6", 6 }, - { "f7", 7 }, - { "f8", 8 }, - { "f9", 9 }, + { "f4", 4 }, + { "f5", 5 }, + { "f6", 6 }, + { "f7", 7 }, + { "f8", 8 }, + { "f9", 9 }, { "fpscr", 0 }, @@ -439,11 +448,77 @@ static const struct pd_reg pre_defined_registers[] = { "srr0", 26 }, /* Machine Status Save/Restore Register 0 */ { "srr1", 27 }, /* Machine Status Save/Restore Register 1 */ + { "v.0", 0 }, /* Vector registers */ + { "v.1", 1 }, + { "v.10", 10 }, + { "v.11", 11 }, + { "v.12", 12 }, + { "v.13", 13 }, + { "v.14", 14 }, + { "v.15", 15 }, + { "v.16", 16 }, + { "v.17", 17 }, + { "v.18", 18 }, + { "v.19", 19 }, + { "v.2", 2 }, + { "v.20", 20 }, + { "v.21", 21 }, + { "v.22", 22 }, + { "v.23", 23 }, + { "v.24", 24 }, + { "v.25", 25 }, + { "v.26", 26 }, + { "v.27", 27 }, + { "v.28", 28 }, + { "v.29", 29 }, + { "v.3", 3 }, + { "v.30", 30 }, + { "v.31", 31 }, + { "v.4", 4 }, + { "v.5", 5 }, + { "v.6", 6 }, + { "v.7", 7 }, + { "v.8", 8 }, + { "v.9", 9 }, + + { "v0", 0 }, + { "v1", 1 }, + { "v10", 10 }, + { "v11", 11 }, + { "v12", 12 }, + { "v13", 13 }, + { "v14", 14 }, + { "v15", 15 }, + { "v16", 16 }, + { "v17", 17 }, + { "v18", 18 }, + { "v19", 19 }, + { "v2", 2 }, + { "v20", 20 }, + { "v21", 21 }, + { "v22", 22 }, + { "v23", 23 }, + { "v24", 24 }, + { "v25", 25 }, + { "v26", 26 }, + { "v27", 27 }, + { "v28", 28 }, + { "v29", 29 }, + { "v3", 3 }, + { "v30", 30 }, + { "v31", 31 }, + { "v4", 4 }, + { "v5", 5 }, + { "v6", 6 }, + { "v7", 7 }, + { "v8", 8 }, + { "v9", 9 }, + { "xer", 1 }, }; -#define REG_NAME_CNT (sizeof(pre_defined_registers) / sizeof(struct pd_reg)) +#define REG_NAME_CNT (sizeof (pre_defined_registers) / sizeof (struct pd_reg)) /* Given NAME, find the register number associated with that name, return the integer value associated with the given name or -1 on failure. */ @@ -512,11 +587,11 @@ register_name (expressionP) reg_number = reg_name_search (pre_defined_registers, REG_NAME_CNT, name); /* look to see if it's in the register table */ - if (reg_number >= 0) + if (reg_number >= 0) { expressionP->X_op = O_register; expressionP->X_add_number = reg_number; - + /* make the rest nice */ expressionP->X_add_symbol = NULL; expressionP->X_op_symbol = NULL; @@ -591,6 +666,9 @@ static int ppc_cpu = 0; PPC_OPCODE_32 or PPC_OPCODE_64. */ static unsigned long ppc_size = PPC_OPCODE_32; +/* Whether to target xcoff64 */ +static int ppc_xcoff64 = 0; + /* Opcode hash table. */ static struct hash_control *ppc_hash; @@ -599,7 +677,7 @@ static struct hash_control *ppc_macro_hash; #ifdef OBJ_ELF /* What type of shared library support to use */ -static enum { SHLIB_NONE, SHLIB_PIC, SHILB_MRELOCATABLE } shlib = SHLIB_NONE; +static enum { SHLIB_NONE, SHLIB_PIC, SHLIB_MRELOCATABLE } shlib = SHLIB_NONE; /* Flags to set in the elf header */ static flagword ppc_flags = 0; @@ -670,7 +748,7 @@ static segT reldata_section; static segT rdata_section; static segT tocdata_section; -/* The current section and the previous section. See ppc_previous. */ +/* The current section and the previous section. See ppc_previous. */ static segT ppc_previous_section; static segT ppc_current_section; @@ -688,7 +766,7 @@ CONST char *md_shortopts = "um:"; struct option md_longopts[] = { {NULL, no_argument, NULL, 0} }; -size_t md_longopts_size = sizeof(md_longopts); +size_t md_longopts_size = sizeof (md_longopts); int md_parse_option (c, arg) @@ -740,6 +818,16 @@ md_parse_option (c, arg) break; #endif + /* a64 and a32 determine whether to use XCOFF64 or XCOFF32. */ + case 'a': + if (strcmp (arg, "64") == 0) + ppc_xcoff64 = 1; + else if (strcmp (arg, "32") == 0) + ppc_xcoff64 = 0; + else + return 0; + break; + case 'm': /* -mpwrx and -mpwr2 mean to assemble for the IBM POWER/2 (RIOS2). */ @@ -749,7 +837,7 @@ md_parse_option (c, arg) else if (strcmp (arg, "pwr") == 0) ppc_cpu = PPC_OPCODE_POWER; /* -m601 means to assemble for the Motorola PowerPC 601, which includes - instructions that are holdovers from the Power. */ + instructions that are holdovers from the Power. */ else if (strcmp (arg, "601") == 0) ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_601; /* -mppc, -mppc32, -m603, and -m604 mean to assemble for the @@ -757,9 +845,12 @@ md_parse_option (c, arg) else if (strcmp (arg, "ppc") == 0 || strcmp (arg, "ppc32") == 0 || strcmp (arg, "403") == 0 + || strcmp (arg, "405") == 0 || strcmp (arg, "603") == 0 || strcmp (arg, "604") == 0) ppc_cpu = PPC_OPCODE_PPC; + else if (strcmp (arg, "7400") == 0) + ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC; /* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC 620. */ else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0) @@ -791,13 +882,13 @@ md_parse_option (c, arg) /* -mrelocatable/-mrelocatable-lib -- warn about initializations that require relocation */ else if (strcmp (arg, "relocatable") == 0) { - shlib = SHILB_MRELOCATABLE; + shlib = SHLIB_MRELOCATABLE; ppc_flags |= EF_PPC_RELOCATABLE; } else if (strcmp (arg, "relocatable-lib") == 0) { - shlib = SHILB_MRELOCATABLE; + shlib = SHLIB_MRELOCATABLE; ppc_flags |= EF_PPC_RELOCATABLE_LIB; } @@ -869,13 +960,13 @@ void md_show_usage (stream) FILE *stream; { - fprintf(stream, _("\ + fprintf (stream, _("\ PowerPC options:\n\ -u ignored\n\ -mpwrx, -mpwr2 generate code for IBM POWER/2 (RIOS2)\n\ -mpwr generate code for IBM POWER (RIOS1)\n\ -m601 generate code for Motorola PowerPC 601\n\ --mppc, -mppc32, -m403, -m603, -m604\n\ +-mppc, -mppc32, -m403, -m405, -m603, -m604\n\ generate code for Motorola PowerPC 603/604\n\ -mppc64, -m620 generate code for Motorola PowerPC 620\n\ -mppc64bridge generate code for PowerPC 64, including bridge insns\n\ @@ -884,7 +975,7 @@ PowerPC options:\n\ -mregnames Allow symbolic names for registers\n\ -mno-regnames Do not allow symbolic names for registers\n")); #ifdef OBJ_ELF - fprintf(stream, _("\ + fprintf (stream, _("\ -mrelocatable support for GCC's -mrelocatble option\n\ -mrelocatable-lib support for GCC's -mrelocatble-lib option\n\ -memb set PPC_EMB bit in ELF flags\n\ @@ -948,6 +1039,37 @@ ppc_arch () return bfd_arch_unknown; } +unsigned long +ppc_mach () +{ + return (ppc_size == PPC_OPCODE_64) ? 620 : 0; +} + +int +ppc_subseg_align() +{ + return (ppc_xcoff64) ? 3 : 2; +} + +extern char* +ppc_target_format() +{ +#ifdef OBJ_COFF +#ifdef TE_PE + return (target_big_endian ? "pe-powerpc" : "pe-powerpcle"); +#elif TE_POWERMAC +#else + return (ppc_xcoff64 ? "aixcoff64-rs6000" : "aixcoff-rs6000"); +#endif +#ifdef TE_POWERMAC + return "xcoff-powermac"; +#endif +#endif +#ifdef OBJ_ELF + return (target_big_endian ? "elf32-powerpc" : "elf32-powerpcle"); +#endif +} + /* This function is called when the assembler starts up. It is called after the options have been parsed and the output file has been opened. */ @@ -964,7 +1086,7 @@ md_begin () ppc_set_cpu (); #ifdef OBJ_ELF - /* Set the ELF flags if desired. */ + /* Set the ELF flags if desired. */ if (ppc_flags && !msolaris) bfd_set_private_flags (stdoutput, ppc_flags); #endif @@ -1042,7 +1164,7 @@ md_begin () #ifdef TE_PE ppc_current_section = text_section; - ppc_previous_section = 0; + ppc_previous_section = 0; #endif } @@ -1147,7 +1269,7 @@ ppc_elf_suffix (str_p, exp_p) int len; struct map_bfd *ptr; -#define MAP(str,reloc) { str, sizeof(str)-1, reloc } +#define MAP(str,reloc) { str, sizeof (str)-1, reloc } static struct map_bfd mapping[] = { MAP ("l", BFD_RELOC_LO16), @@ -1248,9 +1370,9 @@ ppc_elf_suffix (str_p, exp_p) return BFD_RELOC_UNUSED; } -/* Like normal .long/.short/.word, except support @got, etc. */ +/* Like normal .long/.short/.word, except support @got, etc. */ /* clobbers input_line_pointer, checks */ -/* end-of-line. */ +/* end-of-line. */ static void ppc_elf_cons (nbytes) register int nbytes; /* 1=.byte, 2=.word, 4=.long */ @@ -1290,7 +1412,7 @@ ppc_elf_cons (nbytes) } while (*input_line_pointer++ == ','); - input_line_pointer--; /* Put terminator back into stream. */ + input_line_pointer--; /* Put terminator back into stream. */ demand_empty_rest_of_line (); } @@ -1434,7 +1556,7 @@ ppc_elf_validate_fix (fixp, seg) case SHLIB_PIC: return; - case SHILB_MRELOCATABLE: + case SHLIB_MRELOCATABLE: if (fixp->fx_r_type <= BFD_RELOC_UNUSED && fixp->fx_r_type != BFD_RELOC_16_GOTOFF && fixp->fx_r_type != BFD_RELOC_HI16_GOTOFF @@ -1476,7 +1598,7 @@ ppc_elf_validate_fix (fixp, seg) * * Anything else is an error of one kind or another. * - * out: + * out: * return value: success or failure * toc_kind: kind of toc reference * input_line_pointer: @@ -1492,8 +1614,8 @@ ppc_elf_validate_fix (fixp, seg) * */ -enum toc_size_qualifier -{ +enum toc_size_qualifier +{ default_toc, /* The toc cell constructed should be the system default size */ data_in_toc, /* This is a direct reference to a toc cell */ must_be_32, /* The toc cell constructed must be 32 bits wide */ @@ -1515,24 +1637,24 @@ parse_toc_entry(toc_kind) /* skip over the '[' , and whitespace */ ++input_line_pointer; SKIP_WHITESPACE (); - + /* find the spelling of the operand */ toc_spec = input_line_pointer; c = get_symbol_end (); - if (strcmp(toc_spec, "toc") == 0) + if (strcmp(toc_spec, "toc") == 0) { t = default_toc; } - else if (strcmp(toc_spec, "tocv") == 0) + else if (strcmp(toc_spec, "tocv") == 0) { t = data_in_toc; } - else if (strcmp(toc_spec, "toc32") == 0) + else if (strcmp(toc_spec, "toc32") == 0) { t = must_be_32; } - else if (strcmp(toc_spec, "toc64") == 0) + else if (strcmp(toc_spec, "toc64") == 0) { t = must_be_64; } @@ -1547,8 +1669,8 @@ parse_toc_entry(toc_kind) /* now find the ']' */ *input_line_pointer = c; /* put back the delimiting char */ - SKIP_WHITESPACE (); /* leading whitespace could be there. */ - c = *input_line_pointer++; /* input_line_pointer->past char in c. */ + SKIP_WHITESPACE (); /* leading whitespace could be there. */ + c = *input_line_pointer++; /* input_line_pointer->past char in c. */ if (c != ']') { @@ -1721,13 +1843,13 @@ md_assemble (str) input_line_pointer = str; #ifdef TE_PE - if (*input_line_pointer == '[') + if (*input_line_pointer == '[') { /* We are expecting something like the second argument here: lwz r4,[toc].GS.0.static_int(rtoc) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - The argument following the `]' must be a symbol name, and the + The argument following the `]' must be a symbol name, and the register must be the toc register: 'rtoc' or '2' The effect is to 0 as the displacement field @@ -1755,7 +1877,7 @@ md_assemble (str) /* go parse off the [tocXX] part */ valid_toc = parse_toc_entry(&toc_kind); - if (!valid_toc) + if (!valid_toc) { /* Note: message has already been issued. */ /* FIXME: what sort of recovery should we do? */ @@ -1781,8 +1903,8 @@ md_assemble (str) /* FIXME: It's a little confusing what the tocv qualifier can */ /* be used for. At the very least, I've seen three */ /* uses, only one of which I'm sure I can explain. */ - if (ex.X_op == O_symbol) - { + if (ex.X_op == O_symbol) + { assert (ex.X_add_symbol != NULL); if (symbol_get_bfdsym (ex.X_add_symbol)->section != tocdata_section) @@ -1806,10 +1928,10 @@ md_assemble (str) as_bad (_("Unimplemented toc64 expression modifier")); break; default: - fprintf(stderr, + fprintf (stderr, _("Unexpected return value [%d] from parse_toc_entry!\n"), toc_kind); - abort(); + abort (); break; } @@ -1858,7 +1980,7 @@ md_assemble (str) else if (ex.X_op == O_constant) { #ifdef OBJ_ELF - /* Allow @HA, @L, @H on constants. */ + /* Allow @HA, @L, @H on constants. */ char *orig_str = str; if ((reloc = ppc_elf_suffix (&str, &ex)) != BFD_RELOC_UNUSED) @@ -1978,6 +2100,10 @@ md_assemble (str) f = frag_more (4); md_number_to_chars (f, insn, 4); +#ifdef OBJ_ELF + dwarf2_emit_insn (4); +#endif + /* Create any fixups. At this point we do not use a bfd_reloc_code_real_type, but instead just use the BFD_RELOC_UNUSED plus the operand index. This lets us easily @@ -2003,7 +2129,7 @@ md_assemble (str) offset = target_big_endian ? (4 - size) : 0; if (size < 1 || size > 4) - abort(); + abort (); fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size, &fixups[i].exp, reloc_howto->pc_relative, @@ -2064,7 +2190,7 @@ ppc_macro (str, macro) if (s == (char *) NULL) break; *s++ = '\0'; - } + } if (count != macro->operands) { @@ -2111,7 +2237,7 @@ ppc_macro (str, macro) /* Assemble the constructed instruction. */ md_assemble (complete); -} +} #ifdef OBJ_ELF /* For ELF, add support for SHF_EXCLUDE and SHT_ORDERED */ @@ -2296,7 +2422,7 @@ ppc_comm (lcomm) lcomm_name = input_line_pointer; lcomm_endc = get_symbol_end (); - + lcomm_sym = symbol_find_or_make (lcomm_name); *input_line_pointer = lcomm_endc; @@ -2313,9 +2439,9 @@ ppc_comm (lcomm) ignore_rest_of_line (); return; } - + record_alignment (bss_section, align); - + if (! lcomm || ! S_IS_DEFINED (lcomm_sym)) { @@ -2337,7 +2463,7 @@ ppc_comm (lcomm) subseg_set (bss_section, 1); frag_align (align, 0, 0); - + symbol_set_frag (def_sym, frag_now); pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, def_sym, def_size, (char *) NULL); @@ -2377,7 +2503,7 @@ ppc_comm (lcomm) static void ppc_csect (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2385,7 +2511,7 @@ ppc_csect (ignore) name = input_line_pointer; endc = get_symbol_end (); - + sym = symbol_find_or_make (name); *input_line_pointer = endc; @@ -2478,16 +2604,16 @@ ppc_change_csect (sym) symbol_set_frag (sym, frag_now); S_SET_VALUE (sym, (valueT) frag_now_fix ()); - symbol_get_tc (sym)->align = 2; + symbol_get_tc (sym)->align = (ppc_xcoff64) ? 3 : 2; symbol_get_tc (sym)->output = 1; symbol_get_tc (sym)->within = sym; - + for (list = *list_ptr; symbol_get_tc (list)->next != (symbolS *) NULL; list = symbol_get_tc (list)->next) ; symbol_get_tc (list)->next = sym; - + symbol_remove (sym, &symbol_rootP, &symbol_lastP); symbol_append (sym, symbol_get_tc (list)->within, &symbol_rootP, &symbol_lastP); @@ -2527,7 +2653,7 @@ ppc_section (type) static void ppc_named_section (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *user_name; const char *real_name; @@ -2562,7 +2688,7 @@ ppc_named_section (ignore) static void ppc_extern (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2581,7 +2707,7 @@ ppc_extern (ignore) static void ppc_lglobl (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2604,7 +2730,7 @@ ppc_lglobl (ignore) static void ppc_rename (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2640,7 +2766,7 @@ ppc_rename (ignore) static void ppc_stabx (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int len; @@ -2747,7 +2873,7 @@ ppc_stabx (ignore) static void ppc_function (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2838,7 +2964,7 @@ ppc_function (ignore) static void ppc_bf (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -2866,7 +2992,7 @@ ppc_bf (ignore) static void ppc_ef (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -2915,7 +3041,7 @@ ppc_biei (ei) S_SET_STORAGE_CLASS (sym, ei ? C_EINCL : C_BINCL); symbol_get_tc (sym)->output = 1; - + for (look = last_biei ? last_biei : symbol_rootP; (look != (symbolS *) NULL && (S_GET_STORAGE_CLASS (look) == C_FILE @@ -2939,7 +3065,7 @@ ppc_biei (ei) static void ppc_bs (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -2975,7 +3101,7 @@ ppc_bs (ignore) static void ppc_es (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3000,7 +3126,7 @@ ppc_es (ignore) static void ppc_bb (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3027,7 +3153,7 @@ ppc_bb (ignore) static void ppc_eb (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3052,7 +3178,7 @@ ppc_eb (ignore) static void ppc_bc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; int len; @@ -3075,7 +3201,7 @@ ppc_bc (ignore) static void ppc_ec (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *sym; @@ -3095,7 +3221,7 @@ ppc_ec (ignore) static void ppc_toc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (ppc_toc_csect != (symbolS *) NULL) subseg_set (data_section, symbol_get_tc (ppc_toc_csect)->subseg); @@ -3104,7 +3230,7 @@ ppc_toc (ignore) subsegT subseg; symbolS *sym; symbolS *list; - + subseg = ppc_data_subsegment; ++ppc_data_subsegment; @@ -3120,7 +3246,7 @@ ppc_toc (ignore) symbol_get_tc (sym)->within = sym; ppc_toc_csect = sym; - + for (list = ppc_data_csects; symbol_get_tc (list)->next != (symbolS *) NULL; list = symbol_get_tc (list)->next) @@ -3150,8 +3276,16 @@ ppc_xcoff_cons (log_size) } static void +ppc_machine(dummy) + int dummy ATTRIBUTE_UNUSED; +{ + discard_rest_of_line(); + /* What does aix use this for? */ +} + +static void ppc_vbyte (dummy) - int dummy; + int dummy ATTRIBUTE_UNUSED; { expressionS exp; int byte_count; @@ -3269,7 +3403,7 @@ ppc_tc (ignore) else { ++input_line_pointer; - cons (4); + cons ((ppc_size == PPC_OPCODE_64) ? 8 : 4); } } @@ -3293,11 +3427,11 @@ ppc_set_current_section (new) */ static void ppc_previous(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { symbolS *tmp; - if (ppc_previous_section == NULL) + if (ppc_previous_section == NULL) { as_warn(_("No previous section to return to. Directive ignored.")); return; @@ -3326,16 +3460,16 @@ ppc_previous(ignore) */ static void ppc_pdata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { - if (pdata_section == 0) + if (pdata_section == 0) { pdata_section = subseg_new (".pdata", 0); - + bfd_set_section_flags (stdoutput, pdata_section, (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY | SEC_DATA )); - + bfd_set_section_alignment (stdoutput, pdata_section, 2); } else @@ -3361,9 +3495,9 @@ ppc_pdata(ignore) */ static void ppc_ydata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { - if (ydata_section == 0) + if (ydata_section == 0) { ydata_section = subseg_new (".ydata", 0); bfd_set_section_flags (stdoutput, ydata_section, @@ -3398,14 +3532,14 @@ ppc_ydata(ignore) */ static void ppc_reldata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (reldata_section == 0) { reldata_section = subseg_new (".reldata", 0); bfd_set_section_flags (stdoutput, reldata_section, - ( SEC_ALLOC | SEC_LOAD | SEC_RELOC + ( SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA )); bfd_set_section_alignment (stdoutput, reldata_section, 2); @@ -3429,7 +3563,7 @@ ppc_reldata(ignore) */ static void ppc_rdata(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (rdata_section == 0) { @@ -3448,7 +3582,7 @@ ppc_rdata(ignore) } /* pseudo-op: .ualong - behaviour: much like .int, with the exception that no alignment is + behaviour: much like .int, with the exception that no alignment is performed. FIXME: test the alignment statement errors: None @@ -3456,7 +3590,7 @@ ppc_rdata(ignore) */ static void ppc_ualong(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* try for long */ cons ( 4 ); @@ -3471,7 +3605,7 @@ ppc_ualong(ignore) */ static void ppc_znop(ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { unsigned long insn; const struct powerpc_opcode *opcode; @@ -3519,10 +3653,10 @@ ppc_znop(ignore) } -/* pseudo-op: - behaviour: - errors: - warnings: +/* pseudo-op: + behaviour: + errors: + warnings: */ static void ppc_pe_comm(lcomm) @@ -3622,7 +3756,7 @@ ppc_pe_comm(lcomm) * additions/changes for the moto-pas assembler support. There are three * categories: * - * FIXME: I just noticed this. This doesn't work at all really. It it + * FIXME: I just noticed this. This doesn't work at all really. It it * setting bits that bfd probably neither understands or uses. The * correct approach (?) will have to incorporate extra fields attached * to the section to hold the system specific stuff. (krk) @@ -3655,7 +3789,7 @@ ppc_pe_comm(lcomm) void ppc_pe_section (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* Strip out the section name */ char *section_name; @@ -3721,7 +3855,7 @@ ppc_pe_section (ignore) as_bad (_("Unsupported section attribute -- 'a'")); break; case 'c': /* code section */ - flags |= SEC_CODE; + flags |= SEC_CODE; break; case 'd': /* section has initialized data */ flags |= SEC_DATA; @@ -3737,7 +3871,7 @@ ppc_pe_section (ignore) flags |= SEC_HAS_CONTENTS; break; case 'n': /* section can be discarded */ - flags &=~ SEC_LOAD; + flags &=~ SEC_LOAD; break; case 'R': /* Remove section at link time */ flags |= SEC_NEVER_LOAD; @@ -3817,7 +3951,7 @@ ppc_pe_section (ignore) static void ppc_pe_function (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char endc; @@ -3840,7 +3974,7 @@ ppc_pe_function (ignore) static void ppc_pe_tocd (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (tocdata_section == 0) { @@ -4245,7 +4379,7 @@ ppc_frob_symbol (sym) } a->x_csect.x_smtyp = XTY_LD; } - + a->x_csect.x_parmhash = 0; a->x_csect.x_snhash = 0; if (symbol_get_tc (sym)->class == -1) @@ -4354,8 +4488,8 @@ ppc_frob_section (sec) #endif /* OBJ_XCOFF */ /* Turn a string in input_line_pointer into a floating point constant - of type type, and store the appropriate bytes in *litp. The number - of LITTLENUMS emitted is stored in *sizep . An error message is + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is returned, or NULL on OK. */ char * @@ -4406,7 +4540,7 @@ md_atof (type, litp, sizep) litp += 2; } } - + return NULL; } @@ -4461,7 +4595,6 @@ md_convert_frag (abfd, sec, fragp) /* We have no need to default values of symbols. */ -/*ARGSUSED*/ symbolS * md_undefined_symbol (name) char *name ATTRIBUTE_UNUSED; @@ -4802,7 +4935,6 @@ md_apply_fix3 (fixp, valuep, seg) else if ((operand->flags & PPC_OPERAND_PARENS) != 0 && operand->bits == 16 && operand->shift == 0 - && operand->insert == NULL && fixp->fx_addsy != NULL && ppc_is_toc_sym (fixp->fx_addsy)) { @@ -4849,6 +4981,14 @@ md_apply_fix3 (fixp, valuep, seg) value, 4); break; + case BFD_RELOC_64: + if (fixp->fx_pcrel) + fixp->fx_r_type = BFD_RELOC_64_PCREL; + /* fall through */ + case BFD_RELOC_64_PCREL: + md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where, + value, 8); + break; case BFD_RELOC_LO16: case BFD_RELOC_16: case BFD_RELOC_GPREL16: @@ -4934,7 +5074,7 @@ md_apply_fix3 (fixp, valuep, seg) { char *where; unsigned long insn; - + /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. */ where = fixp->fx_frag->fr_literal + fixp->fx_where; @@ -4971,7 +5111,7 @@ md_apply_fix3 (fixp, valuep, seg) break; default: - fprintf(stderr, + fprintf (stderr, _("Gas failure, reloc value %d\n"), fixp->fx_r_type); fflush(stderr); abort (); diff --git a/contrib/binutils/gas/config/tc-ppc.h b/contrib/binutils/gas/config/tc-ppc.h index 783a215..f246cd7 100644 --- a/contrib/binutils/gas/config/tc-ppc.h +++ b/contrib/binutils/gas/config/tc-ppc.h @@ -18,7 +18,7 @@ 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. */ + 02111-1307, USA. */ #define TC_PPC @@ -47,31 +47,16 @@ struct fix; /* The target BFD architecture. */ #define TARGET_ARCH (ppc_arch ()) +#define TARGET_MACH (ppc_mach ()) extern enum bfd_architecture ppc_arch PARAMS ((void)); +extern unsigned long ppc_mach PARAMS ((void)); /* Whether or not the target is big endian */ extern int target_big_endian; /* The target BFD format. */ -#ifdef OBJ_COFF -#ifdef TE_PE -#define TARGET_FORMAT (target_big_endian ? "pe-powerpc" : "pe-powerpcle") -#else -#define TARGET_FORMAT "aixcoff-rs6000" -#endif -#endif - -/* PowerMac has a BFD slightly different from AIX's. */ -#ifdef TE_POWERMAC -#ifdef TARGET_FORMAT -#undef TARGET_FORMAT -#endif -#define TARGET_FORMAT "xcoff-powermac" -#endif - -#ifdef OBJ_ELF -#define TARGET_FORMAT (target_big_endian ? "elf32-powerpc" : "elf32-powerpcle") -#endif +#define TARGET_FORMAT (ppc_target_format ()) +extern char* ppc_target_format (); /* Permit temporary numeric labels. */ #define LOCAL_LABELS_FB 1 @@ -186,7 +171,8 @@ extern int ppc_frob_symbol PARAMS ((symbolS *)); extern void ppc_adjust_symtab PARAMS ((void)); /* Niclas Andersson says this is needed. */ -#define SUB_SEGMENT_ALIGN(SEG) 2 +extern int ppc_subseg_align PARAMS ((void)); +#define SUB_SEGMENT_ALIGN(SEG) ppc_subseg_align() /* We also need to copy, in particular, the class of the symbol, over what obj-coff would otherwise have copied. */ @@ -200,7 +186,6 @@ do { \ symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \ } while (0) - #endif /* OBJ_XCOFF */ #ifdef OBJ_ELF @@ -246,7 +231,7 @@ extern int ppc_section_flags PARAMS ((int, int, int)); #define tc_comment_chars ppc_comment_chars extern const char *ppc_comment_chars; -/* Keep relocations relative to the GOT, or non-PC relative. */ +/* Keep relocations relative to the GOT, or non-PC relative. */ #define tc_fix_adjustable(FIX) \ ((FIX)->fx_r_type != BFD_RELOC_16_GOTOFF \ && (FIX)->fx_r_type != BFD_RELOC_LO16_GOTOFF \ @@ -273,6 +258,7 @@ extern const char *ppc_comment_chars; && S_IS_DEFINED ((FIX)->fx_addsy) \ && ! S_IS_COMMON ((FIX)->fx_addsy))) +#define DWARF2_LINE_MIN_INSN_LENGTH 4 #endif /* OBJ_ELF */ /* call md_apply_fix3 with segment instead of md_apply_fix */ @@ -286,4 +272,3 @@ extern long md_pcrel_from_section PARAMS ((struct fix *, segT)); extern int ppc_parse_name PARAMS ((const char *, struct expressionS *)); #define md_operand(x) - diff --git a/contrib/binutils/gas/config/tc-sparc.c b/contrib/binutils/gas/config/tc-sparc.c index 149610e..6c9827c 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-96, 97, 98, 99, 2000 Free Software Foundation, Inc. + Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. GAS is free software; you can redistribute it and/or modify @@ -15,7 +16,7 @@ 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. */ + Boston, MA 02111-1307, USA. */ #include #include @@ -27,6 +28,7 @@ #ifdef OBJ_ELF #include "elf/sparc.h" +#include "dwarf2dbg.h" #endif static struct sparc_arch *lookup_arch PARAMS ((char *)); @@ -91,6 +93,9 @@ static enum sparc_opcode_arch_val warn_after_architecture; has been used in -64. */ static int no_undeclared_regs; +/* Non-zero if we should try to relax jumps and calls. */ +static int sparc_relax; + /* Non-zero if we are generating PIC code. */ int sparc_pic_code; @@ -114,7 +119,7 @@ static symbolS *globals[8]; || SPARC_OPCODE_ARCH_V9_P (max_architecture)) #endif -/* handle of the OPCODE hash table */ +/* Handle of the OPCODE hash table. */ static struct hash_control *op_hash; static int log2 PARAMS ((int)); @@ -130,7 +135,7 @@ static void s_register PARAMS ((int)); const pseudo_typeS md_pseudo_table[] = { - {"align", s_align_bytes, 0}, /* Defaulting is invalid (0) */ + {"align", s_align_bytes, 0}, /* Defaulting is invalid (0). */ {"common", s_common, 0}, {"empty", s_empty, 0}, {"global", s_globl, 0}, @@ -147,7 +152,9 @@ const pseudo_typeS md_pseudo_table[] = {"uaword", s_uacons, 4}, {"uaxword", s_uacons, 8}, #ifdef OBJ_ELF - /* these are specific to sparc/svr4 */ + {"file", dwarf2_directive_file, 0}, + {"loc", dwarf2_directive_loc, 0}, + /* These are specific to sparc/svr4. */ {"2byte", s_uacons, 2}, {"4byte", s_uacons, 4}, {"8byte", s_uacons, 8}, @@ -156,37 +163,40 @@ const pseudo_typeS md_pseudo_table[] = {NULL, 0, 0}, }; -const int md_reloc_size = 12; /* Size of relocation record */ +/* Size of relocation record. */ +const int md_reloc_size = 12; /* This array holds the chars that always start a comment. If the - pre-processor is disabled, these aren't very useful */ -const char comment_chars[] = "!"; /* JF removed '|' from comment_chars */ + pre-processor is disabled, these aren't very useful. */ +const char comment_chars[] = "!"; /* JF removed '|' from + comment_chars. */ /* This array holds the chars that only start a comment at the beginning of a line. If the line seems to have the form '# 123 filename' - .line and .file directives will appear in the pre-processed output */ + .line and .file directives will appear in the pre-processed output. */ /* Note that input_file.c hand checks for '#' at the beginning of the first line of the input file. This is because the compiler outputs - #NO_APP at the beginning of its output. */ + #NO_APP at the beginning of its output. */ /* Also note that comments started like this one will always - work if '/' isn't otherwise defined. */ + work if '/' isn't otherwise defined. */ const char line_comment_chars[] = "#"; -const char line_separator_chars[] = ""; +const char line_separator_chars[] = ";"; -/* Chars that can be used to separate mant from exp in floating point nums */ +/* Chars that can be used to separate mant from exp in floating point + nums. */ const char EXP_CHARS[] = "eE"; -/* Chars that mean this number is a floating point constant */ -/* As in 0f12.456 */ -/* or 0d1.2345e12 */ +/* Chars that mean this number is a floating point constant. + As in 0f12.456 + or 0d1.2345e12 */ const char FLT_CHARS[] = "rRsSfFdDxXpP"; /* Also be aware that MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT may have to be changed in read.c. Ideally it shouldn't have to know about it at all, but nothing is ideal around here. */ -#define isoctal(c) ((unsigned)((c) - '0') < '8') +#define isoctal(c) ((unsigned) ((c) - '0') < '8') struct sparc_it { @@ -210,7 +220,7 @@ static void output_insn and file formats. */ enum sparc_arch_types {v6, v7, v8, sparclet, sparclite, sparc86x, v8plus, - v8plusa, v9, v9a, v9_64}; + v8plusa, v9, v9a, v9b, v9_64}; static struct sparc_arch { char *name; @@ -230,8 +240,10 @@ static struct sparc_arch { { "sparc86x", "sparclite", sparc86x, 32, 1 }, { "v8plus", "v9", v9, 0, 1 }, { "v8plusa", "v9a", v9, 0, 1 }, + { "v8plusb", "v9b", v9, 0, 1 }, { "v9", "v9", v9, 0, 1 }, { "v9a", "v9a", v9, 0, 1 }, + { "v9b", "v9b", v9, 0, 1 }, /* This exists to allow configure.in/Makefile.in to pass one value to specify both the default machine and default word size. */ { "v9-64", "v9", v9, 64, 0 }, @@ -294,7 +306,8 @@ sparc_target_format () return "a.out-sunos-big"; else if (default_arch_type == sparc86x && target_little_endian_data) return "a.out-sunos-big"; - else return "a.out-sparc-little"; + else + return "a.out-sparc-little"; #else return "a.out-sunos-big"; #endif @@ -320,8 +333,7 @@ sparc_target_format () abort (); } -/* - * md_parse_option +/* md_parse_option * Invocation line includes a switch not recognized by the base assembler. * See if it's a processor-specific option. These are: * @@ -330,16 +342,20 @@ sparc_target_format () * * -Av6, -Av7, -Av8, -Asparclite, -Asparclet * Standard 32 bit architectures. - * -Av8plus, -Av8plusa - * Sparc64 in a 32 bit world. - * -Av9, -Av9a + * -Av9, -Av9a, -Av9b * Sparc64 in either a 32 or 64 bit world (-32/-64 says which). * This used to only mean 64 bits, but properly specifying it * complicated gcc's ASM_SPECs, so now opcode selection is * specified orthogonally to word size (except when specifying * the default, but that is an internal implementation detail). - * -xarch=v8plus, -xarch=v8plusa - * Same as -Av8plus{,a}, for compatibility with Sun's assembler. + * -Av8plus, -Av8plusa, -Av8plusb + * Same as -Av9{,a,b}. + * -xarch=v8plus, -xarch=v8plusa, -xarch=v8plusb + * Same as -Av8plus{,a,b} -32, for compatibility with Sun's + * assembler. + * -xarch=v9, -xarch=v9a, -xarch=v9b + * Same as -Av9{,a,b} -64, for compatibility with Sun's + * assembler. * * Select the architecture and possibly the file format. * Instructions or features not supported by the selected @@ -348,7 +364,7 @@ sparc_target_format () * The default is to start at v6, and bump the architecture up * whenever an instruction is seen at a higher level. In 32 bit * environments, v9 is not bumped up to, the user must pass - * -Av8plus{,a}. + * -Av8plus{,a,b}. * * If -bump is specified, a warning is printing when bumping to * higher levels. @@ -415,9 +431,14 @@ struct option md_longopts[] = { #define OPTION_UNDECLARED_REGS (OPTION_MD_BASE + 13) {"undeclared-regs", no_argument, NULL, OPTION_UNDECLARED_REGS}, #endif +#define OPTION_RELAX (OPTION_MD_BASE + 14) + {"relax", no_argument, NULL, OPTION_RELAX}, +#define OPTION_NO_RELAX (OPTION_MD_BASE + 15) + {"no-relax", no_argument, NULL, OPTION_NO_RELAX}, {NULL, no_argument, NULL, 0} }; -size_t md_longopts_size = sizeof(md_longopts); + +size_t md_longopts_size = sizeof (md_longopts); int md_parse_option (c, arg) @@ -437,15 +458,13 @@ md_parse_option (c, arg) break; case OPTION_XARCH: - /* This is for compatibility with Sun's assembler. */ - if (strcmp (arg, "v8plus") != 0 - && strcmp (arg, "v8plusa") != 0) - { - as_bad (_("invalid architecture -xarch=%s"), arg); - return 0; - } - - /* fall through */ +#ifdef OBJ_ELF + if (strncmp (arg, "v9", 2) != 0) + md_parse_option (OPTION_32, NULL); + else + md_parse_option (OPTION_64, NULL); +#endif + /* Fall through. */ case 'A': { @@ -456,7 +475,10 @@ md_parse_option (c, arg) if (sa == NULL || ! sa->user_option_p) { - as_bad (_("invalid architecture -A%s"), arg); + if (c == OPTION_XARCH) + as_bad (_("invalid architecture -xarch=%s"), arg); + else + as_bad (_("invalid architecture -A%s"), arg); return 0; } @@ -547,15 +569,15 @@ md_parse_option (c, arg) case 'Q': /* Qy - do emit .comment - Qn - do not emit .comment */ + Qn - do not emit .comment. */ break; case 's': - /* use .stab instead of .stab.excl */ + /* Use .stab instead of .stab.excl. */ break; case 'q': - /* quick -- native assembler does fewer checks */ + /* quick -- Native assembler does fewer checks. */ break; case 'K': @@ -574,6 +596,14 @@ md_parse_option (c, arg) break; #endif + case OPTION_RELAX: + sparc_relax = 1; + break; + + case OPTION_NO_RELAX: + sparc_relax = 0; + break; + default: return 0; } @@ -586,26 +616,49 @@ md_show_usage (stream) FILE *stream; { const struct sparc_arch *arch; + int column; /* We don't get a chance to initialize anything before we're called, so handle that now. */ if (! default_init_p) init_default_arch (); - fprintf(stream, _("SPARC options:\n")); + fprintf (stream, _("SPARC options:\n")); + column = 0; for (arch = &sparc_arch_table[0]; arch->name; arch++) { + if (!arch->user_option_p) + continue; if (arch != &sparc_arch_table[0]) fprintf (stream, " | "); - if (arch->user_option_p) - fprintf (stream, "-A%s", arch->name); + if (column + strlen(arch->name) > 70) + { + column = 0; + fputc ('\n', stream); + } + column += 5 + 2 + strlen(arch->name); + fprintf (stream, "-A%s", arch->name); } - fprintf (stream, _("\n-xarch=v8plus | -xarch=v8plusa\n")); - fprintf (stream, _("\ + for (arch = &sparc_arch_table[0]; arch->name; arch++) + { + if (!arch->user_option_p) + continue; + fprintf (stream, " | "); + if (column + strlen(arch->name) > 65) + { + column = 0; + fputc ('\n', stream); + } + column += 5 + 7 + strlen(arch->name); + fprintf (stream, "-xarch=%s", arch->name); + } + fprintf (stream, _("\n\ specify variant of SPARC architecture\n\ -bump warn when assembler switches architectures\n\ -sparc ignored\n\ ---enforce-aligned-data force .long, etc., to be aligned correctly\n")); +--enforce-aligned-data force .long, etc., to be aligned correctly\n\ +-relax relax jumps and branches (default)\n\ +-no-relax avoid changing any jumps and branches\n")); #ifdef OBJ_AOUT fprintf (stream, _("\ -k generate PIC\n")); @@ -642,7 +695,7 @@ md_show_usage (stream) #endif } -/* native operand size opcode translation */ +/* Native operand size opcode translation. */ struct { char *name; @@ -663,13 +716,13 @@ struct {NULL, NULL, NULL}, }; -/* sparc64 priviledged registers */ +/* sparc64 priviledged registers. */ struct priv_reg_entry - { - char *name; - int regnum; - }; +{ + char *name; + int regnum; +}; struct priv_reg_entry priv_reg_table[] = { @@ -690,14 +743,16 @@ struct priv_reg_entry priv_reg_table[] = {"wstate", 14}, {"fq", 15}, {"ver", 31}, - {"", -1}, /* end marker */ + {"", -1}, /* End marker. */ }; -/* v9a specific asrs */ +/* v9a specific asrs. */ struct priv_reg_entry v9a_asr_table[] = { {"tick_cmpr", 23}, + {"sys_tick_cmpr", 25}, + {"sys_tick", 24}, {"softint", 22}, {"set_softint", 20}, {"pic", 17}, @@ -705,7 +760,7 @@ struct priv_reg_entry v9a_asr_table[] = {"gsr", 19}, {"dcr", 18}, {"clear_softint", 21}, - {"", -1}, /* end marker */ + {"", -1}, /* End marker. */ }; static int @@ -720,7 +775,8 @@ cmp_reg_entry (parg, qarg) } /* This function is called once, at assembler startup time. It should - set up all the tables, etc. that the MD part of the assembler will need. */ + set up all the tables, etc. that the MD part of the assembler will + need. */ void md_begin () @@ -764,15 +820,16 @@ md_begin () for (i = 0; native_op_table[i].name; i++) { const struct sparc_opcode *insn; - char *name = sparc_arch_size == 32 ? native_op_table[i].name32 : - native_op_table[i].name64; - insn = (struct sparc_opcode *)hash_find (op_hash, name); + char *name = ((sparc_arch_size == 32) + ? native_op_table[i].name32 + : native_op_table[i].name64); + insn = (struct sparc_opcode *) hash_find (op_hash, name); if (insn == NULL) - { - as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"), - name, native_op_table[i].name); - lose = 1; - } + { + as_bad (_("Internal error: can't find opcode `%s' for `%s'\n"), + name, native_op_table[i].name); + lose = 1; + } else { retval = hash_insert (op_hash, native_op_table[i].name, (PTR) insn); @@ -821,31 +878,28 @@ md_begin () void sparc_md_end () { + unsigned long mach = bfd_mach_sparc; + if (sparc_arch_size == 64) - { - if (current_architecture == SPARC_OPCODE_ARCH_V9A) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v9a); - else - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v9); - } + switch (current_architecture) + { + case SPARC_OPCODE_ARCH_V9A: mach = bfd_mach_sparc_v9a; break; + case SPARC_OPCODE_ARCH_V9B: mach = bfd_mach_sparc_v9b; break; + default: mach = bfd_mach_sparc_v9; break; + } else - { - if (current_architecture == SPARC_OPCODE_ARCH_V9) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v8plus); - else if (current_architecture == SPARC_OPCODE_ARCH_V9A) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_v8plusa); - else if (current_architecture == SPARC_OPCODE_ARCH_SPARCLET) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_sparclet); - else if (default_arch_type == sparc86x && target_little_endian_data) - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc_sparclite_le); - else - { - /* The sparclite is treated like a normal sparc. Perhaps it shouldn't - be but for now it is (since that's the way it's always been - treated). */ - bfd_set_arch_mach (stdoutput, bfd_arch_sparc, bfd_mach_sparc); - } - } + switch (current_architecture) + { + case SPARC_OPCODE_ARCH_SPARCLET: mach = bfd_mach_sparc_sparclet; break; + case SPARC_OPCODE_ARCH_V9: mach = bfd_mach_sparc_v8plus; break; + case SPARC_OPCODE_ARCH_V9A: mach = bfd_mach_sparc_v8plusa; break; + case SPARC_OPCODE_ARCH_V9B: mach = bfd_mach_sparc_v8plusb; break; + /* The sparclite is treated like a normal sparc. Perhaps it shouldn't + be but for now it is (since that's the way it's always been + treated). */ + default: break; + } + bfd_set_arch_mach (stdoutput, bfd_arch_sparc, mach); } /* Return non-zero if VAL is in the range -(MAX+1) to MAX. */ @@ -860,7 +914,7 @@ in_signed_range (val, max) 0xffffffff is always considered -1 on sparc32. */ if (sparc_arch_size == 32) { - bfd_signed_vma sign = (bfd_signed_vma)1 << 31; + bfd_signed_vma sign = (bfd_signed_vma) 1 << 31; val = ((val & 0xffffffff) ^ sign) - sign; } if (val > max) @@ -950,6 +1004,7 @@ static const struct sparc_opcode *last_insn; static unsigned long last_opcode; /* Handle the set and setuw synthetic instructions. */ + static void synthetize_setuw (insn) const struct sparc_opcode *insn; @@ -961,18 +1016,18 @@ synthetize_setuw (insn) { if (SPARC_OPCODE_ARCH_V9_P (max_architecture)) { - if (sizeof(offsetT) > 4 + if (sizeof (offsetT) > 4 && (the_insn.exp.X_add_number < 0 || the_insn.exp.X_add_number > (offsetT) 0xffffffff)) as_warn (_("set: number not in 0..4294967295 range")); } else { - if (sizeof(offsetT) > 4 + if (sizeof (offsetT) > 4 && (the_insn.exp.X_add_number < -(offsetT) 0x80000000 || the_insn.exp.X_add_number > (offsetT) 0xffffffff)) as_warn (_("set: number not in -2147483648..4294967295 range")); - the_insn.exp.X_add_number = (int)the_insn.exp.X_add_number; + the_insn.exp.X_add_number = (int) the_insn.exp.X_add_number; } } @@ -983,10 +1038,10 @@ synthetize_setuw (insn) { the_insn.opcode = (SETHI_INSN | RD (rd) | ((the_insn.exp.X_add_number >> 10) - & (the_insn.exp.X_op == O_constant ? 0x3fffff : 0))); + & (the_insn.exp.X_op == O_constant + ? 0x3fffff : 0))); the_insn.reloc = (the_insn.exp.X_op != O_constant - ? BFD_RELOC_HI22 - : BFD_RELOC_NONE); + ? BFD_RELOC_HI22 : BFD_RELOC_NONE); output_insn (insn, &the_insn); need_hi22_p = 1; } @@ -999,16 +1054,16 @@ synthetize_setuw (insn) the_insn.opcode = (OR_INSN | (need_hi22_p ? RS1 (rd) : 0) | RD (rd) | IMMED | (the_insn.exp.X_add_number - & (the_insn.exp.X_op != O_constant ? 0 : - need_hi22_p ? 0x3ff : 0x1fff))); + & (the_insn.exp.X_op != O_constant + ? 0 : need_hi22_p ? 0x3ff : 0x1fff))); the_insn.reloc = (the_insn.exp.X_op != O_constant - ? BFD_RELOC_LO10 - : BFD_RELOC_NONE); + ? BFD_RELOC_LO10 : BFD_RELOC_NONE); output_insn (insn, &the_insn); } } - + /* Handle the setsw synthetic instruction. */ + static void synthetize_setsw (insn) const struct sparc_opcode *insn; @@ -1028,13 +1083,13 @@ synthetize_setsw (insn) return; } - if (sizeof(offsetT) > 4 + if (sizeof (offsetT) > 4 && (the_insn.exp.X_add_number < -(offsetT) 0x80000000 || the_insn.exp.X_add_number > (offsetT) 0xffffffff)) as_warn (_("setsw: number not in -2147483648..4294967295 range")); - low32 = the_insn.exp.X_add_number; - + low32 = the_insn.exp.X_add_number; + if (low32 >= 0) { synthetize_setuw (insn); @@ -1042,7 +1097,7 @@ synthetize_setsw (insn) } opc = OR_INSN; - + the_insn.reloc = BFD_RELOC_NONE; /* See if operand is absolute and small; skip sethi if so. */ if (low32 < -(1 << 12)) @@ -1060,6 +1115,7 @@ synthetize_setsw (insn) } /* Handle the setsw synthetic instruction. */ + static void synthetize_setx (insn) const struct sparc_opcode *insn; @@ -1070,7 +1126,7 @@ synthetize_setx (insn) int upper_dstreg; int need_hh22_p = 0, need_hm10_p = 0, need_hi22_p = 0, need_lo10_p = 0; int need_xor10_p = 0; - + #define SIGNEXT32(x) ((((x) & 0xffffffff) ^ 0x80000000) - 0x80000000) lower32 = SIGNEXT32 (the_insn.exp.X_add_number); upper32 = SIGNEXT32 (BSR (the_insn.exp.X_add_number, 32)); @@ -1098,7 +1154,8 @@ synthetize_setx (insn) return; } need_hh22_p = need_hm10_p = need_hi22_p = need_lo10_p = 1; - lower32 = 0; upper32 = 0; + lower32 = 0; + upper32 = 0; } else { @@ -1106,18 +1163,18 @@ synthetize_setx (insn) Otherwise fixup_segment will complain about not being able to write an 8 byte number in a 4 byte field. */ the_insn.exp.X_add_number = 0; - + /* Only need hh22 if `or' insn can't handle constant. */ if (upper32 < -(1 << 12) || upper32 >= (1 << 12)) need_hh22_p = 1; - + /* Does bottom part (after sethi) have bits? */ if ((need_hh22_p && (upper32 & 0x3ff) != 0) /* No hh22, but does upper32 still have bits we can't set from lower32? */ || (! need_hh22_p && upper32 != 0 && upper32 != -1)) need_hm10_p = 1; - + /* If the lower half is all zero, we build the upper half directly into the dst reg. */ if (lower32 != 0 @@ -1131,7 +1188,7 @@ synthetize_setx (insn) || (lower32 < 0 && upper32 != -1) || (lower32 >= 0 && upper32 == -1)) need_hi22_p = 1; - + if (need_hi22_p && upper32 == -1) need_xor10_p = 1; @@ -1147,7 +1204,7 @@ synthetize_setx (insn) /* Output directly to dst reg if lower 32 bits are all zero. */ upper_dstreg = dstreg; } - + if (!upper_dstreg && dstreg) as_warn (_("setx: illegal temporary register g0")); @@ -1159,12 +1216,12 @@ synthetize_setx (insn) ? BFD_RELOC_SPARC_HH22 : BFD_RELOC_NONE); output_insn (insn, &the_insn); } - + if (need_hi22_p) { the_insn.opcode = (SETHI_INSN | RD (dstreg) | (((need_xor10_p ? ~lower32 : lower32) - >> 10) & 0x3fffff)); + >> 10) & 0x3fffff)); the_insn.reloc = (the_insn.exp.X_op != O_constant ? BFD_RELOC_SPARC_LM22 : BFD_RELOC_NONE); output_insn (insn, &the_insn); @@ -1181,7 +1238,7 @@ synthetize_setx (insn) ? BFD_RELOC_SPARC_HM10 : BFD_RELOC_NONE); output_insn (insn, &the_insn); } - + if (need_lo10_p) { /* FIXME: One nice optimization to do here is to OR the low part @@ -1195,7 +1252,7 @@ synthetize_setx (insn) ? BFD_RELOC_LO10 : BFD_RELOC_NONE); output_insn (insn, &the_insn); } - + /* If we needed to build the upper part, shift it into place. */ if (need_hh22_p || need_hm10_p) { @@ -1204,7 +1261,7 @@ synthetize_setx (insn) the_insn.reloc = BFD_RELOC_NONE; output_insn (insn, &the_insn); } - + /* To get -1 in upper32, we do sethi %hi(~x), r; xor r, -0x400 | x, r. */ if (need_xor10_p) { @@ -1268,14 +1325,14 @@ md_assemble (str) switch (special_case) { case SPECIAL_CASE_NONE: - /* normal insn */ + /* Normal insn. */ output_insn (insn, &the_insn); break; case SPECIAL_CASE_SETSW: synthetize_setsw (insn); break; - + case SPECIAL_CASE_SET: synthetize_setuw (insn); break; @@ -1283,24 +1340,24 @@ md_assemble (str) case SPECIAL_CASE_SETX: synthetize_setx (insn); break; - + case SPECIAL_CASE_FDIV: { int rd = (the_insn.opcode >> 25) & 0x1f; - + output_insn (insn, &the_insn); - + /* According to information leaked from Sun, the "fdiv" instructions on early SPARC machines would produce incorrect results sometimes. The workaround is to add an fmovs of the destination register to itself just after the instruction. This was true on machines - with Weitek 1165 float chips, such as the Sun-4/260 and /280. */ + with Weitek 1165 float chips, such as the Sun-4/260 and /280. */ assert (the_insn.reloc == BFD_RELOC_NONE); the_insn.opcode = FMOVS_INSN | rd | RD (rd); output_insn (insn, &the_insn); return; } - + default: as_fatal (_("failed special case insn sanity check")); } @@ -1341,8 +1398,7 @@ sparc_ip (str, pinsn) case ',': comma = 1; - - /*FALLTHROUGH */ + /* Fall through. */ case ' ': *s++ = '\0'; @@ -1371,10 +1427,8 @@ sparc_ip (str, pinsn) the_insn.reloc = BFD_RELOC_NONE; v9_arg_p = 0; - /* - * Build the opcode, checking as we go to make - * sure that the operands match - */ + /* Build the opcode, checking as we go to make sure that the + operands match. */ for (args = insn->args;; ++args) { switch (*args) @@ -1397,10 +1451,12 @@ sparc_ip (str, pinsn) goto error; } kmask |= mask; - while (*s == ' ') { ++s; continue; } + while (*s == ' ') + ++s; if (*s == '|' || *s == '+') ++s; - while (*s == ' ') { ++s; continue; } + while (*s == ' ') + ++s; } } else @@ -1421,6 +1477,24 @@ sparc_ip (str, pinsn) continue; } + case '3': + { + int smask = 0; + + if (! parse_const_expr_arg (&s, &smask)) + { + error_message = _(": invalid siam mode expression"); + goto error; + } + if (smask < 0 || smask > 7) + { + error_message = _(": invalid siam mode number"); + goto error; + } + opcode |= smask; + continue; + } + case '*': { int fcn = 0; @@ -1457,7 +1531,7 @@ sparc_ip (str, pinsn) if (*s == '%') { struct priv_reg_entry *p = priv_reg_table; - unsigned int len = 9999999; /* init to make gcc happy */ + unsigned int len = 9999999; /* Init to make gcc happy. */ s += 1; while (p->name[0] > s[0]) @@ -1489,11 +1563,11 @@ sparc_ip (str, pinsn) case '_': case '/': - /* Parse a v9a ancillary state register. */ + /* Parse a v9a/v9b ancillary state register. */ if (*s == '%') { struct priv_reg_entry *p = v9a_asr_table; - unsigned int len = 9999999; /* init to make gcc happy */ + unsigned int len = 9999999; /* Init to make gcc happy. */ s += 1; while (p->name[0] > s[0]) @@ -1507,14 +1581,22 @@ sparc_ip (str, pinsn) } if (p->name[0] != s[0]) { - error_message = _(": unrecognizable v9a ancillary state register"); + error_message = _(": unrecognizable v9a or v9b ancillary state register"); goto error; } if (*args == '/' && (p->regnum == 20 || p->regnum == 21)) { error_message = _(": rd on write only ancillary state register"); goto error; - } + } + if (p->regnum >= 24 + && (insn->architecture + & SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9A))) + { + /* %sys_tick and %sys_tick_cmpr are v9bnotv9a */ + error_message = _(": unrecognizable v9a ancillary state register"); + goto error; + } if (*args == '/') opcode |= (p->regnum << 14); else @@ -1524,7 +1606,7 @@ sparc_ip (str, pinsn) } else { - error_message = _(": unrecognizable v9a ancillary state register"); + error_message = _(": unrecognizable v9a or v9b ancillary state register"); goto error; } @@ -1569,7 +1651,7 @@ sparc_ip (str, pinsn) error_message = _(": expecting %asrN"); goto error; } - } /* if %asr */ + } /* if %asr */ break; case 'I': @@ -1714,7 +1796,7 @@ sparc_ip (str, pinsn) } break; - case '\0': /* end of args */ + case '\0': /* End of args. */ if (*s == '\0') { match = 1; @@ -1733,7 +1815,7 @@ sparc_ip (str, pinsn) } break; - case '[': /* these must match exactly */ + case '[': /* These must match exactly. */ case ']': case ',': case ' ': @@ -1741,7 +1823,7 @@ sparc_ip (str, pinsn) continue; break; - case '#': /* must be at least one digit */ + case '#': /* Must be at least one digit. */ if (isdigit ((unsigned char) *s++)) { while (isdigit ((unsigned char) *s)) @@ -1752,7 +1834,7 @@ sparc_ip (str, pinsn) } break; - case 'C': /* coprocessor state register */ + case 'C': /* Coprocessor state register. */ if (strncmp (s, "%csr", 4) == 0) { s += 4; @@ -1760,7 +1842,7 @@ sparc_ip (str, pinsn) } break; - case 'b': /* next operand is a coprocessor register */ + case 'b': /* Next operand is a coprocessor register. */ case 'c': case 'D': if (*s++ == '%' && *s++ == 'c' && isdigit ((unsigned char) *s)) @@ -1893,7 +1975,7 @@ sparc_ip (str, pinsn) } if ((mask & ~1) == 2 && sparc_arch_size == 64 - && no_undeclared_regs && ! globals [mask]) + && no_undeclared_regs && ! globals[mask]) as_bad (_("detected global register use not covered by .register pseudo-op")); /* Got the register, now figure out where @@ -1987,7 +2069,7 @@ sparc_ip (str, pinsn) else { break; - } /* if not an 'f' register. */ + } /* if not an 'f' register. */ switch (*args) { @@ -1997,7 +2079,6 @@ sparc_ip (str, pinsn) opcode |= RS1 (mask); continue; - case 'f': case 'B': case 'R': @@ -2009,11 +2090,11 @@ sparc_ip (str, pinsn) case 'J': opcode |= RD (mask); continue; - } /* pack it in. */ + } /* Pack it in. */ know (0); break; - } /* float arg */ + } /* float arg */ case 'F': if (strncmp (s, "%fsr", 4) == 0) @@ -2023,26 +2104,26 @@ sparc_ip (str, pinsn) } break; - case '0': /* 64 bit immediate (set, setsw, setx insn) */ - the_insn.reloc = BFD_RELOC_NONE; /* reloc handled elsewhere */ + case '0': /* 64 bit immediate (set, setsw, setx insn) */ + the_insn.reloc = BFD_RELOC_NONE; /* reloc handled elsewhere */ goto immediate; - case 'l': /* 22 bit PC relative immediate */ + case 'l': /* 22 bit PC relative immediate */ the_insn.reloc = BFD_RELOC_SPARC_WDISP22; the_insn.pcrel = 1; goto immediate; - case 'L': /* 30 bit immediate */ + case 'L': /* 30 bit immediate */ the_insn.reloc = BFD_RELOC_32_PCREL_S2; the_insn.pcrel = 1; goto immediate; case 'h': - case 'n': /* 22 bit immediate */ + case 'n': /* 22 bit immediate */ the_insn.reloc = BFD_RELOC_SPARC22; goto immediate; - case 'i': /* 13 bit immediate */ + case 'i': /* 13 bit immediate */ the_insn.reloc = BFD_RELOC_SPARC13; /* fallthrough */ @@ -2086,16 +2167,16 @@ sparc_ip (str, pinsn) { "l44", 3, BFD_RELOC_SPARC_L44, 1, 0 }, { "uhi", 3, BFD_RELOC_SPARC_HH22, 1, 0 }, { "ulo", 3, BFD_RELOC_SPARC_HM10, 1, 0 }, - { NULL } + { NULL, 0, 0, 0, 0 } }; const struct ops *o; - + for (o = ops; o->name; o++) if (strncmp (s + 1, o->name, o->len) == 0) break; if (o->name == NULL) break; - + if (s[o->len + 1] != '(') { as_bad (_("Illegal operands: %%%s requires arguments in ()"), o->name); @@ -2137,7 +2218,7 @@ sparc_ip (str, pinsn) as_bad (_("Illegal operands: %%%s requires arguments in ()"), op_arg); return special_case; } - + *s1 = '\0'; (void) get_expression (s); *s1 = ')'; @@ -2152,10 +2233,11 @@ sparc_ip (str, pinsn) *s1 = '0'; s = s1; op_exp = the_insn.exp; - memset (&the_insn.exp, 0, sizeof(the_insn.exp)); + memset (&the_insn.exp, 0, sizeof (the_insn.exp)); } - for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++) ; + for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++) + ; if (s1 != s && isdigit ((unsigned char) s1[-1])) { @@ -2210,7 +2292,7 @@ sparc_ip (str, pinsn) case BFD_RELOC_SPARC_HH22: val = BSR (val, 32); - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_SPARC_LM22: case BFD_RELOC_HI22: @@ -2219,7 +2301,7 @@ sparc_ip (str, pinsn) case BFD_RELOC_SPARC_HM10: val = BSR (val, 32); - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_LO10: val &= 0x3ff; @@ -2240,7 +2322,7 @@ sparc_ip (str, pinsn) break; case BFD_RELOC_SPARC_HIX22: - val = ~ val; + val = ~val; val = (val >> 10) & 0x3fffff; break; @@ -2335,7 +2417,7 @@ sparc_ip (str, pinsn) } opcode |= ASI (asi); continue; - } /* alternate space */ + } /* Alternate space. */ case 'p': if (strncmp (s, "%psr", 4) == 0) @@ -2345,7 +2427,7 @@ sparc_ip (str, pinsn) } break; - case 'q': /* floating point queue */ + case 'q': /* Floating point queue. */ if (strncmp (s, "%fq", 3) == 0) { s += 3; @@ -2353,7 +2435,7 @@ sparc_ip (str, pinsn) } break; - case 'Q': /* coprocessor queue */ + case 'Q': /* Coprocessor queue. */ if (strncmp (s, "%cq", 3) == 0) { s += 3; @@ -2459,16 +2541,16 @@ sparc_ip (str, pinsn) default: as_fatal (_("failed sanity check.")); - } /* switch on arg code */ + } /* switch on arg code. */ /* Break out of for() loop. */ break; - } /* for each arg that we expect */ + } /* For each arg that we expect. */ error: if (match == 0) { - /* Args don't match. */ + /* Args don't match. */ if (&insn[1] - sparc_opcodes < sparc_num_opcodes && (insn->name == insn[1].name || !strcmp (insn->name, insn[1].name))) @@ -2485,20 +2567,25 @@ sparc_ip (str, pinsn) } else { - /* We have a match. Now see if the architecture is ok. */ + /* We have a match. Now see if the architecture is OK. */ int needed_arch_mask = insn->architecture; if (v9_arg_p) { - needed_arch_mask &= ~ ((1 << SPARC_OPCODE_ARCH_V9) - | (1 << SPARC_OPCODE_ARCH_V9A)); - needed_arch_mask |= (1 << SPARC_OPCODE_ARCH_V9); + needed_arch_mask &= + ~(SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9) - 1); + if (! needed_arch_mask) + needed_arch_mask = + SPARC_OPCODE_ARCH_MASK (SPARC_OPCODE_ARCH_V9); } - if (needed_arch_mask & SPARC_OPCODE_SUPPORTED (current_architecture)) - ; /* ok */ + if (needed_arch_mask + & SPARC_OPCODE_SUPPORTED (current_architecture)) + /* OK. */ + ; /* Can we bump up the architecture? */ - else if (needed_arch_mask & SPARC_OPCODE_SUPPORTED (max_architecture)) + else if (needed_arch_mask + & SPARC_OPCODE_SUPPORTED (max_architecture)) { enum sparc_opcode_arch_val needed_architecture = sparc_ffs (SPARC_OPCODE_SUPPORTED (max_architecture) @@ -2523,12 +2610,12 @@ sparc_ip (str, pinsn) happen but what about tomorrow? */ else { - int arch,printed_one_p = 0; + int arch, printed_one_p = 0; char *p; char required_archs[SPARC_OPCODE_ARCH_MAX * 16]; /* Create a list of the architectures that support the insn. */ - needed_arch_mask &= ~ SPARC_OPCODE_SUPPORTED (max_architecture); + needed_arch_mask &= ~SPARC_OPCODE_SUPPORTED (max_architecture); p = required_archs; arch = sparc_ffs (needed_arch_mask); while ((1 << arch) <= needed_arch_mask) @@ -2550,10 +2637,10 @@ sparc_ip (str, pinsn) sparc_opcode_archs[max_architecture].name); return special_case; } - } /* if no match */ + } /* If no match. */ break; - } /* forever looking for a match */ + } /* Forever looking for a match. */ the_insn.opcode = opcode; return special_case; @@ -2659,18 +2746,18 @@ output_insn (insn, the_insn) { char *toP = frag_more (4); - /* put out the opcode */ + /* Put out the opcode. */ if (INSN_BIG_ENDIAN) number_to_chars_bigendian (toP, (valueT) the_insn->opcode, 4); else number_to_chars_littleendian (toP, (valueT) the_insn->opcode, 4); - /* put out the symbol-dependent stuff */ + /* Put out the symbol-dependent stuff. */ if (the_insn->reloc != BFD_RELOC_NONE) { - fixS *fixP = fix_new_exp (frag_now, /* which frag */ - (toP - frag_now->fr_literal), /* where */ - 4, /* size */ + fixS *fixP = fix_new_exp (frag_now, /* Which frag. */ + (toP - frag_now->fr_literal), /* Where. */ + 4, /* Size. */ &the_insn->exp, the_insn->pcrel, the_insn->reloc); @@ -2685,18 +2772,21 @@ output_insn (insn, the_insn) last_insn = insn; last_opcode = the_insn->opcode; + +#ifdef OBJ_ELF + dwarf2_emit_insn (4); +#endif } -/* - This is identical to the md_atof in m68k.c. I think this is right, - but I'm not sure. +/* This is identical to the md_atof in m68k.c. I think this is right, + but I'm not sure. - Turn a string in input_line_pointer into a floating point constant of type - type, and store the appropriate bytes in *litP. The number of LITTLENUMS - emitted is stored in *sizeP . An error message is returned, or NULL on OK. - */ + Turn a string in input_line_pointer into a floating point constant + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is + returned, or NULL on OK. */ -/* Equal to MAX_PRECISION in atof-ieee.c */ +/* Equal to MAX_PRECISION in atof-ieee.c. */ #define MAX_LITTLENUMS 6 char * @@ -2705,7 +2795,7 @@ md_atof (type, litP, sizeP) char *litP; int *sizeP; { - int i,prec; + int i, prec; LITTLENUM_TYPE words[MAX_LITTLENUMS]; char *t; @@ -2749,7 +2839,8 @@ md_atof (type, litP, sizeP) { for (i = 0; i < prec; i++) { - md_number_to_chars (litP, (valueT) words[i], sizeof (LITTLENUM_TYPE)); + md_number_to_chars (litP, (valueT) words[i], + sizeof (LITTLENUM_TYPE)); litP += sizeof (LITTLENUM_TYPE); } } @@ -2757,11 +2848,12 @@ md_atof (type, litP, sizeP) { for (i = prec - 1; i >= 0; i--) { - md_number_to_chars (litP, (valueT) words[i], sizeof (LITTLENUM_TYPE)); + md_number_to_chars (litP, (valueT) words[i], + sizeof (LITTLENUM_TYPE)); litP += sizeof (LITTLENUM_TYPE); } } - + return 0; } @@ -2778,14 +2870,15 @@ md_number_to_chars (buf, val, n) number_to_chars_bigendian (buf, val, n); else if (target_little_endian_data && ((n == 4 || n == 2) && ~now_seg->flags & SEC_ALLOC)) - /* Output debug words, which are not in allocated sections, as big endian */ + /* Output debug words, which are not in allocated sections, as big + endian. */ number_to_chars_bigendian (buf, val, n); else if (target_little_endian_data || ! target_big_endian) number_to_chars_littleendian (buf, val, n); } /* Apply a fixS to the frags, now that we know the value it ought to - hold. */ + hold. */ int md_apply_fix3 (fixP, value, segment) @@ -2801,7 +2894,7 @@ md_apply_fix3 (fixP, value, segment) assert (fixP->fx_r_type < BFD_RELOC_UNUSED); - fixP->fx_addnumber = val; /* Remember value for emit_reloc */ + fixP->fx_addnumber = val; /* Remember value for emit_reloc. */ #ifdef OBJ_ELF /* FIXME: SPARC ELF relocations don't use an addend in the data @@ -2890,7 +2983,7 @@ md_apply_fix3 (fixP, value, segment) { md_number_to_chars (buf, val, 8); } - else if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT + else if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) { fixP->fx_done = 0; @@ -2904,7 +2997,7 @@ md_apply_fix3 (fixP, value, segment) insn = bfd_getb32 ((unsigned char *) buf); else insn = bfd_getl32 ((unsigned char *) buf); - + switch (fixP->fx_r_type) { case BFD_RELOC_32_PCREL_S2: @@ -2915,7 +3008,91 @@ md_apply_fix3 (fixP, value, segment) || fixP->fx_addsy == NULL || symbol_section_p (fixP->fx_addsy)) ++val; + insn |= val & 0x3fffffff; + + /* See if we have a delay slot. */ + if (sparc_relax && fixP->fx_where + 8 <= fixP->fx_frag->fr_fix) + { +#define G0 0 +#define O7 15 +#define XCC (2 << 20) +#define COND(x) (((x)&0xf)<<25) +#define CONDA COND(0x8) +#define INSN_BPA (F2(0,1) | CONDA | BPRED | XCC) +#define INSN_BA (F2(0,2) | CONDA) +#define INSN_OR F3(2, 0x2, 0) +#define INSN_NOP F2(0,4) + + long delay; + + /* If the instruction is a call with either: + restore + arithmetic instruction with rd == %o7 + where rs1 != %o7 and rs2 if it is register != %o7 + then we can optimize if the call destination is near + by changing the call into a branch always. */ + if (INSN_BIG_ENDIAN) + delay = bfd_getb32 ((unsigned char *) buf + 4); + else + delay = bfd_getl32 ((unsigned char *) buf + 4); + if ((insn & OP (~0)) != OP (1) || (delay & OP (~0)) != OP (2)) + break; + if ((delay & OP3 (~0)) != OP3 (0x3d) /* Restore. */ + && ((delay & OP3 (0x28)) != 0 /* Arithmetic. */ + || ((delay & RD (~0)) != RD (O7)))) + break; + if ((delay & RS1 (~0)) == RS1 (O7) + || ((delay & F3I (~0)) == 0 + && (delay & RS2 (~0)) == RS2 (O7))) + break; + /* Ensure the branch will fit into simm22. */ + if ((val & 0x3fe00000) + && (val & 0x3fe00000) != 0x3fe00000) + break; + /* Check if the arch is v9 and branch will fit + into simm19. */ + if (((val & 0x3c0000) == 0 + || (val & 0x3c0000) == 0x3c0000) + && (sparc_arch_size == 64 + || current_architecture >= SPARC_OPCODE_ARCH_V9)) + /* ba,pt %xcc */ + insn = INSN_BPA | (val & 0x7ffff); + else + /* ba */ + insn = INSN_BA | (val & 0x3fffff); + if (fixP->fx_where >= 4 + && ((delay & (0xffffffff ^ RS1 (~0))) + == (INSN_OR | RD (O7) | RS2 (G0)))) + { + long setter; + int reg; + + if (INSN_BIG_ENDIAN) + setter = bfd_getb32 ((unsigned char *) buf - 4); + else + setter = bfd_getl32 ((unsigned char *) buf - 4); + if ((setter & (0xffffffff ^ RD (~0))) + != (INSN_OR | RS1 (O7) | RS2 (G0))) + break; + /* The sequence was + or %o7, %g0, %rN + call foo + or %rN, %g0, %o7 + + If call foo was replaced with ba, replace + or %rN, %g0, %o7 with nop. */ + reg = (delay & RS1 (~0)) >> 14; + if (reg != ((setter & RD (~0)) >> 25) + || reg == G0 || reg == O7) + break; + + if (INSN_BIG_ENDIAN) + bfd_putb32 (INSN_NOP, (unsigned char *) buf + 4); + else + bfd_putl32 (INSN_NOP, (unsigned char *) buf + 4); + } + } break; case BFD_RELOC_SPARC_11: @@ -2954,7 +3131,7 @@ md_apply_fix3 (fixP, value, segment) break; case BFD_RELOC_SPARC_WDISP16: - /* FIXME: simplify */ + /* FIXME: simplify. */ if (((val > 0) && (val & ~0x3fffc)) || ((val < 0) && (~(val - 1) & ~0x3fffc))) as_bad_where (fixP->fx_file, fixP->fx_line, @@ -2965,7 +3142,7 @@ md_apply_fix3 (fixP, value, segment) break; case BFD_RELOC_SPARC_WDISP19: - /* FIXME: simplify */ + /* FIXME: simplify. */ if (((val > 0) && (val & ~0x1ffffc)) || ((val < 0) && (~(val - 1) & ~0x1ffffc))) as_bad_where (fixP->fx_file, fixP->fx_line, @@ -2977,7 +3154,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_HH22: val = BSR (val, 32); - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_SPARC_LM22: case BFD_RELOC_HI22: @@ -3001,7 +3178,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_HM10: val = BSR (val, 32); - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_LO10: if (!fixP->fx_addsy) @@ -3018,7 +3195,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_OLO10: val &= 0x3ff; val += fixP->tc_fix_data; - /* intentional fallthrough */ + /* Fall through. */ case BFD_RELOC_SPARC13: if (! in_signed_range (val, 0x1fff)) @@ -3029,7 +3206,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_WDISP22: val = (val >> 2) + 1; - /* FALLTHROUGH */ + /* Fall through. */ case BFD_RELOC_SPARC_BASE22: insn |= val & 0x3fffff; break; @@ -3056,7 +3233,7 @@ md_apply_fix3 (fixP, value, segment) case BFD_RELOC_SPARC_HIX22: if (!fixP->fx_addsy) { - val ^= ~ (offsetT) 0; + val ^= ~(offsetT) 0; insn |= (val >> 10) & 0x3fffff; } break; @@ -3089,6 +3266,7 @@ md_apply_fix3 (fixP, value, segment) /* Translate internal representation of relocation info to BFD target format. */ + arelent ** tc_gen_reloc (section, fixp) asection *section; @@ -3190,7 +3368,7 @@ tc_gen_reloc (section, fixp) break; } } -#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */ +#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */ if (code == BFD_RELOC_SPARC_OLO10) reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO10); @@ -3224,7 +3402,7 @@ tc_gen_reloc (section, fixp) else reloc->addend = fixp->fx_offset - reloc->address; -#else /* elf or coff */ +#else /* elf or coff */ if (reloc->howto->pc_relative == 0 || code == BFD_RELOC_SPARC_PC10 @@ -3246,7 +3424,8 @@ tc_gen_reloc (section, fixp) relocs[2] = NULL; reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); - *reloc->sym_ptr_ptr = symbol_get_bfdsym (section_symbol (absolute_section)); + *reloc->sym_ptr_ptr + = symbol_get_bfdsym (section_symbol (absolute_section)); reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_SPARC13); reloc->addend = fixp->tc_fix_data; @@ -3255,20 +3434,20 @@ tc_gen_reloc (section, fixp) return relocs; } -/* We have no need to default values of symbols. */ +/* We have no need to default values of symbols. */ -/* ARGSUSED */ symbolS * md_undefined_symbol (name) - char *name; + char *name ATTRIBUTE_UNUSED; { return 0; -} /* md_undefined_symbol() */ +} + +/* Round up a section size to the appropriate boundary. */ -/* Round up a section size to the appropriate boundary. */ valueT md_section_align (segment, size) - segT segment; + segT segment ATTRIBUTE_UNUSED; valueT size; { #ifndef OBJ_ELF @@ -3277,7 +3456,8 @@ md_section_align (segment, size) valueT align = ((valueT) 1 << (valueT) bfd_get_section_alignment (stdoutput, segment)); valueT newsize; - /* turn alignment value into a mask */ + + /* Turn alignment value into a mask. */ align--; newsize = (size + align) & ~align; return newsize; @@ -3289,8 +3469,8 @@ md_section_align (segment, size) /* Exactly what point is a PC-relative offset relative TO? On the sparc, they're relative to the address of the offset, plus its size. This gets us to the following instruction. - (??? Is this right? FIXME-SOON) */ -long + (??? Is this right? FIXME-SOON) */ +long md_pcrel_from (fixP) fixS *fixP; { @@ -3322,9 +3502,7 @@ log2 (value) return (value == 1) ? shift : -1; } -/* - * sort of like s_lcomm - */ +/* Sort of like s_lcomm. */ #ifndef OBJ_ELF static int max_alignment = 15; @@ -3332,7 +3510,7 @@ static int max_alignment = 15; static void s_reserve (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char *p; @@ -3362,7 +3540,7 @@ s_reserve (ignore) as_bad (_("BSS length (%d.) <0! Ignored."), size); ignore_rest_of_line (); return; - } /* bad length */ + } /* Bad length. */ *p = 0; symbolP = symbol_find_or_make (name); @@ -3441,18 +3619,20 @@ s_reserve (ignore) segT current_seg = now_seg; subsegT current_subseg = now_subseg; - subseg_set (bss_section, 1); /* switch to bss */ + /* Switch to bss. */ + subseg_set (bss_section, 1); if (align) - frag_align (align, 0, 0); /* do alignment */ + /* Do alignment. */ + frag_align (align, 0, 0); - /* detach from old frag */ - if (S_GET_SEGMENT(symbolP) == bss_section) + /* Detach from old frag. */ + if (S_GET_SEGMENT (symbolP) == bss_section) symbol_get_frag (symbolP)->fr_symbol = NULL; symbol_set_frag (symbolP, frag_now); - pfrag = frag_var (rs_org, 1, 1, (relax_substateT)0, symbolP, - (offsetT) size, (char *)0); + pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, + (offsetT) size, (char *) 0); *pfrag = 0; S_SET_SEGMENT (symbolP, bss_section); @@ -3466,16 +3646,16 @@ s_reserve (ignore) } else { - as_warn("Ignoring attempt to re-define symbol %s", - S_GET_NAME (symbolP)); - } /* if not redefining */ + as_warn ("Ignoring attempt to re-define symbol %s", + S_GET_NAME (symbolP)); + } /* if not redefining. */ demand_empty_rest_of_line (); } static void s_common (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char *name; char c; @@ -3485,7 +3665,7 @@ s_common (ignore) name = input_line_pointer; c = get_symbol_end (); - /* just after name is now '\0' */ + /* Just after name is now '\0'. */ p = input_line_pointer; *p = c; SKIP_WHITESPACE (); @@ -3495,7 +3675,10 @@ s_common (ignore) ignore_rest_of_line (); return; } - input_line_pointer++; /* skip ',' */ + + /* Skip ','. */ + input_line_pointer++; + if ((temp = get_absolute_expression ()) < 0) { as_bad (_(".COMMon length (%d.) <0! Ignored."), temp); @@ -3594,7 +3777,7 @@ s_common (ignore) subseg_set (old_sec, old_subsec); } else -#endif /* OBJ_ELF */ +#endif /* OBJ_ELF */ { allocate_common: S_SET_VALUE (symbolP, (valueT) size); @@ -3653,7 +3836,7 @@ s_common (ignore) static void s_empty (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { /* The easy way to implement is to just forget about the last instruction. */ @@ -3662,7 +3845,7 @@ s_empty (ignore) static void s_seg (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { if (strncmp (input_line_pointer, "\"text\"", 6) == 0) @@ -3688,8 +3871,8 @@ s_seg (ignore) input_line_pointer += 5; /* We only support 2 segments -- text and data -- for now, so things in the "bss segment" will have to go into data for now. - You can still allocate SEG_BSS stuff with .lcomm or .reserve. */ - subseg_set (data_section, 255); /* FIXME-SOMEDAY */ + You can still allocate SEG_BSS stuff with .lcomm or .reserve. */ + subseg_set (data_section, 255); /* FIXME-SOMEDAY. */ return; } as_bad (_("Unknown segment type")); @@ -3705,7 +3888,7 @@ s_data1 () static void s_proc (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { while (!is_end_of_line[(unsigned char) *input_line_pointer]) { @@ -3738,7 +3921,7 @@ s_uacons (bytes) static void s_ncons (bytes) - int bytes; + int bytes ATTRIBUTE_UNUSED; { cons (sparc_arch_size == 32 ? 4 : 8); } @@ -3747,13 +3930,13 @@ s_ncons (bytes) /* Handle the SPARC ELF .register pseudo-op. This sets the binding of a global register. The syntax is: - + .register %g[2367],{#scratch|symbolname|#ignore} - */ +*/ static void s_register (ignore) - int ignore; + int ignore ATTRIBUTE_UNUSED; { char c; int reg; @@ -3776,7 +3959,7 @@ s_register (ignore) c = get_symbol_end (); if (strcmp (regname, "scratch") && strcmp (regname, "ignore")) as_bad (_("register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}")); - if (regname [0] == 'i') + if (regname[0] == 'i') regname = NULL; else regname = ""; @@ -3788,17 +3971,17 @@ s_register (ignore) } if (sparc_arch_size == 64) { - if (globals [reg]) + if (globals[reg]) { - if ((regname && globals [reg] != (symbolS *)1 - && strcmp (S_GET_NAME (globals [reg]), regname)) - || ((regname != NULL) ^ (globals [reg] != (symbolS *)1))) + if ((regname && globals[reg] != (symbolS *) 1 + && strcmp (S_GET_NAME (globals[reg]), regname)) + || ((regname != NULL) ^ (globals[reg] != (symbolS *) 1))) as_bad (_("redefinition of global register")); } else { if (regname == NULL) - globals [reg] = (symbolS *)1; + globals[reg] = (symbolS *) 1; else { if (*regname) @@ -3807,26 +3990,26 @@ s_register (ignore) as_bad (_("Register symbol %s already defined."), regname); } - globals [reg] = symbol_make (regname); - flags = symbol_get_bfdsym (globals [reg])->flags; + globals[reg] = symbol_make (regname); + flags = symbol_get_bfdsym (globals[reg])->flags; if (! *regname) flags = flags & ~(BSF_GLOBAL|BSF_LOCAL|BSF_WEAK); if (! (flags & (BSF_GLOBAL|BSF_LOCAL|BSF_WEAK))) flags |= BSF_GLOBAL; - symbol_get_bfdsym (globals [reg])->flags = flags; - S_SET_VALUE (globals [reg], (valueT)reg); - S_SET_ALIGN (globals [reg], reg); - S_SET_SIZE (globals [reg], 0); + symbol_get_bfdsym (globals[reg])->flags = flags; + S_SET_VALUE (globals[reg], (valueT) reg); + S_SET_ALIGN (globals[reg], reg); + S_SET_SIZE (globals[reg], 0); /* Although we actually want undefined_section here, we have to use absolute_section, because otherwise generic as code will make it a COM section. We fix this up in sparc_adjust_symtab. */ - S_SET_SEGMENT (globals [reg], absolute_section); - S_SET_OTHER (globals [reg], 0); - elf_symbol (symbol_get_bfdsym (globals [reg])) + S_SET_SEGMENT (globals[reg], absolute_section); + S_SET_OTHER (globals[reg], 0); + elf_symbol (symbol_get_bfdsym (globals[reg])) ->internal_elf_sym.st_info = ELF_ST_INFO(STB_GLOBAL, STT_REGISTER); - elf_symbol (symbol_get_bfdsym (globals [reg])) + elf_symbol (symbol_get_bfdsym (globals[reg])) ->internal_elf_sym.st_shndx = SHN_UNDEF; } } @@ -3839,12 +4022,12 @@ s_register (ignore) /* Adjust the symbol table. We set undefined sections for STT_REGISTER symbols which need it. */ - + void sparc_adjust_symtab () { symbolS *sym; - + for (sym = symbol_rootP; sym != NULL; sym = symbol_next (sym)) { if (ELF_ST_TYPE (elf_symbol (symbol_get_bfdsym (sym)) @@ -3902,51 +4085,65 @@ sparc_cons_align (nbytes) return; } - p = frag_var (rs_align_code, 1, 1, (relax_substateT) 0, + p = frag_var (rs_align_test, 1, 1, (relax_substateT) 0, (symbolS *) NULL, (offsetT) nalign, (char *) NULL); record_alignment (now_seg, nalign); } -/* This is where we do the unexpected alignment check. - This is called from HANDLE_ALIGN in tc-sparc.h. */ +/* This is called from HANDLE_ALIGN in tc-sparc.h. */ void sparc_handle_align (fragp) fragS *fragp; { - if (fragp->fr_type == rs_align_code && !fragp->fr_subtype - && fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix != 0) - as_bad_where (fragp->fr_file, fragp->fr_line, _("misaligned data")); - if (fragp->fr_type == rs_align_code && fragp->fr_subtype == 1024) - { - int count = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix; - - if (count >= 4 - && !(count & 3) - && count <= 1024 - && !((long)(fragp->fr_literal + fragp->fr_fix) & 3)) - { - unsigned *p = (unsigned *)(fragp->fr_literal + fragp->fr_fix); - int i; - - for (i = 0; i < count; i += 4, p++) - if (INSN_BIG_ENDIAN) - number_to_chars_bigendian ((char *)p, 0x01000000, 4); /* emit nops */ - else - number_to_chars_littleendian ((char *)p, 0x10000000, 4); - - if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8) - { - char *waddr = &fragp->fr_literal[fragp->fr_fix]; - unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */ - if (INSN_BIG_ENDIAN) - number_to_chars_bigendian (waddr, wval, 4); - else - number_to_chars_littleendian (waddr, wval, 4); - } - fragp->fr_var = count; - } + int count, fix; + char *p; + + count = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix; + + switch (fragp->fr_type) + { + case rs_align_test: + if (count != 0) + as_bad_where (fragp->fr_file, fragp->fr_line, _("misaligned data")); + break; + + case rs_align_code: + p = fragp->fr_literal + fragp->fr_fix; + fix = 0; + + if (count & 3) + { + fix = count & 3; + memset (p, 0, fix); + p += fix; + count -= fix; + } + + if (SPARC_OPCODE_ARCH_V9_P (max_architecture) && count > 8) + { + unsigned wval = (0x30680000 | count >> 2); /* ba,a,pt %xcc, 1f */ + if (INSN_BIG_ENDIAN) + number_to_chars_bigendian (p, wval, 4); + else + number_to_chars_littleendian (p, wval, 4); + p += 4; + count -= 4; + fix += 4; + } + + if (INSN_BIG_ENDIAN) + number_to_chars_bigendian (p, 0x01000000, 4); + else + number_to_chars_littleendian (p, 0x01000000, 4); + + fragp->fr_fix += fix; + fragp->fr_var = 4; + break; + + default: + break; } } @@ -3976,6 +4173,8 @@ sparc_elf_final_processing () elf_elfheader (stdoutput)->e_flags |= EF_SPARC_32PLUS; if (current_architecture == SPARC_OPCODE_ARCH_V9A) elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1; + else if (current_architecture == SPARC_OPCODE_ARCH_V9B) + elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1|EF_SPARC_SUN_US3; } #endif @@ -3997,7 +4196,7 @@ cons_fix_new_sparc (frag, where, nbytes, exp) (nbytes == 4 ? BFD_RELOC_32 : BFD_RELOC_64))); if (target_little_endian_data && nbytes == 4 - && now_seg->flags & SEC_ALLOC) + && now_seg->flags & SEC_ALLOC) r = BFD_RELOC_SPARC_REV32; fix_new_exp (frag, where, (int) nbytes, exp, 0, r); } @@ -4005,13 +4204,12 @@ cons_fix_new_sparc (frag, where, nbytes, exp) #ifdef OBJ_ELF int elf32_sparc_force_relocation (fixp) - struct fix *fixp; + struct fix *fixp; { if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 1; - + return 0; } #endif - diff --git a/contrib/binutils/gas/config/tc-sparc.h b/contrib/binutils/gas/config/tc-sparc.h index 91fda22..17bef83 100644 --- a/contrib/binutils/gas/config/tc-sparc.h +++ b/contrib/binutils/gas/config/tc-sparc.h @@ -50,31 +50,24 @@ extern const char *sparc_target_format PARAMS ((void)); #define WORKING_DOT_WORD -#define md_convert_frag(b,s,f) {as_fatal (_("sparc convert_frag\n"));} +#define md_convert_frag(b,s,f) \ + as_fatal (_("sparc convert_frag\n")) #define md_estimate_size_before_relax(f,s) \ - (as_fatal(_("estimate_size_before_relax called")),1) + (as_fatal(_("estimate_size_before_relax called")), 1) #define LISTING_HEADER "SPARC GAS " extern int sparc_pic_code; -#define md_do_align(n, fill, len, max, around) \ -if ((n) && (n) <= 10 && !need_pass_2 && !(fill) \ - && subseg_text_p (now_seg)) \ - { \ - char *p; \ - p = frag_var (rs_align_code, 1 << n, 1, (relax_substateT) 1024, \ - (symbolS *) 0, (offsetT) (n), (char *) 0); \ - *p = 0x00; \ - goto around; \ - } - /* We require .word, et. al., to be aligned correctly. */ #define md_cons_align(nbytes) sparc_cons_align (nbytes) extern void sparc_cons_align PARAMS ((int)); + #define HANDLE_ALIGN(fragp) sparc_handle_align (fragp) extern void sparc_handle_align PARAMS ((struct frag *)); +#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4 + 4) + #if defined (OBJ_ELF) || defined (OBJ_AOUT) /* This expression evaluates to false if the relocation is for a local @@ -186,14 +179,16 @@ extern void cons_fix_new_sparc { \ (X)->tc_fix_data = 0; \ } \ - while(0) + while (0) #define TC_FIX_DATA_PRINT(FILE, FIXP) \ do \ { \ - fprintf((FILE), "addend2=%ld\n", \ + fprintf ((FILE), "addend2=%ld\n", \ (unsigned long) (FIXP)->tc_fix_data); \ } \ - while(0) + while (0) + +#define DWARF2_LINE_MIN_INSN_LENGTH 4 /* end of tc-sparc.h */ diff --git a/contrib/binutils/gas/config/tc-tic30.c b/contrib/binutils/gas/config/tc-tic30.c index 255c06a..e11cb33 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 Free Software Foundation. + Copyright (C) 1998, 1999, 2000 Free Software Foundation. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) This file is part of GAS, the GNU Assembler. @@ -19,20 +19,20 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - Texas Instruments TMS320C30 machine specific gas. +/* Texas Instruments TMS320C30 machine specific gas. Written by Steven Haworth (steve@pm.cse.rmit.edu.au). Bugs & suggestions are completely welcome. This is free software. - Please help us make it better. - */ + Please help us make it better. */ #include "as.h" #include "opcode/tic30.h" -/* put here all non-digit non-letter charcters that may occur in an operand */ +/* Put here all non-digit non-letter charcters that may occur in an + operand. */ static char operand_special_chars[] = "%$-+(,)*._~/<>&^!:[@]"; -static char *ordinal_names[] = -{"first", "second", "third", "fourth", "fifth"}; +static char *ordinal_names[] = { + "first", "second", "third", "fourth", "fifth" +}; const int md_reloc_size = 0; @@ -41,19 +41,19 @@ const char line_comment_chars[] = "*"; const char line_separator_chars[] = ""; const char *md_shortopts = ""; -struct option md_longopts[] = -{ +struct option md_longopts[] = { {NULL, no_argument, NULL, 0} }; size_t md_longopts_size = sizeof (md_longopts); -/* Chars that mean this number is a floating point constant */ +/* Chars that mean this number is a floating point constant. */ /* As in 0f12.456 */ /* or 0d1.2345e12 */ const char FLT_CHARS[] = "fFdDxX"; -/* Chars that can be used to separate mant from exp in floating point nums */ +/* Chars that can be used to separate mant from exp in floating point + nums. */ const char EXP_CHARS[] = "eE"; /* tables for lexical analysis */ @@ -72,8 +72,7 @@ static char digit_chars[256]; #define is_identifier_char(x) (identifier_chars[(unsigned char) x]) #define is_digit_char(x) (digit_chars[(unsigned char) x]) -const pseudo_typeS md_pseudo_table[] = -{ +const pseudo_typeS md_pseudo_table[] = { {0, 0, 0} }; @@ -85,7 +84,7 @@ const pseudo_typeS md_pseudo_table[] = #include int -debug (const char *string,...) +debug (const char *string, ...) { if (flag_debug) { @@ -230,42 +229,32 @@ md_begin () #define PC_Register 0x00000000 #define PC_Relative 0x02000000 -typedef struct -{ +typedef struct { unsigned op_type; - struct - { - int resolved; - unsigned address; - char *label; - expressionS direct_expr; - } - direct; - struct - { - unsigned mod; - int ARnum; - unsigned char disp; - } - indirect; - struct - { - unsigned opcode; - } - reg; - struct - { - int resolved; - int decimal_found; - float f_number; - int s_number; - unsigned int u_number; - char *label; - expressionS imm_expr; - } - immediate; -} -operand; + struct { + int resolved; + unsigned address; + char *label; + expressionS direct_expr; + } direct; + struct { + unsigned mod; + int ARnum; + unsigned char disp; + } indirect; + struct { + unsigned opcode; + } reg; + struct { + int resolved; + int decimal_found; + float f_number; + int s_number; + unsigned int u_number; + char *label; + expressionS imm_expr; + } immediate; +} operand; int tic30_parallel_insn PARAMS ((char *)); operand *tic30_operand PARAMS ((char *)); @@ -273,15 +262,14 @@ char *tic30_find_parallel_insn PARAMS ((char *, char *)); template *opcode; -struct tic30_insn - { - template *tm; /* Template of current instruction */ - unsigned opcode; /* Final opcode */ - int operands; /* Number of given operands */ - /* Type of operand given in instruction */ - operand *operand_type[MAX_OPERANDS]; - unsigned addressing_mode; /* Final addressing mode of instruction */ - }; +struct tic30_insn { + template *tm; /* Template of current instruction */ + unsigned opcode; /* Final opcode */ + int operands; /* Number of given operands */ + /* Type of operand given in instruction */ + operand *operand_type[MAX_OPERANDS]; + unsigned addressing_mode; /* Final addressing mode of instruction */ +}; struct tic30_insn insn; static int found_parallel_insn; @@ -317,7 +305,7 @@ md_assemble (line) return; } /* Check if instruction is a parallel instruction by seeing if the first - character is a q. */ + character is a q. */ if (*token_start == 'q') { if (tic30_parallel_insn (token_start)) @@ -444,7 +432,7 @@ md_assemble (line) int numops = insn.tm->operands; /* If operands are not the same, then see if any of the operands are not required. Then recheck with number of given operands. If they are still not - the same, then give an error, otherwise carry on. */ + the same, then give an error, otherwise carry on. */ for (i = 0; i < insn.tm->operands; i++) if (insn.tm->operand_types[i] & NotReq) numops--; @@ -465,7 +453,7 @@ md_assemble (line) if (insn.tm->opcode_modifier == AddressMode) { int addr_insn = 0; - /* Store instruction uses the second operand for the address mode. */ + /* Store instruction uses the second operand for the address mode. */ if ((insn.tm->operand_types[1] & (Indirect | Direct)) == (Indirect | Direct)) addr_insn = 1; if (insn.operand_type[addr_insn]->op_type & (AllReg)) @@ -484,11 +472,11 @@ md_assemble (line) return; } } - /* Now set the addressing mode for 3 operand instructions. */ + /* Now set the addressing mode for 3 operand instructions. */ if ((insn.tm->operand_types[0] & op3T1) && (insn.tm->operand_types[1] & op3T2)) { /* Set the addressing mode to the values used for 2 operand instructions in the - G addressing field of the opcode. */ + G addressing field of the opcode. */ char *p; switch (insn.operand_type[0]->op_type) { @@ -522,7 +510,7 @@ md_assemble (line) } /* Now make up the opcode for the 3 operand instructions. As in parallel instructions, there will be no unresolved values, so they can be fully formed - and added to the frag table. */ + and added to the frag table. */ insn.opcode = insn.tm->base_opcode; if (insn.operand_type[0]->op_type & Indirect) { @@ -549,7 +537,7 @@ md_assemble (line) char *p; int am_insn = -1; insn.opcode = insn.tm->base_opcode; - /* Create frag for instruction - all instructions are 4 bytes long. */ + /* Create frag for instruction - all instructions are 4 bytes long. */ p = frag_more (INSN_SIZE); if ((insn.operands > 0) && (insn.tm->opcode_modifier == AddressMode)) { @@ -746,7 +734,7 @@ md_assemble (line) md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE); fix = fix_new_exp (frag_now, p + 3 - (frag_now->fr_literal), 1, &insn.operand_type[0]->direct.direct_expr, 0, 0); /* Ensure that the assembler doesn't complain about fitting a 24-bit - address into 8 bits. */ + address into 8 bits. */ fix->fx_no_overflow = 1; } } @@ -790,12 +778,12 @@ md_assemble (line) } else if (insn.tm->operand_types[0] & NotReq) { - /* Check for NOP instruction without arguments. */ + /* Check for NOP instruction without arguments. */ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE); } else if (insn.tm->operands == 0) { - /* Check for instructions without operands. */ + /* Check for instructions without operands. */ md_number_to_chars (p, (valueT) insn.opcode, INSN_SIZE); } } @@ -813,13 +801,12 @@ md_assemble (line) debug ("\n"); } -struct tic30_par_insn -{ +struct tic30_par_insn { partemplate *tm; /* Template of current parallel instruction */ int operands[2]; /* Number of given operands for each insn */ /* Type of operand given in instruction */ operand *operand_type[2][MAX_OPERANDS]; - int swap_operands; /* Whether to swap operands around. */ + int swap_operands; /* Whether to swap operands around. */ unsigned p_field; /* Value of p field in multiply add/sub instructions */ unsigned opcode; /* Final opcode */ }; @@ -1039,7 +1026,7 @@ tic30_parallel_insn (char *token) /* Get number of R register and indirect reference contained within the first two operands of each instruction. This is required for the multiply parallel instructions which require two R registers and two indirect - references, but not in any particular place. */ + references, but not in any particular place. */ if ((p_insn.operand_type[count][i]->op_type & Rn) && i < 2) num_rn++; else if ((p_insn.operand_type[count][i]->op_type & Indirect) && i < 2) @@ -1109,7 +1096,7 @@ tic30_parallel_insn (char *token) debug ("P field: %08X\n", p_insn.p_field); /* Finalise opcode. This is easier for parallel instructions as they have to be fully resolved, there are no memory addresses allowed, except through indirect - addressing, so there are no labels to resolve. */ + addressing, so there are no labels to resolve. */ { p_insn.opcode = p_insn.tm->base_opcode; switch (p_insn.tm->oporder) @@ -1201,7 +1188,7 @@ tic30_parallel_insn (char *token) } break; } - } /* Opcode is finalised at this point for all parallel instructions. */ + } /* Opcode is finalised at this point for all parallel instructions. */ { /* Output opcode */ char *p; p = frag_more (INSN_SIZE); @@ -1303,7 +1290,7 @@ tic30_operand (token) if (*(token + count) == '(') { /* Parenthesis found, so check if a displacement value is inside. If so, get - the value and remove it from the buffer. */ + the value and remove it from the buffer. */ if (is_digit_char (*(token + count + 1))) { char disp[10]; @@ -1459,7 +1446,7 @@ tic30_find_parallel_insn (current_line, next_line) char *parallel_insn; debug ("In tic30_find_parallel_insn()\n"); - while (!is_end_of_line[(int) *next_line]) + while (!is_end_of_line[(unsigned char) *next_line]) { if (*next_line == PARALLEL_SEPARATOR && *(next_line + 1) == PARALLEL_SEPARATOR) { @@ -1495,7 +1482,7 @@ tic30_find_parallel_insn (current_line, next_line) int char_ptr = 0; char c; - while (!is_end_of_line[(int) (c = *line)] && *line) + while (!is_end_of_line[(unsigned char) (c = *line)]) { if (is_opcode_char (c) && search_status == NONE) { @@ -1543,7 +1530,7 @@ tic30_find_parallel_insn (current_line, next_line) #undef END_OPERANDS /* In order to get gas to ignore any | chars at the start of a line, - this function returns true if a | is found in a line. */ + this function returns true if a | is found in a line. */ int tic30_unrecognized_line (c) @@ -1588,7 +1575,7 @@ md_apply_fix (fixP, valP) char *buf = fixP->fx_frag->fr_literal + fixP->fx_where; value /= INSN_SIZE; if (fixP->fx_size == 1) - { /* Special fix for LDP instruction. */ + { /* Special fix for LDP instruction. */ value = (value & 0x00FF0000) >> 16; } debug ("new value = %ld\n", (long) value); @@ -1650,7 +1637,7 @@ md_pcrel_from (fixP) debug ("fx_size = %d\n", fixP->fx_size); /* Find the opcode that represents the current instruction in the fr_literal storage area, and check bit 21. Bit 21 contains whether the current instruction - is a delayed one or not, and then set the offset value appropriately. */ + is a delayed one or not, and then set the offset value appropriately. */ if (fixP->fx_frag->fr_literal[fixP->fx_where - fixP->fx_size + 1] & 0x20) offset = 3; else @@ -1682,7 +1669,8 @@ md_atof (what_statement_type, literalP, sizeP) debug ("literal = %s\n", literalP); debug ("line = "); token = input_line_pointer; - while (!is_end_of_line[(unsigned) *input_line_pointer] && (*input_line_pointer) && (*input_line_pointer != ',')) + while (!is_end_of_line[(unsigned char) *input_line_pointer] + && (*input_line_pointer != ',')) { debug ("%c", *input_line_pointer); input_line_pointer++; diff --git a/contrib/binutils/gas/config/tc-tic30.h b/contrib/binutils/gas/config/tc-tic30.h index d172d2e..5b34cf1 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 Free Software Foundation. + Copyright (C) 1998, 2000 Free Software Foundation. Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) This file is part of GAS, the GNU Assembler. @@ -45,7 +45,7 @@ char *output_invalid PARAMS ((int c)); /* Define this to 1 if you want the debug output to be on stdout, otherwise stderr will be used. If stderr is used, there will be a better synchronisation with the as_bad outputs, but you can't - capture the output. */ + capture the output. */ #define USE_STDOUT 0 #define tc_unrecognized_line tic30_unrecognized_line diff --git a/contrib/binutils/gas/config/tc-v850.c b/contrib/binutils/gas/config/tc-v850.c index e53054d..57931950 100644 --- a/contrib/binutils/gas/config/tc-v850.c +++ b/contrib/binutils/gas/config/tc-v850.c @@ -1,5 +1,5 @@ /* tc-v850.c -- Assembler code for the NEC V850 - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation. + Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -21,60 +21,58 @@ #include #include #include "as.h" -#include "subsegs.h" +#include "subsegs.h" #include "opcode/v850.h" +#include "dwarf2dbg.h" #define AREA_ZDA 0 #define AREA_SDA 1 #define AREA_TDA 2 -/* sign-extend a 16-bit number */ -#define SEXT16(x) ((((x) & 0xffff) ^ (~ 0x7fff)) + 0x8000) +/* Sign-extend a 16-bit number. */ +#define SEXT16(x) ((((x) & 0xffff) ^ (~0x7fff)) + 0x8000) /* Temporarily holds the reloc in a cons expression. */ -static bfd_reloc_code_real_type hold_cons_reloc; +static bfd_reloc_code_real_type hold_cons_reloc = BFD_RELOC_UNUSED; /* Set to TRUE if we want to be pedantic about signed overflows. */ static boolean warn_signed_overflows = FALSE; static boolean warn_unsigned_overflows = FALSE; /* Indicates the target BFD machine number. */ -static int machine = -1; +static int machine = -1; /* Indicates the target processor(s) for the assemble. */ -static unsigned int processor_mask = -1; - +static int processor_mask = -1; /* Structure to hold information about predefined registers. */ -struct reg_name -{ - const char * name; - int value; +struct reg_name { + const char *name; + int value; }; -/* Generic assembler global variables which must be defined by all targets. */ +/* Generic assembler global variables which must be defined by all + targets. */ -/* Characters which always start a comment. */ +/* Characters which always start a comment. */ const char comment_chars[] = "#"; /* Characters which start a comment at the beginning of a line. */ const char line_comment_chars[] = ";#"; -/* Characters which may be used to separate multiple commands on a +/* Characters which may be used to separate multiple commands on a single line. */ const char line_separator_chars[] = ";"; -/* Characters which are used to indicate an exponent in a floating +/* Characters which are used to indicate an exponent in a floating point number. */ const char EXP_CHARS[] = "eE"; -/* Characters which mean that a number is a floating point constant, +/* Characters which mean that a number is a floating point constant, as in 0d1.0. */ const char FLT_CHARS[] = "dD"; - -const relax_typeS md_relax_table[] = -{ +const relax_typeS md_relax_table[] = { /* Conditional branches. */ {0xff, -0x100, 2, 1}, {0x1fffff, -0x200000, 6, 0}, @@ -83,7 +81,6 @@ const relax_typeS md_relax_table[] = {0x1fffff, -0x200000, 4, 0}, }; - static segT sdata_section = NULL; static segT tdata_section = NULL; static segT zdata_section = NULL; @@ -98,207 +95,207 @@ static segT zcommon_section = NULL; static segT call_table_data_section = NULL; static segT call_table_text_section = NULL; -/* fixups */ +/* Fixups. */ #define MAX_INSN_FIXUPS (5) -struct v850_fixup -{ - expressionS exp; - int opindex; +struct v850_fixup { + expressionS exp; + int opindex; bfd_reloc_code_real_type reloc; }; -struct v850_fixup fixups [MAX_INSN_FIXUPS]; +struct v850_fixup fixups[MAX_INSN_FIXUPS]; static int fc; - void -v850_sdata (int ignore) +v850_sdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (sdata_section, (subsegT) get_absolute_expression ()); demand_empty_rest_of_line (); } void -v850_tdata (int ignore) +v850_tdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (tdata_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_zdata (int ignore) +v850_zdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (zdata_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_sbss (int ignore) +v850_sbss (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (sbss_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_tbss (int ignore) +v850_tbss (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (tbss_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_zbss (int ignore) +v850_zbss (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (zbss_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_rosdata (int ignore) +v850_rosdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (rosdata_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_rozdata (int ignore) +v850_rozdata (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (rozdata_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_call_table_data (int ignore) +v850_call_table_data (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (call_table_data_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_call_table_text (int ignore) +v850_call_table_text (int ignore ATTRIBUTE_UNUSED) { - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (call_table_text_section, (subsegT) get_absolute_expression ()); - + demand_empty_rest_of_line (); } void -v850_bss (int ignore) +v850_bss (int ignore ATTRIBUTE_UNUSED) { register int temp = get_absolute_expression (); - obj_elf_section_change_hook(); - + obj_elf_section_change_hook (); + subseg_set (bss_section, (subsegT) temp); - + demand_empty_rest_of_line (); } void -v850_offset (int ignore) +v850_offset (int ignore ATTRIBUTE_UNUSED) { int temp = get_absolute_expression (); - - temp -= frag_now_fix(); - + + temp -= frag_now_fix (); + if (temp > 0) (void) frag_more (temp); - + demand_empty_rest_of_line (); } -/* Copied from obj_elf_common() in gas/config/obj-elf.c */ +/* Copied from obj_elf_common() in gas/config/obj-elf.c. */ + static void v850_comm (area) int area; { - char * name; - char c; - char * p; - int temp; - int size; - symbolS * symbolP; - int have_align; + char *name; + char c; + char *p; + int temp; + unsigned int size; + symbolS *symbolP; + int have_align; name = input_line_pointer; c = get_symbol_end (); - - /* just after name is now '\0' */ + + /* Just after name is now '\0'. */ p = input_line_pointer; *p = c; - + SKIP_WHITESPACE (); - + if (*input_line_pointer != ',') { as_bad (_("Expected comma after symbol-name")); ignore_rest_of_line (); return; } - - input_line_pointer ++; /* skip ',' */ - + + /* Skip ','. */ + input_line_pointer++; + if ((temp = get_absolute_expression ()) < 0) { - /* xgettext:c-format */ + /* xgettext:c-format */ as_bad (_(".COMMon length (%d.) < 0! Ignored."), temp); ignore_rest_of_line (); return; } - + size = temp; *p = 0; symbolP = symbol_find_or_make (name); *p = c; - + if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP)) { as_bad (_("Ignoring attempt to re-define symbol")); ignore_rest_of_line (); return; } - + if (S_GET_VALUE (symbolP) != 0) { if (S_GET_VALUE (symbolP) != size) { - /* xgettext:c-format */ + /* xgettext:c-format */ as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %d."), S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size); } } - - know (symbol_get_frag (symbolP) == & zero_address_frag); - + + know (symbol_get_frag (symbolP) == &zero_address_frag); + if (*input_line_pointer != ',') have_align = 0; else @@ -307,7 +304,7 @@ v850_comm (area) input_line_pointer++; SKIP_WHITESPACE (); } - + if (! have_align || *input_line_pointer != '"') { if (! have_align) @@ -315,60 +312,60 @@ v850_comm (area) else { temp = get_absolute_expression (); - + if (temp < 0) { temp = 0; as_warn (_("Common alignment negative; 0 assumed")); } } - + if (symbol_get_obj (symbolP)->local) { - segT old_sec; - int old_subsec; - char * pfrag; - int align; - flagword applicable; + segT old_sec; + int old_subsec; + char *pfrag; + int align; + flagword applicable; old_sec = now_seg; old_subsec = now_subseg; - + applicable = bfd_applicable_section_flags (stdoutput); - + applicable &= SEC_ALLOC; - + switch (area) { case AREA_SDA: if (sbss_section == NULL) { sbss_section = subseg_new (".sbss", 0); - + bfd_set_section_flags (stdoutput, sbss_section, applicable); - + seg_info (sbss_section)->bss = 1; } break; - + case AREA_ZDA: if (zbss_section == NULL) { zbss_section = subseg_new (".zbss", 0); - + bfd_set_section_flags (stdoutput, sbss_section, applicable); - + seg_info (zbss_section)->bss = 1; } break; - + case AREA_TDA: if (tbss_section == NULL) { tbss_section = subseg_new (".tbss", 0); - + bfd_set_section_flags (stdoutput, tbss_section, applicable); - + seg_info (tbss_section)->bss = 1; } break; @@ -376,10 +373,10 @@ v850_comm (area) if (temp) { - /* convert to a power of 2 alignment */ + /* Convert to a power of 2 alignment. */ for (align = 0; (temp & 1) == 0; temp >>= 1, ++align) ; - + if (temp != 1) { as_bad (_("Common alignment not a power of 2")); @@ -389,31 +386,31 @@ v850_comm (area) } else align = 0; - + switch (area) { case AREA_SDA: record_alignment (sbss_section, align); - obj_elf_section_change_hook(); + obj_elf_section_change_hook (); subseg_set (sbss_section, 0); break; case AREA_ZDA: record_alignment (zbss_section, align); - obj_elf_section_change_hook(); + obj_elf_section_change_hook (); subseg_set (zbss_section, 0); break; case AREA_TDA: record_alignment (tbss_section, align); - obj_elf_section_change_hook(); + obj_elf_section_change_hook (); subseg_set (tbss_section, 0); break; default: - abort(); + abort (); } - + if (align) frag_align (align, 0, 0); @@ -437,33 +434,33 @@ v850_comm (area) default: abort (); } - + symbol_set_frag (symbolP, frag_now); pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, (offsetT) size, (char *) 0); *pfrag = 0; S_SET_SIZE (symbolP, size); - + switch (area) { case AREA_SDA: S_SET_SEGMENT (symbolP, sbss_section); break; - + case AREA_ZDA: S_SET_SEGMENT (symbolP, zbss_section); break; - + case AREA_TDA: S_SET_SEGMENT (symbolP, tbss_section); break; - + default: - abort(); + abort (); } - + S_CLEAR_EXTERNAL (symbolP); - obj_elf_section_change_hook(); + obj_elf_section_change_hook (); subseg_set (old_sec, old_subsec); } else @@ -472,68 +469,72 @@ v850_comm (area) S_SET_VALUE (symbolP, (valueT) size); S_SET_ALIGN (symbolP, temp); S_SET_EXTERNAL (symbolP); - + switch (area) { case AREA_SDA: if (scommon_section == NULL) { - flagword applicable; - - applicable = bfd_applicable_section_flags (stdoutput); - + flagword applicable = + bfd_applicable_section_flags (stdoutput); + scommon_section = subseg_new (".scommon", 0); - - bfd_set_section_flags (stdoutput, scommon_section, applicable + + bfd_set_section_flags (stdoutput, scommon_section, + (applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA - | SEC_HAS_CONTENTS) | SEC_IS_COMMON); + | SEC_HAS_CONTENTS)) | SEC_IS_COMMON); } S_SET_SEGMENT (symbolP, scommon_section); break; - + case AREA_ZDA: if (zcommon_section == NULL) { - flagword applicable; - - applicable = bfd_applicable_section_flags (stdoutput); - + flagword applicable = + bfd_applicable_section_flags (stdoutput); + zcommon_section = subseg_new (".zcommon", 0); - - bfd_set_section_flags (stdoutput, zcommon_section, applicable + + bfd_set_section_flags (stdoutput, zcommon_section, + (applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA - | SEC_HAS_CONTENTS) | SEC_IS_COMMON); + | SEC_HAS_CONTENTS)) | SEC_IS_COMMON); } S_SET_SEGMENT (symbolP, zcommon_section); break; - + case AREA_TDA: if (tcommon_section == NULL) { - flagword applicable; - - applicable = bfd_applicable_section_flags (stdoutput); - + flagword applicable = + bfd_applicable_section_flags (stdoutput); + tcommon_section = subseg_new (".tcommon", 0); - - bfd_set_section_flags (stdoutput, tcommon_section, applicable - & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA - | SEC_HAS_CONTENTS) | SEC_IS_COMMON); + + bfd_set_section_flags (stdoutput, tcommon_section, + ((applicable + & (SEC_ALLOC | SEC_LOAD + | SEC_RELOC | SEC_DATA + | SEC_HAS_CONTENTS)) + | SEC_IS_COMMON)); } S_SET_SEGMENT (symbolP, tcommon_section); break; - + default: - abort(); + abort (); } } } else { input_line_pointer++; + /* @@ Some use the dot, some don't. Can we get some consistency?? */ if (*input_line_pointer == '.') input_line_pointer++; + /* @@ Some say data, some say bss. */ if (strncmp (input_line_pointer, "bss\"", 4) && strncmp (input_line_pointer, "data\"", 5)) @@ -576,15 +577,14 @@ set_machine (int number) switch (machine) { - case 0: processor_mask = PROCESSOR_V850; break; - case bfd_mach_v850e: processor_mask = PROCESSOR_V850E; break; + case 0: processor_mask = PROCESSOR_V850; break; + case bfd_mach_v850e: processor_mask = PROCESSOR_V850E; break; case bfd_mach_v850ea: processor_mask = PROCESSOR_V850EA; break; } } /* The target specific pseudo-ops which we support. */ -const pseudo_typeS md_pseudo_table[] = -{ +const pseudo_typeS md_pseudo_table[] = { {"sdata", v850_sdata, 0}, {"tdata", v850_tdata, 0}, {"zdata", v850_zdata, 0}, @@ -604,19 +604,20 @@ 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 }, { NULL, NULL, 0} }; /* Opcode hash table. */ static struct hash_control *v850_hash; -/* This table is sorted. Suitable for searching by a binary search. */ -static const struct reg_name pre_defined_registers[] = -{ +/* This table is sorted. Suitable for searching by a binary search. */ +static const struct reg_name pre_defined_registers[] = { { "ep", 30 }, /* ep - element ptr */ - { "gp", 4 }, /* gp - global ptr */ - { "hp", 2 }, /* hp - handler stack ptr */ - { "lp", 31 }, /* lp - link ptr */ + { "gp", 4 }, /* gp - global ptr */ + { "hp", 2 }, /* hp - handler stack ptr */ + { "lp", 31 }, /* lp - link ptr */ { "r0", 0 }, { "r1", 1 }, { "r10", 10 }, @@ -649,15 +650,15 @@ static const struct reg_name pre_defined_registers[] = { "r7", 7 }, { "r8", 8 }, { "r9", 9 }, - { "sp", 3 }, /* sp - stack ptr */ - { "tp", 5 }, /* tp - text ptr */ + { "sp", 3 }, /* sp - stack ptr */ + { "tp", 5 }, /* tp - text ptr */ { "zero", 0 }, }; -#define REG_NAME_CNT (sizeof (pre_defined_registers) / sizeof (struct reg_name)) +#define REG_NAME_CNT \ + (sizeof (pre_defined_registers) / sizeof (struct reg_name)) -static const struct reg_name system_registers[] = -{ +static const struct reg_name system_registers[] = { { "ctbp", 20 }, { "ctpc", 16 }, { "ctpsw", 17 }, @@ -670,17 +671,19 @@ static const struct reg_name system_registers[] = { "fepsw", 3 }, { "psw", 5 }, }; -#define SYSREG_NAME_CNT (sizeof (system_registers) / sizeof (struct reg_name)) -static const struct reg_name system_list_registers[] = -{ +#define SYSREG_NAME_CNT \ + (sizeof (system_registers) / sizeof (struct reg_name)) + +static const struct reg_name system_list_registers[] = { {"PS", 5 }, {"SR", 0 + 1} }; -#define SYSREGLIST_NAME_CNT (sizeof (system_list_registers) / sizeof (struct reg_name)) -static const struct reg_name cc_names[] = -{ +#define SYSREGLIST_NAME_CNT \ + (sizeof (system_list_registers) / sizeof (struct reg_name)) + +static const struct reg_name cc_names[] = { { "c", 0x1 }, { "e", 0x2 }, { "ge", 0xe }, @@ -704,22 +707,24 @@ static const struct reg_name cc_names[] = { "v", 0x0 }, { "z", 0x2 }, }; -#define CC_NAME_CNT (sizeof (cc_names) / sizeof (struct reg_name)) -/* reg_name_search does a binary search of the given register table - to see if "name" is a valid regiter name. Returns the register - number from the array on success, or -1 on failure. */ +#define CC_NAME_CNT \ + (sizeof (cc_names) / sizeof (struct reg_name)) + +/* Do a binary search of the given register table to see if NAME is a + valid regiter name. Return the register number from the array on + success, or -1 on failure. */ static int reg_name_search (regs, regcount, name, accept_numbers) - const struct reg_name * regs; - int regcount; - const char * name; - boolean accept_numbers; + const struct reg_name *regs; + int regcount; + const char *name; + boolean accept_numbers; { int middle, low, high; int cmp; - symbolS * symbolP; + symbolS *symbolP; /* If the register name is a symbol, then evaluate it. */ if ((symbolP = symbol_find (name)) != NULL) @@ -728,19 +733,20 @@ reg_name_search (regs, regcount, name, accept_numbers) If the symbol is an alias for a number, then return the number. */ if (symbol_equated_p (symbolP)) { - name = S_GET_NAME (symbol_get_value_expression (symbolP)->X_add_symbol); + name + = S_GET_NAME (symbol_get_value_expression (symbolP)->X_add_symbol); } else if (accept_numbers) { int reg = S_GET_VALUE (symbolP); - + if (reg >= 0 && reg <= 31) return reg; } /* Otherwise drop through and try parsing name normally. */ } - + low = 0; high = regcount - 1; @@ -759,7 +765,6 @@ reg_name_search (regs, regcount, name, accept_numbers) return -1; } - /* Summary of register_name(). * * in: Input_line_pointer points to 1st char of operand. @@ -768,18 +773,18 @@ reg_name_search (regs, regcount, name, accept_numbers) * The operand may have been a register: in this case, X_op == O_register, * X_add_number is set to the register number, and truth is returned. * Input_line_pointer->(next non-blank) char after operand, or is in - * its original state. - */ + * its original state. */ + static boolean register_name (expressionP) - expressionS * expressionP; + expressionS *expressionP; { - int reg_number; - char * name; - char * start; - char c; + int reg_number; + char *name; + char *start; + char c; - /* Find the spelling of the operand */ + /* Find the spelling of the operand. */ start = name = input_line_pointer; c = get_symbol_end (); @@ -787,78 +792,79 @@ register_name (expressionP) reg_number = reg_name_search (pre_defined_registers, REG_NAME_CNT, name, FALSE); - * input_line_pointer = c; /* put back the delimiting char */ - - /* look to see if it's in the register table */ - if (reg_number >= 0) + /* Put back the delimiting char. */ + *input_line_pointer = c; + + /* Look to see if it's in the register table. */ + if (reg_number >= 0) { expressionP->X_op = O_register; expressionP->X_add_number = reg_number; - /* make the rest nice */ + /* Make the rest nice. */ expressionP->X_add_symbol = NULL; expressionP->X_op_symbol = NULL; - + return true; } else { - /* reset the line as if we had not done anything */ + /* Reset the line as if we had not done anything. */ input_line_pointer = start; - + return false; } } /* Summary of system_register_name(). * - * in: Input_line_pointer points to 1st char of operand. - * expressionP points to an expression structure to be filled in. - * accept_numbers is true iff numerical register names may be used. - * accept_list_names is true iff the special names PS and SR may be + * in: INPUT_LINE_POINTER points to 1st char of operand. + * EXPRESSIONP points to an expression structure to be filled in. + * ACCEPT_NUMBERS is true iff numerical register names may be used. + * ACCEPT_LIST_NAMES is true iff the special names PS and SR may be * accepted. * * out: A expressionS structure in expressionP. * The operand may have been a register: in this case, X_op == O_register, * X_add_number is set to the register number, and truth is returned. * Input_line_pointer->(next non-blank) char after operand, or is in - * its original state. - */ + * its original state. */ + static boolean system_register_name (expressionP, accept_numbers, accept_list_names) - expressionS * expressionP; - boolean accept_numbers; - boolean accept_list_names; + expressionS *expressionP; + boolean accept_numbers; + boolean accept_list_names; { - int reg_number; - char * name; - char * start; - char c; + int reg_number; + char *name; + char *start; + char c; - /* Find the spelling of the operand */ + /* Find the spelling of the operand. */ start = name = input_line_pointer; c = get_symbol_end (); reg_number = reg_name_search (system_registers, SYSREG_NAME_CNT, name, accept_numbers); - * input_line_pointer = c; /* put back the delimiting char */ - + /* Put back the delimiting char. */ + *input_line_pointer = c; + if (reg_number < 0 && accept_numbers) { - input_line_pointer = start; /* reset input_line pointer */ + /* Reset input_line pointer. */ + input_line_pointer = start; - if (isdigit (* input_line_pointer)) + if (isdigit (*input_line_pointer)) { - reg_number = strtol (input_line_pointer, & input_line_pointer, 10); - - /* Make sure that the register number is allowable. */ - if ( reg_number < 0 - || reg_number > 5 - && reg_number < 16 - || reg_number > 20 - ) + reg_number = strtol (input_line_pointer, &input_line_pointer, 10); + + /* Make sure that the register number is allowable. */ + if (reg_number < 0 + || (reg_number > 5 && reg_number < 16) + || reg_number > 20) { reg_number = -1; } @@ -869,17 +875,18 @@ system_register_name (expressionP, accept_numbers, accept_list_names) reg_number = reg_name_search (system_list_registers, SYSREGLIST_NAME_CNT, name, FALSE); - * input_line_pointer = c; /* put back the delimiting char */ + /* Put back the delimiting char. */ + *input_line_pointer = c; } } - - /* look to see if it's in the register table */ - if (reg_number >= 0) + + /* Look to see if it's in the register table. */ + if (reg_number >= 0) { expressionP->X_op = O_register; expressionP->X_add_number = reg_number; - /* make the rest nice */ + /* Make the rest nice. */ expressionP->X_add_symbol = NULL; expressionP->X_op_symbol = NULL; @@ -887,47 +894,48 @@ system_register_name (expressionP, accept_numbers, accept_list_names) } else { - /* reset the line as if we had not done anything */ + /* Reset the line as if we had not done anything. */ input_line_pointer = start; - + return false; } } /* Summary of cc_name(). * - * in: Input_line_pointer points to 1st char of operand. + * in: INPUT_LINE_POINTER points to 1st char of operand. * * out: A expressionS. * The operand may have been a register: in this case, X_op == O_register, * X_add_number is set to the register number, and truth is returned. * Input_line_pointer->(next non-blank) char after operand, or is in - * its original state. - */ + * its original state. */ + static boolean cc_name (expressionP) - expressionS * expressionP; + expressionS *expressionP; { - int reg_number; - char * name; - char * start; - char c; + int reg_number; + char *name; + char *start; + char c; - /* Find the spelling of the operand */ + /* Find the spelling of the operand. */ start = name = input_line_pointer; c = get_symbol_end (); reg_number = reg_name_search (cc_names, CC_NAME_CNT, name, FALSE); - * input_line_pointer = c; /* put back the delimiting char */ - - /* look to see if it's in the register table */ - if (reg_number >= 0) + /* Put back the delimiting char. */ + *input_line_pointer = c; + + /* Look to see if it's in the register table. */ + if (reg_number >= 0) { expressionP->X_op = O_constant; expressionP->X_add_number = reg_number; - /* make the rest nice */ + /* Make the rest nice. */ expressionP->X_add_symbol = NULL; expressionP->X_op_symbol = NULL; @@ -935,9 +943,9 @@ cc_name (expressionP) } else { - /* reset the line as if we had not done anything */ + /* Reset the line as if we had not done anything. */ input_line_pointer = start; - + return false; } } @@ -945,16 +953,16 @@ cc_name (expressionP) static void skip_white_space (void) { - while ( * input_line_pointer == ' ' - || * input_line_pointer == '\t') - ++ input_line_pointer; + while (*input_line_pointer == ' ' + || *input_line_pointer == '\t') + ++input_line_pointer; } /* Summary of parse_register_list (). * - * in: Input_line_pointer points to 1st char of a list of registers. - * insn is the partially constructed instruction. - * operand is the operand being inserted. + * in: INPUT_LINE_POINTER points to 1st char of a list of registers. + * INSN is the partially constructed instruction. + * OPERAND is the operand being inserted. * * out: NULL if the parse completed successfully, otherwise a * pointer to an error message is returned. If the parse @@ -973,24 +981,29 @@ skip_white_space (void) * registers in the lists. The LSB in the expression refers to * the lowest numbered permissable register in the register list, * and so on upwards. System registers are considered to be very - * high numbers. - * - */ + * high numbers. */ + static char * -parse_register_list -( - unsigned long * insn, - const struct v850_operand * operand -) +parse_register_list (insn, operand) + unsigned long *insn; + const struct v850_operand *operand; { - static int type1_regs[ 32 ] = { 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 }; - static int type2_regs[ 32 ] = { 19, 18, 17, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 }; - static int type3_regs[ 32 ] = { 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 15, 13, 12, 7, 6, 5, 4, 11, 10, 9, 8 }; - int * regs; + static int type1_regs[32] = { + 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 + }; + static int type2_regs[32] = { + 19, 18, 17, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 30, 31, 29, 28, 23, 22, 21, 20, 27, 26, 25, 24 + }; + static int type3_regs[32] = { + 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 14, 15, 13, 12, 7, 6, 5, 4, 11, 10, 9, 8 + }; + int *regs; expressionS exp; - - /* Select a register array to parse. */ + /* Select a register array to parse. */ switch (operand->shift) { case 0xffe00001: regs = type1_regs; break; @@ -1006,15 +1019,14 @@ parse_register_list /* If the expression starts with a curly brace it is a register list. Otherwise it is a constant expression, whoes bits indicate which registers are to be included in the list. */ - - if (* input_line_pointer != '{') + + if (*input_line_pointer != '{') { - int bits; int reg; int i; - - expression (& exp); - + + expression (&exp); + if (exp.X_op != O_constant) return _("constant expression or register list expected"); @@ -1022,71 +1034,71 @@ parse_register_list { if (exp.X_add_number & 0xFFFFF000) return _("high bits set in register list expression"); - - for (reg = 20; reg < 32; reg ++) + + for (reg = 20; reg < 32; reg++) if (exp.X_add_number & (1 << (reg - 20))) { for (i = 0; i < 32; i++) if (regs[i] == reg) - * insn |= (1 << i); + *insn |= (1 << i); } } else if (regs == type2_regs) { if (exp.X_add_number & 0xFFFE0000) return _("high bits set in register list expression"); - - for (reg = 1; reg < 16; reg ++) + + for (reg = 1; reg < 16; reg++) if (exp.X_add_number & (1 << (reg - 1))) { for (i = 0; i < 32; i++) if (regs[i] == reg) - * insn |= (1 << i); + *insn |= (1 << i); } if (exp.X_add_number & (1 << 15)) - * insn |= (1 << 3); - + *insn |= (1 << 3); + if (exp.X_add_number & (1 << 16)) - * insn |= (1 << 19); + *insn |= (1 << 19); } - else /* regs == type3_regs */ + else /* regs == type3_regs */ { if (exp.X_add_number & 0xFFFE0000) return _("high bits set in register list expression"); - - for (reg = 16; reg < 32; reg ++) + + for (reg = 16; reg < 32; reg++) if (exp.X_add_number & (1 << (reg - 16))) { for (i = 0; i < 32; i++) if (regs[i] == reg) - * insn |= (1 << i); + *insn |= (1 << i); } if (exp.X_add_number & (1 << 16)) - * insn |= (1 << 19); + *insn |= (1 << 19); } return NULL; } - input_line_pointer ++; + input_line_pointer++; /* Parse the register list until a terminator (closing curly brace or new-line) is found. */ for (;;) { - if (register_name (& exp)) + if (register_name (&exp)) { - int i; - + int i; + /* Locate the given register in the list, and if it is there, insert the corresponding bit into the instruction. */ for (i = 0; i < 32; i++) { - if (regs[ i ] == exp.X_add_number) + if (regs[i] == exp.X_add_number) { - * insn |= (1 << i); + *insn |= (1 << i); break; } } @@ -1096,7 +1108,7 @@ parse_register_list return _("illegal register included in list"); } } - else if (system_register_name (& exp, true, true)) + else if (system_register_name (&exp, true, true)) { if (regs == type1_regs) { @@ -1107,34 +1119,34 @@ parse_register_list if (regs == type2_regs) return _("PSW cannot be included in list"); else - * insn |= 0x8; + *insn |= 0x8; } else if (exp.X_add_number < 4) - * insn |= 0x80000; + *insn |= 0x80000; else return _("High value system registers cannot be included in list"); } - else if (* input_line_pointer == '}') + else if (*input_line_pointer == '}') { - input_line_pointer ++; + input_line_pointer++; break; } - else if (* input_line_pointer == ',') + else if (*input_line_pointer == ',') { - input_line_pointer ++; + input_line_pointer++; continue; } - else if (* input_line_pointer == '-') + else if (*input_line_pointer == '-') { - /* We have encountered a range of registers: rX - rY */ - int j; + /* We have encountered a range of registers: rX - rY. */ + int j; expressionS exp2; /* Skip the dash. */ - ++ input_line_pointer; + ++input_line_pointer; /* Get the second register in the range. */ - if (! register_name (& exp2)) + if (! register_name (&exp2)) { return _("second register should follow dash in register list"); exp2.X_add_number = exp.X_add_number; @@ -1143,15 +1155,15 @@ parse_register_list /* Add the rest of the registers in the range. */ for (j = exp.X_add_number + 1; j <= exp2.X_add_number; j++) { - int i; - + int i; + /* Locate the given register in the list, and if it is there, insert the corresponding bit into the instruction. */ for (i = 0; i < 32; i++) { - if (regs[ i ] == j) + if (regs[i] == j) { - * insn |= (1 << i); + *insn |= (1 << i); break; } } @@ -1171,18 +1183,17 @@ parse_register_list return NULL; } -CONST char * md_shortopts = "m:"; +CONST char *md_shortopts = "m:"; -struct option md_longopts[] = -{ +struct option md_longopts[] = { {NULL, no_argument, NULL, 0} }; -size_t md_longopts_size = sizeof md_longopts; +size_t md_longopts_size = sizeof (md_longopts); void md_show_usage (stream) - FILE * stream; + FILE *stream; { fprintf (stream, _(" V850 options:\n")); fprintf (stream, _(" -mwarn-signed-overflow Warn if signed immediate values overflow\n")); @@ -1195,13 +1206,14 @@ md_show_usage (stream) int md_parse_option (c, arg) - int c; - char * arg; + int c; + char *arg; { if (c != 'm') { - /* xgettext:c-format */ - fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg); + if (c != 'a') + /* xgettext:c-format */ + fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg); return 0; } @@ -1230,36 +1242,39 @@ md_parse_option (c, arg) } else if (strcmp (arg, "v850any") == 0) { - machine = 0; /* Tell the world that this is for any v850 chip. */ - processor_mask = PROCESSOR_V850EA; /* But support instructions for the extended versions. */ + /* Tell the world that this is for any v850 chip. */ + machine = 0; + + /* But support instructions for the extended versions. */ + processor_mask = PROCESSOR_V850EA; } else { - /* xgettext:c-format */ + /* xgettext:c-format */ fprintf (stderr, _("unknown command line option: -%c%s\n"), c, arg); return 0; } - + return 1; } symbolS * md_undefined_symbol (name) - char * name; + char *name ATTRIBUTE_UNUSED; { return 0; } char * md_atof (type, litp, sizep) - int type; - char * litp; - int * sizep; + int type; + char *litp; + int *sizep; { - int prec; + int prec; LITTLENUM_TYPE words[4]; - char * t; - int i; + char *t; + int i; switch (type) { @@ -1275,7 +1290,7 @@ md_atof (type, litp, sizep) *sizep = 0; return _("bad call to md_atof"); } - + t = atof_ieee (input_line_pointer, type, words); if (t) input_line_pointer = t; @@ -1291,16 +1306,16 @@ md_atof (type, litp, sizep) return NULL; } - /* Very gross. */ + void md_convert_frag (abfd, sec, fragP) - bfd * abfd; - asection * sec; - fragS * fragP; + bfd *abfd ATTRIBUTE_UNUSED; + asection *sec; + fragS *fragP; { subseg_change (sec, 0); - + /* In range conditional or unconditional branch. */ if (fragP->fr_subtype == 0 || fragP->fr_subtype == 2) { @@ -1312,7 +1327,7 @@ md_convert_frag (abfd, sec, fragP) /* Out of range conditional branch. Emit a branch around a jump. */ else if (fragP->fr_subtype == 1) { - unsigned char *buffer = + unsigned char *buffer = (unsigned char *) (fragP->fr_fix + fragP->fr_literal); /* Reverse the condition of the first branch. */ @@ -1349,8 +1364,8 @@ md_convert_frag (abfd, sec, fragP) valueT md_section_align (seg, addr) - asection * seg; - valueT addr; + asection *seg; + valueT addr; { int align = bfd_get_section_alignment (stdoutput, seg); return ((addr + (1 << align) - 1) & (-1 << align)); @@ -1359,41 +1374,40 @@ md_section_align (seg, addr) void md_begin () { - char * prev_name = ""; - register const struct v850_opcode * op; - flagword applicable; + char *prev_name = ""; + register const struct v850_opcode *op; + flagword applicable; if (strncmp (TARGET_CPU, "v850ea", 6) == 0) { if (machine == -1) machine = bfd_mach_v850ea; - + if (processor_mask == -1) processor_mask = PROCESSOR_V850EA; } else if (strncmp (TARGET_CPU, "v850e", 5) == 0) { if (machine == -1) - machine = bfd_mach_v850e; - + machine = bfd_mach_v850e; + if (processor_mask == -1) processor_mask = PROCESSOR_V850E; } - else - if (strncmp (TARGET_CPU, "v850", 4) == 0) + else if (strncmp (TARGET_CPU, "v850", 4) == 0) { if (machine == -1) - machine = 0; - + machine = 0; + if (processor_mask == -1) processor_mask = PROCESSOR_V850; } else - /* xgettext:c-format */ - as_bad (_("Unable to determine default target processor from string: %s"), + /* xgettext:c-format */ + as_bad (_("Unable to determine default target processor from string: %s"), TARGET_CPU); - v850_hash = hash_new(); + v850_hash = hash_new (); /* Insert unique names into hash table. The V850 instruction set has many identical opcode names that have different opcodes based @@ -1403,7 +1417,7 @@ md_begin () op = v850_opcodes; while (op->name) { - if (strcmp (prev_name, op->name)) + if (strcmp (prev_name, op->name)) { prev_name = (char *) op->name; hash_insert (v850_hash, op->name, (char *) op); @@ -1414,90 +1428,115 @@ md_begin () bfd_set_arch_mach (stdoutput, TARGET_ARCH, machine); applicable = bfd_applicable_section_flags (stdoutput); - + call_table_data_section = subseg_new (".call_table_data", 0); bfd_set_section_flags (stdoutput, call_table_data_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA | SEC_HAS_CONTENTS)); - + call_table_text_section = subseg_new (".call_table_text", 0); bfd_set_section_flags (stdoutput, call_table_text_section, applicable & (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE)); - + /* Restore text section as the current default. */ subseg_set (text_section, 0); } - static bfd_reloc_code_real_type -handle_ctoff (const struct v850_operand * operand) +handle_ctoff (const struct v850_operand *operand) { if (operand == NULL) return BFD_RELOC_V850_CALLT_16_16_OFFSET; - if ( operand->bits != 6 + if (operand->bits != 6 || operand->shift != 0) { as_bad (_("ctoff() relocation used on an instruction which does not support it")); return BFD_RELOC_64; /* Used to indicate an error condition. */ } - + return BFD_RELOC_V850_CALLT_6_7_OFFSET; } static bfd_reloc_code_real_type -handle_sdaoff (const struct v850_operand * operand) +handle_sdaoff (const struct v850_operand *operand) { - if (operand == NULL) return BFD_RELOC_V850_SDA_16_16_OFFSET; - if (operand->bits == 15 && operand->shift == 17) return BFD_RELOC_V850_SDA_15_16_OFFSET; - if (operand->bits == -1) return BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET; - - if ( operand->bits != 16 + if (operand == NULL) + return BFD_RELOC_V850_SDA_16_16_OFFSET; + + if (operand->bits == 15 && operand->shift == 17) + return BFD_RELOC_V850_SDA_15_16_OFFSET; + + if (operand->bits == -1) + return BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET; + + if (operand->bits != 16 || operand->shift != 16) { as_bad (_("sdaoff() relocation used on an instruction which does not support it")); return BFD_RELOC_64; /* Used to indicate an error condition. */ } - + return BFD_RELOC_V850_SDA_16_16_OFFSET; } static bfd_reloc_code_real_type -handle_zdaoff (const struct v850_operand * operand) +handle_zdaoff (const struct v850_operand *operand) { - if (operand == NULL) return BFD_RELOC_V850_ZDA_16_16_OFFSET; - if (operand->bits == 15 && operand->shift == 17) return BFD_RELOC_V850_ZDA_15_16_OFFSET; - if (operand->bits == -1) return BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET; + if (operand == NULL) + return BFD_RELOC_V850_ZDA_16_16_OFFSET; + + if (operand->bits == 15 && operand->shift == 17) + return BFD_RELOC_V850_ZDA_15_16_OFFSET; - if ( operand->bits != 16 + if (operand->bits == -1) + return BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET; + + if (operand->bits != 16 || operand->shift != 16) { as_bad (_("zdaoff() relocation used on an instruction which does not support it")); - return BFD_RELOC_64; /* Used to indicate an error condition. */ + /* Used to indicate an error condition. */ + return BFD_RELOC_64; } - + return BFD_RELOC_V850_ZDA_16_16_OFFSET; } static bfd_reloc_code_real_type -handle_tdaoff (const struct v850_operand * operand) +handle_tdaoff (const struct v850_operand *operand) { - if (operand == NULL) return BFD_RELOC_V850_TDA_7_7_OFFSET; /* data item, not an instruction. */ - if (operand->bits == 6 && operand->shift == 1) return BFD_RELOC_V850_TDA_6_8_OFFSET; /* sld.w/sst.w, operand: D8_6 */ - if (operand->bits == 4 && operand->insert != NULL) return BFD_RELOC_V850_TDA_4_5_OFFSET; /* sld.hu, operand: D5-4 */ - if (operand->bits == 4 && operand->insert == NULL) return BFD_RELOC_V850_TDA_4_4_OFFSET; /* sld.bu, operand: D4 */ - if (operand->bits == 16 && operand->shift == 16) return BFD_RELOC_V850_TDA_16_16_OFFSET; /* set1 & chums, operands: D16 */ - + if (operand == NULL) + /* Data item, not an instruction. */ + return BFD_RELOC_V850_TDA_7_7_OFFSET; + + if (operand->bits == 6 && operand->shift == 1) + /* sld.w/sst.w, operand: D8_6 */ + return BFD_RELOC_V850_TDA_6_8_OFFSET; + + if (operand->bits == 4 && operand->insert != NULL) + /* sld.hu, operand: D5-4 */ + return BFD_RELOC_V850_TDA_4_5_OFFSET; + + if (operand->bits == 4 && operand->insert == NULL) + /* sld.bu, operand: D4 */ + return BFD_RELOC_V850_TDA_4_4_OFFSET; + + if (operand->bits == 16 && operand->shift == 16) + /* set1 & chums, operands: D16 */ + return BFD_RELOC_V850_TDA_16_16_OFFSET; + if (operand->bits != 7) { as_bad (_("tdaoff() relocation used on an instruction which does not support it")); - return BFD_RELOC_64; /* Used to indicate an error condition. */ + /* Used to indicate an error condition. */ + return BFD_RELOC_64; } - + return operand->insert != NULL - ? BFD_RELOC_V850_TDA_7_8_OFFSET /* sld.h/sst.h, operand: D8_7 */ - : BFD_RELOC_V850_TDA_7_7_OFFSET; /* sld.b/sst.b, opreand: D7 */ + ? BFD_RELOC_V850_TDA_7_8_OFFSET /* sld.h/sst.h, operand: D8_7 */ + : BFD_RELOC_V850_TDA_7_7_OFFSET; /* sld.b/sst.b, opreand: D7 */ } /* Warning: The code in this function relies upon the definitions @@ -1505,15 +1544,14 @@ handle_tdaoff (const struct v850_operand * operand) matching the hard coded values contained herein. */ static bfd_reloc_code_real_type -v850_reloc_prefix (const struct v850_operand * operand) +v850_reloc_prefix (const struct v850_operand *operand) { boolean paren_skipped = false; - /* Skip leading opening parenthesis. */ - if (* input_line_pointer == '(') + if (*input_line_pointer == '(') { - ++ input_line_pointer; + ++input_line_pointer; paren_skipped = true; } @@ -1523,20 +1561,20 @@ v850_reloc_prefix (const struct v850_operand * operand) input_line_pointer += strlen (name); \ return reloc; \ } - - CHECK_ ("hi0", BFD_RELOC_HI16); - CHECK_ ("hi", BFD_RELOC_HI16_S); - CHECK_ ("lo", BFD_RELOC_LO16); + + CHECK_ ("hi0", BFD_RELOC_HI16 ); + CHECK_ ("hi", BFD_RELOC_HI16_S ); + CHECK_ ("lo", BFD_RELOC_LO16 ); CHECK_ ("sdaoff", handle_sdaoff (operand)); CHECK_ ("zdaoff", handle_zdaoff (operand)); CHECK_ ("tdaoff", handle_tdaoff (operand)); - CHECK_ ("hilo", BFD_RELOC_32); - CHECK_ ("ctoff", handle_ctoff (operand)); - + CHECK_ ("hilo", BFD_RELOC_32 ); + CHECK_ ("ctoff", handle_ctoff (operand) ); + /* Restore skipped parenthesis. */ if (paren_skipped) - -- input_line_pointer; - + --input_line_pointer; + return BFD_RELOC_UNUSED; } @@ -1544,31 +1582,31 @@ v850_reloc_prefix (const struct v850_operand * operand) static unsigned long v850_insert_operand (insn, operand, val, file, line, str) - unsigned long insn; - const struct v850_operand * operand; - offsetT val; - char * file; - unsigned int line; - char * str; + unsigned long insn; + const struct v850_operand *operand; + offsetT val; + char *file; + unsigned int line; + char *str; { if (operand->insert) { - const char * message = NULL; - - insn = operand->insert (insn, val, & message); + const char *message = NULL; + + insn = operand->insert (insn, val, &message); if (message != NULL) { if ((operand->flags & V850_OPERAND_SIGNED) && ! warn_signed_overflows && strstr (message, "out of range") != NULL) { - /* skip warning... */ + /* Skip warning... */ } else if ((operand->flags & V850_OPERAND_SIGNED) == 0 && ! warn_unsigned_overflows && strstr (message, "out of range") != NULL) { - /* skip warning... */ + /* Skip warning... */ } else if (str) { @@ -1590,8 +1628,7 @@ v850_insert_operand (insn, operand, val, file, line, str) { if (operand->bits != 32) { - long min, max; - offsetT test; + long min, max; if ((operand->flags & V850_OPERAND_SIGNED) != 0) { @@ -1599,25 +1636,26 @@ v850_insert_operand (insn, operand, val, file, line, str) max = (1 << operand->bits) - 1; else max = (1 << (operand->bits - 1)) - 1; - - min = - (1 << (operand->bits - 1)); + + min = -(1 << (operand->bits - 1)); } else { max = (1 << operand->bits) - 1; - + if (! warn_unsigned_overflows) - min = - (1 << (operand->bits - 1)); + min = -(1 << (operand->bits - 1)); else min = 0; } - + if (val < (offsetT) min || val > (offsetT) max) { - /* xgettext:c-format */ - const char * err = _("operand out of range (%s not between %ld and %ld)"); - char buf[100]; - + /* xgettext:c-format */ + const char *err = + _("operand out of range (%s not between %ld and %ld)"); + char buf[100]; + /* Restore min and mix to expected values for decimal ranges. */ if ((operand->flags & V850_OPERAND_SIGNED) && ! warn_signed_overflows) @@ -1630,12 +1668,12 @@ v850_insert_operand (insn, operand, val, file, line, str) if (str) { sprintf (buf, "%s: ", str); - + sprint_value (buf + strlen (buf), val); } else sprint_value (buf, val); - + if (file == (char *) NULL) as_warn (err, buf, min, max); else @@ -1645,74 +1683,73 @@ v850_insert_operand (insn, operand, val, file, line, str) insn |= (((long) val & ((1 << operand->bits) - 1)) << operand->shift); } - + return insn; } - -static char copy_of_instruction [128]; +static char copy_of_instruction[128]; void -md_assemble (str) - char * str; +md_assemble (str) + char *str; { - char * s; - char * start_of_operands; - struct v850_opcode * opcode; - struct v850_opcode * next_opcode; - const unsigned char * opindex_ptr; - int next_opindex; - int relaxable; - unsigned long insn; - unsigned long insn_size; - char * f; - int i; - int match; - boolean extra_data_after_insn = false; - unsigned extra_data_len; - unsigned long extra_data; - char * saved_input_line_pointer; - - + char *s; + char *start_of_operands; + struct v850_opcode *opcode; + struct v850_opcode *next_opcode; + const unsigned char *opindex_ptr; + int next_opindex; + int relaxable = 0; + unsigned long insn; + unsigned long insn_size; + unsigned long total_insn_size = 0; + char *f; + int i; + int match; + boolean extra_data_after_insn = false; + unsigned extra_data_len = 0; + unsigned long extra_data = 0; + char *saved_input_line_pointer; + strncpy (copy_of_instruction, str, sizeof (copy_of_instruction) - 1); - + /* Get the opcode. */ for (s = str; *s != '\0' && ! isspace (*s); s++) continue; - + if (*s != '\0') *s++ = '\0'; - /* find the first opcode with the proper name */ + /* Find the first opcode with the proper name. */ opcode = (struct v850_opcode *) hash_find (v850_hash, str); if (opcode == NULL) { - /* xgettext:c-format */ + /* xgettext:c-format */ as_bad (_("Unrecognized opcode: `%s'"), str); ignore_rest_of_line (); return; } str = s; - while (isspace (* str)) - ++ str; + while (isspace (*str)) + ++str; start_of_operands = str; saved_input_line_pointer = input_line_pointer; - + for (;;) { - const char * errmsg = NULL; + const char *errmsg = NULL; match = 0; - + if ((opcode->processors & processor_mask) == 0) { errmsg = _("Target processor does not support this instruction."); goto error; } - + relaxable = 0; fc = 0; next_opindex = 0; @@ -1721,36 +1758,36 @@ md_assemble (str) input_line_pointer = str = start_of_operands; - for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr ++) + for (opindex_ptr = opcode->operands; *opindex_ptr != 0; opindex_ptr++) { - const struct v850_operand * operand; - char * hold; - expressionS ex; - bfd_reloc_code_real_type reloc; + const struct v850_operand *operand; + char *hold; + expressionS ex; + bfd_reloc_code_real_type reloc; if (next_opindex == 0) { - operand = & v850_operands[ * opindex_ptr ]; + operand = &v850_operands[*opindex_ptr]; } else { - operand = & v850_operands[ next_opindex ]; + operand = &v850_operands[next_opindex]; next_opindex = 0; } errmsg = NULL; while (*str == ' ' || *str == ',' || *str == '[' || *str == ']') - ++ str; + ++str; if (operand->flags & V850_OPERAND_RELAX) relaxable = 1; - /* Gather the operand. */ + /* Gather the operand. */ hold = input_line_pointer; input_line_pointer = str; - - /* lo(), hi(), hi0(), etc... */ + + /* lo(), hi(), hi0(), etc... */ if ((reloc = v850_reloc_prefix (operand)) != BFD_RELOC_UNUSED) { /* This is a fake reloc, used to indicate an error condition. */ @@ -1759,8 +1796,8 @@ md_assemble (str) match = 1; goto error; } - - expression (& ex); + + expression (&ex); if (ex.X_op == O_constant) { @@ -1770,7 +1807,7 @@ md_assemble (str) /* To cope with "not1 7, zdaoff(0xfffff006)[r0]" and the like. */ /* Fall through. */ - + case BFD_RELOC_LO16: { /* Truncate, then sign extend the value. */ @@ -1788,27 +1825,27 @@ md_assemble (str) case BFD_RELOC_HI16_S: { /* Truncate, then sign extend the value. */ - int temp = (ex.X_add_number >> 16) & 0xffff; + int temp = (ex.X_add_number >> 16) & 0xffff; temp += (ex.X_add_number >> 15) & 1; ex.X_add_number = SEXT16 (temp); break; } - + case BFD_RELOC_32: if ((operand->flags & V850E_IMMEDIATE32) == 0) { errmsg = _("immediate operand is too large"); goto error; } - + extra_data_after_insn = true; extra_data_len = 4; extra_data = ex.X_add_number; ex.X_add_number = 0; break; - + default: fprintf (stderr, "reloc: %d\n", reloc); as_bad (_("AAARG -> unhandled constant reloc")); @@ -1817,10 +1854,10 @@ md_assemble (str) if (fc > MAX_INSN_FIXUPS) as_fatal (_("too many fixups")); - - fixups[ fc ].exp = ex; - fixups[ fc ].opindex = * opindex_ptr; - fixups[ fc ].reloc = reloc; + + fixups[fc].exp = ex; + fixups[fc].opindex = *opindex_ptr; + fixups[fc].reloc = reloc; fc++; } else @@ -1832,54 +1869,54 @@ md_assemble (str) errmsg = _("immediate operand is too large"); goto error; } - + extra_data_after_insn = true; extra_data_len = 4; extra_data = ex.X_add_number; } - + if (fc > MAX_INSN_FIXUPS) as_fatal (_("too many fixups")); - fixups[ fc ].exp = ex; - fixups[ fc ].opindex = * opindex_ptr; - fixups[ fc ].reloc = reloc; + fixups[fc].exp = ex; + fixups[fc].opindex = *opindex_ptr; + fixups[fc].reloc = reloc; fc++; } } else { errmsg = NULL; - - if ((operand->flags & V850_OPERAND_REG) != 0) + + if ((operand->flags & V850_OPERAND_REG) != 0) { - if (!register_name (& ex)) + if (!register_name (&ex)) { errmsg = _("invalid register name"); } else if ((operand->flags & V850_NOT_R0) - && ex.X_add_number == 0) + && ex.X_add_number == 0) { errmsg = _("register r0 cannot be used here"); - + /* Force an error message to be generated by skipping over any following potential matches for this opcode. */ opcode += 3; } } - else if ((operand->flags & V850_OPERAND_SRG) != 0) + else if ((operand->flags & V850_OPERAND_SRG) != 0) { - if (!system_register_name (& ex, true, false)) + if (!system_register_name (&ex, true, false)) { errmsg = _("invalid system register name"); } } else if ((operand->flags & V850_OPERAND_EP) != 0) { - char * start = input_line_pointer; - char c = get_symbol_end (); - + char *start = input_line_pointer; + char c = get_symbol_end (); + if (strcmp (start, "ep") != 0 && strcmp (start, "r30") != 0) { /* Put things back the way we found them. */ @@ -1888,34 +1925,35 @@ md_assemble (str) errmsg = _("expected EP register"); goto error; } - + *input_line_pointer = c; str = input_line_pointer; input_line_pointer = hold; - - while (*str == ' ' || *str == ',' || *str == '[' || *str == ']') - ++ str; + + while (*str == ' ' || *str == ',' + || *str == '[' || *str == ']') + ++str; continue; } - else if ((operand->flags & V850_OPERAND_CC) != 0) + else if ((operand->flags & V850_OPERAND_CC) != 0) { - if (!cc_name (& ex)) + if (!cc_name (&ex)) { errmsg = _("invalid condition code name"); } } - else if (operand->flags & V850E_PUSH_POP) + else if (operand->flags & V850E_PUSH_POP) { - errmsg = parse_register_list (& insn, operand); - + errmsg = parse_register_list (&insn, operand); + /* The parse_register_list() function has already done everything, so fake a dummy expression. */ ex.X_op = O_constant; ex.X_add_number = 0; } - else if (operand->flags & V850E_IMMEDIATE16) + else if (operand->flags & V850E_IMMEDIATE16) { - expression (& ex); + expression (&ex); if (ex.X_op != O_constant) errmsg = _("constant expression expected"); @@ -1928,30 +1966,30 @@ md_assemble (str) else errmsg = _("constant too big to fit into instruction"); } - + extra_data_after_insn = true; extra_data_len = 2; extra_data = ex.X_add_number; ex.X_add_number = 0; } - else if (operand->flags & V850E_IMMEDIATE32) + else if (operand->flags & V850E_IMMEDIATE32) { - expression (& ex); - + expression (&ex); + if (ex.X_op != O_constant) errmsg = _("constant expression expected"); - + extra_data_after_insn = true; extra_data_len = 4; extra_data = ex.X_add_number; ex.X_add_number = 0; } - else if (register_name (& ex) + else if (register_name (&ex) && (operand->flags & V850_OPERAND_REG) == 0) { char c; - int exists = 0; - + int exists = 0; + /* It is possible that an alias has been defined that matches a register name. For example the code may include a ".set ZERO, 0" directive, which matches @@ -1962,14 +2000,14 @@ md_assemble (str) input_line_pointer = str; c = get_symbol_end (); - + if (symbol_find (str) != NULL) exists = 1; - - * input_line_pointer = c; + + *input_line_pointer = c; input_line_pointer = str; - - expression (& ex); + + expression (&ex); if (ex.X_op != O_constant) { @@ -1977,21 +2015,22 @@ md_assemble (str) the parsing of the instruction, (because another field is missing) then report this. */ if (opindex_ptr[1] != 0 - && (v850_operands [opindex_ptr [1]].flags & V850_OPERAND_REG)) + && (v850_operands[opindex_ptr[1]].flags + & V850_OPERAND_REG)) errmsg = _("syntax error: value is missing before the register name"); else errmsg = _("syntax error: register not expected"); - /* If we created a symbol in the process of this test then - delete it now, so that it will not be output with the real - symbols... */ + /* If we created a symbol in the process of this + test then delete it now, so that it will not + be output with the real symbols... */ if (exists == 0 && ex.X_op == O_symbol) symbol_remove (ex.X_add_symbol, - & symbol_rootP, & symbol_lastP); + &symbol_rootP, &symbol_lastP); } } - else if (system_register_name (& ex, false, false) + else if (system_register_name (&ex, false, false) && (operand->flags & V850_OPERAND_SRG) == 0) { errmsg = _("syntax error: system register not expected"); @@ -2003,7 +2042,7 @@ md_assemble (str) } else { - expression (& ex); + expression (&ex); /* Special case: If we are assembling a MOV instruction (or a CALLT.... :-) and the immediate value does not fit into the bits @@ -2013,18 +2052,22 @@ md_assemble (str) if (((insn & 0x07e0) == 0x0200) && ex.X_op == O_constant - && (ex.X_add_number < (- (1 << (operand->bits - 1))) + && (ex.X_add_number < (-(1 << (operand->bits - 1))) || ex.X_add_number > ((1 << operand->bits) - 1))) errmsg = _("immediate operand is too large"); } if (errmsg) goto error; - -/* fprintf (stderr, " insn: %x, operand %d, op: %d, add_number: %d\n", - insn, opindex_ptr - opcode->operands, ex.X_op, ex.X_add_number); */ - switch (ex.X_op) +#if 0 + fprintf (stderr, + " insn: %x, operand %d, op: %d, add_number: %d\n", + insn, opindex_ptr - opcode->operands, + ex.X_op, ex.X_add_number); +#endif + + switch (ex.X_op) { case O_illegal: errmsg = _("illegal operand"); @@ -2033,7 +2076,8 @@ md_assemble (str) errmsg = _("missing operand"); goto error; case O_register: - if ((operand->flags & (V850_OPERAND_REG | V850_OPERAND_SRG)) == 0) + if ((operand->flags + & (V850_OPERAND_REG | V850_OPERAND_SRG)) == 0) { errmsg = _("invalid operand"); goto error; @@ -2054,9 +2098,9 @@ md_assemble (str) if (fc >= MAX_INSN_FIXUPS) as_fatal (_("too many fixups")); - fixups[ fc ].exp = ex; - fixups[ fc ].opindex = * opindex_ptr; - fixups[ fc ].reloc = BFD_RELOC_UNUSED; + fixups[fc].exp = ex; + fixups[fc].opindex = *opindex_ptr; + fixups[fc].reloc = BFD_RELOC_UNUSED; ++fc; break; } @@ -2073,7 +2117,7 @@ md_assemble (str) error: if (match == 0) - { + { next_opcode = opcode + 1; if (next_opcode->name != NULL && strcmp (next_opcode->name, opcode->name) == 0) @@ -2084,33 +2128,33 @@ md_assemble (str) processor. */ if ((opcode->processors & processor_mask) == 0) goto error; - + continue; } - + as_bad ("%s: %s", copy_of_instruction, errmsg); - - if (* input_line_pointer == ']') - ++ input_line_pointer; - + + if (*input_line_pointer == ']') + ++input_line_pointer; + ignore_rest_of_line (); input_line_pointer = saved_input_line_pointer; return; - } + } break; } - + while (isspace (*str)) ++str; if (*str != '\0') - /* xgettext:c-format */ + /* xgettext:c-format */ as_bad (_("junk at end of line: `%s'"), str); input_line_pointer = str; - /* Write out the instruction. */ - + /* Write out the instruction. */ + if (relaxable && fc > 0) { insn_size = 2; @@ -2121,7 +2165,7 @@ md_assemble (str) f = frag_var (rs_machine_dependent, 4, 2, 2, fixups[0].exp.X_add_symbol, fixups[0].exp.X_add_number, - (char *)fixups[0].opindex); + (char *) fixups[0].opindex); md_number_to_chars (f, insn, insn_size); md_number_to_chars (f + 2, 0, 2); } @@ -2130,12 +2174,13 @@ md_assemble (str) f = frag_var (rs_machine_dependent, 6, 4, 0, fixups[0].exp.X_add_symbol, fixups[0].exp.X_add_number, - (char *)fixups[0].opindex); + (char *) fixups[0].opindex); md_number_to_chars (f, insn, insn_size); md_number_to_chars (f + 2, 0, 4); } + total_insn_size = insn_size; } - else + else { /* Four byte insns have an opcode with the two high bits on. */ if ((insn & 0x0600) == 0x0600) @@ -2143,18 +2188,20 @@ md_assemble (str) else insn_size = 2; - /* Special case: 32 bit MOV */ + /* Special case: 32 bit MOV. */ if ((insn & 0xffe0) == 0x0620) 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; @@ -2166,43 +2213,41 @@ md_assemble (str) BFD_RELOC_UNUSED plus the operand index. This lets us easily handle fixups for any operand type, although that is admittedly not a very exciting feature. We pick a BFD reloc type in - md_apply_fix. */ + md_apply_fix. */ for (i = 0; i < fc; i++) { - const struct v850_operand * operand; - bfd_reloc_code_real_type reloc; - - operand = & v850_operands[ fixups[i].opindex ]; + const struct v850_operand *operand; + bfd_reloc_code_real_type reloc; + + operand = &v850_operands[fixups[i].opindex]; reloc = fixups[i].reloc; - + if (reloc != BFD_RELOC_UNUSED) { - reloc_howto_type * reloc_howto = bfd_reloc_type_lookup (stdoutput, - reloc); - int size; - int address; - fixS * fixP; + reloc_howto_type *reloc_howto = + bfd_reloc_type_lookup (stdoutput, reloc); + int size; + int address; + fixS *fixP; if (!reloc_howto) - abort(); - + abort (); + size = bfd_get_reloc_size (reloc_howto); /* XXX This will abort on an R_V850_8 reloc - - is this reloc actually used ? */ - if (size != 2 && size != 4) + is this reloc actually used? */ + if (size != 2 && size != 4) abort (); address = (f - frag_now->fr_literal) + insn_size - size; if (reloc == BFD_RELOC_32) - { - address += 2; - } - + address += 2; + fixP = fix_new_exp (frag_now, address, size, - & fixups[i].exp, + &fixups[i].exp, reloc_howto->pc_relative, reloc); @@ -2213,67 +2258,69 @@ md_assemble (str) case BFD_RELOC_HI16_S: fixP->fx_no_overflow = 1; break; + default: + break; } } else { - fix_new_exp ( - frag_now, + fix_new_exp (frag_now, f - frag_now->fr_literal, 4, & fixups[i].exp, - 1 /* FIXME: V850_OPERAND_RELATIVE ??? */, + 1 /* FIXME: V850_OPERAND_RELATIVE ??? */, (bfd_reloc_code_real_type) (fixups[i].opindex - + (int) BFD_RELOC_UNUSED) - ); + + (int) BFD_RELOC_UNUSED)); } } 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 + then it is done here. */ -/* If while processing a fixup, a reloc really needs to be created */ -/* then it is done here. */ - arelent * tc_gen_reloc (seg, fixp) - asection * seg; - fixS * fixp; + asection *seg ATTRIBUTE_UNUSED; + fixS *fixp; { - arelent * reloc; - - reloc = (arelent *) xmalloc (sizeof (arelent)); - reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); - *reloc->sym_ptr_ptr= symbol_get_bfdsym (fixp->fx_addsy); - reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; - reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); + arelent *reloc; + + reloc = (arelent *) xmalloc (sizeof (arelent)); + reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *)); + *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy); + reloc->address = fixp->fx_frag->fr_address + fixp->fx_where; + reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type); if (reloc->howto == (reloc_howto_type *) NULL) { as_bad_where (fixp->fx_file, fixp->fx_line, - /* xgettext:c-format */ - _("reloc %d not supported by object file format"), + /* xgettext:c-format */ + _("reloc %d not supported by object file format"), (int) fixp->fx_r_type); xfree (reloc); - + return NULL; } - - if ( fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY + + if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY || fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT) reloc->addend = fixp->fx_offset; else reloc->addend = fixp->fx_addnumber; - + return reloc; } /* Assume everything will fit in two bytes, then expand as necessary. */ + int md_estimate_size_before_relax (fragp, seg) - fragS * fragp; - asection * seg; + fragS *fragp; + asection *seg ATTRIBUTE_UNUSED; { if (fragp->fr_subtype == 0) fragp->fr_var = 4; @@ -2282,12 +2329,12 @@ md_estimate_size_before_relax (fragp, seg) else abort (); return 2; -} +} long v850_pcrel_from_section (fixp, section) - fixS * fixp; - segT section; + fixS *fixp; + segT section; { /* If the symbol is undefined, or in a section other than our own, or it is weak (in which case it may well be in another section, @@ -2297,20 +2344,20 @@ v850_pcrel_from_section (fixp, section) || S_IS_WEAK (fixp->fx_addsy) || (S_GET_SEGMENT (fixp->fx_addsy) != section))) return 0; - + return fixp->fx_frag->fr_address + fixp->fx_where; } int md_apply_fix3 (fixp, valuep, seg) - fixS * fixp; - valueT * valuep; - segT seg; + fixS *fixp; + valueT *valuep; + segT seg ATTRIBUTE_UNUSED; { valueT value; - char * where; + char *where; - if ( fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT + if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY) { fixp->fx_done = 0; @@ -2319,11 +2366,11 @@ md_apply_fix3 (fixp, valuep, seg) if (fixp->fx_addsy == (symbolS *) NULL) { - value = * valuep; + value = *valuep; fixp->fx_done = 1; } else if (fixp->fx_pcrel) - value = * valuep; + value = *valuep; else { value = fixp->fx_offset; @@ -2342,12 +2389,12 @@ md_apply_fix3 (fixp, valuep, seg) if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED) { - int opindex; - const struct v850_operand * operand; - unsigned long insn; + int opindex; + const struct v850_operand *operand; + unsigned long insn; opindex = (int) fixp->fx_r_type - (int) BFD_RELOC_UNUSED; - operand = & v850_operands[ opindex ]; + operand = &v850_operands[opindex]; /* Fetch the instruction, insert the fully resolved operand value, and stuff the instruction back again. @@ -2363,12 +2410,12 @@ md_apply_fix3 (fixp, valuep, seg) if (fixp->fx_done) { - /* Nothing else to do here. */ + /* Nothing else to do here. */ return 1; } - /* Determine a BFD reloc value based on the operand information. - We are only prepared to turn a few of the operands into relocs. */ + /* Determine a BFD reloc value based on the operand information. + We are only prepared to turn a few of the operands into relocs. */ if (operand->bits == 22) fixp->fx_r_type = BFD_RELOC_V850_22_PCREL; @@ -2376,10 +2423,12 @@ md_apply_fix3 (fixp, valuep, seg) fixp->fx_r_type = BFD_RELOC_V850_9_PCREL; else { - /* fprintf (stderr, "bits: %d, insn: %x\n", operand->bits, insn); */ - +#if 0 + fprintf (stderr, "bits: %d, insn: %x\n", operand->bits, insn); +#endif + as_bad_where (fixp->fx_file, fixp->fx_line, - _("unresolved expression that must be resolved")); + _("unresolved expression that must be resolved")); fixp->fx_done = 1; return 1; } @@ -2390,23 +2439,23 @@ md_apply_fix3 (fixp, valuep, seg) where = fixp->fx_frag->fr_literal + fixp->fx_where; if (fixp->fx_size == 1) - * where = value & 0xff; + *where = value & 0xff; else if (fixp->fx_size == 2) bfd_putl16 (value & 0xffff, (unsigned char *) where); else if (fixp->fx_size == 4) bfd_putl32 (value, (unsigned char *) where); } - + fixp->fx_addnumber = value; return 1; } - /* Parse a cons expression. We have to handle hi(), lo(), etc on the v850. */ + void parse_cons_expression_v850 (exp) - expressionS * exp; + expressionS *exp; { /* See if there's a reloc prefix like hi() we have to handle. */ hold_cons_reloc = v850_reloc_prefix (NULL); @@ -2418,9 +2467,10 @@ parse_cons_expression_v850 (exp) /* Create a fixup for a cons expression. If parse_cons_expression_v850 found a reloc prefix, then we use that reloc, else we choose an appropriate one based on the size of the expression. */ + void cons_fix_new_v850 (frag, where, size, exp) - fragS * frag; + fragS *frag; int where; int size; expressionS *exp; @@ -2439,44 +2489,47 @@ cons_fix_new_v850 (frag, where, size, exp) fix_new_exp (frag, where, size, exp, 0, hold_cons_reloc); else fix_new (frag, where, size, NULL, 0, 0, hold_cons_reloc); + + hold_cons_reloc = BFD_RELOC_UNUSED; } boolean v850_fix_adjustable (fixP) - fixS * fixP; + fixS *fixP; { if (fixP->fx_addsy == NULL) return 1; - - /* Prevent all adjustments to global symbols. */ + + /* Prevent all adjustments to global symbols. */ if (S_IS_EXTERN (fixP->fx_addsy)) return 0; - + + /* Similarly for weak symbols. */ if (S_IS_WEAK (fixP->fx_addsy)) return 0; - - /* Don't adjust function names */ + + /* Don't adjust function names. */ if (S_IS_FUNCTION (fixP->fx_addsy)) return 0; - /* We need the symbol name for the VTABLE entries */ - if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT + /* We need the symbol name for the VTABLE entries. */ + if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 0; - + return 1; } - + int v850_force_relocation (fixP) - struct fix * fixP; + struct fix *fixP; { if (fixP->fx_addsy && S_IS_WEAK (fixP->fx_addsy)) return 1; - - if ( fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT + + if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY) return 1; - + return 0; } diff --git a/contrib/binutils/gas/config/tc-v850.h b/contrib/binutils/gas/config/tc-v850.h index fad4d1c..1e597f0 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 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -16,7 +16,7 @@ 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. */ + 02111-1307, USA. */ #define TC_V850 @@ -39,6 +39,13 @@ #define obj_fix_adjustable(fixP) v850_fix_adjustable(fixP) #define TC_FORCE_RELOCATION(fixp) v850_force_relocation(fixp) + +#ifdef OBJ_ELF +/* This arranges for gas/write.c to not apply a relocation if + obj_fix_adjustable() says it is not adjustable. */ +#define TC_FIX_ADJUSTABLE(fixP) obj_fix_adjustable (fixP) +#endif + extern int v850_force_relocation PARAMS ((struct fix *)); /* Permit temporary numeric labels. */ @@ -50,7 +57,7 @@ extern int v850_force_relocation PARAMS ((struct fix *)); #define WORKING_DOT_WORD #define md_number_to_chars number_to_chars_littleendian - + /* We need to handle lo(), hi(), etc etc in .hword, .word, etc directives, so we have to parse "cons" expressions ourselves. */ #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) parse_cons_expression_v850 (EXP) @@ -58,7 +65,6 @@ extern int v850_force_relocation PARAMS ((struct fix *)); extern const struct relax_type md_relax_table[]; #define TC_GENERIC_RELAX_TABLE md_relax_table - /* This section must be in the small data area (pointed to by GP). */ #define SHF_V850_GPREL 0x10000000 /* This section must be in the tiny data area (pointed to by EP). */ @@ -83,3 +89,5 @@ extern const struct relax_type md_relax_table[]; #define MD_PCREL_FROM_SECTION(fixP,section) v850_pcrel_from_section (fixP, section) extern long v850_pcrel_from_section (); + +#define DWARF2_LINE_MIN_INSN_LENGTH 2 diff --git a/contrib/binutils/gas/config/tc-z8k.c b/contrib/binutils/gas/config/tc-z8k.c index f89b14b3..58c85ea 100644 --- a/contrib/binutils/gas/config/tc-z8k.c +++ b/contrib/binutils/gas/config/tc-z8k.c @@ -1,5 +1,6 @@ /* tc-z8k.c -- Assemble code for the Zilog Z800n - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation. + Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 + Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -18,10 +19,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* - Written By Steve Chamberlain - sac@cygnus.com - */ +/* Written By Steve Chamberlain . */ + #define DEFINE_TABLE #include @@ -31,25 +30,15 @@ #include "bfd.h" #include -const char comment_chars[] = -{'!', 0}; -const char line_separator_chars[] = -{';', 0}; -const char line_comment_chars[] = -{'#', 0}; +const char comment_chars[] = "!"; +const char line_comment_chars[] = "#"; +const char line_separator_chars[] = ";"; extern int machine; extern int coff_flags; int segmented_mode; const int md_reloc_size; -/* This table describes all the machine specific pseudo-ops the assembler - has to support. The fields are: - pseudo-op name without dot - function to call to execute this pseudo-op - Integer arg to pass to the function - */ - void cons (); void @@ -68,8 +57,7 @@ s_unseg () coff_flags = F_Z8002; } -static -void +static void even () { frag_align (1, 0, 0); @@ -92,7 +80,6 @@ tohex (c) void sval () { - SKIP_WHITESPACE (); if (*input_line_pointer == '\'') { @@ -112,47 +99,53 @@ sval () } demand_empty_rest_of_line (); } - } -const pseudo_typeS md_pseudo_table[] = -{ - {"int", cons, 2}, - {"data.b", cons, 1}, - {"data.w", cons, 2}, - {"data.l", cons, 4}, - {"form", listing_psize, 0}, - {"heading", listing_title, 0}, - {"import", s_ignore, 0}, - {"page", listing_eject, 0}, - {"program", s_ignore, 0}, - {"z8001", s_segm, 0}, - {"z8002", s_unseg, 0}, - - - {"segm", s_segm, 0}, - {"unsegm", s_unseg, 0}, - {"unseg", s_unseg, 0}, - {"name", s_app_file, 0}, - {"global", s_globl, 0}, - {"wval", cons, 2}, - {"lval", cons, 4}, - {"bval", cons, 1}, - {"sval", sval, 0}, - {"rsect", obj_coff_section, 0}, - {"sect", obj_coff_section, 0}, - {"block", s_space, 0}, - {"even", even, 0}, - {0, 0, 0} + +/* This table describes all the machine specific pseudo-ops the assembler + has to support. The fields are: + pseudo-op name without dot + function to call to execute this pseudo-op + Integer arg to pass to the function + */ + +const pseudo_typeS md_pseudo_table[] = { + {"int" , cons , 2}, + {"data.b" , cons , 1}, + {"data.w" , cons , 2}, + {"data.l" , cons , 4}, + {"form" , listing_psize , 0}, + {"heading", listing_title , 0}, + {"import" , s_ignore , 0}, + {"page" , listing_eject , 0}, + {"program", s_ignore , 0}, + {"z8001" , s_segm , 0}, + {"z8002" , s_unseg , 0}, + + {"segm" , s_segm , 0}, + {"unsegm" , s_unseg , 0}, + {"unseg" , s_unseg , 0}, + {"name" , s_app_file , 0}, + {"global" , s_globl , 0}, + {"wval" , cons , 2}, + {"lval" , cons , 4}, + {"bval" , cons , 1}, + {"sval" , sval , 0}, + {"rsect" , obj_coff_section, 0}, + {"sect" , obj_coff_section, 0}, + {"block" , s_space , 0}, + {"even" , even , 0}, + {0 , 0 , 0} }; const char EXP_CHARS[] = "eE"; -/* Chars that mean this number is a floating point constant */ -/* As in 0f12.456 */ -/* or 0d1.2345e12 */ +/* Chars that mean this number is a floating point constant. + As in 0f12.456 + or 0d1.2345e12 */ const char FLT_CHARS[] = "rRsSfFdDxXpP"; -static struct hash_control *opcode_hash_control; /* Opcode mnemonics */ +/* Opcode mnemonics. */ +static struct hash_control *opcode_hash_control; void md_begin () @@ -165,7 +158,7 @@ md_begin () for (opcode = z8k_table; opcode->name; opcode++) { - /* Only enter unique codes into the table */ + /* Only enter unique codes into the table. */ char *src = opcode->name; if (strcmp (opcode->name, prev_name)) @@ -177,10 +170,10 @@ md_begin () prev_name = opcode->name; } - /* default to z8002 */ + /* Default to z8002. */ s_unseg (); - /* insert the pseudo ops too */ + /* Insert the pseudo ops, too. */ for (idx = 0; md_pseudo_table[idx].poc_name; idx++) { opcode_entry_type *fake_opcode; @@ -194,24 +187,27 @@ md_begin () linkrelax = 1; } -struct z8k_exp -{ +struct z8k_exp { char *e_beg; char *e_end; expressionS e_exp; }; -typedef struct z8k_op -{ - char regsize; /* 'b','w','r','q' */ - unsigned int reg; /* 0..15 */ + +typedef struct z8k_op { + /* 'b','w','r','q'. */ + char regsize; + + /* 0 .. 15. */ + unsigned int reg; int mode; - unsigned int x_reg; /* any other register associated with the mode */ - expressionS exp; /* any expression */ -} + /* Any other register associated with the mode. */ + unsigned int x_reg; -op_type; + /* Any expression. */ + expressionS exp; +} op_type; static expressionS *da_operand; static expressionS *imm_operand; @@ -223,9 +219,9 @@ int the_flags; int the_interrupt; char * -DEFUN (whatreg, (reg, src), - int *reg AND - char *src) +whatreg (reg, src) + int *reg; + char *src; { if (isdigit (src[1])) { @@ -239,28 +235,28 @@ DEFUN (whatreg, (reg, src), } } -/* - parse operands +/* Parse operands - rh0-rh7, rl0-rl7 - r0-r15 - rr0-rr14 - rq0--rq12 - WREG r0,r1,r2,r3,r4,r5,r6,r7,fp,sp - r0l,r0h,..r7l,r7h - @WREG - @WREG+ - @-WREG - #const + rh0-rh7, rl0-rl7 + r0-r15 + rr0-rr14 + rq0--rq12 + WREG r0,r1,r2,r3,r4,r5,r6,r7,fp,sp + r0l,r0h,..r7l,r7h + @WREG + @WREG+ + @-WREG + #const +*/ - */ +/* Try to parse a reg name. Return a pointer to the first character + in SRC after the reg name. */ -/* try and parse a reg name, returns number of chars consumed */ char * -DEFUN (parse_reg, (src, mode, reg), - char *src AND - int *mode AND - unsigned int *reg) +parse_reg (src, mode, reg) + char *src; + int *mode; + unsigned int *reg; { char *res = 0; char regno; @@ -268,69 +264,68 @@ DEFUN (parse_reg, (src, mode, reg), if (src[0] == 's' && src[1] == 'p') { if (segmented_mode) - { - *mode = CLASS_REG_LONG; - *reg = 14; - } + { + *mode = CLASS_REG_LONG; + *reg = 14; + } else - { - *mode = CLASS_REG_WORD; - *reg = 15; - } + { + *mode = CLASS_REG_WORD; + *reg = 15; + } return src + 2; } if (src[0] == 'r') { if (src[1] == 'r') - { - *mode = CLASS_REG_LONG; - res = whatreg (reg, src + 2); + { + *mode = CLASS_REG_LONG; + res = whatreg (reg, src + 2); regno = *reg; if (regno > 14) - as_warn (_("register rr%d, out of range."),regno); - } + as_warn (_("register rr%d, out of range."), regno); + } else if (src[1] == 'h') - { - *mode = CLASS_REG_BYTE; - res = whatreg (reg, src + 2); + { + *mode = CLASS_REG_BYTE; + res = whatreg (reg, src + 2); regno = *reg; if (regno > 7) - as_warn (_("register rh%d, out of range."),regno); - } + as_warn (_("register rh%d, out of range."), regno); + } else if (src[1] == 'l') - { - *mode = CLASS_REG_BYTE; - res = whatreg (reg, src + 2); + { + *mode = CLASS_REG_BYTE; + res = whatreg (reg, src + 2); regno = *reg; if (regno > 7) - as_warn (_("register rl%d, out of range."),regno); - *reg += 8; - } + as_warn (_("register rl%d, out of range."), regno); + *reg += 8; + } else if (src[1] == 'q') - { - *mode = CLASS_REG_QUAD; - res = whatreg (reg, src + 2); + { + *mode = CLASS_REG_QUAD; + res = whatreg (reg, src + 2); regno = *reg; if (regno > 12) - as_warn (_("register rq%d, out of range."),regno); - } + as_warn (_("register rq%d, out of range."), regno); + } else - { - *mode = CLASS_REG_WORD; - res = whatreg (reg, src + 1); + { + *mode = CLASS_REG_WORD; + res = whatreg (reg, src + 1); regno = *reg; if (regno > 15) - as_warn (_("register r%d, out of range."),regno); - } + as_warn (_("register r%d, out of range."), regno); + } } return res; - } char * -DEFUN (parse_exp, (s, op), - char *s AND - expressionS * op) +parse_exp (s, op) + char *s; + expressionS *op; { char *save = input_line_pointer; char *new; @@ -356,31 +351,27 @@ DEFUN (parse_exp, (s, op), exp(r) r(#exp) r(r) - - - */ -static -char * -DEFUN (checkfor, (ptr, what), - char *ptr AND - char what) +static char * +checkfor (ptr, what) + char *ptr; + char what; { if (*ptr == what) ptr++; else - { - as_bad (_("expected %c"), what); - } + as_bad (_("expected %c"), what); + return ptr; } -/* Make sure the mode supplied is the size of a word */ +/* Make sure the mode supplied is the size of a word. */ + static void -DEFUN (regword, (mode, string), - int mode AND - char *string) +regword (mode, string) + int mode; + char *string; { int ok; @@ -391,11 +382,12 @@ DEFUN (regword, (mode, string), } } -/* Make sure the mode supplied is the size of an address */ +/* Make sure the mode supplied is the size of an address. */ + static void -DEFUN (regaddr, (mode, string), - int mode AND - char *string) +regaddr (mode, string) + int mode; + char *string; { int ok; @@ -406,30 +398,28 @@ DEFUN (regaddr, (mode, string), } } -struct ctrl_names -{ - int value; - char *name; +struct ctrl_names { + int value; + char *name; }; -struct ctrl_names ctrl_table[] = -{ - 0x2, "fcw", - 0X3, "refresh", - 0x4, "psapseg", - 0x5, "psapoff", - 0x5, "psap", - 0x6, "nspseg", - 0x7, "nspoff", - 0x7, "nsp", - 0, 0 +struct ctrl_names ctrl_table[] = { + 0x2, "fcw", + 0X3, "refresh", + 0x4, "psapseg", + 0x5, "psapoff", + 0x5, "psap", + 0x6, "nspseg", + 0x7, "nspoff", + 0x7, "nsp", + 0 , 0 }; - + static void -DEFUN (get_ctrl_operand, (ptr, mode, dst), - char **ptr AND - struct z8k_op *mode AND - unsigned int dst) +get_ctrl_operand (ptr, mode, dst) + char **ptr; + struct z8k_op *mode; + unsigned int dst; { char *src = *ptr; int r; @@ -444,28 +434,27 @@ DEFUN (get_ctrl_operand, (ptr, mode, dst), int j; for (j = 0; ctrl_table[i].name[j]; j++) - { - if (ctrl_table[i].name[j] != src[j]) - goto fail; - } + { + if (ctrl_table[i].name[j] != src[j]) + goto fail; + } the_ctrl = ctrl_table[i].value; *ptr = src + j; return; - fail:; + fail: + ; } the_ctrl = 0; return; } -struct flag_names -{ +struct flag_names { int value; char *name; }; -struct flag_names flag_table[] = -{ +struct flag_names flag_table[] = { 0x1, "p", 0x1, "v", 0x2, "s", @@ -476,10 +465,10 @@ struct flag_names flag_table[] = }; static void -DEFUN (get_flags_operand, (ptr, mode, dst), - char **ptr AND - struct z8k_op *mode AND - unsigned int dst) +get_flags_operand (ptr, mode, dst) + char **ptr; + struct z8k_op *mode; + unsigned int dst; { char *src = *ptr; int r; @@ -493,35 +482,32 @@ DEFUN (get_flags_operand, (ptr, mode, dst), the_flags = 0; for (j = 0; j <= 9; j++) { - if (!src[j]) + if (!src[j]) goto done; - for (i = 0; flag_table[i].name; i++) - { - if (flag_table[i].name[0] == src[j]) - { - the_flags = the_flags | flag_table[i].value; - goto match; - } - } + for (i = 0; flag_table[i].name; i++) + { + if (flag_table[i].name[0] == src[j]) + { + the_flags = the_flags | flag_table[i].value; + goto match; + } + } goto done; match: - ; + ; } - done: + done: *ptr = src + j; return; } - -struct interrupt_names -{ +struct interrupt_names { int value; char *name; }; -struct interrupt_names intr_table[] = -{ +struct interrupt_names intr_table[] = { 0x1, "nvi", 0x2, "vi", 0x3, "both", @@ -530,10 +516,10 @@ struct interrupt_names intr_table[] = }; static void -DEFUN (get_interrupt_operand, (ptr, mode, dst), - char **ptr AND - struct z8k_op *mode AND - unsigned int dst) +get_interrupt_operand (ptr, mode, dst) + char **ptr; + struct z8k_op *mode; + unsigned int dst; { char *src = *ptr; int r; @@ -548,28 +534,27 @@ DEFUN (get_interrupt_operand, (ptr, mode, dst), int j; for (j = 0; intr_table[i].name[j]; j++) - { - if (intr_table[i].name[j] != src[j]) - goto fail; - } + { + if (intr_table[i].name[j] != src[j]) + goto fail; + } the_interrupt = intr_table[i].value; *ptr = src + j; return; - fail:; + fail: + ; } the_interrupt = 0x0; return; } -struct cc_names -{ +struct cc_names { int value; char *name; }; -struct cc_names table[] = -{ +struct cc_names table[] = { 0x0, "f", 0x1, "lt", 0x2, "le", @@ -592,14 +577,14 @@ struct cc_names table[] = 0xe, "nz", 0xf, "nc", 0xf, "uge", - 0, 0 + 0 , 0 }; static void -DEFUN (get_cc_operand, (ptr, mode, dst), - char **ptr AND - struct z8k_op *mode AND - unsigned int dst) +get_cc_operand (ptr, mode, dst) + char **ptr; + struct z8k_op *mode; + unsigned int dst; { char *src = *ptr; int r; @@ -621,7 +606,8 @@ DEFUN (get_cc_operand, (ptr, mode, dst), the_cc = table[i].value; *ptr = src + j; return; - fail:; + fail: + ; } the_cc = 0x8; } @@ -672,20 +658,18 @@ get_operand (ptr, mode, dst) end = parse_reg (src, &nw, &nr); if (end) { - /* Got Ra(Rb) */ + /* Got Ra(Rb). */ src = end; if (*src != ')') - { - as_bad (_("Missing ) in ra(rb)")); - } + as_bad (_("Missing ) in ra(rb)")); else - { - src++; - } + src++; regaddr (mode->mode, "ra(rb) ra"); -/* regword (mode->mode, "ra(rb) rb");*/ +#if 0 + regword (mode->mode, "ra(rb) rb"); +#endif mode->mode = CLASS_BX; mode->reg = regn; mode->x_reg = nr; @@ -693,7 +677,7 @@ get_operand (ptr, mode, dst) } else { - /* Got Ra(disp) */ + /* Got Ra(disp). */ if (*src == '#') src++; src = parse_exp (src, &(mode->exp)); @@ -712,7 +696,7 @@ get_operand (ptr, mode, dst) } else { - /* No initial reg */ + /* No initial reg. */ src = parse_exp (src, &(mode->exp)); if (*src == '(') { @@ -727,7 +711,7 @@ get_operand (ptr, mode, dst) } else { - /* Just an address */ + /* Just an address. */ mode->mode = CLASS_DA; mode->reg = 0; mode->x_reg = 0; @@ -738,15 +722,15 @@ get_operand (ptr, mode, dst) *ptr = src; } -static -char * +static char * get_operands (opcode, op_end, operand) opcode_entry_type *opcode; char *op_end; op_type *operand; { char *ptr = op_end; -char *savptr; + char *savptr; + switch (opcode->noperands) { case 0: @@ -757,21 +741,21 @@ char *savptr; case 1: ptr++; if (opcode->arg_info[0] == CLASS_CC) - { - get_cc_operand (&ptr, operand + 0, 0); - } + { + get_cc_operand (&ptr, operand + 0, 0); + } else if (opcode->arg_info[0] == CLASS_FLAGS) - { - get_flags_operand (&ptr, operand + 0, 0); - } - else if (opcode->arg_info[0] == (CLASS_IMM +(ARG_IMM2))) - { - get_interrupt_operand (&ptr, operand + 0, 0); - } + { + get_flags_operand (&ptr, operand + 0, 0); + } + else if (opcode->arg_info[0] == (CLASS_IMM + (ARG_IMM2))) + { + get_interrupt_operand (&ptr, operand + 0, 0); + } else - { - get_operand (&ptr, operand + 0, 0); - } + { + get_operand (&ptr, operand + 0, 0); + } operand[1].mode = 0; break; @@ -779,32 +763,32 @@ char *savptr; ptr++; savptr = ptr; if (opcode->arg_info[0] == CLASS_CC) - { - get_cc_operand (&ptr, operand + 0, 0); - } + { + get_cc_operand (&ptr, operand + 0, 0); + } else if (opcode->arg_info[0] == CLASS_CTRL) - { - get_ctrl_operand (&ptr, operand + 0, 0); - if (the_ctrl == 0) - { - ptr = savptr; - get_operand (&ptr, operand + 0, 0); - if (ptr == 0) - return; - if (*ptr == ',') - ptr++; - get_ctrl_operand (&ptr, operand + 1, 1); - return ptr; - } - } + { + get_ctrl_operand (&ptr, operand + 0, 0); + if (the_ctrl == 0) + { + ptr = savptr; + get_operand (&ptr, operand + 0, 0); + if (ptr == 0) + return; + if (*ptr == ',') + ptr++; + get_ctrl_operand (&ptr, operand + 1, 1); + return ptr; + } + } else - { - get_operand (&ptr, operand + 0, 0); - } + { + get_operand (&ptr, operand + 0, 0); + } if (ptr == 0) - return; + return; if (*ptr == ',') - ptr++; + ptr++; get_operand (&ptr, operand + 1, 1); break; @@ -832,6 +816,7 @@ char *savptr; ptr++; get_cc_operand (&ptr, operand + 3, 3); break; + default: abort (); } @@ -840,15 +825,13 @@ char *savptr; } /* Passed a pointer to a list of opcodes which use different - addressing modes, return the opcode which matches the opcodes - provided - */ + addressing modes. Return the opcode which matches the opcodes + provided. */ -static -opcode_entry_type * -DEFUN (get_specific, (opcode, operands), - opcode_entry_type * opcode AND - op_type * operands) +static opcode_entry_type * +get_specific (opcode, operands) + opcode_entry_type *opcode; + op_type *operands; { opcode_entry_type *this_try = opcode; @@ -869,29 +852,29 @@ DEFUN (get_specific, (opcode, operands), if ((mode & CLASS_MASK) != (this_try->arg_info[i] & CLASS_MASK)) { - /* it could be an pc rel operand, if this is a da mode and - we like disps, then insert it */ + /* It could be an pc rel operand, if this is a da mode + and we like disps, then insert it. */ if (mode == CLASS_DA && this_try->arg_info[i] == CLASS_DISP) { - /* This is the case */ + /* This is the case. */ operands[i].mode = CLASS_DISP; } else if (mode == CLASS_BA && this_try->arg_info[i]) { - /* Can't think of a way to turn what we've been given into - something that's ok */ + /* Can't think of a way to turn what we've been + given into something that's OK. */ goto fail; } else if (this_try->arg_info[i] & CLASS_PR) { if (mode == CLASS_REG_LONG && segmented_mode) { - /* ok */ + /* OK. */ } else if (mode == CLASS_REG_WORD && !segmented_mode) { - /* ok */ + /* OK. */ } else goto fail; @@ -920,7 +903,8 @@ DEFUN (get_specific, (opcode, operands), } found = 1; - fail:; + fail: + ; } if (found) return this_try; @@ -929,22 +913,24 @@ DEFUN (get_specific, (opcode, operands), } static void -DEFUN (check_operand, (operand, width, string), - struct z8k_op *operand AND - unsigned int width AND - char *string) +check_operand (operand, width, string) + struct z8k_op *operand; + unsigned int width; + char *string; { if (operand->exp.X_add_symbol == 0 && operand->exp.X_op_symbol == 0) { - /* No symbol involved, let's look at offset, it's dangerous if any of - the high bits are not 0 or ff's, find out by oring or anding with - the width and seeing if the answer is 0 or all fs*/ + /* No symbol involved, let's look at offset, it's dangerous if + any of the high bits are not 0 or ff's, find out by oring or + anding with the width and seeing if the answer is 0 or all + fs. */ if ((operand->exp.X_add_number & ~width) != 0 && (operand->exp.X_add_number | width) != (~0)) { - as_warn (_("operand %s0x%x out of range."), string, operand->exp.X_add_number); + as_warn (_("operand %s0x%x out of range."), + string, operand->exp.X_add_number); } } @@ -953,10 +939,10 @@ DEFUN (check_operand, (operand, width, string), static char buffer[20]; static void -DEFUN (newfix, (ptr, type, operand), - int ptr AND - int type AND - expressionS * operand) +newfix (ptr, type, operand) + int ptr; + int type; + expressionS *operand; { if (operand->X_add_symbol || operand->X_op_symbol @@ -972,11 +958,11 @@ DEFUN (newfix, (ptr, type, operand), } static char * -DEFUN (apply_fix, (ptr, type, operand, size), - char *ptr AND - int type AND - expressionS * operand AND - int size) +apply_fix (ptr, type, operand, size) + char *ptr; + int type; + expressionS *operand; + int size; { int n = operand->X_add_number; @@ -985,12 +971,12 @@ DEFUN (apply_fix, (ptr, type, operand, size), #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 niblles == 16 bits */ *ptr++ = n >> 12; *ptr++ = n >> 8; case 2: @@ -1004,12 +990,13 @@ DEFUN (apply_fix, (ptr, type, operand, size), } -/* Now we know what sort of opcodes it is, lets build the bytes - - */ +/* Now we know what sort of opcodes it is. Let's build the bytes. */ + #define INSERT(x,y) *x++ = y>>24; *x++ = y>> 16; *x++=y>>8; *x++ =y; + static void build_bytes (this_try, operand) - opcode_entry_type * this_try; + opcode_entry_type *this_try; struct z8k_op *operand; { unsigned int i; @@ -1029,18 +1016,18 @@ build_bytes (this_try, operand) memset (buffer, 20, 0); class_ptr = this_try->byte_info; -top:; + top: for (nibble = 0; c = *class_ptr++; nibble++) { switch (c & CLASS_MASK) { default: - abort (); + case CLASS_ADDRESS: - /* Direct address, we don't cope with the SS mode right now */ + /* Direct address, we don't cope with the SS mode right now. */ if (segmented_mode) { da_operand->X_add_number |= 0x80000000; @@ -1053,23 +1040,23 @@ top:; da_operand = 0; break; case CLASS_DISP8: - /* pc rel 8 bit */ + /* pc rel 8 bit */ output_ptr = apply_fix (output_ptr, R_JR, da_operand, 2); da_operand = 0; break; case CLASS_0DISP7: - /* pc rel 7 bit */ + /* pc rel 7 bit */ *output_ptr = 0; output_ptr = apply_fix (output_ptr, R_DISP7, da_operand, 2); da_operand = 0; break; case CLASS_1DISP7: - /* pc rel 7 bit */ + /* pc rel 7 bit */ *output_ptr = 0x80; output_ptr = apply_fix (output_ptr, R_DISP7, da_operand, 2); - output_ptr[-2] = 0x8; + output_ptr[-2] = 0x8; da_operand = 0; break; @@ -1078,53 +1065,45 @@ top:; if (imm_operand) { if (imm_operand->X_add_number == 2) - { - *output_ptr |= 2; - } + *output_ptr |= 2; else if (imm_operand->X_add_number != 1) - { - as_bad (_("immediate must be 1 or 2")); - } + as_bad (_("immediate must be 1 or 2")); } else - { - as_bad (_("immediate 1 or 2 expected")); - } + as_bad (_("immediate 1 or 2 expected")); output_ptr++; break; case CLASS_CC: *output_ptr++ = the_cc; break; - case CLASS_0CCC: - *output_ptr++ = the_ctrl; - break; - case CLASS_1CCC: - *output_ptr++ = the_ctrl | 0x8; - break; - case CLASS_00II: - *output_ptr++ = (~the_interrupt & 0x3); - break; - case CLASS_01II: - *output_ptr++ = (~the_interrupt & 0x3) | 0x4; - break; - case CLASS_FLAGS: - *output_ptr++ = the_flags; - break; + case CLASS_0CCC: + *output_ptr++ = the_ctrl; + break; + case CLASS_1CCC: + *output_ptr++ = the_ctrl | 0x8; + break; + case CLASS_00II: + *output_ptr++ = (~the_interrupt & 0x3); + break; + case CLASS_01II: + *output_ptr++ = (~the_interrupt & 0x3) | 0x4; + break; + case CLASS_FLAGS: + *output_ptr++ = the_flags; + break; case CLASS_BIT: *output_ptr++ = c & 0xf; break; case CLASS_REGN0: if (reg[c & 0xf] == 0) - { - as_bad (_("can't use R0 here")); - } + as_bad (_("can't use R0 here")); + /* Fall through. */ case CLASS_REG: case CLASS_REG_BYTE: case CLASS_REG_WORD: case CLASS_REG_LONG: case CLASS_REG_QUAD: - /* Insert bit mattern of - right reg */ + /* Insert bit mattern of right reg. */ *output_ptr++ = reg[c & 0xf]; break; case CLASS_DISP: @@ -1168,8 +1147,7 @@ top:; } } - /* Copy from the nibble buffer into the frag */ - + /* Copy from the nibble buffer into the frag. */ { int length = (output_ptr - buffer) / 2; char *src = buffer; @@ -1181,19 +1159,16 @@ top:; src += 2; fragp++; } - } - } /* This is the guts of the machine-dependent assembler. STR points to a - machine dependent instruction. This funciton is supposed to emit - the frags/bytes it assembles to. - */ + machine dependent instruction. This function is supposed to emit + the frags/bytes it assembles to. */ void -DEFUN (md_assemble, (str), - char *str) +md_assemble (str) + char *str; { char *op_start; char *op_end; @@ -1205,18 +1180,15 @@ DEFUN (md_assemble, (str), char *dot = 0; char c; - /* Drop leading whitespace */ + /* Drop leading whitespace. */ while (*str == ' ') str++; - /* find the op code end */ + /* Find the op code end. */ for (op_start = op_end = str; *op_end != 0 && *op_end != ' '; op_end++) - { - } - - ; + ; if (op_end == op_start) { @@ -1226,9 +1198,7 @@ DEFUN (md_assemble, (str), *op_end = 0; - opcode = (opcode_entry_type *) hash_find (opcode_hash_control, - op_start); - + opcode = (opcode_entry_type *) hash_find (opcode_hash_control, op_start); if (opcode == NULL) { @@ -1238,7 +1208,7 @@ DEFUN (md_assemble, (str), if (opcode->opcode == 250) { - /* was really a pseudo op */ + /* Was really a pseudo op. */ pseudo_typeS *p; char oc; @@ -1246,7 +1216,6 @@ DEFUN (md_assemble, (str), char *old = input_line_pointer; *op_end = c; - input_line_pointer = op_end; oc = *old; @@ -1261,15 +1230,14 @@ DEFUN (md_assemble, (str), } else { - input_line_pointer = get_operands (opcode, op_end, - operand); + input_line_pointer = get_operands (opcode, op_end, operand); prev_opcode = opcode; opcode = get_specific (opcode, operand); if (opcode == 0) { - /* Couldn't find an opcode which matched the operands */ + /* Couldn't find an opcode which matched the operands. */ char *where = frag_more (2); where[0] = 0x0; @@ -1284,34 +1252,35 @@ DEFUN (md_assemble, (str), } void -DEFUN (tc_crawl_symbol_chain, (headers), - object_headers * headers) +tc_crawl_symbol_chain (headers) + object_headers *headers; { printf (_("call to tc_crawl_symbol_chain \n")); } symbolS * -DEFUN (md_undefined_symbol, (name), - char *name) +md_undefined_symbol (name) + char *name; { return 0; } void -DEFUN (tc_headers_hook, (headers), - object_headers * headers) +tc_headers_hook (headers) + object_headers *headers; { printf (_("call to tc_headers_hook \n")); } -/* Various routines to kill one day */ -/* Equal to MAX_PRECISION in atof-ieee.c */ +/* Various routines to kill one day. */ +/* Equal to MAX_PRECISION in atof-ieee.c. */ #define MAX_LITTLENUMS 6 -/* Turn a string in input_line_pointer into a floating point constant of type - type, and store the appropriate bytes in *litP. The number of LITTLENUMS - emitted is stored in *sizeP . An error message is returned, or NULL on OK. - */ +/* Turn a string in input_line_pointer into a floating point constant + of type TYPE, and store the appropriate bytes in *LITP. The number + of LITTLENUMS emitted is stored in *SIZEP. An error message is + returned, or NULL on OK. */ + char * md_atof (type, litP, sizeP) char type; @@ -1368,10 +1337,12 @@ md_atof (type, litP, sizeP) } CONST char *md_shortopts = "z:"; + struct option md_longopts[] = { {NULL, no_argument, NULL, 0} }; -size_t md_longopts_size = sizeof(md_longopts); + +size_t md_longopts_size = sizeof (md_longopts); int md_parse_option (c, arg) @@ -1403,7 +1374,7 @@ void md_show_usage (stream) FILE *stream; { - fprintf(stream, _("\ + fprintf (stream, _("\ Z8K options:\n\ -z8001 generate segmented code\n\ -z8002 generate unsegmented code\n")); @@ -1427,11 +1398,12 @@ md_convert_frag (headers, seg, fragP) } valueT -DEFUN (md_section_align, (seg, size), - segT seg AND - valueT size) +md_section_align (seg, size) + segT seg; + valueT size; { - return ((size + (1 << section_alignment[(int) seg]) - 1) & (-1 << section_alignment[(int) seg])); + return ((size + (1 << section_alignment[(int) seg]) - 1) + & (-1 << section_alignment[(int) seg])); } @@ -1451,13 +1423,19 @@ md_apply_fix (fixP, val) case R_JR: *buf++ = val; - /* if (val != 0) abort();*/ +#if 0 + if (val != 0) + abort (); +#endif break; case R_DISP7: *buf++ += val; - /* if (val != 0) abort();*/ +#if 0 + if (val != 0) + abort (); +#endif break; case R_IMM8: @@ -1488,7 +1466,6 @@ md_apply_fix (fixP, val) default: abort (); - } } @@ -1501,16 +1478,17 @@ md_estimate_size_before_relax (fragP, segment_type) abort (); } -/* Put number into target byte order */ +/* Put number into target byte order. */ void -DEFUN (md_number_to_chars, (ptr, use, nbytes), - char *ptr AND - valueT use AND - int nbytes) +md_number_to_chars (ptr, use, nbytes) + char *ptr; + valueT use; + int nbytes; { number_to_chars_bigendian (ptr, use, nbytes); } + long md_pcrel_from (fixP) fixS *fixP; @@ -1533,30 +1511,31 @@ tc_reloc_mangle (fix_ptr, intr, base) { symbolS *symbol_ptr; - if (fix_ptr->fx_addsy && - fix_ptr->fx_subsy) + if (fix_ptr->fx_addsy + && fix_ptr->fx_subsy) { symbolS *add = fix_ptr->fx_addsy; symbolS *sub = fix_ptr->fx_subsy; - if (S_GET_SEGMENT(add) != S_GET_SEGMENT(sub)) + + if (S_GET_SEGMENT (add) != S_GET_SEGMENT (sub)) + as_bad (_("Can't subtract symbols in different sections %s %s"), + S_GET_NAME (add), S_GET_NAME (sub)); + else { - as_bad(_("Can't subtract symbols in different sections %s %s"), - S_GET_NAME(add), S_GET_NAME(sub)); + int diff = S_GET_VALUE (add) - S_GET_VALUE (sub); + + fix_ptr->fx_addsy = 0; + fix_ptr->fx_subsy = 0; + fix_ptr->fx_offset += diff; } - else { - int diff = S_GET_VALUE(add) - S_GET_VALUE(sub); - fix_ptr->fx_addsy = 0; - fix_ptr->fx_subsy = 0; - fix_ptr->fx_offset += diff; - } } symbol_ptr = fix_ptr->fx_addsy; /* If this relocation is attached to a symbol then it's ok - to output it */ + to output it. */ if (fix_ptr->fx_r_type == 0) { - /* cons likes to create reloc32's whatever the size of the reloc.. */ + /* cons likes to create reloc32's whatever the size of the reloc. */ switch (fix_ptr->fx_size) { case 2: @@ -1571,12 +1550,9 @@ tc_reloc_mangle (fix_ptr, intr, base) default: abort (); } - } else - { - intr->r_type = fix_ptr->fx_r_type; - } + intr->r_type = fix_ptr->fx_r_type; intr->r_vaddr = fix_ptr->fx_frag->fr_address + fix_ptr->fx_where + base; intr->r_offset = fix_ptr->fx_offset; @@ -1586,4 +1562,3 @@ tc_reloc_mangle (fix_ptr, intr, base) else intr->r_symndx = -1; } - diff --git a/contrib/binutils/gas/config/tc-z8k.h b/contrib/binutils/gas/config/tc-z8k.h index d88b656..130c01c 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, 1998 Free Software Foundation, Inc. + Copyright (C) 1987-1992, 93, 95, 97, 98, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -18,7 +19,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #define TC_Z8K #define TARGET_BYTES_BIG_ENDIAN 1 @@ -33,7 +33,7 @@ struct internal_reloc; #endif /* This macro translates between an internal fix and an coff reloc type */ -#define TC_COFF_FIX2RTYPE(fixP) abort(); +#define TC_COFF_FIX2RTYPE(fixP) abort (); #define BFD_ARCH bfd_arch_z8k #define COFF_MAGIC 0x8000 @@ -50,5 +50,3 @@ extern void tc_reloc_mangle #define RELOC_32 1234 #define md_operand(x) - -/* end of tc-z8k.h */ diff --git a/contrib/binutils/gas/config/te-386bsd.h b/contrib/binutils/gas/config/te-386bsd.h index dbff990..0f077b5 100644 --- a/contrib/binutils/gas/config/te-386bsd.h +++ b/contrib/binutils/gas/config/te-386bsd.h @@ -1,21 +1,22 @@ /* te-386bsd.h -- 386BSD target environment declarations. Copyright (C) 1987, 1990, 1991, 1992 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. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #define TE_386BSD 1 @@ -28,4 +29,4 @@ * End: */ -/* end of te-sun3.h */ +/* end of te-386bsd.h */ diff --git a/contrib/binutils/gas/config/te-aux.h b/contrib/binutils/gas/config/te-aux.h index da6fa01..38445d9 100644 --- a/contrib/binutils/gas/config/te-aux.h +++ b/contrib/binutils/gas/config/te-aux.h @@ -2,7 +2,7 @@ /* From obj-coff.h: This internal_lineno crap is to stop namespace pollution from the - bfd internal coff headerfile. */ + bfd internal coff headerfile. */ #define internal_lineno bfd_internal_lineno #include "coff/aux-coff.h" /* override bits in coff/internal.h */ #undef internal_lineno diff --git a/contrib/binutils/gas/config/te-nbsd.h b/contrib/binutils/gas/config/te-nbsd.h index cee4600..010a711 100644 --- a/contrib/binutils/gas/config/te-nbsd.h +++ b/contrib/binutils/gas/config/te-nbsd.h @@ -1,18 +1,18 @@ /* te-nbsd.h -- NetBSD target environment declarations. Copyright (C) 1987, 90, 91, 92, 94, 95, 1998 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 diff --git a/contrib/binutils/gas/config/te-ppcnw.h b/contrib/binutils/gas/config/te-ppcnw.h index 2ddf050..d23e38c 100644 --- a/contrib/binutils/gas/config/te-ppcnw.h +++ b/contrib/binutils/gas/config/te-ppcnw.h @@ -1,21 +1,22 @@ /* te-ppcnw.h -- Power PC running Netware environment declarations. Copyright (C) 1994 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. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* Added these, because if we don't know what we're targetting we may need an assembler version of libgcc, and that will use local @@ -26,6 +27,6 @@ /* these define interfaces */ #include "obj-format.h" -/* gcc uses escape sequences for ppc/netware */ +/* gcc uses escape sequences for ppc/netware. */ #undef NO_STRING_ESCAPES diff --git a/contrib/binutils/gas/config/te-sparcaout.h b/contrib/binutils/gas/config/te-sparcaout.h index 6310184..6c92f63 100644 --- a/contrib/binutils/gas/config/te-sparcaout.h +++ b/contrib/binutils/gas/config/te-sparcaout.h @@ -1,21 +1,22 @@ /* te-sparcaout.h -- embedded sparc-aout target environment declarations. Copyright (C) 1996 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. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ #define TE_SPARCAOUT 1 #include "obj-format.h" diff --git a/contrib/binutils/gas/config/te-sysv32.h b/contrib/binutils/gas/config/te-sysv32.h index 923e6e5..c60728a 100644 --- a/contrib/binutils/gas/config/te-sysv32.h +++ b/contrib/binutils/gas/config/te-sysv32.h @@ -1,4 +1,4 @@ -/* Remove leading underscore from the gcc generated symbol names */ +/* Remove leading underscore from the gcc generated symbol names. */ #define STRIP_UNDERSCORE #include "obj-format.h" diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure index 28f69be..dbdad71 100755 --- a/contrib/binutils/gas/configure +++ b/contrib/binutils/gas/configure @@ -22,12 +22,16 @@ ac_help="$ac_help ac_help="$ac_help --disable-libtool-lock avoid locking (might break parallel builds)" ac_help="$ac_help + --with-pic try to use only PIC/non-PIC objects [default=use both]" +ac_help="$ac_help --enable-bfd-assembler use BFD back end for writing object files" ac_help="$ac_help targets alternative target configurations besides the primary" ac_help="$ac_help --enable-commonbfdlib build shared BFD/opcodes/libiberty library" ac_help="$ac_help + --enable-build-warnings Enable build-time compiler warnings if gcc is used" +ac_help="$ac_help --disable-nls do not use Native Language Support" ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" @@ -51,6 +55,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -165,6 +170,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -335,6 +341,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -500,12 +511,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -543,6 +558,68 @@ else ac_n= ac_c='\c' ac_t= fi +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:563: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:596: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes ac_aux_dir= @@ -592,7 +669,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:596: checking host system type" >&5 +echo "configure:673: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -613,7 +690,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:617: checking target system type" >&5 +echo "configure:694: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -631,7 +708,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:635: checking build system type" >&5 +echo "configure:712: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -654,6 +731,49 @@ test "$host_alias" != "$target_alias" && program_prefix=${target_alias}- + 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 + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcposix $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=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""yes" 1>&6 + LIBS="$LIBS -lcposix" +else + echo "$ac_t""no" 1>&6 +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 # incompatible versions: @@ -666,7 +786,7 @@ test "$host_alias" != "$target_alias" && # 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:670: checking for a BSD compatible install" >&5 +echo "configure:790: 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 @@ -719,7 +839,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:723: checking whether build environment is sane" >&5 +echo "configure:843: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -776,7 +896,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:780: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:900: 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 @@ -805,7 +925,7 @@ fi PACKAGE=gas -VERSION=2.10.1 +VERSION=2.11 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; } @@ -822,7 +942,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:826: checking for working aclocal" >&5 +echo "configure:946: 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. @@ -835,7 +955,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:839: checking for working autoconf" >&5 +echo "configure:959: 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. @@ -848,7 +968,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:852: checking for working automake" >&5 +echo "configure:972: 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. @@ -861,7 +981,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:865: checking for working autoheader" >&5 +echo "configure:985: 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. @@ -874,7 +994,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:878: checking for working makeinfo" >&5 +echo "configure:998: 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. @@ -957,40 +1077,10 @@ else enable_fast_install=yes fi -# 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:964: 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 - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" -fi -fi -RANLIB="$ac_cv_prog_RANLIB" -if test -n "$RANLIB"; then - echo "$ac_t""$RANLIB" 1>&6 -else - echo "$ac_t""no" 1>&6 -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:994: checking for $ac_word" >&5 +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 @@ -1020,7 +1110,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:1024: checking for $ac_word" >&5 +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 @@ -1071,7 +1161,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:1075: checking for $ac_word" >&5 +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 @@ -1103,7 +1193,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +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. @@ -1114,12 +1204,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1118 "configure" +#line 1208 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +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 @@ -1145,12 +1235,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:1149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +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:1154: checking whether we are using GNU C" >&5 +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 @@ -1159,7 +1249,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1163: \"$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:1253: \"$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 @@ -1178,7 +1268,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:1182: checking whether ${CC-cc} accepts -g" >&5 +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 @@ -1221,8 +1311,14 @@ 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:1225: checking for ld used by GCC" >&5 - ac_prog=`($CC -print-prog-name=ld) 2>&5` +echo "configure:1315: checking for ld used by GCC" >&5 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac case "$ac_prog" in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) @@ -1245,10 +1341,10 @@ echo "configure:1225: 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:1249: checking for GNU ld" >&5 +echo "configure:1345: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1252: checking for non-GNU ld" >&5 +echo "configure:1348: 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 @@ -1283,7 +1379,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:1287: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1383: 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 @@ -1296,10 +1392,23 @@ fi fi echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 +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 +if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + lt_cv_ld_reload_flag='-r' +fi +echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6 +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:1303: checking for BSD-compatible nm" >&5 +echo "configure:1412: 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 @@ -1310,18 +1419,20 @@ else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then + tmp_nm=$ac_dir/${ac_tool_prefix}nm + if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored - if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -B" + # Tru64's nm complains that /dev/null is an invalid object file + if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then + ac_cv_path_NM="$tmp_nm -B" break - elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then - ac_cv_path_NM="$ac_dir/nm -p" + elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$tmp_nm -p" break else - ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but + ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi @@ -1335,7 +1446,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:1339: checking whether ln -s works" >&5 +echo "configure:1450: 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 @@ -1348,18 +1459,490 @@ else ac_cv_prog_LN_S=ln fi fi -LN_S="$ac_cv_prog_LN_S" -if test "$ac_cv_prog_LN_S" = "ln -s"; then - echo "$ac_t""yes" 1>&6 +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6 +echo "configure:1471: 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 + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [regex]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given egrep regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case "$host_os" in +aix4*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi4*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin* | mingw* |pw32*) + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +freebsd* ) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case "$host_cpu" in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20*) + # TODO: Does this work for hpux-11 too? + lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + +irix5* | irix6*) + case "$host_os" in + irix5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" + ;; + *) + case "$LD" in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" + ;; + esac + lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux-gnu*) + case "$host_cpu" in + alpha* | i*86 | powerpc* | sparc* | ia64* ) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : + else + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + fi + ;; + +osf3* | osf4* | osf5*) + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' + lt_cv_file_magic_test_file=/shlib/libc.so + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + lt_cv_file_magic_test_file=/lib/libc.so + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case "$host_vendor" in + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + esac + ;; +esac + +fi + +echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6 +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 +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 + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:1640: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +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 + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + +if test $host != $build; then + ac_tool_prefix=${host_alias}- +else + ac_tool_prefix= +fi + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# Only perform the check for file, if the check method requires it +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 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +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 +if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MAGIC_CMD" in + /*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; + ?:/*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. + ;; + *) + ac_save_MAGIC_CMD="$MAGIC_CMD" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="/usr/bin:$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case "$deplibs_check_method" in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + egrep "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$ac_save_ifs" + MAGIC_CMD="$ac_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$ac_t""$MAGIC_CMD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +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 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_RANLIB"; then +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 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +else + RANLIB=":" +fi +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 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test -z "$ac_cv_prog_STRIP"; then +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 +if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # 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_STRIP="strip" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":" +fi +fi +STRIP="$ac_cv_prog_STRIP" +if test -n "$STRIP"; then + echo "$ac_t""$STRIP" 1>&6 else echo "$ac_t""no" 1>&6 fi +else + STRIP=":" +fi +fi -case "$target" in -NONE) lt_target="$host" ;; -*) lt_target="$target" ;; -esac # Check for any special flags to pass to ltconfig. libtool_flags="--cache-file=$cache_file" @@ -1379,13 +1962,24 @@ fi test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi + +test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic" +test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" + # Some flags need to be propagated to the compiler or linker for good # libtool support. -case "$lt_target" in +case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1388 "configure"' > conftest.$ac_ext - if { (eval echo configure:1389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1982 "configure"' > conftest.$ac_ext + if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1406,19 +2000,27 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1410: checking whether the C compiler needs -belf" >&5 +echo "configure:2004: 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 - cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2024: \"$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 @@ -1428,6 +2030,13 @@ else lt_cv_cc_needs_belf=no fi rm -f 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 + fi echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 @@ -1491,12 +2100,14 @@ rm -f confcache # Actually configure libtool. ac_aux_dir is where install-sh is found. -CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ -LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ -DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ +AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ +LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ +AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ +objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ +deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ -$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ +$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } # Reload cache, that may have been modified by ltconfig @@ -1510,7 +2121,7 @@ fi # This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" +LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -1520,6 +2131,12 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' exec 5>>./config.log + + + + + + user_bfd_gas= # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given. if test "${enable_bfd_assembler+set}" = set; then @@ -1552,6 +2169,29 @@ fi using_cgen=no +build_warnings="-W -Wall" +# Check whether --enable-build-warnings or --disable-build-warnings was given. +if test "${enable_build_warnings+set}" = set; then + enableval="$enable_build_warnings" + case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi +fi +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi + + # Generate a header file @@ -1619,10 +2259,14 @@ for this_target in $target $canon_targets ; do armb*) cpu_type=arm endian=little ;; armv*l) cpu_type=arm endian=little ;; armv*b) cpu_type=arm endian=big ;; + xscale*) cpu_type=arm endian=little ;; strongarm*) cpu_type=arm endian=little ;; thumb*) cpu_type=arm endian=little ;; hppa*) cpu_type=hppa ;; - i[456]86) cpu_type=i386 ;; + i[3456]86) cpu_type=i386 arch=i386;; + x86_64) cpu_type=i386 arch=x86_64;; + ia64) cpu_type=ia64 ;; + m6811|m6812|m68hc12) cpu_type=m68hc11 ;; m680[012346]0) cpu_type=m68k ;; m68008) cpu_type=m68k ;; m683??) cpu_type=m68k ;; @@ -1661,6 +2305,7 @@ for this_target in $target $canon_targets ; do a29k-amd-udi) fmt=coff ;; a29k-amd-ebmon) fmt=coff ;; a29k-nyu-sym1) fmt=coff ;; + a29k-*-rtems*) fmt=coff ;; a29k-*-vxworks*) fmt=coff ;; alpha*-*-*vms*) fmt=evax ;; @@ -1669,42 +2314,57 @@ for this_target in $target $canon_targets ; do alpha*-*-osf*) fmt=ecoff ;; alpha*-*-linuxecoff*) fmt=ecoff ;; alpha*-*-linux-gnu*) fmt=elf em=linux ;; - alpha*-*-freebsd*) fmt=elf em=freebsd ;; alpha*-*-netbsd*) fmt=elf em=nbsd ;; arc-*-elf*) fmt=elf bfd_gas=yes ;; arm-*-aout) fmt=aout ;; arm-*-coff | thumb-*-coff) fmt=coff ;; + arm-*-rtems | thumb-*-rtems) fmt=elf ;; arm-*-elf | thumb-*-elf) fmt=elf ;; arm*-*-conix*) fmt=elf ;; arm-*-linux*aout*) fmt=aout em=linux ;; - arm*-*-linux-gnu*) fmt=elf em=linux ;; - arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; + arm*-*-linux-gnu* | arm*-*-uclinux*) + fmt=elf em=linux ;; + arm-*-netbsd*) fmt=aout em=nbsd ;; arm-*-oabi | thumb-*-oabi) fmt=elf ;; arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;; - arm-*-wince) fmt=coff em=wince-pe bfd_gas=yes;; + arm-*-wince) fmt=coff em=wince-pe ;; arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; arm-*-riscix*) fmt=aout em=riscix ;; avr-*-*) fmt=elf bfd_gas=yes ;; + cris-*-*) fmt=multi bfd_gas=yes ;; + d10v-*-*) fmt=elf bfd_gas=yes ;; d30v-*-*) fmt=elf bfd_gas=yes ;; fr30-*-*) fmt=elf bfd_gas=yes ;; + hppa-*-linux-gnu*) case ${cpu} in + hppa*64*) + fmt=elf em=hppalinux64;; + hppa*) + fmt=elf em=linux;; + esac ;; hppa-*-*elf*) fmt=elf em=hppa ;; - hppa-*-linux-gnu*) fmt=elf em=hppa ;; hppa-*-lites*) fmt=elf em=hppa ;; hppa-*-osf*) fmt=som em=hppa ;; hppa-*-rtems*) fmt=elf em=hppa ;; + hppa-*-hpux11*) case ${cpu} in + hppa*64*) + fmt=elf em=hppa64 ;; + hppa*) + fmt=som em=hppa ;; + esac ;; hppa-*-hpux*) fmt=som em=hppa ;; hppa-*-mpeix*) fmt=som em=hppa ;; hppa-*-bsd*) fmt=som em=hppa ;; hppa-*-hiux*) fmt=som em=hppa ;; + h8300-*-rtems*) fmt=coff ;; h8300-*-coff) fmt=coff ;; i370-*-elf* | i370-*-linux*) fmt=elf ;; @@ -1719,12 +2379,12 @@ for this_target in $target $canon_targets ; do i386-*-linux*aout* | i386-*-linuxoldld) 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 ;; i386-*-lynxos*) fmt=coff em=lynx ;; - i386-*-sysv4* | i386-*-solaris* | i386-*-elf) + i386-*-sysv[45]* | i386-*-solaris* | i386-*-elf) fmt=elf bfd_gas=yes ;; i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12]) fmt=aout em=386bsd ;; - i386-*-freebsd*) fmt=elf bfd_gas=yes ;; i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) fmt=coff ;; i386-*-sco3.2v5*) fmt=elf @@ -1738,25 +2398,31 @@ EOF i386-*-sco3.2*) fmt=coff ;; i386-*-vsta) fmt=aout ;; i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) - fmt=coff em=go32;; - i386-*-rtemscoff*) fmt=coff ;; + fmt=coff em=go32 bfd_gas=yes + cat >> confdefs.h <<\EOF +#define STRICTCOFF 1 +EOF + + ;; i386-*-rtemself*) fmt=elf ;; - i386-*-rtems*) fmt=elf ;; + i386-*-rtems*) fmt=coff ;; i386-*-gnu*) fmt=elf ;; i386-*-mach*) fmt=aout em=mach bfd_gas=yes ;; i386-*-msdos*) fmt=aout ;; i386-*-moss*) fmt=elf ;; - i386-*-pe) fmt=coff em=pe ;; + i386-*-pe) fmt=coff em=pe bfd_gas=yes ;; i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;; i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;; i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; - i386-*-*nt*) fmt=coff em=pe ;; + i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;; i386-*-vxworks*) fmt=aout ;; + i386-*-chaos) fmt=elf ;; + i860-stardent-sysv4* | i860-stardent-elf*) + fmt=elf bfd_gas=yes endian=little + echo "configure: warning: GAS support for ${generic_target} is preliminary and a work in progress" 1>&2 ;; i960-*-bout) fmt=bout ;; i960-*-coff) fmt=coff em=ic960 ;; - i960-*-rtemscoff*) fmt=coff em=ic960 ;; - i960-*-rtemself*) fmt=elf ;; i960-*-rtems*) fmt=coff em=ic960 ;; i960-*-nindy*) fmt=bout ;; i960-*-vxworks4*) fmt=bout ;; @@ -1765,8 +2431,14 @@ EOF i960-*-vxworks*) fmt=bout ;; i960-*-elf*) fmt=elf ;; + ia64-*-elf*) fmt=elf ;; + ia64-*-linux-gnu*) fmt=elf em=linux ;; + ia64-*-hpux*) fmt=elf em=hpux ;; + m32r-*-*) fmt=elf bfd_gas=yes ;; + m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)fmt=elf bfd_gas=yes ;; + m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) fmt=aout em=sun3 ;; m68k-motorola-sysv*) fmt=coff em=delta ;; @@ -1775,10 +2447,7 @@ EOF m68k-*-sysv4*) # must be before -sysv* fmt=elf em=svr4 ;; m68k-*-elf*) fmt=elf ;; - m68k-*-rtemscoff*) fmt=coff ;; - m68k-*-rtemself*) fmt=elf ;; - m68k-*-rtems*) fmt=elf ;; - m68k-*-coff | m68k-*-sysv*) + m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) fmt=coff ;; m68k-*-hpux*) fmt=hp300 em=hp300 ;; m68k-*-linux*aout*) fmt=aout em=linux ;; @@ -1812,6 +2481,7 @@ EOF mips-*-irix*) fmt=ecoff ;; mips-*-lnews*) fmt=ecoff em=lnews ;; mips-*-riscos*) fmt=ecoff ;; + mips-*-sysv4*MP*) fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) fmt=elf ;; @@ -1853,12 +2523,12 @@ EOF ppc-*-netware*) fmt=elf em=ppcnw ;; ppc-*-vxworks*) fmt=elf ;; + sh-*-linux*) fmt=elf em=linux ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff ;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes;; sh-*-rtemself*) fmt=elf ;; - sh-*-rtemscoff*) fmt=coff ;; - sh-*-rtems*) fmt=coff ;; + sh-*-rtems*) fmt=coff ;; ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; @@ -1890,9 +2560,13 @@ EOF strongarm-*-coff) fmt=coff ;; strongarm-*-elf) fmt=elf ;; + xscale-*-coff) fmt=coff ;; + xscale-*-elf) fmt=elf ;; tic30-*-*aout*) fmt=aout bfd_gas=yes ;; tic30-*-*coff*) fmt=coff bfd_gas=yes ;; + tic54x-*-* | c54x*-*-*) + fmt=coff bfd_gas=yes need_libm=yes;; tic80-*-*) fmt=coff ;; v850-*-*) fmt=elf bfd_gas=yes ;; @@ -1909,6 +2583,7 @@ EOF w65-*-*) fmt=coff ;; + *-*-freebsd*) fmt=elf bfd_gas=yes ;; *-*-aout | *-*-scout) fmt=aout ;; *-*-nindy*) @@ -1945,11 +2620,13 @@ EOF arm-*) bfd_gas=yes ;; # not yet # i386-aout) bfd_gas=preferred ;; + ia64*-*) bfd_gas=yes ;; mips-*) bfd_gas=yes ;; ns32k-*) bfd_gas=yes ;; ppc-*) bfd_gas=yes ;; sparc-*) bfd_gas=yes ;; strongarm-*) bfd_gas=yes ;; + xscale-*) bfd_gas=yes ;; *-elf) bfd_gas=yes ;; *-ecoff) bfd_gas=yes ;; *-som) bfd_gas=yes ;; @@ -2012,6 +2689,14 @@ EOF fi ;; + i386) + if test $this_target = $target ; then + cat >> confdefs.h <> confdefs.h <&6 -echo "configure:2393: checking for $ac_word" >&5 +echo "configure:3085: 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 @@ -2419,7 +3111,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:2423: checking for $ac_word" >&5 +echo "configure:3115: 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 @@ -2470,7 +3162,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:2474: checking for $ac_word" >&5 +echo "configure:3166: 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 @@ -2502,7 +3194,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2506: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:3198: 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. @@ -2513,12 +3205,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2517 "configure" +#line 3209 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3214: \"$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 @@ -2544,12 +3236,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:2548: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:3240: 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:2553: checking whether we are using GNU C" >&5 +echo "configure:3245: 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 @@ -2558,7 +3250,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2562: \"$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:3254: \"$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 @@ -2577,7 +3269,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:2581: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:3273: 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 @@ -2614,7 +3306,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:2618: checking for $ac_word" >&5 +echo "configure:3310: 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 @@ -2645,7 +3337,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2649: checking how to run the C preprocessor" >&5 +echo "configure:3341: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2660,13 +3352,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:2670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3362: \"$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 : @@ -2677,13 +3369,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:2687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3379: \"$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 : @@ -2694,13 +3386,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:2704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3396: \"$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 : @@ -2730,7 +3422,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:2734: checking for $ac_word" >&5 +echo "configure:3426: 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 @@ -2763,7 +3455,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:2767: checking for $ac_word" >&5 +echo "configure:3459: 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 @@ -2797,7 +3489,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:2801: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3493: 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 @@ -2805,7 +3497,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:3512: \"$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 @@ -2839,7 +3531,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:2843: checking lex output file root" >&5 +echo "configure:3535: 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 @@ -2860,7 +3552,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:2864: checking whether yytext is a pointer" >&5 +echo "configure:3556: 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 @@ -2872,14 +3564,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:3575: \"$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 @@ -2902,34 +3594,43 @@ fi ALL_LINGUAS= -echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:2907: 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 - 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 +# 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 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 else echo "$ac_t""no" 1>&6 - ISC= fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2928: checking for ANSI C header files" >&5 +echo "configure:3629: 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 @@ -2937,7 +3638,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3642: \"$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* @@ -2954,7 +3655,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 @@ -2972,7 +3673,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 @@ -2993,7 +3694,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3004,7 +3705,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3028,18 +3729,18 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3032: checking for working const" >&5 +echo "configure:3733: 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:3787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3103,21 +3804,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3107: checking for inline" >&5 +echo "configure:3808: 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:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3143,12 +3844,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3147: checking for off_t" >&5 +echo "configure:3848: 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 @@ -3176,12 +3877,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3180: checking for size_t" >&5 +echo "configure:3881: 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 @@ -3211,19 +3912,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:3215: checking for working alloca.h" >&5 +echo "configure:3916: 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() { -void *p = alloca(2 * sizeof(int)); +char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3928: \"$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 @@ -3244,12 +3945,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3248: checking for alloca" >&5 +echo "configure:3949: 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:3982: \"$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 @@ -3309,12 +4010,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3313: checking whether alloca needs Cray hooks" >&5 +echo "configure:4014: 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:3343: checking for $ac_func" >&5 +echo "configure:4044: 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:4072: \"$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 @@ -3394,7 +4095,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3398: checking stack direction for C alloca" >&5 +echo "configure:4099: 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 @@ -3402,7 +4103,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:4126: \"$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 @@ -3446,17 +4147,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:3450: checking for $ac_hdr" >&5 +echo "configure:4151: 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:3460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4161: \"$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* @@ -3485,12 +4186,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3489: checking for $ac_func" >&5 +echo "configure:4190: 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:4218: \"$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 @@ -3538,7 +4239,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3542: checking for working mmap" >&5 +echo "configure:4243: 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 @@ -3546,7 +4247,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext < #include #include -#include -#include - -#ifdef HAVE_UNISTD_H -# include -#endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE +# ifdef HAVE_UNISTD_H +# include +# endif /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H @@ -3636,7 +4334,7 @@ main() /* * First, make a file with some known garbage in it. */ - data = (char*)malloc(pagesize); + data = malloc(pagesize); if (!data) exit(1); for (i = 0; i < pagesize; ++i) @@ -3657,7 +4355,7 @@ main() fd = open("conftestmmap", O_RDWR); if (fd < 0) exit(1); - data2 = (char*)malloc(2 * pagesize); + data2 = malloc(2 * pagesize); if (!data2) exit(1); data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); @@ -3675,7 +4373,7 @@ main() */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; - data3 = (char*)malloc(pagesize); + data3 = malloc(pagesize); if (!data3) exit(1); if (read(fd, data3, pagesize) != pagesize) @@ -3689,7 +4387,7 @@ main() } EOF -if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4391: \"$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 @@ -3717,17 +4415,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:3721: checking for $ac_hdr" >&5 +echo "configure:4419: 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:3731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4429: \"$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* @@ -3757,12 +4455,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3761: checking for $ac_func" >&5 +echo "configure:4459: 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:4487: \"$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 @@ -3814,12 +4512,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3818: checking for $ac_func" >&5 +echo "configure:4516: 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:4544: \"$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 @@ -3876,19 +4574,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3880: checking for LC_MESSAGES" >&5 +echo "configure:4578: 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:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4590: \"$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 @@ -3909,7 +4607,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3913: checking whether NLS is requested" >&5 +echo "configure:4611: 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" @@ -3929,7 +4627,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3933: checking whether included gettext is requested" >&5 +echo "configure:4631: 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" @@ -3948,17 +4646,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3952: checking for libintl.h" >&5 +echo "configure:4650: 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:3962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4660: \"$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* @@ -3975,19 +4673,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:3979: checking for gettext in libc" >&5 +echo "configure:4677: 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:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4689: \"$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 @@ -4003,7 +4701,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:4007: checking for bindtextdomain in -lintl" >&5 +echo "configure:4705: 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 @@ -4011,7 +4709,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:4724: \"$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 @@ -4038,19 +4736,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:4042: checking for gettext in libintl" >&5 +echo "configure:4740: 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:4752: \"$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 @@ -4078,7 +4776,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:4082: checking for $ac_word" >&5 +echo "configure:4780: 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 @@ -4112,12 +4810,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4116: checking for $ac_func" >&5 +echo "configure:4814: 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:4842: \"$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 @@ -4167,7 +4865,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:4171: checking for $ac_word" >&5 +echo "configure:4869: 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 @@ -4203,7 +4901,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:4207: checking for $ac_word" >&5 +echo "configure:4905: 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 @@ -4235,7 +4933,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4275,7 +4973,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:4279: checking for $ac_word" >&5 +echo "configure:4977: 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 @@ -4309,7 +5007,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:4313: checking for $ac_word" >&5 +echo "configure:5011: 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 @@ -4345,7 +5043,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:4349: checking for $ac_word" >&5 +echo "configure:5047: 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 @@ -4435,7 +5133,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4439: checking for catalogs to be installed" >&5 +echo "configure:5137: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4463,17 +5161,17 @@ echo "configure:4439: 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:4467: checking for linux/version.h" >&5 +echo "configure:5165: 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:4477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5175: \"$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* @@ -4536,7 +5234,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4540: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:5238: 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" @@ -4558,72 +5256,10 @@ fi MAINT=$MAINTAINER_MODE_TRUE -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:4563: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_cygwin" 1>&6 -CYGWIN= -test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:4596: checking for mingw32 environment" >&5 -if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$ac_cv_mingw32" 1>&6 -MINGW32= -test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4627: checking for executable suffix" >&5 +echo "configure:5263: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4633,10 +5269,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:5273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -4658,17 +5294,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:4662: checking for $ac_hdr" >&5 +echo "configure:5298: 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:4672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5308: \"$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* @@ -4698,7 +5334,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:4702: checking whether compiling a cross-assembler" >&5 +echo "configure:5338: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -4713,19 +5349,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:4717: checking for working alloca.h" >&5 +echo "configure:5353: 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() { -void *p = alloca(2 * sizeof(int)); +char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:4729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5365: \"$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 @@ -4746,12 +5382,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4750: checking for alloca" >&5 +echo "configure:5386: 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:5419: \"$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 @@ -4811,12 +5447,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4815: checking whether alloca needs Cray hooks" >&5 +echo "configure:5451: 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:4845: checking for $ac_func" >&5 +echo "configure:5481: 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:5509: \"$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 @@ -4896,7 +5532,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4900: checking stack direction for C alloca" >&5 +echo "configure:5536: 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 @@ -4904,7 +5540,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:5563: \"$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 @@ -4945,21 +5581,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:4949: checking for inline" >&5 +echo "configure:5585: 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:5599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -4989,12 +5625,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4993: checking for $ac_func" >&5 +echo "configure:5629: 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:5657: \"$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 @@ -5046,12 +5682,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5050: checking for $ac_func" >&5 +echo "configure:5686: 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:5714: \"$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 @@ -5099,16 +5735,146 @@ fi done +# do we need the math library? +case "${need_libm}" in +yes) + LIBM= +case "$host" in +*-*-beos* | *-*-cygwin* | *-*-pw32*) + # These system don't have libm + ;; +*-ncr-sysv4.3*) + echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6 +echo "configure:5749: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lmw $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=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""yes" 1>&6 + LIBM="-lmw" +else + echo "$ac_t""no" 1>&6 +fi + + echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 +echo "configure:5789: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=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""yes" 1>&6 + LIBM="$LIBM -lm" +else + echo "$ac_t""no" 1>&6 +fi + + ;; +*) + echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 +echo "configure:5827: 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 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=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""yes" 1>&6 + LIBM="-lm" +else + echo "$ac_t""no" 1>&6 +fi + + ;; +esac + + + ;; +esac + # Some non-ANSI preprocessors botch requoting inside strings. That's bad # 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:5107: checking for working assert macro" >&5 +echo "configure:5873: 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 @@ -5124,7 +5890,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -5165,12 +5931,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:5169: checking whether declaration is required for strstr" >&5 +echo "configure:5935: 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:5951: \"$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 @@ -5202,12 +5968,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:5206: checking whether declaration is required for malloc" >&5 +echo "configure:5972: 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:5988: \"$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 @@ -5239,12 +6005,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:5243: checking whether declaration is required for free" >&5 +echo "configure:6009: 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:6025: \"$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 @@ -5276,12 +6042,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:5280: checking whether declaration is required for sbrk" >&5 +echo "configure:6046: 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:6062: \"$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 @@ -5313,12 +6079,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:5317: checking whether declaration is required for environ" >&5 +echo "configure:6083: 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:6099: \"$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 @@ -5353,12 +6119,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:5357: checking whether declaration is required for errno" >&5 +echo "configure:6123: 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:6143: \"$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 @@ -5554,10 +6320,14 @@ s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g -s%@RANLIB@%$RANLIB%g s%@CC@%$CC%g s%@LN_S@%$LN_S%g +s%@OBJEXT@%$OBJEXT%g +s%@EXEEXT@%$EXEEXT%g +s%@RANLIB@%$RANLIB%g +s%@STRIP@%$STRIP%g s%@LIBTOOL@%$LIBTOOL%g +s%@WARN_CFLAGS@%$WARN_CFLAGS%g s%@GDBINIT@%$GDBINIT%g s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g s%@extra_objects@%$extra_objects%g @@ -5598,7 +6368,7 @@ s%@l@%$l%g s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g s%@MAINT@%$MAINT%g -s%@EXEEXT@%$EXEEXT%g +s%@LIBM@%$LIBM%g CEOF EOF diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in index 1707acd..62c50dd 100644 --- a/contrib/binutils/gas/configure.in +++ b/contrib/binutils/gas/configure.in @@ -9,8 +9,9 @@ AC_PREREQ(2.13) AC_INIT(as.h) AC_CANONICAL_SYSTEM +AC_ISC_POSIX -AM_INIT_AUTOMAKE(gas, 2.10.1) +AM_INIT_AUTOMAKE(gas, 2.11) AM_PROG_LIBTOOL @@ -40,6 +41,27 @@ esac])dnl using_cgen=no +build_warnings="-W -Wall" +AC_ARG_ENABLE(build-warnings, +[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], +[case "${enableval}" in + yes) ;; + no) build_warnings="-w";; + ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${build_warnings} ${t}";; + *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` + build_warnings="${t} ${build_warnings}";; + *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi])dnl +WARN_CFLAGS="" +if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then + WARN_CFLAGS="${build_warnings}" +fi +AC_SUBST(WARN_CFLAGS) + # Generate a header file AM_CONFIG_HEADER(config.h:config.in) @@ -95,11 +117,15 @@ changequote([,])dnl armb*) cpu_type=arm endian=little ;; armv*l) cpu_type=arm endian=little ;; armv*b) cpu_type=arm endian=big ;; + xscale*) cpu_type=arm endian=little ;; strongarm*) cpu_type=arm endian=little ;; thumb*) cpu_type=arm endian=little ;; hppa*) cpu_type=hppa ;; changequote(,)dnl - i[456]86) cpu_type=i386 ;; + i[3456]86) cpu_type=i386 arch=i386;; + x86_64) cpu_type=i386 arch=x86_64;; + ia64) cpu_type=ia64 ;; + m6811|m6812|m68hc12) cpu_type=m68hc11 ;; m680[012346]0) cpu_type=m68k ;; changequote([,])dnl m68008) cpu_type=m68k ;; @@ -139,6 +165,7 @@ changequote([,])dnl a29k-amd-udi) fmt=coff ;; a29k-amd-ebmon) fmt=coff ;; a29k-nyu-sym1) fmt=coff ;; + a29k-*-rtems*) fmt=coff ;; a29k-*-vxworks*) fmt=coff ;; alpha*-*-*vms*) fmt=evax ;; @@ -147,42 +174,57 @@ changequote([,])dnl alpha*-*-osf*) fmt=ecoff ;; alpha*-*-linuxecoff*) fmt=ecoff ;; alpha*-*-linux-gnu*) fmt=elf em=linux ;; - alpha*-*-freebsd*) fmt=elf em=freebsd ;; alpha*-*-netbsd*) fmt=elf em=nbsd ;; arc-*-elf*) fmt=elf bfd_gas=yes ;; arm-*-aout) fmt=aout ;; arm-*-coff | thumb-*-coff) fmt=coff ;; + arm-*-rtems | thumb-*-rtems) fmt=elf ;; arm-*-elf | thumb-*-elf) fmt=elf ;; arm*-*-conix*) fmt=elf ;; arm-*-linux*aout*) fmt=aout em=linux ;; - arm*-*-linux-gnu*) fmt=elf em=linux ;; - arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; + arm*-*-linux-gnu* | arm*-*-uclinux*) + fmt=elf em=linux ;; + arm-*-netbsd*) fmt=aout em=nbsd ;; arm-*-oabi | thumb-*-oabi) fmt=elf ;; arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;; - arm-*-wince) fmt=coff em=wince-pe bfd_gas=yes;; + arm-*-wince) fmt=coff em=wince-pe ;; arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; arm-*-riscix*) fmt=aout em=riscix ;; avr-*-*) fmt=elf bfd_gas=yes ;; + cris-*-*) fmt=multi bfd_gas=yes ;; + d10v-*-*) fmt=elf bfd_gas=yes ;; d30v-*-*) fmt=elf bfd_gas=yes ;; fr30-*-*) fmt=elf bfd_gas=yes ;; + hppa-*-linux-gnu*) case ${cpu} in + hppa*64*) + fmt=elf em=hppalinux64;; + hppa*) + fmt=elf em=linux;; + esac ;; hppa-*-*elf*) fmt=elf em=hppa ;; - hppa-*-linux-gnu*) fmt=elf em=hppa ;; hppa-*-lites*) fmt=elf em=hppa ;; hppa-*-osf*) fmt=som em=hppa ;; hppa-*-rtems*) fmt=elf em=hppa ;; + hppa-*-hpux11*) case ${cpu} in + hppa*64*) + fmt=elf em=hppa64 ;; + hppa*) + fmt=som em=hppa ;; + esac ;; hppa-*-hpux*) fmt=som em=hppa ;; hppa-*-mpeix*) fmt=som em=hppa ;; hppa-*-bsd*) fmt=som em=hppa ;; hppa-*-hiux*) fmt=som em=hppa ;; + h8300-*-rtems*) fmt=coff ;; h8300-*-coff) fmt=coff ;; i370-*-elf* | i370-*-linux*) fmt=elf ;; @@ -197,14 +239,14 @@ changequote([,])dnl i386-*-linux*aout* | i386-*-linuxoldld) 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 ;; i386-*-lynxos*) fmt=coff em=lynx ;; - i386-*-sysv4* | i386-*-solaris* | i386-*-elf) - fmt=elf bfd_gas=yes ;; changequote(,)dnl + i386-*-sysv[45]* | i386-*-solaris* | i386-*-elf) + fmt=elf bfd_gas=yes ;; i386-*-freebsdaout* | i386-*-freebsd[12].* | i386-*-freebsd[12]) fmt=aout em=386bsd ;; changequote([,])dnl - i386-*-freebsd*) fmt=elf bfd_gas=yes ;; i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) fmt=coff ;; i386-*-sco3.2v5*) fmt=elf @@ -216,25 +258,28 @@ changequote([,])dnl i386-*-sco3.2*) fmt=coff ;; i386-*-vsta) fmt=aout ;; i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) - fmt=coff em=go32;; - i386-*-rtemscoff*) fmt=coff ;; + fmt=coff em=go32 bfd_gas=yes + AC_DEFINE(STRICTCOFF, 1, [Using strict COFF?]) + ;; i386-*-rtemself*) fmt=elf ;; - i386-*-rtems*) fmt=elf ;; + i386-*-rtems*) fmt=coff ;; i386-*-gnu*) fmt=elf ;; i386-*-mach*) fmt=aout em=mach bfd_gas=yes ;; i386-*-msdos*) fmt=aout ;; i386-*-moss*) fmt=elf ;; - i386-*-pe) fmt=coff em=pe ;; + i386-*-pe) fmt=coff em=pe bfd_gas=yes ;; i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;; i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;; i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; - i386-*-*nt*) fmt=coff em=pe ;; + i386-*-*nt*) fmt=coff em=pe bfd_gas=yes ;; i386-*-vxworks*) fmt=aout ;; + i386-*-chaos) fmt=elf ;; + i860-stardent-sysv4* | i860-stardent-elf*) + fmt=elf bfd_gas=yes endian=little + AC_MSG_WARN(GAS support for ${generic_target} is preliminary and a work in progress) ;; i960-*-bout) fmt=bout ;; i960-*-coff) fmt=coff em=ic960 ;; - i960-*-rtemscoff*) fmt=coff em=ic960 ;; - i960-*-rtemself*) fmt=elf ;; i960-*-rtems*) fmt=coff em=ic960 ;; i960-*-nindy*) fmt=bout ;; i960-*-vxworks4*) fmt=bout ;; @@ -243,8 +288,14 @@ changequote([,])dnl i960-*-vxworks*) fmt=bout ;; i960-*-elf*) fmt=elf ;; + ia64-*-elf*) fmt=elf ;; + ia64-*-linux-gnu*) fmt=elf em=linux ;; + ia64-*-hpux*) fmt=elf em=hpux ;; + m32r-*-*) fmt=elf bfd_gas=yes ;; + m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)fmt=elf bfd_gas=yes ;; + m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) fmt=aout em=sun3 ;; m68k-motorola-sysv*) fmt=coff em=delta ;; @@ -253,10 +304,7 @@ changequote([,])dnl m68k-*-sysv4*) # must be before -sysv* fmt=elf em=svr4 ;; m68k-*-elf*) fmt=elf ;; - m68k-*-rtemscoff*) fmt=coff ;; - m68k-*-rtemself*) fmt=elf ;; - m68k-*-rtems*) fmt=elf ;; - m68k-*-coff | m68k-*-sysv*) + m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) fmt=coff ;; m68k-*-hpux*) fmt=hp300 em=hp300 ;; m68k-*-linux*aout*) fmt=aout em=linux ;; @@ -290,6 +338,7 @@ changequote([,])dnl mips-*-irix*) fmt=ecoff ;; mips-*-lnews*) fmt=ecoff em=lnews ;; mips-*-riscos*) fmt=ecoff ;; + mips-*-sysv4*MP*) fmt=elf em=tmips ;; mips-*-sysv*) fmt=ecoff ;; mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) fmt=elf ;; @@ -327,12 +376,12 @@ changequote([,])dnl ppc-*-netware*) fmt=elf em=ppcnw ;; ppc-*-vxworks*) fmt=elf ;; + sh-*-linux*) fmt=elf em=linux ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff ;; sh-*-pe*) fmt=coff em=pe bfd_gas=yes;; sh-*-rtemself*) fmt=elf ;; - sh-*-rtemscoff*) fmt=coff ;; - sh-*-rtems*) fmt=coff ;; + sh-*-rtems*) fmt=coff ;; ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; @@ -364,9 +413,13 @@ changequote([,])dnl strongarm-*-coff) fmt=coff ;; strongarm-*-elf) fmt=elf ;; + xscale-*-coff) fmt=coff ;; + xscale-*-elf) fmt=elf ;; tic30-*-*aout*) fmt=aout bfd_gas=yes ;; tic30-*-*coff*) fmt=coff bfd_gas=yes ;; + tic54x-*-* | c54x*-*-*) + fmt=coff bfd_gas=yes need_libm=yes;; tic80-*-*) fmt=coff ;; v850-*-*) fmt=elf bfd_gas=yes ;; @@ -383,6 +436,7 @@ changequote([,])dnl w65-*-*) fmt=coff ;; + *-*-freebsd*) fmt=elf bfd_gas=yes ;; *-*-aout | *-*-scout) fmt=aout ;; *-*-nindy*) @@ -417,11 +471,13 @@ changequote([,])dnl arm-*) bfd_gas=yes ;; # not yet # i386-aout) bfd_gas=preferred ;; + ia64*-*) bfd_gas=yes ;; mips-*) bfd_gas=yes ;; ns32k-*) bfd_gas=yes ;; ppc-*) bfd_gas=yes ;; sparc-*) bfd_gas=yes ;; strongarm-*) bfd_gas=yes ;; + xscale-*) bfd_gas=yes ;; *-elf) bfd_gas=yes ;; *-ecoff) bfd_gas=yes ;; *-som) bfd_gas=yes ;; @@ -484,6 +540,11 @@ changequote([,])dnl fi ;; + i386) + if test $this_target = $target ; then + AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.]) + fi + ;; sparc) if test $this_target = $target ; then AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}", [Default architecture.]) @@ -533,6 +594,9 @@ changequote([,])dnl big) emulation="mipsbelf mipslelf mipself" ;; *) emulation="mipslelf mipsbelf mipself" ;; esac ;; + mips-*-sysv4*MP*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; + # i386-pc-pe-coff != i386-pc-coff. + i386-*-pe-coff) ;; # Uncommenting the next line will turn on support for i386 AOUT # for the default linux configuration # i386-*-linux*-elf) emulation="i386elf i386aout" ;; @@ -540,6 +604,10 @@ changequote([,])dnl i386-*-aout) emulation="i386aout" ;; i386-*-coff) emulation="i386coff" ;; i386-*-elf) emulation="i386elf" ;; + + # Always all formats. The first stated emulation becomes the default. + cris-*-*aout*) emulation="crisaout criself" ;; + cris-*-*) emulation="criself crisaout" ;; esac emulations="$emulations $emulation" @@ -654,12 +722,12 @@ for em in . $emulations ; do fmt=elf file=mipself ;; mipsbecoff | mipslecoff) fmt=ecoff file=mipsecoff ;; - i386aout) - fmt=aout file=i386aout ;; - i386coff) - fmt=coff file=i386coff ;; - i386elf) - fmt=elf file=i386elf ;; + *coff) + fmt=coff file=$em ;; + *aout) + fmt=aout file=$em ;; + *elf) + fmt=elf file=$em ;; esac formats="$formats $fmt" emfiles="$emfiles e-$file.o" @@ -787,6 +855,14 @@ AC_CHECK_FUNCS(unlink remove, break) # Some systems don't have sbrk(). AC_CHECK_FUNCS(sbrk) +# do we need the math library? +case "${need_libm}" in +yes) + AC_CHECK_LIBM + AC_SUBST(LIBM) + ;; +esac + # Some non-ANSI preprocessors botch requoting inside strings. That's bad # enough, but on some of those systems, the assert macro relies on requoting # working properly! diff --git a/contrib/binutils/gas/debug.c b/contrib/binutils/gas/debug.c index e99f23f..e9f6f09 100644 --- a/contrib/binutils/gas/debug.c +++ b/contrib/binutils/gas/debug.c @@ -62,8 +62,7 @@ dmp_frag (fp, indent) printf ("%srs_fill(%d)\n", indent, fp->fr_offset); printf ("%s", indent); var_chars (fp, fp->fr_var + fp->fr_fix); - printf ("%s\t repeated %d times,", - indent, fp->fr_offset); + printf ("%s\t repeated %d times,", indent, fp->fr_offset); printf (" fixed length if # chars == 0)\n"); break; case rs_org: diff --git a/contrib/binutils/gas/dep-in.sed b/contrib/binutils/gas/dep-in.sed index 8771f0f..fd1be2c 100644 --- a/contrib/binutils/gas/dep-in.sed +++ b/contrib/binutils/gas/dep-in.sed @@ -2,37 +2,41 @@ /\\$/N /\\$/b loop -s! ../config.h!!g -s! ../../bfd/bfd.h!!g -s! ../itbl-parse.h!!g +s! \.\./! !g s!@INCDIR@!$(INCDIR)!g s!@BFDDIR@!$(BFDDIR)!g s!@SRCDIR@/config!$(srcdir)/config!g -s!@SRCDIR@/../opcodes!$(srcdir)/../opcodes!g +s!@SRCDIR@/\.\./opcodes!$(srcdir)/../opcodes!g s!@SRCDIR@/!!g -s! config.h!!g -s! as.h!!g -s! asintl.h!!g -s! targ-env.h!!g -s! obj-format.h!!g -s! targ-cpu.h!!g -s! flonum.h!!g -s! expr.h!!g -s! write.h!!g -s! frags.h!!g -s! hash.h!!g -s! read.h!!g -s! symbols.h!!g -s! tc.h!!g -s! obj.h!!g -s! listing.h!!g -s! bignum.h!!g -s! bit_fix.h!!g -s! itbl-cpu.h!!g -s! \$(srcdir)/config/te-generic.h!!g -s! \$(INCDIR)/libiberty.h!!g -s! \$(INCDIR)/ansidecl.h!!g -s! \$(INCDIR)/fopen-same.h!!g +s! \$(INCDIR)/ansidecl\.h!!g +s! \$(INCDIR)/fopen-same\.h!!g +s! \$(srcdir)/config/te-generic\.h!!g +s! \.\./bfd/bfd\.h!!g +s! itbl-cpu\.h!!g +s! itbl-parse\.h!!g + +s! \$(INCDIR)/bin-bugs\.h!!g +s! \$(INCDIR)/libiberty\.h!!g +s! \$(INCDIR)/progress\.h!!g +s! obj-format\.h!!g +s! targ-cpu\.h!!g +s! targ-env\.h!!g +s! as\.h!!g +s! asintl\.h!!g +s! bignum\.h!!g +s! bit_fix\.h!!g +s! config\.h!!g +s! emul\.h!!g +s! expr\.h!!g +s! flonum\.h!!g +s! frags\.h!!g +s! hash\.h!!g +s! listing\.h!!g +s! obj\.h!!g +s! read\.h!!g +s! symbols\.h!!g +s! tc\.h!!g +s! write\.h!!g s/\\\n */ /g diff --git a/contrib/binutils/gas/depend.c b/contrib/binutils/gas/depend.c index f17c7c8..05a9708 100644 --- a/contrib/binutils/gas/depend.c +++ b/contrib/binutils/gas/depend.c @@ -23,8 +23,7 @@ /* The file to write to, or NULL if no dependencies being kept. */ static char *dep_file = NULL; -struct dependency -{ +struct dependency { char *file; struct dependency *next; }; @@ -40,9 +39,7 @@ static void wrap_output PARAMS ((FILE *, char *, int)); /* Number of columns allowable. */ #define MAX_COLUMNS 72 - - /* Start saving dependencies, to be written to FILENAME. If this is never called, then dependency tracking is simply skipped. */ @@ -66,7 +63,7 @@ register_dependency (filename) for (dep = dep_chain; dep != NULL; dep = dep->next) { - if (! strcmp (filename, dep->file)) + if (!strcmp (filename, dep->file)) return; } @@ -105,7 +102,7 @@ quote_string_for_make (file, src) the end of a file name; and backslashes in other contexts should not be doubled. */ char *q; - for (q = p - 1; src < q && q[-1] == '\\'; q--) + for (q = p - 1; src < q && q[-1] == '\\'; q--) { if (file) putc ('\\', file); @@ -118,7 +115,7 @@ quote_string_for_make (file, src) putc ('\\', file); i++; goto ordinary_char; - + case '$': if (file) putc (c, file); @@ -154,7 +151,11 @@ wrap_output (f, string, spacer) if (len == 0) return; - if (column && MAX_COLUMNS - 1 /*spacer*/ - 2 /*` \'*/ < column + len) + if (column + && (MAX_COLUMNS + - 1 /* spacer */ + - 2 /* ` \' */ + < column + len)) { fprintf (f, " \\\n "); column = 0; diff --git a/contrib/binutils/gas/doc/Makefile.am b/contrib/binutils/gas/doc/Makefile.am index c6eaf77..60761a4 100644 --- a/contrib/binutils/gas/doc/Makefile.am +++ b/contrib/binutils/gas/doc/Makefile.am @@ -17,6 +17,7 @@ asconfig.texi: $(CONFIG).texi CPU_DOCS = \ c-a29k.texi \ + c-arc.texi \ c-arm.texi \ c-d10v.texi \ c-h8300.texi \ @@ -24,14 +25,17 @@ CPU_DOCS = \ c-hppa.texi \ c-i370.texi \ c-i386.texi \ + c-i860.texi \ c-i960.texi \ c-m32r.texi \ + c-m68hc11.texi \ c-m68k.texi \ c-mips.texi \ c-ns32k.texi \ c-pj.texi \ c-sh.texi \ c-sparc.texi \ + c-tic54x.texi \ c-vax.texi \ c-v850.texi \ c-z8k.texi diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in index 0be6179..5f9b258 100644 --- a/contrib/binutils/gas/doc/Makefile.in +++ b/contrib/binutils/gas/doc/Makefile.in @@ -69,9 +69,13 @@ BFDLIB = @BFDLIB@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ EXEEXT = @EXEEXT@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ GDBINIT = @GDBINIT@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ @@ -83,6 +87,7 @@ INTLDEPS = @INTLDEPS@ INTLLIBS = @INTLLIBS@ INTLOBJS = @INTLOBJS@ LEX = @LEX@ +LIBM = @LIBM@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ MAINT = @MAINT@ @@ -90,14 +95,17 @@ MAKEINFO = @MAKEINFO@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ OPCODES_LIB = @OPCODES_LIB@ PACKAGE = @PACKAGE@ POFILES = @POFILES@ POSUB = @POSUB@ RANLIB = @RANLIB@ +STRIP = @STRIP@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ YACC = @YACC@ atof = @atof@ cgen_cpu_prefix = @cgen_cpu_prefix@ @@ -119,6 +127,7 @@ info_TEXINFOS = as.texinfo gasp.texi CPU_DOCS = \ c-a29k.texi \ + c-arc.texi \ c-arm.texi \ c-d10v.texi \ c-h8300.texi \ @@ -126,14 +135,17 @@ CPU_DOCS = \ c-hppa.texi \ c-i370.texi \ c-i386.texi \ + c-i860.texi \ c-i960.texi \ c-m32r.texi \ + c-m68hc11.texi \ c-m68k.texi \ c-mips.texi \ c-ns32k.texi \ c-pj.texi \ c-sh.texi \ c-sparc.texi \ + c-tic54x.texi \ c-vax.texi \ c-v850.texi \ c-z8k.texi @@ -163,7 +175,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best all: all-redirect .SUFFIXES: diff --git a/contrib/binutils/gas/doc/all.texi b/contrib/binutils/gas/doc/all.texi index d1058fb..22742b4 100644 --- a/contrib/binutils/gas/doc/all.texi +++ b/contrib/binutils/gas/doc/all.texi @@ -35,14 +35,17 @@ @set HPPA @set I370 @set I80386 +@set I860 @set I960 @set M32R +@set M68HC11 @set M680X0 @set MCORE @set MIPS @set PJ @set SH @set SPARC +@set C54X @set V850 @set VAX @set VXWORKS diff --git a/contrib/binutils/gas/doc/as.1 b/contrib/binutils/gas/doc/as.1 index 5fc517c..0e9d0ce 100644 --- a/contrib/binutils/gas/doc/as.1 +++ b/contrib/binutils/gas/doc/as.1 @@ -1,6 +1,6 @@ -.\" Copyright (c) 1991, 1992, 1996, 1997, 1998 Free Software Foundation +.\" Copyright (c) 1991, 1992, 1996, 1997, 1998, 2000 Free Software Foundation .\" See section COPYING for conditions for redistribution -.TH as 1 "29 March 1996" "cygnus support" "GNU Development Tools" +.TH as 1 "29 March 1996" "Free Software Foundation" "GNU Development Tools" .SH NAME GNU as \- the portable GNU assembler. @@ -290,19 +290,377 @@ Using as: The GNU Assembler\c .BR ld "(" 1 ")." .SH COPYING -Copyright (c) 1991, 1992 Free Software Foundation, Inc. +Copyright (c) 1991, 1992, 2000 Free Software Foundation, Inc. .PP -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. -.PP -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided that the -entire resulting derived work is distributed under the terms of a -permission notice identical to this one. -.PP -Permission is granted to copy and distribute translations of this -manual into another language, under the above conditions for modified -versions, except that this permission notice may be included in -translations approved by the Free Software Foundation instead of in -the original English. +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/. + +\" 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. diff --git a/contrib/binutils/gas/doc/as.texinfo b/contrib/binutils/gas/doc/as.texinfo index 4ceb104..fb80ca5 100644 --- a/contrib/binutils/gas/doc/as.texinfo +++ b/contrib/binutils/gas/doc/as.texinfo @@ -1,5 +1,5 @@ \input texinfo @c -*-Texinfo-*- -@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000 +@c Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 2000, 2001 @c Free Software Foundation, Inc. @c UPDATE!! On future updates-- @c (1) check for new machine-dep cmdline options in @@ -87,11 +87,14 @@ END-INFO-DIR-ENTRY @ifinfo This file documents the GNU Assembler "@value{AS}". -Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. +Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + 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 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 "GNU Free Documentation License". @ignore Permission is granted to process this file through Tex and print the @@ -100,13 +103,6 @@ notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore -Permission is granted to copy and distribute modified versions of this manual -under the conditions for verbatim copying, provided that the entire resulting -derived work is distributed under the terms of a permission notice identical to -this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end ifinfo @titlepage @@ -142,19 +138,15 @@ done. @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. +Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. -Permission is granted to copy and distribute modified versions of this manual -under the conditions for verbatim copying, provided that the entire resulting -derived work is distributed under the terms of a permission notice identical to -this one. + 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 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 "GNU Free Documentation License". -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end titlepage @ifinfo @@ -167,6 +159,11 @@ This file is a user guide to the @sc{gnu} assembler @code{@value{AS}} version This version of the file describes @code{@value{AS}} configured to generate code for @value{TARGET} architectures. @end ifclear + +This document is distributed under the terms of the GNU Free +Documentation License. A copy of the license is included in the +section entitled "GNU Free Documentation License". + @menu * Overview:: Overview * Invoking:: Command-Line Options @@ -178,6 +175,7 @@ code for @value{TARGET} architectures. * Machine Dependencies:: Machine Dependent Features * Reporting Bugs:: Reporting Bugs * Acknowledgements:: Who Did What +* GNU Free Documentation License:: GNU Free Documentation License * Index:: Index @end menu @end ifinfo @@ -205,12 +203,13 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details, [ -f ] [ --gstabs ] [ --gdwarf2 ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ] [ --keep-locals ] [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ] [ -version ] [ --version ] [ -W ] [ --warn ] [ --fatal-warnings ] - [ -w ] [ -x ] [ -Z ] + [ -w ] [ -x ] [ -Z ] [ --target-help ] @ifset A29K @c am29k has no machine-dependent assembler options @end ifset @ifset ARC - [ -mbig-endian | -mlittle-endian ] + [ -marc[5|6|7|8] ] + [ -EB | -EL ] @end ifset @ifset ARM [ -m[arm]1 | -m[arm]2 | -m[arm]250 | -m[arm]3 | -m[arm]6 | -m[arm]60 | @@ -219,7 +218,7 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details, -m[arm]810 | -m[arm]9 | -m[arm]920 | -m[arm]920t | -m[arm]9tdmi | -mstrongarm | -mstrongarm110 | -mstrongarm1100 ] [ -m[arm]v2 | -m[arm]v2a | -m[arm]v3 | -m[arm]v3m | -m[arm]v4 | -m[arm]v4t | - -m[arm]v5 | -[arm]v5t ] + -m[arm]v5 | -[arm]v5t | -[arm]v5te ] [ -mthumb | -mall ] [ -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu ] [ -EB | -EL ] @@ -249,6 +248,10 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details, -Av8plus | -Av8plusa | -Av9 | -Av9a ] [ -xarch=v8plus | -xarch=v8plusa ] [ -bump ] [ -32 | -64 ] @end ifset +@ifset TIC54X + [ -mcpu=54[123589] | -mcpu=54[56]lp ] [ -mfar-mode | -mf ] + [ -merrors-to-file | -me ] +@end ifset @ifset Z8000 @c Z8000 has no machine-dependent assembler options @end ifset @@ -257,15 +260,26 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details, [ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC ] [ -b ] [ -no-relax ] @end ifset +@ifset M32R + [ --m32rx | --[no-]warn-explicit-parallel-conflicts | --W[n]p ] +@end ifset @ifset M680X0 [ -l ] [ -m68000 | -m68010 | -m68020 | ... ] @end ifset @ifset MCORE [ -jsri2bsr ] [ -sifilter ] [ -relax ] + [ -mcpu=[210|340] ] +@end ifset +@ifset M68HC11 + [ -m68hc11 | -m68hc12 ] + [ --force-long-branchs ] [ --short-branchs ] [ --strict-direct-mode ] + [ --print-insn-syntax ] [ --print-opcodes ] [ --generate-example ] @end ifset @ifset MIPS [ -nocpp ] [ -EL ] [ -EB ] [ -G @var{num} ] [ -mcpu=@var{CPU} ] - [ -mips1 ] [ -mips2 ] [ -mips3 ] [ -m4650 ] [ -no-m4650 ] + [ -mips1 ] [ -mips2 ] [ -mips3 ] [ -mips4 ] [ -mips5 ] + [ -mips32 ] [ -mips64 ] + [ -m4650 ] [ -no-m4650 ] [ --trap ] [ --break ] [ --emulation=@var{name} ] @end ifset @@ -325,11 +339,15 @@ may help debugging assembler code, if the debugger can handle it. @item --gdwarf2 Generate DWARF2 debugging information for each assembler line. This -may help debugging assembler code, if the debugger can handle it. +may help debugging assembler code, if the debugger can handle it. Note - this +option is only supported by some targets, not all of them. @item --help Print a summary of the command line options and exit. +@item --target-help +Print a summary of all target specific options and exit. + @item -I @var{dir} Add directory @var{dir} to the search list for @code{.include} directives. @@ -399,17 +417,10 @@ The following options are available when @value{AS} is configured for an ARC processor. @table @code - -@cindex ARC endianness -@cindex endianness, ARC -@cindex big endian output, ARC -@item -mbig-endian -Generate ``big endian'' format output. - -@cindex little endian output, ARC -@item -mlittle-endian -Generate ``little endian'' format output. - +@item -marc[5|6|7|8] +This option selects the core processor variant. +@item -EB | -EL +Select either big-endian (-EB) or little-endian (-EL) output. @end table @end ifset @@ -425,7 +436,7 @@ Specify which ARM architecture variant is used by the target. @item -mthumb | -mall Enable or disable Thumb only instruction decoding. @item -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu -Select which Floating Point architcture is the target. +Select which Floating Point architecture is the target. @item -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi Select which procedure calling convention is in use. @item -EB | -EL @@ -486,6 +497,26 @@ error if necessary. @end table @end ifset +@ifset M32R +The following options are available when @value{AS} is configured for the +Mitsubishi M32R series. + +@table @code + +@item --m32rx +Specify which processor in the M32R family is the target. The default +is normally the M32R, but this option changes it to the M32RX. + +@item --warn-explicit-parallel-conflicts or --Wp +Produce warning messages when questionable parallel constructs are +encountered. + +@item --no-warn-explicit-parallel-conflicts or --Wnp +Do not produce warning messages when questionable parallel constructs are +encountered. + +@end table +@end ifset @ifset M680X0 The following options are available when @value{AS} is configured for the @@ -534,6 +565,41 @@ Generate ``little endian'' format output. @end table @end ifset +@ifset M68HC11 +The following options are available when @value{AS} is configured for the +Motorola 68HC11 or 68HC12 series. + +@table @code + +@item -m68hc11 | -m68hc12 +Specify what processor is the target. The default is +defined by the configuration option when building the assembler. + +@item --force-long-branchs +Relative branches are turned into absolute ones. This concerns +conditional branches, unconditional branches and branches to a +sub routine. + +@item -S | --short-branchs +Do not turn relative branchs into absolute ones +when the offset is out of range. + +@item --strict-direct-mode +Do not turn the direct addressing mode into extended addressing mode +when the instruction does not support direct addressing mode. + +@item --print-insn-syntax +Print the syntax of instruction in case of error. + +@item --print-opcodes +print the list of instructions with syntax and then exit. + +@item --generate-example +print an example of instruction for each possible instruction and then exit. +This option is only useful for testing @code{@value{AS}}. + +@end table +@end ifset @ifset SPARC The following options are available when @code{@value{AS}} is configured @@ -559,6 +625,22 @@ Warn when the assembler switches to another architecture. @end table @end ifset +@ifset TIC54X +The following options are available when @value{AS} is configured for the 'c54x +architecture. + +@table @code +@item -mfar-mode +Enable extended addressing mode. All addresses and relocations will assume +extended addressing (usually 23 bits). +@item -mcpu=@var{CPU_VERSION} +Sets the CPU version being compiled for. +@item -merrors-to-file @var{FILENAME} +Redirect error output to a file, for broken systems which don't support such +behaviour in the shell. +@end table +@end ifset + @ifset MIPS The following options are available when @value{AS} is configured for a MIPS processor. @@ -583,10 +665,15 @@ Generate ``little endian'' format output. @item -mips1 @itemx -mips2 @itemx -mips3 +@itemx -mips4 +@itemx -mips32 Generate code for a particular MIPS Instruction Set Architecture level. @samp{-mips1} corresponds to the @sc{r2000} and @sc{r3000} processors, @samp{-mips2} to the @sc{r6000} processor, and @samp{-mips3} to the @sc{r4000} processor. +@samp{-mips5}, @samp{-mips32}, and @samp{-mips64} correspond +to generic @sc{MIPS V}, @sc{MIPS32}, and @sc{MIPS64} ISA +processors, respectively. @item -m4650 @itemx -no-m4650 @@ -596,8 +683,9 @@ instructions around accesses to the @samp{HI} and @samp{LO} registers. @samp{-no-m4650} turns off this option. @item -mcpu=@var{CPU} -Generate code for a particular MIPS cpu. This has little effect on the -assembler, but it is passed by @code{@value{GCC}}. +Generate code for a particular MIPS cpu. It is exactly equivalent to +@samp{-m@var{cpu}}, except that there are more value of @var{cpu} +understood. @cindex emulation @item --emulation=@var{name} @@ -654,11 +742,20 @@ The command line option @samp{-nojsri2bsr} can be used to disable it. @item -sifilter @itemx -nosifilter Enable or disable the silicon filter behaviour. By default this is disabled. -The default can be overidden by the @samp{-sifilter} command line option. +The default can be overridden by the @samp{-sifilter} command line option. @item -relax Alter jump instructions for long displacements. +@item -mcpu=[210|340] +Select the cpu type on the target hardware. This controls which instructions +can be assembled. + +@item -EB +Assemble for a big endian target. + +@item -EL +Assemble for a little endian target. @end table @end ifset @@ -933,7 +1030,7 @@ information for the debugger. @node Errors @section Error and Warning Messages -@cindex error messsages +@cindex error messages @cindex warning messages @cindex messages from assembler @code{@value{AS}} may write warnings and error messages to the standard error @@ -1564,6 +1661,9 @@ is considered a comment and is ignored. The line comment character is @ifset HPPA @samp{;} for the HPPA; @end ifset +@ifset I80386 +@samp{#} on the i386 and x86-64; +@end ifset @ifset I960 @samp{#} on the i960; @end ifset @@ -1582,6 +1682,9 @@ is considered a comment and is ignored. The line comment character is @ifset M680X0 @samp{|} on the 680x0; @end ifset +@ifset M68HC11 +@samp{#} on the 68HC11 and 68HC12; +@end ifset @ifset VAX @samp{#} on the Vax; @end ifset @@ -1592,7 +1695,7 @@ is considered a comment and is ignored. The line comment character is @samp{#} on the V850; @end ifset see @ref{Machine Dependencies}. @refill -@c FIXME What about i386, m88k, i860? +@c FIXME What about m88k, i860? @ifset GENERIC On some machines there are two different line comment characters. One @@ -2297,7 +2400,7 @@ in the data section. @cindex bss section @item bss section This section contains zeroed bytes when your program begins running. It -is used to hold unitialized variables or common storage. The length of +is used to hold uninitialized variables or common storage. The length of each partial program's bss section is important, but because it starts out containing zeroed bytes there is no need to store explicit zero bytes in the object file. The bss section was invented to eliminate @@ -3128,11 +3231,19 @@ Some machine configurations provide additional directives. * Float:: @code{.float @var{flonums}} * Func:: @code{.func} * Global:: @code{.global @var{symbol}}, @code{.globl @var{symbol}} +@ifset ELF +* Hidden:: @code{.hidden @var{names}} +@end ifset + * hword:: @code{.hword @var{expressions}} * Ident:: @code{.ident} * If:: @code{.if @var{absolute expression}} * Include:: @code{.include "@var{file}"} * Int:: @code{.int @var{expressions}} +@ifset ELF +* Internal:: @code{.internal @var{names}} +@end ifset + * Irp:: @code{.irp @var{symbol},@var{values}}@dots{} * Irpc:: @code{.irpc @var{symbol},@var{values}}@dots{} * Lcomm:: @code{.lcomm @var{symbol} , @var{length}} @@ -3151,14 +3262,26 @@ Some machine configurations provide additional directives. * Macro:: @code{.macro @var{name} @var{args}}@dots{} * MRI:: @code{.mri @var{val}} - * Nolist:: @code{.nolist} * Octa:: @code{.octa @var{bignums}} * Org:: @code{.org @var{new-lc} , @var{fill}} * P2align:: @code{.p2align @var{abs-expr} , @var{abs-expr}} +@ifset ELF +* PopSection:: @code{.popsection} +* Previous:: @code{.previous} +@end ifset + * Print:: @code{.print @var{string}} +@ifset ELF +* Protected:: @code{.protected @var{names}} +@end ifset + * Psize:: @code{.psize @var{lines}, @var{columns}} * Purgem:: @code{.purgem @var{name}} +@ifset ELF +* PushSection:: @code{.pushsection @var{name}} +@end ifset + * Quad:: @code{.quad @var{bignums}} * Rept:: @code{.rept @var{count}} * Sbttl:: @code{.sbttl "@var{subheading}"} @@ -3170,10 +3293,7 @@ Some machine configurations provide additional directives. * Set:: @code{.set @var{symbol}, @var{expression}} * Short:: @code{.short @var{expressions}} * Single:: @code{.single @var{flonums}} -@ifset COFF -* Size:: @code{.size} -@end ifset - +* Size:: @code{.size [@var{name} , @var{expression}]} * Skip:: @code{.skip @var{size} , @var{fill}} * Sleb128:: @code{.sleb128 @var{expressions}} * Space:: @code{.space @var{size} , @var{fill}} @@ -3184,23 +3304,29 @@ Some machine configurations provide additional directives. * String:: @code{.string "@var{str}"} * Struct:: @code{.struct @var{expression}} @ifset ELF +* SubSection:: @code{.subsection} * Symver:: @code{.symver @var{name},@var{name2@@nodename}} @end ifset + @ifset COFF * Tag:: @code{.tag @var{structname}} @end ifset * Text:: @code{.text @var{subsection}} * Title:: @code{.title "@var{heading}"} +* Type:: @code{.type <@var{int} | @var{name} , @var{type description}>} +* Uleb128:: @code{.uleb128 @var{expressions}} @ifset COFF -* Type:: @code{.type @var{int}} * Val:: @code{.val @var{addr}} @end ifset + @ifset ELF -* Visibility:: @code{.internal @var{name}, .hidden @var{name}, .protected @var{name}} +* Version:: @code{.version "@var{string}"} +* VTableEntry:: @code{.vtable_entry @var{table}, @var{offset}} +* VTableInherit:: @code{.vtable_inherit @var{child}, @var{parent}} +* Weak:: @code{.weak @var{names}} @end ifset -* Uleb128:: @code{.uleb128 @var{expressions}} * Word:: @code{.word @var{expressions}} * Deprecated:: Deprecated Directives @end menu @@ -3658,6 +3784,22 @@ partial programs. You may need the HPPA-only @code{.EXPORT} directive as well. @xref{HPPA Directives,, HPPA Assembler Directives}. @end ifset +@ifset ELF +@node Hidden +@section @code{.hidden @var{names}} + +@cindex @code{.hidden} directive +@cindex Visibility +This one of the ELF visibility directives. The other two are +@code{.internal} (@pxref{Internal,,@code{.internal}}) and +@code{.protected} (@pxref{Protected,,@code{.protected}}). + +This directive overrides the named symbols default visibility (which is set by +their binding: local, global or weak). The directive sets the visibility to +@code{hidden} which means that the symbols are not visible to other components. +Such symbols are always considered to be @code{protected} as well. +@end ifset + @node hword @section @code{.hword @var{expressions}} @@ -3800,6 +3942,23 @@ integers. On the H8/300H and the Hitachi SH, however, @code{.int} emits @end ifset @end ifclear +@ifset ELF +@node Internal +@section @code{.internal @var{names}} + +@cindex @code{.internal} directive +@cindex Visibility +This one of the ELF visibility directives. The other two are +@code{.hidden} (@pxref{Hidden,,@code{.hidden}}) and +@code{.protected} (@pxref{Protected,,@code{.protected}}). + +This directive overrides the named symbols default visibility (which is set by +their binding: local, global or weak). The directive sets the visibility to +@code{internal} which means that the symbols are considered to be @code{hidden} +(ie not visible to other components), and that some extra, processor specific +processing must also be performed upon the symbols as well. +@end ifset + @node Irp @section @code{.irp @var{symbol},@var{values}}@dots{} @@ -4227,6 +4386,42 @@ filled in with the value 0x368d (the exact placement of the bytes depends upon the endianness of the processor). If it skips 1 or 3 bytes, the fill value is undefined. +@ifset ELF +@node Previous +@section @code{.previous} + +@cindex @code{.previous} directive +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.section} (@pxref{Section}), @code{.subsection} (@pxref{SubSection}), +@code{.pushsection} (@pxref{PushSection}), and @code{.popsection} +(@pxref{PopSection}). + +This directive swaps the current section (and subsection) with most recently +referenced section (and subsection) prior to this one. Multiple +@code{.previous} directives in a row will flip between two sections (and their +subsections). + +In terms of the section stack, this directive swaps the current section with +the top section on the section stack. +@end ifset + +@ifset ELF +@node PopSection +@section @code{.popsection} + +@cindex @code{.popsection} directive +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.section} (@pxref{Section}), @code{.subsection} (@pxref{SubSection}), +@code{.pushsection} (@pxref{PushSection}), and @code{.previous} +(@pxref{Previous}). + +This directive replaces the current section (and subsection) with the top +section (and subsection) on the section stack. This section is popped off the +stack. +@end ifset + @node Print @section @code{.print @var{string}} @@ -4234,6 +4429,23 @@ undefined. @code{@value{AS}} will print @var{string} on the standard output during assembly. You must put @var{string} in double quotes. +@ifset ELF +@node Protected +@section @code{.protected @var{names}} + +@cindex @code{.protected} directive +@cindex Visibility +This one of the ELF visibility directives. The other two are +@code{.hidden} (@pxref{Hidden}) and @code{.internal} (@pxref{Internal}). + +This directive overrides the named symbols default visibility (which is set by +their binding: local, global or weak). The directive sets the visibility to +@code{protected} which means that any references to the symbols from within the +components that defines them must be resolved to the definition in that +component, even if a definition in another component would normally preempt +this. +@end ifset + @node Psize @section @code{.psize @var{lines} , @var{columns}} @@ -4261,6 +4473,22 @@ those explicitly specified with @code{.eject}. Undefine the macro @var{name}, so that later uses of the string will not be expanded. @xref{Macro}. +@ifset ELF +@node PushSection +@section @code{.pushsection @var{name} , @var{subsection}} + +@cindex @code{.pushsection} directive +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.section} (@pxref{Section}), @code{.subsection} (@pxref{SubSection}), +@code{.popsection} (@pxref{PopSection}), and @code{.previous} +(@pxref{Previous}). + +This directive is a synonym for @code{.section}. It pushes the current section +(and subsection) onto the top of the section stack, and then replaces the +current section and subsection with @code{name} and @code{subsection}. +@end ifset + @node Quad @section @code{.quad @var{bignums}} @@ -4338,7 +4566,7 @@ accepts this directive but ignores it. @end ifset @node Section -@section @code{.section @var{name}} +@section @code{.section @var{name}} (COFF version) @cindex @code{section} directive @cindex named section @@ -4349,9 +4577,9 @@ This directive is only supported for targets that actually support arbitrarily named sections; on @code{a.out} targets, for example, it is not accepted, even with a standard @code{a.out} section name. -@ifset COFF For COFF targets, the @code{.section} directive is used in one of the following ways: + @smallexample .section @var{name}[, "@var{flags}"] .section @var{name}[, @var{subsegment}] @@ -4382,15 +4610,28 @@ loaded and writable. If the optional argument to the @code{.section} directive is not quoted, it is taken as a subsegment number (@pxref{Sub-Sections}). -@end ifset + +@section @code{.section @var{name}} (ELF version) + +@cindex @code{section} directive +@cindex named section @ifset ELF +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.subsection} (@pxref{SubSection}), @code{.pushsection} +(@pxref{PushSection}), @code{.popsection} (@pxref{PopSection}), and +@code{.previous} (@pxref{Previous}). +@end ifset + For ELF targets, the @code{.section} directive is used like this: + @smallexample -.section @var{name}[, "@var{flags}"[, @@@var{type}]] +.section @var{name} [, "@var{flags}"[, @@@var{type}]] @end smallexample + The optional @var{flags} argument is a quoted string which may contain any -combintion of the following characters: +combination of the following characters: @table @code @item a section is allocatable @@ -4415,9 +4656,11 @@ executable. The section will contain data. For ELF targets, the assembler supports another type of @code{.section} directive for compatibility with the Solaris assembler: + @smallexample .section "@var{name}"[, @var{flags}...] @end smallexample + Note that the section name is quoted. There may be a sequence of comma separated flags: @table @code @@ -4428,7 +4671,11 @@ section is writable @item #execinstr section is executable @end table -@end ifset + +This directive replaces the current section and subsection. The replaced +section and subsection are pushed onto the section stack. See the contents of +the gas testsuite directory @code{gas/testsuite/gas/elf} for some examples of +how this directive and the other section stack directives work. @node Set @section @code{.set @var{symbol}, @var{expression}} @@ -4489,21 +4736,27 @@ numbers in @sc{ieee} format. @end ifset @end ifclear -@ifset COFF @node Size -@section @code{.size} +@section @code{.size} (COFF version) @cindex @code{size} directive This directive is generated by compilers to include auxiliary debugging information in the symbol table. It is only permitted inside @code{.def}/@code{.endef} pairs. -@ifset BOUT +@ifset BOUT @samp{.size} is only meaningful when generating COFF format output; when @code{@value{AS}} is generating @code{b.out}, it accepts this directive but ignores it. @end ifset -@end ifset + +@section @code{.size @var{name} , @var{expression}} (ELF version) +@cindex @code{size} directive + +This directive is used to set the size associated with a symbol @var{name}. +The size in bytes is computed from @var{expression} which can make use of label +arithmetic. This directive is typically used to set the size of function +symbols. @node Sleb128 @section @code{.sleb128 @var{expressions}} @@ -4658,6 +4911,22 @@ use a @code{.section} directive of some sort to change to some other section before further assembly. @ifset ELF +@node SubSection +@section @code{.subsection @var{name}} + +@cindex @code{.subsection} directive +@cindex Section Stack +This is one of the ELF section stack manipulation directives. The others are +@code{.section} (@pxref{Section}), @code{.pushsection} (@pxref{PushSection}), +@code{.popsection} (@pxref{PopSection}), and @code{.previous} +(@pxref{Previous}). + +This directive replaces the current subsection with @code{name}. The current +section is not changed. The replaced subsection is put onto the section stack +in place of the then current top of stack subsection. +@end ifset + +@ifset ELF @node Symver @section @code{.symver} @cindex @code{symver} directive @@ -4670,12 +4939,12 @@ There are cases where it may make sense to use this in objects to be bound into an application itself so as to override a versioned symbol from a shared library. -For ELF targets, the @code{.symver} directive is used like this: +For ELF targets, the @code{.symver} directive can be used like this: @smallexample .symver @var{name}, @var{name2@@nodename} @end smallexample -In this case, the symbol @var{name} must exist and be defined within the file -being assembled. The @code{.versym} directive effectively creates a symbol +If the symbol @var{name} is defined within the file +being assembled, the @code{.symver} directive effectively creates a symbol alias with the name @var{name2@@nodename}, and in fact the main reason that we just don't try and create a regular alias is that the @var{@@} character isn't permitted in symbol names. The @var{name2} part of the name is the actual name @@ -4688,6 +4957,29 @@ the name of a node specified in the version script supplied to the linker when building a shared library. If you are attempting to override a versioned symbol from a shared library, then @var{nodename} should correspond to the nodename of the symbol you are trying to override. + +If the symbol @var{name} is not defined within the file being assembled, all +references to @var{name} will be changed to @var{name2@@nodename}. If no +reference to @var{name} is made, @var{name2@@nodename} will be removed from the +symbol table. + +Another usage of the @code{.symver} directive is: +@smallexample +.symver @var{name}, @var{name2@@@@nodename} +@end smallexample +In this case, the symbol @var{name} must exist and be defined within +the file being assembled. It is similar to @var{name2@@nodename}. The +difference is @var{name2@@@@nodename} will also be used to resolve +references to @var{name2} by the linker. + +The third usage of the @code{.symver} directive is: +@smallexample +.symver @var{name}, @var{name2@@@@@@nodename} +@end smallexample +When @var{name} is not defined within the +file being assembled, it is treated as @var{name2@@nodename}. When +@var{name} is defined within the file being assembled, the symbol +name, @var{name}, will be changed to @var{name2@@@@nodename}. @end ifset @ifset COFF @@ -4729,22 +5021,55 @@ source file name and pagenumber) when generating assembly listings. This directive affects subsequent pages, as well as the current page if it appears within ten lines of the top of a page. -@ifset COFF @node Type -@section @code{.type @var{int}} +@section @code{.type @var{int}} (COFF version) @cindex COFF symbol type @cindex symbol type, COFF @cindex @code{type} directive This directive, permitted only within @code{.def}/@code{.endef} pairs, records the integer @var{int} as the type attribute of a symbol table entry. -@ifset BOUT +@ifset BOUT @samp{.type} is associated only with COFF format output; when @code{@value{AS}} is configured for @code{b.out} output, it accepts this directive but ignores it. @end ifset -@end ifset + +@section @code{.type @var{name} , @var{type description}} (ELF version) + +@cindex ELF symbol type +@cindex symbol type, ELF +@cindex @code{type} directive +This directive is used to set the type of symbol @var{name} to be either a +function symbol or an object symbol. There are five different syntaxes +supported for the @var{type description} field, in order to provide +compatibility with various other assemblers. The syntaxes supported are: + +@smallexample + .type ,#function + .type ,#object + + .type ,@@function + .type ,@@object + + .type ,%function + .type ,%object + + .type ,"function" + .type ,"object" + + .type STT_FUNCTION + .type STT_OBJECT +@end smallexample + +@node Uleb128 +@section @code{.uleb128 @var{expressions}} + +@cindex @code{uleb128} directive +@var{uleb128} stands for ``unsigned little endian base 128.'' This is a +compact, variable length representation of numbers used by the DWARF +symbolic debugging format. @xref{Sleb128,@code{.sleb128}}. @ifset COFF @node Val @@ -4763,46 +5088,40 @@ configured for @code{b.out}, it accepts this directive but ignores it. @end ifset @end ifset -@node Uleb128 -@section @code{.uleb128 @var{expressions}} - -@cindex @code{uleb128} directive -@var{uleb128} stands for ``unsigned little endian base 128.'' This is a -compact, variable length representation of numbers used by the DWARF -symbolic debugging format. @xref{Sleb128,@code{.sleb128}}. - @ifset ELF -@node Visibility -@section @code{.internal}, @code{.hidden}, @code{.protected} -@cindex @code{internal} directive -@cindex @code{hidden} directive -@cindex @code{protected} directive -@cindex symbol visibility +@node Version +@section @code{.version "@var{string}"} -These directives can be used to set the visibility of a specified symbol. By -default a symbol's visibility is set by its binding (local, global or weak), -but these directives can be used to override that. +@cindex @code{.version} +This directive creates a @code{.note} section and places into it an ELF +formatted note of type NT_VERSION. The note's name is set to @code{string}. +@end ifset -A visibility of @code{protected} means that any references to the symbol from -within the component that defines the symbol must be resolved to the definition -in that component, even if a definition in another component would normally -preempt this. +@ifset ELF +@node VTableEntry +@section @code{.vtable_entry @var{table}, @var{offset}} -A visibility of @code{hidden} means that the symbol is not visible to other -components. Such a symbol is always considered to be protected as well. +@cindex @code{.vtable_entry} +This directive finds or creates a symbol @code{table} and creates a +@code{VTABLE_ENTRY} relocation for it with an addend of @code{offset}. -A visibility of @code{internal} is the same as a visibility of @code{hidden}, -except that some extra, processor specific processing must also be performed -upon the symbol. +@node VTableInherit +@section @code{.vtable_inherit @var{child}, @var{parent}} -For ELF targets, the directives are used like this: +@cindex @code{.vtable_inherit} +This directive finds the symbol @code{child} and finds or creates the symbol +@code{parent} and then creates a @code{VTABLE_INHERIT} relocation for the +parent whose addend is the value of the child symbol. As a special case the +parent name of @code{0} is treated as refering the @code{*ABS*} section. +@end ifset -@smallexample -.internal @var{name} -.hidden @var{name} -.protected @var{name} -@end smallexample +@ifset ELF +@node Weak +@section @code{.weak @var{names}} +@cindex @code{.weak} +This directive sets the weak attribute on the comma separated list of symbol +@code{names}. If the symbols do not already exist, they will be created. @end ifset @node Word @@ -4842,7 +5161,7 @@ interest to you does 32-bit addressing (or doesn't require it; @end ifset In order to assemble compiler output into something that works, -@code{@value{AS}} occasionlly does strange things to @samp{.word} directives. +@code{@value{AS}} occasionally does strange things to @samp{.word} directives. Directives of the form @samp{.word sym1-sym2} are often emitted by compilers as part of jump tables. Therefore, when @code{@value{AS}} assembles a directive of the form @samp{.word sym1-sym2}, and the difference between @@ -4929,14 +5248,23 @@ subject, see the hardware manufacturer's manual. * ESA/390-Dependent:: IBM ESA/390 Dependent Features @end ifset @ifset I80386 -* i386-Dependent:: Intel 80386 Dependent Features +* i386-Dependent:: Intel 80386 and AMD x86-64 Dependent Features +@end ifset +@ifset I860 +* i860-Dependent:: Intel 80860 Dependent Features @end ifset @ifset I960 * i960-Dependent:: Intel 80960 Dependent Features @end ifset +@ifset M32R +* M32R-Dependent:: M32R Dependent Features +@end ifset @ifset M680X0 * M68K-Dependent:: M680x0 Dependent Features @end ifset +@ifset M68HC11 +* M68HC11-Dependent:: M68HC11 and 68HC12 Dependent Features +@end ifset @ifset MIPS * MIPS-Dependent:: MIPS Dependent Features @end ifset @@ -4949,6 +5277,9 @@ subject, see the hardware manufacturer's manual. @ifset SPARC * Sparc-Dependent:: SPARC Dependent Features @end ifset +@ifset TIC54X +* TIC54X-Dependent:: TI TMS320C54x Dependent Features +@end ifset @ifset V850 * V850-Dependent:: V850 Dependent Features @end ifset @@ -4972,80 +5303,7 @@ subject, see the hardware manufacturer's manual. @c in both conditional blocks. @ifset ARC -@ifset GENERIC -@page -@node ARC-Dependent -@chapter ARC Dependent Features -@end ifset -@ifclear GENERIC -@node Machine Dependencies -@chapter ARC Dependent Features -@end ifclear - -@cindex ARC support -@menu -* ARC-Opts:: Options -* ARC-Float:: Floating Point -* ARC-Directives:: Sparc Machine Directives -@end menu - -@node ARC-Opts -@section Options - -@cindex options for ARC -@cindex ARC options -@cindex architectures, ARC -@cindex ARC architectures -The ARC chip family includes several successive levels (or other -variants) of chip, using the same core instruction set, but including -a few additional instructions at each level. - -By default, @code{@value{AS}} assumes the core instruction set (ARC -base). The @code{.cpu} pseudo-op is intended to be used to select -the variant. - -@table @code -@cindex @code{-mbig-endian} option (ARC) -@cindex @code{-mlittle-endian} option (ARC) -@cindex ARC big-endian output -@cindex ARC little-endian output -@cindex big-endian output, ARC -@cindex little-endian output, ARC -@item -mbig-endian -@itemx -mlittle-endian -Any @sc{arc} configuration of @code{@value{AS}} can select big-endian or -little-endian output at run time (unlike most other @sc{gnu} development -tools, which must be configured for one or the other). Use -@samp{-mbig-endian} to select big-endian output, and @samp{-mlittle-endian} -for little-endian. -@end table - -@node ARC-Float -@section Floating Point - -@cindex floating point, ARC (@sc{ieee}) -@cindex ARC floating point (@sc{ieee}) -The ARC cpu family currently does not have hardware floating point -support. Software floating point support is provided by @code{GCC} -and uses @sc{ieee} floating-point numbers. - -@node ARC-Directives -@section ARC Machine Directives - -@cindex ARC machine directives -@cindex machine directives, ARC -The ARC version of @code{@value{AS}} supports the following additional -machine directives: - -@table @code -@item .cpu -@cindex @code{cpu} directive, SPARC -This must be followed by the desired cpu. -The ARC is intended to be customizable, @code{.cpu} is used to -select the desired variant [though currently there are none]. - -@end table - +@include c-arc.texi @end ifset @ifset A29K @@ -5103,15 +5361,26 @@ family. @include c-i386.texi @end ifset +@ifset I860 +@include c-i860.texi +@end ifset + @ifset I960 @include c-i960.texi @end ifset +@ifset M32R +@include c-m32r.texi +@end ifset @ifset M680X0 @include c-m68k.texi @end ifset +@ifset M68HC11 +@include c-m68hc11.texi +@end ifset + @ifset MIPS @include c-mips.texi @end ifset @@ -5132,6 +5401,10 @@ family. @include c-sparc.texi @end ifset +@ifset TIC54X +@include c-tic54x.texi +@end ifset + @ifset Z8000 @include c-z8k.texi @end ifset @@ -5212,7 +5485,7 @@ individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs distribution. In any event, we also recommend that you send bug reports for @code{@value{AS}} -to @samp{bug-gnu-utils@@gnu.org}. +to @samp{bug-binutils@@gnu.org}. The fundamental principle of reporting bugs usefully is this: @strong{report all the facts}. If you are not sure whether to state a @@ -5435,6 +5708,9 @@ Linas Vepstas added GAS support for the ESA/390 "IBM 370" architecture. Richard Henderson rewrote the Alpha assembler. Klaus Kaempf wrote GAS and BFD support for openVMS/Alpha. +Timothy Wall, Michael Hayes, and Greg Smart contributed to the various tic* +flavors. + Several engineers at Cygnus Support have also provided many small bug fixes and configuration enhancements. @@ -5443,6 +5719,369 @@ you have contributed significant work and are not mentioned on this list, and want to be, let us know. Some of the history has been lost; we are not intentionally leaving anyone out. +@node GNU Free Documentation License +@chapter 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. + + +0. PREAMBLE + +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. + +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. + +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. + + +1. APPLICABILITY AND DEFINITIONS + +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". + +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. + +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. + +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. + +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. + +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". + +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. + +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. + + +2. VERBATIM COPYING + +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. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +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. + +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. + +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. + +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. + + +4. MODIFICATIONS + +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: + +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. +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). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +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. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +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. +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. +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. +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. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +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. + +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. + +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. + +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. + + +5. COMBINING DOCUMENTS + +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. + +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. + +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." + + +6. COLLECTIONS OF DOCUMENTS + +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. + +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. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +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. + +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. + + +8. TRANSLATION + +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. + + +9. TERMINATION + +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. + + +10. FUTURE REVISIONS OF THIS LICENSE + +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/. + +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. + + +ADDENDUM: How to use this License for your documents + +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: + +@smallexample + 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". +@end smallexample + +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. + +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. + @node Index @unnumbered Index diff --git a/contrib/binutils/gas/doc/c-arm.texi b/contrib/binutils/gas/doc/c-arm.texi index e354982..d3de43b 100644 --- a/contrib/binutils/gas/doc/c-arm.texi +++ b/contrib/binutils/gas/doc/c-arm.texi @@ -32,15 +32,18 @@ @cindex @code{-marm} command line option, ARM @item -marm@code{[2|250|3|6|60|600|610|620|7|7m|7d|7dm|7di|7dmi|70|700|700i|710|710c|7100|7500|7500fe|7tdmi|8|810|9|9tdmi|920|strongarm|strongarm110|strongarm1100]} +@itemx -mxscale This option specifies the target processor. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target processor. @cindex @code{-marmv} command line option, ARM -@item -marmv@code{[2|2a|3|3m|4|4t|5|5t]} +@item -marmv@code{[2|2a|3|3m|4|4t|5|5t|5te]} This option specifies the target architecture. The assembler will issue an error message if an attempt is made to assemble an instruction which will not execute on the target architecture. +The option @code{-marmv5te} specifies that v5t architecture should be +used with the El Segundo extensions enabled. @cindex @code{-mthumb} command line option, ARM @item -mthumb @@ -51,13 +54,13 @@ This option specifies that only Thumb instructions should be assembled. This option specifies that any Arm or Thumb instruction should be assembled. @cindex @code{-mfpa} command line option, ARM -@item -mfpa @var{[10|11]} +@item -mfpa @code{[10|11]} This option specifies the floating point architecture in use on the target processor. @cindex @code{-mfpe-old} command line option, ARM @item -mfpe-old -Do not allow the assemble of floating point multiple instructions. +Do not allow the assembly of floating point multiple instructions. @cindex @code{-mno-fpu} command line option, ARM @item -mno-fpu @@ -69,11 +72,19 @@ This option specifies that the output generated by the assembler should be marked as supporting interworking. @cindex @code{-mapcs} command line option, ARM -@item -mapcs @var{[26|32]} +@item -mapcs @code{[26|32]} This option specifies that the output generated by the assembler should be marked as supporting the indicated version of the Arm Procedure. Calling Standard. +@cindex @code{-matpcs} command line option, ARM +@item -matpcs +This option specifies that the output generated by the assembler should +be marked as supporting the Arm/Thumb Procedure Calling Standard. If +enabled this option will cause the assembler to create an empty +debugging section in the object file called .arm.atpcs. Debuggers can +use this to determine the ABI being used by. + @cindex @code{-mapcs-float} command line option, ARM @item -mapcs-float This indicates the the floating point variant of the APCS should be @@ -98,7 +109,8 @@ be marked as being encoded for a little-endian processor. @cindex @code{-k} command line option, ARM @cindex PIC code generation for ARM @item -k -This option enables the generation of PIC (position independent code). +This option specifies that the output of the assembler should be marked +as position-independent code (PIC). @cindex @code{-moabi} command line option, ARM @item -moabi @@ -129,8 +141,8 @@ the first character of a line, the whole line is treated as a comment. @cindex line separator, ARM @cindex statement separator, ARM @cindex ARM line separator -On ARM systems running the GNU/Linux operating system, @samp{;} can be -used instead of a newline to separate statements. +The @samp{;} character can be used instead of a newline to separate +statements. @cindex immediate character, ARM @cindex ARM immediate character @@ -180,7 +192,7 @@ example: @end smallexample @cindex @code{code} directive, ARM -@item .code @var{[16|32]} +@item .code @code{[16|32]} This directive selects the instruction set being generated. The value 16 selects Thumb, with the value 32 selecting ARM. @@ -203,7 +215,8 @@ This directive specifies that the following symbol is the name of a Thumb encoded function. This information is necessary in order to allow the assembler and linker to generate correct code for interworking between Arm and Thumb instructions and should be used even if -interworking is not going to be performed. +interworking is not going to be performed. The presence of this +directive also implies @code{.thumb} @cindex @code{thumb_set} directive, ARM @item .thumb_set @@ -277,7 +290,7 @@ will not make use of the literal pool. @end smallexample This instruction will load the address of @var{label} into the indicated -register. The instruction will evaluate to one or two a PC relative ADD +register. The instruction will evaluate to one or two PC relative ADD or SUB instructions depending upon where the label is located. If a second instruction is not needed a NOP instruction will be generated in its place, so that this instruction is always 8 bytes long. diff --git a/contrib/binutils/gas/doc/c-i386.texi b/contrib/binutils/gas/doc/c-i386.texi index 8a9c85a..110d560 100644 --- a/contrib/binutils/gas/doc/c-i386.texi +++ b/contrib/binutils/gas/doc/c-i386.texi @@ -13,6 +13,12 @@ @cindex i386 support @cindex i80306 support +@cindex x86-64 support + +The i386 version @code{@value{AS}} supports both the original Intel 386 +architecture in both 16 and 32-bit mode as well as AMD x86-64 architecture +extending the Intel architecture to 64-bits. + @menu * i386-Options:: Options * i386-Syntax:: AT&T Syntax versus Intel Syntax @@ -24,6 +30,7 @@ * i386-Float:: Floating Point * i386-SIMD:: Intel's MMX and AMD's 3DNow! SIMD Operations * i386-16bit:: Writing 16-bit Code +* i386-Arch:: Specifying an x86 CPU architecture * i386-Bugs:: AT&T Syntax bugs * i386-Notes:: Notes @end menu @@ -31,17 +38,52 @@ @node i386-Options @section Options -@cindex options for i386 (none) -@cindex i386 options (none) -The 80386 has no machine dependent options. +@cindex options for i386 +@cindex options for x86-64 +@cindex i386 options +@cindex x86-64 options + +The i386 version of @code{@value{AS}} has a few machine +dependent options: + +@table @code +@cindex @samp{--32} option, i386 +@cindex @samp{--32} option, x86-64 +@cindex @samp{--64} option, i386 +@cindex @samp{--64} option, x86-64 +@item --32 | --64 +Select the word size, either 32 bits or 64 bits. Selecting 32-bit +implies Intel i386 architecture, while 64-bit implies AMD x86-64 +architecture. + +These options are only available with the ELF object file format, and +require that the necessary BFD support has been included (on a 32-bit +platform you have to add --enable-64-bit-bfd to configure enable 64-bit +usage and use x86-64 as target platform). +@end table @node i386-Syntax @section AT&T Syntax versus Intel Syntax +@cindex i386 intel_syntax pseudo op +@cindex intel_syntax pseudo op, i386 +@cindex i386 att_syntax pseudo op +@cindex att_syntax pseudo op, i386 @cindex i386 syntax compatibility @cindex syntax compatibility, i386 -In order to maintain compatibility with the output of @code{@value{GCC}}, -@code{@value{AS}} supports AT&T System V/386 assembler syntax. This is quite +@cindex x86-64 intel_syntax pseudo op +@cindex intel_syntax pseudo op, x86-64 +@cindex x86-64 att_syntax pseudo op +@cindex att_syntax pseudo op, x86-64 +@cindex x86-64 syntax compatibility +@cindex syntax compatibility, x86-64 + +@code{@value{AS}} now supports assembly using Intel assembler syntax. +@code{.intel_syntax} selects Intel mode, and @code{.att_syntax} switches +back to the usual AT&T mode for compatibility with the output of +@code{@value{GCC}}. Either of these directives may have an optional +argument, @code{prefix}, or @code{noprefix} specifying whether registers +require a @samp{%} prefix. AT&T System V/386 assembler syntax is quite different from Intel syntax. We mention these differences because almost all 80386 documents use Intel syntax. Notable differences between the two syntaxes are: @@ -53,6 +95,14 @@ between the two syntaxes are: @cindex jump/call operands, i386 @cindex i386 jump/call operands @cindex operand delimiters, i386 + +@cindex immediate operands, x86-64 +@cindex x86-64 immediate operands +@cindex register operands, x86-64 +@cindex x86-64 register operands +@cindex jump/call operands, x86-64 +@cindex x86-64 jump/call operands +@cindex operand delimiters, x86-64 @itemize @bullet @item AT&T immediate operands are preceded by @samp{$}; Intel immediate @@ -63,6 +113,8 @@ operands are prefixed by @samp{*}; they are undelimited in Intel syntax. @cindex i386 source, destination operands @cindex source, destination operands; i386 +@cindex x86-64 source, destination operands +@cindex source, destination operands; x86-64 @item AT&T and Intel syntax use the opposite order for source and destination operands. Intel @samp{add eax, 4} is @samp{addl $4, %eax}. The @@ -74,17 +126,23 @@ reversed order. @ref{i386-Bugs}. @cindex mnemonic suffixes, i386 @cindex sizes operands, i386 @cindex i386 size suffixes +@cindex mnemonic suffixes, x86-64 +@cindex sizes operands, x86-64 +@cindex x86-64 size suffixes @item In AT&T syntax the size of memory operands is determined from the last character of the instruction mnemonic. Mnemonic suffixes of @samp{b}, -@samp{w}, and @samp{l} specify byte (8-bit), word (16-bit), and long -(32-bit) memory references. Intel syntax accomplishes this by prefixing -memory operands (@emph{not} the instruction mnemonics) with @samp{byte -ptr}, @samp{word ptr}, and @samp{dword ptr}. Thus, Intel @samp{mov al, -byte ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T syntax. +@samp{w}, @samp{l} and @samp{q} specify byte (8-bit), word (16-bit), long +(32-bit) and quadruple word (64-bit) memory references. Intel syntax accomplishes +this by prefixing memory operands (@emph{not} the instruction mnemonics) with +@samp{byte ptr}, @samp{word ptr}, @samp{dword ptr} and @samp{qword ptr}. Thus, +Intel @samp{mov al, byte ptr @var{foo}} is @samp{movb @var{foo}, %al} in AT&T +syntax. @cindex return instructions, i386 @cindex i386 jump, call, return +@cindex return instructions, x86-64 +@cindex x86-64 jump, call, return @item Immediate form long jumps and calls are @samp{lcall/ljmp $@var{section}, $@var{offset}} in AT&T syntax; the @@ -96,6 +154,8 @@ is @samp{lret $@var{stack-adjust}} in AT&T syntax; Intel syntax is @cindex sections, i386 @cindex i386 sections +@cindex sections, x86-64 +@cindex x86-64 sections @item The AT&T assembler does not provide support for multiple section programs. Unix style systems expect all programs to be single sections. @@ -106,17 +166,20 @@ programs. Unix style systems expect all programs to be single sections. @cindex i386 instruction naming @cindex instruction naming, i386 +@cindex x86-64 instruction naming +@cindex instruction naming, x86-64 + Instruction mnemonics are suffixed with one character modifiers which -specify the size of operands. The letters @samp{b}, @samp{w}, and -@samp{l} specify byte, word, and long operands. If no suffix is -specified by an instruction then @code{@value{AS}} tries to fill in the -missing suffix based on the destination register operand (the last one -by convention). Thus, @samp{mov %ax, %bx} is equivalent to @samp{movw -%ax, %bx}; also, @samp{mov $1, %bx} is equivalent to @samp{movw $1, -%bx}. Note that this is incompatible with the AT&T Unix assembler which -assumes that a missing mnemonic suffix implies long operand size. (This -incompatibility does not affect compiler output since compilers always -explicitly specify the mnemonic suffix.) +specify the size of operands. The letters @samp{b}, @samp{w}, @samp{l} +and @samp{q} specify byte, word, long and quadruple word operands. If +no suffix is specified by an instruction then @code{@value{AS}} tries to +fill in the missing suffix based on the destination register operand +(the last one by convention). Thus, @samp{mov %ax, %bx} is equivalent +to @samp{movw %ax, %bx}; also, @samp{mov $1, %bx} is equivalent to +@samp{movw $1, bx}. Note that this is incompatible with the AT&T Unix +assembler which assumes that a missing mnemonic suffix implies long +operand size. (This incompatibility does not affect compiler output +since compilers always explicitly specify the mnemonic suffix.) Almost all instructions have the same names in AT&T and Intel format. There are a few exceptions. The sign extend and zero extend @@ -130,10 +193,14 @@ are tacked on to this base name, the @emph{from} suffix before the @emph{to} suffix. Thus, @samp{movsbl %al, %edx} is AT&T syntax for ``move sign extend @emph{from} %al @emph{to} %edx.'' Possible suffixes, thus, are @samp{bl} (from byte to long), @samp{bw} (from byte to word), -and @samp{wl} (from word to long). +@samp{wl} (from word to long), @samp{bq} (from byte to quadruple word), +@samp{wq} (from word to quadruple word), and @samp{lq} (from long to +quadruple word). @cindex conversion instructions, i386 @cindex i386 conversion instructions +@cindex conversion instructions, x86-64 +@cindex x86-64 conversion instructions The Intel-syntax conversion instructions @itemize @bullet @@ -148,14 +215,25 @@ The Intel-syntax conversion instructions @item @samp{cdq} --- sign-extend dword in @samp{%eax} to quad in @samp{%edx:%eax}, + +@item +@samp{cdqe} --- sign-extend dword in @samp{%eax} to quad in @samp{%rax} +(x86-64 only), + +@item +@samp{cdo} --- sign-extend quad in @samp{%rax} to octuple in +@samp{%rdx:%rax} (x86-64 only), @end itemize @noindent -are called @samp{cbtw}, @samp{cwtl}, @samp{cwtd}, and @samp{cltd} in -AT&T naming. @code{@value{AS}} accepts either naming for these instructions. +are called @samp{cbtw}, @samp{cwtl}, @samp{cwtd}, @samp{cltd}, @samp{cltq}, and +@samp{cqto} in AT&T naming. @code{@value{AS}} accepts either naming for these +instructions. @cindex jump instructions, i386 @cindex call instructions, i386 +@cindex jump instructions, x86-64 +@cindex call instructions, x86-64 Far call/jump instructions are @samp{lcall} and @samp{ljmp} in AT&T syntax, but are @samp{call far} and @samp{jump far} in Intel convention. @@ -165,6 +243,8 @@ convention. @cindex i386 registers @cindex registers, i386 +@cindex x86-64 registers +@cindex registers, x86-64 Register operands are always prefixed with @samp{%}. The 80386 registers consist of @@ -204,6 +284,44 @@ the 2 test registers @samp{%tr6} and @samp{%tr7}. the 8 floating point register stack @samp{%st} or equivalently @samp{%st(0)}, @samp{%st(1)}, @samp{%st(2)}, @samp{%st(3)}, @samp{%st(4)}, @samp{%st(5)}, @samp{%st(6)}, and @samp{%st(7)}. +These registers are overloaded by 8 MMX registers @samp{%mm0}, +@samp{%mm1}, @samp{%mm2}, @samp{%mm3}, @samp{%mm4}, @samp{%mm5}, +@samp{%mm6} and @samp{%mm7}. + +@item +the 8 SSE registers registers @samp{%xmm0}, @samp{%xmm1}, @samp{%xmm2}, +@samp{%xmm3}, @samp{%xmm4}, @samp{%xmm5}, @samp{%xmm6} and @samp{%xmm7}. +@end itemize + +The AMD x86-64 architecture extends the register set by: + +@itemize @bullet +@item +enhancing the 8 32-bit registers to 64-bit: @samp{%rax} (the +accumulator), @samp{%rbx}, @samp{%rcx}, @samp{%rdx}, @samp{%rdi}, +@samp{%rsi}, @samp{%rbp} (the frame pointer), @samp{%rsp} (the stack +pointer) + +@item +the 8 extended registers @samp{%r8}--@samp{%r15}. + +@item +the 8 32-bit low ends of the extended registers: @samp{%r8d}--@samp{%r15d} + +@item +the 8 16-bit low ends of the extended registers: @samp{%r8w}--@samp{%r15w} + +@item +the 8 8-bit low ends of the extended registers: @samp{%r8b}--@samp{%r15b} + +@item +the 4 8-bit registers: @samp{%sil}, @samp{%dil}, @samp{%bpl}, @samp{%spl}. + +@item +the 8 debug registers: @samp{%db8}--@samp{%db15}. + +@item +the 8 SSE registers: @samp{%xmm8}--@samp{%xmm15}. @end itemize @node i386-Prefixes @@ -270,6 +388,20 @@ complete the current instruction. This should never be needed for the The @samp{rep}, @samp{repe}, and @samp{repne} prefixes are added to string instructions to make them repeat @samp{%ecx} times (@samp{%cx} times if the current address size is 16-bits). +@cindex REX prefixes, i386 +@item +The @samp{rex} family of prefixes is used by x86-64 to encode +extensions to i386 instruction set. The @samp{rex} prefix has four +bits --- an operand size overwrite (@code{64}) used to change operand size +from 32-bit to 64-bit and X, Y and Z extensions bits used to extend the +register set. + +You may write the @samp{rex} prefixes directly. The @samp{rex64xyz} +instruction emits @samp{rex} prefix with all the bits set. By omitting +the @code{64}, @code{x}, @code{y} or @code{z} you may write other +prefixes as well. Normally, there is no need to write the prefixes +explicitly, since gas will automatically generate them based on the +instruction operands. @end itemize @node i386-Memory @@ -277,6 +409,8 @@ times if the current address size is 16-bits). @cindex i386 memory references @cindex memory references, i386 +@cindex x86-64 memory references +@cindex memory references, x86-64 An Intel syntax indirect memory reference of the form @smallexample @@ -333,14 +467,34 @@ prefixed with @samp{*}. If no @samp{*} is specified, @code{@value{AS}} always chooses PC relative addressing for jump/call labels. Any instruction that has a memory operand, but no register operand, -@emph{must} specify its size (byte, word, or long) with an instruction -mnemonic suffix (@samp{b}, @samp{w}, or @samp{l}, respectively). +@emph{must} specify its size (byte, word, long, or quadruple) with an +instruction mnemonic suffix (@samp{b}, @samp{w}, @samp{l} or @samp{q}, +respectively). + +The x86-64 architecture adds an RIP (instruction pointer relative) +addressing. This addressing mode is specified by using @samp{rip} as a +base register. Only constant offsets are valid. For example: + +@table @asis +@item AT&T: @samp{1234(%rip)}, Intel: @samp{[rip + 1234]} +Points to the address 1234 bytes past the end of the current +instruction. + +@item AT&T: @samp{symbol(%rip)}, Intel: @samp{[rip + symbol]} +Points to the @code{symbol} in RIP relative way, this is shorter than +the default absolute addressing. +@end table + +Other addressing modes remain unchanged in x86-64 architecture, except +registers used are 64-bit instead of 32-bit. @node i386-jumps @section Handling of Jump Instructions @cindex jump optimization, i386 @cindex i386 jump optimization +@cindex jump optimization, x86-64 +@cindex x86-64 jump optimization 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 @@ -369,6 +523,8 @@ cx_nonzero: @cindex i386 floating point @cindex floating point, i386 +@cindex x86-64 floating point +@cindex floating point, x86-64 All 80387 floating point types except packed BCD are supported. (BCD support may be added without much difficulty). These data types are 16-, 32-, and 64- bit integers, and single (32-bit), @@ -381,6 +537,10 @@ data type. Constructors build these data types into memory. @cindex @code{single} directive, i386 @cindex @code{double} directive, i386 @cindex @code{tfloat} directive, i386 +@cindex @code{float} directive, x86-64 +@cindex @code{single} directive, x86-64 +@cindex @code{double} directive, x86-64 +@cindex @code{tfloat} directive, x86-64 @itemize @bullet @item Floating point constructors are @samp{.float} or @samp{.single}, @@ -394,6 +554,10 @@ top) and @samp{fstpt} (store 80-bit real and pop stack) instructions. @cindex @code{long} directive, i386 @cindex @code{int} directive, i386 @cindex @code{quad} directive, i386 +@cindex @code{word} directive, x86-64 +@cindex @code{long} directive, x86-64 +@cindex @code{int} directive, x86-64 +@cindex @code{quad} directive, x86-64 @item Integer constructors are @samp{.word}, @samp{.long} or @samp{.int}, and @samp{.quad} for the 16-, 32-, and 64-bit integer formats. The @@ -417,6 +581,9 @@ then stores the result in the 4 byte location @samp{mem}) @cindex MMX, i386 @cindex 3DNow!, i386 @cindex SIMD, i386 +@cindex MMX, x86-64 +@cindex 3DNow!, x86-64 +@cindex SIMD, x86-64 @code{@value{AS}} supports Intel's MMX instruction set (SIMD instructions for integer data), available on Intel's Pentium MMX @@ -446,7 +613,10 @@ instructions is reversed from the Intel syntax. @cindex @code{code16gcc} directive, i386 @cindex @code{code16} directive, i386 @cindex @code{code32} directive, i386 -While @code{@value{AS}} normally writes only ``pure'' 32-bit i386 code, +@cindex @code{code64} directive, i386 +@cindex @code{code64} directive, x86-64 +While @code{@value{AS}} normally writes only ``pure'' 32-bit i386 code +or 64-bit x86-64 code depending on the default configuration, it also supports writing code to run in real mode or in 16-bit protected mode code segments. To do this, put a @samp{.code16} or @samp{.code16gcc} directive before the assembly language instructions to @@ -506,14 +676,44 @@ non-commutative arithmetic floating point operations with two register operands where the source register is @samp{%st} and the destination register is @samp{%st(i)}. +@node i386-Arch +@section Specifying CPU Architecture + +@cindex arch directive, i386 +@cindex i386 arch directive +@cindex arch directive, x86-64 +@cindex x86-64 arch directive + +@code{@value{AS}} may be told to assemble for a particular CPU +architecture with the @code{.arch @var{cpu_type}} directive. This +directive enables a warning when gas detects an instruction that is not +supported on the CPU specified. The choices for @var{cpu_type} are: + +@multitable @columnfractions .20 .20 .20 .20 +@item @samp{i8086} @tab @samp{i186} @tab @samp{i286} @tab @samp{i386} +@item @samp{i486} @tab @samp{i586} @tab @samp{i686} @tab @samp{pentium} +@item @samp{pentiumpro} @tab @samp{pentium4} @tab @samp{k6} @tab @samp{athlon} +@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 +@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}. + @node i386-Notes @section Notes @cindex i386 @code{mul}, @code{imul} instructions @cindex @code{mul} instruction, i386 @cindex @code{imul} instruction, i386 +@cindex @code{mul} instruction, x86-64 +@cindex @code{imul} instruction, x86-64 There is some trickery concerning the @samp{mul} and @samp{imul} -instructions that deserves mention. The 16-, 32-, and 64-bit expanding +instructions that deserves mention. The 16-, 32-, 64- and 128-bit expanding multiplies (base opcode @samp{0xf6}; extension 4 for @samp{mul} and 5 for @samp{imul}) can be output only in the one operand form. Thus, @samp{imul %ebx, %eax} does @emph{not} select the expanding multiply; diff --git a/contrib/binutils/gas/doc/gasp.texi b/contrib/binutils/gas/doc/gasp.texi index 64cd6f4..e023edc 100644 --- a/contrib/binutils/gas/doc/gasp.texi +++ b/contrib/binutils/gas/doc/gasp.texi @@ -3,10 +3,14 @@ @c @c This file documents the assembly preprocessor "GASP" @c -@c Copyright (c) 1994 Free Software Foundation, Inc. +@c Copyright (c) 1994, 2000 Free Software Foundation, Inc. @c -@c This text may be freely distributed under the terms of the GNU -@c General Public License. +@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 +@c or any later version published by the Free Software Foundation; +@c with no Invariant Sections, with no Front-Cover Texts, and with no +@c Back-Cover Texts. A copy of the license is included in the +@c section entitled "GNU Free Documentation License". @ifinfo @format @@ -37,27 +41,19 @@ END-INFO-DIR-ENTRY @end tex @vskip 0pt plus 1filll -Copyright @copyright{} 1994, 1995 Free Software Foundation, Inc. +Copyright @copyright{} 1994, 1995, 2000 Free Software Foundation, Inc. -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. + 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 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 "GNU Free Documentation License". -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. - -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @end titlepage @ifinfo -Copyright @copyright{} 1994, 1995 Free Software Foundation, Inc. - -Permission is granted to make and distribute verbatim copies of -this manual provided the copyright notice and this permission notice -are preserved on all copies. +Copyright @copyright{} 1994, 1995, 2000 Free Software Foundation, Inc. @ignore Permission is granted to process this file through TeX and print the @@ -66,13 +62,13 @@ notice identical to this one except for the removal of this paragraph (this paragraph not being relevant to the printed manual). @end ignore -Permission is granted to copy and distribute modified versions of this -manual under the conditions for verbatim copying, provided also that -the entire resulting derived work is distributed under the terms of a -permission notice identical to this one. + 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 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 "GNU Free Documentation License". -Permission is granted to copy and distribute translations of this manual -into another language, under the above conditions for modified versions. @node Top @top GASP @@ -87,6 +83,7 @@ Steve Chamberlain wrote GASP; Roland Pesch wrote this manual. * Overview:: What is GASP? * Invoking GASP:: Command line options. * Commands:: Preprocessor commands. +* GNU Free Documentation License:: GNU Free Documentation License * Index:: Index. @end menu @end ifinfo @@ -1077,6 +1074,369 @@ You can write @samp{%@var{expr}} to evaluate the expression @var{expr} and use the result as a string. @end table +@node GNU Free Documentation License +@chapter 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. + + +0. PREAMBLE + +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. + +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. + +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. + + +1. APPLICABILITY AND DEFINITIONS + +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". + +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. + +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. + +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. + +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. + +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". + +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. + +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. + + +2. VERBATIM COPYING + +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. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +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. + +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. + +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. + +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. + + +4. MODIFICATIONS + +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: + +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. +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). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +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. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +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. +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. +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. +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. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +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. + +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. + +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. + +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. + + +5. COMBINING DOCUMENTS + +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. + +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. + +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." + + +6. COLLECTIONS OF DOCUMENTS + +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. + +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. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +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. + +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. + + +8. TRANSLATION + +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. + + +9. TERMINATION + +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. + + +10. FUTURE REVISIONS OF THIS LICENSE + +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/. + +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. + + +ADDENDUM: How to use this License for your documents + +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: + +@smallexample + 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". +@end smallexample + +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. + +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. + @node Index @unnumbered Index diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi index 8453c48..a42bc0f 100644 --- a/contrib/binutils/gas/doc/internals.texi +++ b/contrib/binutils/gas/doc/internals.texi @@ -8,8 +8,7 @@ This chapter describes the internals of the assembler. It is incomplete, but it may help a bit. -This chapter was last modified on $Date: 2000/03/26 14:47:33 $. It is not updated regularly, and it -may be out of date. +This chapter is not updated regularly, and it may be out of date. @menu * GAS versions:: GAS versions @@ -464,7 +463,7 @@ the other fields; see the definition in @file{expr.h} for the possibilities. An @code{operatorT} value of @code{O_big} indicates either a floating point number, stored in the global variable @code{generic_floating_point_number}, or -an integer to large to store in an @code{offsetT} type, stored in the global +an integer too large to store in an @code{offsetT} type, stored in the global array @code{generic_bignum}. This rather inflexible approach makes it impossible to use floating point numbers or large expressions in complex expressions. @@ -645,7 +644,7 @@ The variable characters are to be repeated @code{fr_offset} times. If have this type. @item rs_leb128 -This state is used to implement the DWARF ``little endian base 128'' +This state is used to implement the DWARF ``little endian base 128'' variable length number format. The @code{fr_symbol} is always an expression symbol, as constant expressions are emitted directly. The @code{fr_offset} field is used during relaxation to hold the previous size of the number so @@ -774,6 +773,12 @@ variable. Normally the default value of @samp{generic} is fine. The configuration process will create a file named @file{targ-env.h} in the build directory which includes @file{te-@var{em}.h}. +There is a special case for COFF. For historical reason, the GNU COFF +assembler doesn't follow the documented behavior on certain debug symbols for +the compatibility with other COFF assemblers. A port can define +@code{STRICTCOFF} in the configure script to make the GNU COFF assembler +to follow the documented behavior. + Porting GAS to a new CPU requires writing the @file{tc-@var{CPU}} files. Porting GAS to a new object file format requires writing the @file{obj-@var{fmt}} files. There is sometimes some interaction between these @@ -884,7 +889,7 @@ pseudo-ops which are specific to the CPU. If this macro is defined, GAS will call it with a @code{pseudo_typeS} argument. It should return non-zero if the pseudo-op is a conditional which controls whether code is assembled, such as @samp{.if}. GAS knows about the normal -conditional pseudo-ops,and you should normally not have to define this macro. +conditional pseudo-ops, and you should normally not have to define this macro. @item comment_chars @cindex comment_chars @@ -913,7 +918,7 @@ comment when they appear at the start of a line. @item line_separator_chars @cindex line_separator_chars This is a null terminated @code{const char} array of characters which separate -lines (semicolon and newline are such characters by default, and need not be +lines (null and newline are such characters by default, and need not be listed in this array). Note that line_separator_chars do not separate lines if found in a comment, such as after a character in line_comment_chars or comment_chars. @@ -965,7 +970,7 @@ default value is @code{LEX_NAME | LEX_BEGIN_NAME}. @item NUMBERS_WITH_SUFFIX @cindex NUMBERS_WITH_SUFFIX When this macro is defined to be non-zero, the parser allows the radix of a -constant to be indicated with a suffix. Valid suffixes are binary (B), +constant to be indicated with a suffix. Valid suffixes are binary (B), octal (Q), and hexadecimal (H). Case is not significant. @item SINGLE_QUOTE_STRINGS @@ -992,6 +997,7 @@ If you define this macro, GAS will assume that any text at the start of a line is a label, even if it does not have a colon. @item TC_START_LABEL +@itemx TC_START_LABEL_WITHOUT_COLON @cindex TC_START_LABEL You may define this macro to control what GAS considers to be a label. The default definition is to accept any name followed by a colon character. @@ -999,7 +1005,7 @@ default definition is to accept any name followed by a colon character. @item TC_START_LABEL_WITHOUT_COLON @cindex TC_START_LABEL_WITHOUT_COLON Same as TC_START_LABEL, but should be used instead of TC_START_LABEL when -LABELS_WITHOUT_COLONS is defined. +LABELS_WITHOUT_COLONS is defined. @item NO_PSEUDO_DOT @cindex NO_PSEUDO_DOT @@ -1133,11 +1139,13 @@ relocation entry. @itemx md_long_jump_size @itemx md_create_short_jump @itemx md_create_long_jump +@itemx TC_CHECK_ADJUSTED_BROKEN_DOT_WORD @cindex WORKING_DOT_WORD @cindex md_short_jump_size @cindex md_long_jump_size @cindex md_create_short_jump @cindex md_create_long_jump +@cindex TC_CHECK_ADJUSTED_BROKEN_DOT_WORD If @code{WORKING_DOT_WORD} is defined, GAS will not do broken word processing (@pxref{Broken words}). Otherwise, you should set @code{md_short_jump_size} to the size of a short jump (a jump that is just long enough to jump around a @@ -1145,6 +1153,10 @@ number of long jumps) and @code{md_long_jump_size} to the size of a long jump (a jump that can go anywhere in the function). You should define @code{md_create_short_jump} to create a short jump around a number of long jumps, and define @code{md_create_long_jump} to create a long jump. +If defined, the macro TC_CHECK_ADJUSTED_BROKEN_DOT_WORD will be called for each +adjusted word just before the word is output. The macro takes two arguments, +an @code{addressT} with the adjusted word and a pointer to the current +@code{struct broken_word}. @item md_estimate_size_before_relax @cindex md_estimate_size_before_relax @@ -1177,6 +1189,15 @@ If you define this macro, and the global variable @samp{linkrelax} is set @samp{.align} directive will cause extra space to be allocated. The linker can then discard this space when relaxing the section. +@item TC_LINKRELAX_FIXUP (@var{segT}) +@cindex TC_LINKRELAX_FIXUP +If defined, this macro allows control over whether fixups for a +given section will be processed when the @var{linkrelax} variable is +set. The macro is given the N_TYPE bits for the section in its +@var{segT} argument. If the macro evaluates to a non-zero value +then the fixups will be converted into relocs, otherwise they will +be passed to @var{md_apply_fix3} as normal. + @item md_convert_frag @cindex md_convert_frag GAS will call this for each rs_machine_dependent fragment. @@ -1251,7 +1272,7 @@ size. @cindex md_macro_start If defined, GAS will call this macro when it starts to include a macro expansion. @code{macro_nest} indicates the current macro nesting level, which -includes the one being expanded. +includes the one being expanded. @item md_macro_info @cindex md_macro_info @@ -1263,7 +1284,7 @@ macro (macro_entry *), which includes expansion of the formal arguments. @item md_macro_end @cindex md_macro_end Complement to md_macro_start. If defined, it is called when finished -processing an inserted macro expansion, just before decrementing macro_nest. +processing an inserted macro expansion, just before decrementing macro_nest. @item DOUBLEBAR_PARALLEL @cindex DOUBLEBAR_PARALLEL @@ -1332,6 +1353,13 @@ source line. The default value is 4. @item LISTING_RHS_WIDTH The maximum number of characters to print from one line of the input file. The default value is 100. + +@item TC_COFF_SECTION_DEFAULT_ATTRIBUTES +@cindex TC_COFF_SECTION_DEFAULT_ATTRIBUTES +The COFF @code{.section} directive will use the value of this macro to set +a new section's attributes when a directive has no valid flags or when the +flag is @code{w}. The default value of the macro is @code{SEC_LOAD | SEC_DATA}. + @end table @node Object format backend @@ -1400,8 +1428,8 @@ generate a @code{.file} symbol if none was generated previously. @item SEPARATE_STAB_SECTIONS @cindex SEPARATE_STAB_SECTIONS -You may define this macro to indicate that stabs should be placed in separate -sections, as in ELF. +You may define this macro to a nonzero value to indicate that stabs should be +placed in separate sections, as in ELF. @item INIT_STAB_SECTION @cindex INIT_STAB_SECTION @@ -1573,6 +1601,16 @@ called to convert the frag to an @code{rs_fill} frag with no variant part. Sometimes changing addressing modes may also require rewriting the instruction. It can be accessed via @code{fr_opcode} or @code{fr_fix}. +If you generate frags separately for the basic insn opcode and any relaxable +operands, do not call @code{fix_new} thinking you can emit fixups for the +opcode field from the relaxable frag. It is not garanteed to be the same frag. +If you need to emit fixups for the opcode field from inspection of the +relaxable frag, then you need to generate a common frag for both the basic +opcode and relaxable fields, or you need to provide the frag for the opcode to +pass to @code{fix_new}. The latter can be done for example by defining +@code{TC_FRAG_TYPE} to include a pointer to it and defining @code{TC_FRAG_INIT} +to set the pointer. + Sometimes @code{fr_var} is increased instead, and @code{frag_wane} is not called. I'm not sure, but I think this is to keep @code{fr_fix} referring to an earlier byte, and @code{fr_subtype} set to @code{rs_machine_dependent} so diff --git a/contrib/binutils/gas/dwarf2dbg.c b/contrib/binutils/gas/dwarf2dbg.c index b83175a..e44574d 100644 --- a/contrib/binutils/gas/dwarf2dbg.c +++ b/contrib/binutils/gas/dwarf2dbg.c @@ -28,8 +28,21 @@ FILENO is the filenumber. */ #include "ansidecl.h" - #include "as.h" + +#ifdef HAVE_LIMITS_H +#include +#else +#ifdef HAVE_SYS_PARAM_H +#include +#endif +#ifndef INT_MAX +#define INT_MAX (int) (((unsigned) (-1)) >> 1) +#endif +#endif + +#ifdef BFD_ASSEMBLER + #include "dwarf2dbg.h" #include "subsegs.h" @@ -63,7 +76,7 @@ #ifndef DWARF2_LINE_MIN_INSN_LENGTH /* Define the architecture-dependent minimum instruction length (in bytes). This value should be rather too small than too big. */ -# define DWARF2_LINE_MIN_INSN_LENGTH 4 +# define DWARF2_LINE_MIN_INSN_LENGTH 1 #endif /* Flag that indicates the initial value of the is_stmt_start flag. @@ -72,12 +85,6 @@ is not made available by the GCC front-end. */ #define DWARF2_LINE_DEFAULT_IS_STMT 1 -/* Flag that indicates the initial value of the is_stmt_start flag. - In the present implementation, we do not mark any lines as - the beginning of a source statement, because that information - is not made available by the GCC front-end. */ -#define DWARF2_LINE_DEFAULT_IS_STMT 1 - /* Given a special op, return the line skip amount. */ #define SPECIAL_LINE(op) \ (((op) - DWARF2_LINE_OPCODE_BASE)%DWARF2_LINE_RANGE + DWARF2_LINE_BASE) @@ -89,682 +96,1213 @@ /* The maximum address skip amount that can be encoded with a special op. */ #define MAX_SPECIAL_ADDR_DELTA SPECIAL_ADDR(255) -#define INITIAL_STATE \ - /* Initialize as per DWARF2.0 standard. */ \ - 0, /* address */ \ - 1, /* file */ \ - 1, /* line */ \ - 0, /* column */ \ - DWARF2_LINE_DEFAULT_IS_STMT, /* is_stmt */ \ - 0, /* basic_block */ \ - 1 /* empty_sequence */ - -static struct - { - /* state machine state as per DWARF2 manual: */ - struct dwarf2_sm - { - addressT addr; - unsigned int filenum; - unsigned int line; - unsigned int column; - unsigned int - is_stmt : 1, - basic_block : 1, - empty_sequence : 1; /* current code sequence has no DWARF2 directives? */ - } - sm; - - unsigned int - any_dwarf2_directives : 1; /* did we emit any DWARF2 line debug directives? */ - - fragS * frag; /* frag that "addr" is relative to */ - segT text_seg; /* text segment "addr" is relative to */ - subsegT text_subseg; - segT line_seg; /* ".debug_line" segment */ - int last_filename; /* index of last filename that was used */ - int num_filenames; /* index of last filename in use */ - int filename_len; /* length of the filename array */ - struct - { - int dir; /* valid after gen_dir_list() only */ - char *name; /* full path before gen_dir_list(), filename afterwards */ - } - *file; +struct line_entry { + struct line_entry *next; + fragS *frag; + addressT frag_ofs; + struct dwarf2_line_info loc; +}; + +struct line_subseg { + struct line_subseg *next; + subsegT subseg; + struct line_entry *head; + struct line_entry **ptail; +}; + +struct line_seg { + struct line_seg *next; + segT seg; + struct line_subseg *head; + symbolS *text_start; + symbolS *text_end; +}; + +/* Collects data for all line table entries during assembly. */ +static struct line_seg *all_segs; + +struct file_entry { + char *filename; + unsigned int dir; +}; + +/* Table of files used by .debug_line. */ +static struct file_entry *files; +static unsigned int files_in_use; +static unsigned int files_allocated; + +/* True when we've seen a .loc directive recently. Used to avoid + doing work when there's nothing to do. */ +static boolean loc_directive_seen; + +/* Current location as indicated by the most recent .loc directive. */ +static struct dwarf2_line_info current; + +/* Fake label name. */ +static char const fake_label_name[] = ".L0\001"; + +/* The size of an address on the target. */ +static unsigned int sizeof_address; + +static struct line_subseg *get_line_subseg PARAMS ((segT, subsegT)); +static unsigned int get_filenum PARAMS ((const char *)); +static struct frag *first_frag_for_seg PARAMS ((segT)); +static struct frag *last_frag_for_seg PARAMS ((segT)); +static void out_byte PARAMS ((int)); +static void out_opcode PARAMS ((int)); +static void out_two PARAMS ((int)); +static void out_four PARAMS ((int)); +static void out_abbrev PARAMS ((int, int)); +static void out_uleb128 PARAMS ((addressT)); +static symbolS *symbol_new_now PARAMS ((void)); +static void set_symbol_value_now PARAMS ((symbolS *)); +static offsetT get_frag_fix PARAMS ((fragS *)); +static void out_set_addr PARAMS ((segT, fragS *, addressT)); +static int size_inc_line_addr PARAMS ((int, addressT)); +static void emit_inc_line_addr PARAMS ((int, addressT, char *, int)); +static void out_inc_line_addr PARAMS ((int, addressT)); +static void relax_inc_line_addr PARAMS ((int, segT, fragS *, addressT, + fragS *, addressT)); +static void process_entries PARAMS ((segT, struct line_entry *)); +static void out_file_list PARAMS ((void)); +static void out_debug_line PARAMS ((segT)); +static void out_debug_aranges PARAMS ((segT, segT)); +static void out_debug_abbrev PARAMS ((segT)); +static void out_debug_info PARAMS ((segT, segT, segT)); + +/* Find or create an entry for SEG+SUBSEG in ALL_SEGS. */ + +static struct line_subseg * +get_line_subseg (seg, subseg) + segT seg; + subsegT subseg; +{ + static segT last_seg; + static subsegT last_subseg; + static struct line_subseg *last_line_subseg; - struct dwarf2_line_info current; /* current source info: */ + struct line_seg *s; + struct line_subseg **pss, *ss; - /* counters for statistical purposes: */ - unsigned int num_line_entries; - unsigned int opcode_hist[256]; /* histogram of opcode frequencies */ - } -ls = - { - { - INITIAL_STATE - }, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - NULL, - { NULL, 0, 0, 0, 0 }, - 0, + if (seg == last_seg && subseg == last_subseg) + return last_line_subseg; + + for (s = all_segs; s; s = s->next) + if (s->seg == seg) + goto found_seg; + + s = (struct line_seg *) xmalloc (sizeof (*s)); + s->next = all_segs; + s->seg = seg; + s->head = NULL; + all_segs = s; + + found_seg: + for (pss = &s->head; (ss = *pss) != NULL ; pss = &ss->next) { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + if (ss->subseg == subseg) + goto found_subseg; + if (ss->subseg > subseg) + break; } - }; + ss = (struct line_subseg *) xmalloc (sizeof (*ss)); + ss->next = *pss; + ss->subseg = subseg; + ss->head = NULL; + ss->ptail = &ss->head; + *pss = ss; -/* Function prototypes: */ -static void out_uleb128 PARAMS ((addressT)); -static void out_sleb128 PARAMS ((offsetT)); -static void gen_addr_line PARAMS ((int, addressT)); -static void reset_state_machine PARAMS ((void)); -static void out_set_addr PARAMS ((addressT)); -static void out_end_sequence PARAMS ((void)); -static int get_filenum PARAMS ((int, char *)); -static void gen_dir_list PARAMS ((void)); -static void gen_file_list PARAMS ((void)); -static void print_stats PARAMS ((unsigned long)); + found_subseg: + last_seg = seg; + last_subseg = subseg; + last_line_subseg = ss; + return ss; +} -#define out_byte(byte) FRAG_APPEND_1_CHAR(byte) -#define out_opcode(opc) (out_byte ((opc)), ++ls.opcode_hist[(opc) & 0xff]) +/* Record an entry for LOC ocurring at OFS within the current fragment. */ -/* Output an unsigned "little-endian base 128" number. */ -static void -out_uleb128 (value) - addressT value; +void +dwarf2_gen_line_info (ofs, loc) + addressT ofs; + struct dwarf2_line_info *loc; { - unsigned char byte, more = 0x80; + struct line_subseg *ss; + struct line_entry *e; + + /* Early out for as-yet incomplete location information. */ + if (loc->filenum == 0 || loc->line == 0) + return; - do + e = (struct line_entry *) xmalloc (sizeof (*e)); + e->next = NULL; + e->frag = frag_now; + e->frag_ofs = ofs; + e->loc = *loc; + + ss = get_line_subseg (now_seg, now_subseg); + *ss->ptail = e; + ss->ptail = &e->next; +} + +void +dwarf2_where (line) + struct dwarf2_line_info *line; +{ + if (debug_type == DEBUG_DWARF2) { - byte = value & 0x7f; - value >>= 7; - if (value == 0) - more = 0; - out_byte (more | byte); + char *filename; + as_where (&filename, &line->line); + line->filenum = get_filenum (filename); + line->column = 0; + line->flags = DWARF2_FLAG_BEGIN_STMT; } - while (more); + else + *line = current; } -/* Output a signed "little-endian base 128" number. */ -static void -out_sleb128 (value) - offsetT value; +/* Called for each machine instruction, or relatively atomic group of + machine instructions (ie built-in macro). The instruction or group + is SIZE bytes in length. If dwarf2 line number generation is called + for, emit a line statement appropriately. */ + +void +dwarf2_emit_insn (size) + int size; { - unsigned char byte, more = 0x80; + struct dwarf2_line_info loc; + + if (debug_type != DEBUG_DWARF2 && ! loc_directive_seen) + return; + loc_directive_seen = false; + + dwarf2_where (&loc); + dwarf2_gen_line_info (frag_now_fix () - size, &loc); +} + +/* Get a .debug_line file number for FILENAME. */ - do +static unsigned int +get_filenum (filename) + const char *filename; +{ + static unsigned int last_used; + unsigned int i; + + if (last_used) + if (strcmp (filename, files[last_used].filename) == 0) + return last_used; + + for (i = 1; i < files_in_use; ++i) + if (strcmp (filename, files[i].filename) == 0) + return i; + + if (i >= files_allocated) { - byte = value & 0x7f; - value >>= 7; - if (((value == 0) && ((byte & 0x40) == 0)) - || ((value == -1) && ((byte & 0x40) != 0))) - more = 0; - out_byte (more | byte); + unsigned int old = files_allocated; + + files_allocated = i + 32; + files = (struct file_entry *) + xrealloc (files, (i + 32) * sizeof (struct file_entry)); + + memset (files + old, 0, (i + 32 - old) * sizeof (struct file_entry)); } - while (more); + + files[i].filename = xstrdup (filename); + files[i].dir = 0; + files_in_use = i + 1; + last_used = i; + + return i; } -/* Encode a pair of line and address skips as efficiently as possible. - Note that the line skip is signed, whereas the address skip is - unsigned. */ -static void -gen_addr_line (line_delta, addr_delta) - int line_delta; - addressT addr_delta; -{ - unsigned int tmp, opcode; +/* Handle the .file directive. */ - tmp = line_delta - DWARF2_LINE_BASE; +void +dwarf2_directive_file (dummy) + int dummy ATTRIBUTE_UNUSED; +{ + offsetT num; + const char *filename; + int filename_len; - if (tmp >= DWARF2_LINE_RANGE) + /* Continue to accept a bare string and pass it off. */ + SKIP_WHITESPACE (); + if (*input_line_pointer == '"') { - out_opcode (DW_LNS_advance_line); - out_sleb128 (line_delta); - tmp = 0 - DWARF2_LINE_BASE; - line_delta = 0; + s_app_file (0); + return; } - tmp += DWARF2_LINE_OPCODE_BASE; + num = get_absolute_expression (); + filename = demand_copy_C_string (&filename_len); + demand_empty_rest_of_line (); - /* try using a special opcode: */ - opcode = tmp + addr_delta*DWARF2_LINE_RANGE; - if (opcode <= 255) + if (num < 1) { - out_opcode (opcode); + as_bad (_("File number less than one")); return; } - /* try using DW_LNS_const_add_pc followed by special op: */ - opcode = tmp + (addr_delta - MAX_SPECIAL_ADDR_DELTA)*DWARF2_LINE_RANGE; - if (opcode <= 255) + if (num < files_in_use && files[num].filename != 0) { - out_opcode (DW_LNS_const_add_pc); - out_opcode (opcode); + as_bad (_("File number %d already allocated"), num); return; } - out_opcode (DW_LNS_advance_pc); - out_uleb128 (addr_delta); + if (num >= (int) files_allocated) + { + unsigned int old = files_allocated; - if (line_delta) - out_opcode (tmp); /* output line-delta */ - else - out_opcode (DW_LNS_copy); /* append new row with current info */ + files_allocated = num + 16; + files = (struct file_entry *) + xrealloc (files, (num + 16) * sizeof (struct file_entry)); + + /* Zero the new memory. */ + memset (files + old, 0, (num + 16 - old) * sizeof (struct file_entry)); + } + + files[num].filename = filename; + files[num].dir = 0; + files_in_use = num + 1; } -static void -reset_state_machine () +void +dwarf2_directive_loc (dummy) + int dummy ATTRIBUTE_UNUSED; { - static const struct dwarf2_sm initial_state = { INITIAL_STATE }; + offsetT filenum, line, column; + + filenum = get_absolute_expression (); + SKIP_WHITESPACE (); + line = get_absolute_expression (); + SKIP_WHITESPACE (); + column = get_absolute_expression (); + demand_empty_rest_of_line (); + + if (filenum < 1) + { + as_bad (_("File number less than one")); + return; + } + if (filenum >= (int) files_in_use || files[filenum].filename == 0) + { + as_bad (_("Unassigned file number %ld"), (long) filenum); + return; + } + + current.filenum = filenum; + current.line = line; + current.column = column; + current.flags = DWARF2_FLAG_BEGIN_STMT; - ls.sm = initial_state; + loc_directive_seen = true; + +#ifndef NO_LISTING + if (listing) + listing_source_line (line); +#endif } + +static struct frag * +first_frag_for_seg (seg) + segT seg; +{ + frchainS *f, *first = NULL; -/* Set an absolute address (may results in a relocation entry): */ -static void -out_set_addr (addr) - addressT addr; + for (f = frchain_root; f; f = f->frch_next) + if (f->frch_seg == seg + && (! first || first->frch_subseg > f->frch_subseg)) + first = f; + + return first ? first->frch_root : NULL; +} + +static struct frag * +last_frag_for_seg (seg) + segT seg; { - subsegT saved_subseg; - segT saved_seg; - expressionS expr; - symbolS *sym; - int bytes_per_address; + frchainS *f, *last = NULL; - saved_seg = now_seg; - saved_subseg = now_subseg; + for (f = frchain_root; f; f = f->frch_next) + if (f->frch_seg == seg + && (! last || last->frch_subseg < f->frch_subseg)) + last= f; - subseg_set (ls.text_seg, ls.text_subseg); - sym = symbol_new (".L0\001", now_seg, addr, frag_now); + return last ? last->frch_last : NULL; +} + +/* Emit a single byte into the current segment. */ - subseg_set (saved_seg, saved_subseg); +static inline void +out_byte (byte) + int byte; +{ + FRAG_APPEND_1_CHAR (byte); +} -#ifdef BFD_ASSEMBLER - bytes_per_address = bfd_arch_bits_per_address (stdoutput) / 8; -#else - /* FIXME. */ - bytes_per_address = 4; -#endif +/* Emit a statement program opcode into the current segment. */ - out_opcode (DW_LNS_extended_op); - out_uleb128 (bytes_per_address + 1); +static inline void +out_opcode (opc) + int opc; +{ + out_byte (opc); +} - out_opcode (DW_LNE_set_address); - expr.X_op = O_symbol; - expr.X_add_symbol = sym; - expr.X_add_number = 0; - emit_expr (&expr, bytes_per_address); +/* Emit a two-byte word into the current segment. */ + +static inline void +out_two (data) + int data; +{ + md_number_to_chars (frag_more (2), data, 2); } -/* Emit DW_LNS_end_sequence and reset state machine. Does not - preserve the current segment/sub-segment! */ +/* Emit a four byte word into the current segment. */ + +static inline void +out_four (data) + int data; +{ + md_number_to_chars (frag_more (4), data, 4); +} + +/* Emit an unsigned "little-endian base 128" number. */ + static void -out_end_sequence () +out_uleb128 (value) + addressT value; { - addressT addr, delta; - fragS *text_frag; + output_leb128 (frag_more (sizeof_leb128 (value, 0)), value, 0); +} - if (ls.text_seg) - { - subseg_set (ls.text_seg, ls.text_subseg); -#ifdef md_current_text_addr - addr = md_current_text_addr (); -#else - addr = frag_now_fix (); -#endif - text_frag = frag_now; - subseg_set (ls.line_seg, DL_BODY); - if (text_frag != ls.frag) - { - out_set_addr (addr); - ls.sm.addr = addr; - ls.frag = text_frag; - } - else - { - delta = (addr - ls.sm.addr) / DWARF2_LINE_MIN_INSN_LENGTH; - if (delta > 0) - { - /* Advance address without updating the line-debug - matrix---the end_sequence entry is used only to tell - the debugger the end of the sequence.*/ - out_opcode (DW_LNS_advance_pc); - out_uleb128 (delta); - } - } - } - else - subseg_set (ls.line_seg, DL_BODY); +/* Emit a tuple for .debug_abbrev. */ - out_opcode (DW_LNS_extended_op); - out_uleb128 (1); - out_byte (DW_LNE_end_sequence); +static inline void +out_abbrev (name, form) + int name, form; +{ + out_uleb128 (name); + out_uleb128 (form); +} - reset_state_machine (); +/* Create a new fake symbol whose value is the current position. */ + +static symbolS * +symbol_new_now () +{ + return symbol_new (fake_label_name, now_seg, frag_now_fix (), frag_now); } -/* Look up a filenumber either by filename or by filenumber. If both - a filenumber and a filename are specified, lookup by filename takes - precedence. If the filename cannot be found, it is added to the - filetable and the filenumber for the new entry is returned. */ -static int -get_filenum (filenum, file) - int filenum; - char *file; +/* Set the value of SYM to the current position in the current segment. */ + +static void +set_symbol_value_now (sym) + symbolS *sym; { - int i, last = filenum - 1; - char char0 = file[0]; + S_SET_SEGMENT (sym, now_seg); + S_SET_VALUE (sym, frag_now_fix ()); + symbol_set_frag (sym, frag_now); +} - /* If filenum is out of range of the filename table, then try using the - table entry returned from the previous call. */ - if (last >= ls.num_filenames || last < 0) - last = ls.last_filename; +/* Get the size of a fragment. */ - /* Do a quick check against the specified or previously used filenum. */ - if (ls.num_filenames > 0 && ls.file[last].name[0] == char0 - && strcmp (ls.file[last].name + 1, file + 1) == 0) - return last + 1; +static offsetT +get_frag_fix (frag) + fragS *frag; +{ + frchainS *fr; - /* no match, fall back to simple linear scan: */ - for (i = 0; i < ls.num_filenames; ++i) - { - if (ls.file[i].name[0] == char0 - && strcmp (ls.file[i].name + 1, file + 1) == 0) - { - ls.last_filename = i; - return i + 1; - } - } + if (frag->fr_next) + return frag->fr_fix; - /* no match: enter new filename */ - if (ls.num_filenames >= ls.filename_len) - { - ls.filename_len += 13; - ls.file = xrealloc (ls.file, ls.filename_len * sizeof (ls.file[0])); - } - ls.file[ls.num_filenames].dir = 0; - ls.file[ls.num_filenames].name = file; - ls.last_filename = ls.num_filenames; - return ++ls.num_filenames; + /* If a fragment is the last in the chain, special measures must be + taken to find its size before relaxation, since it may be pending + on some subsegment chain. */ + for (fr = frchain_root; fr; fr = fr->frch_next) + if (fr->frch_last == frag) + { + return ((char *) obstack_next_free (&fr->frch_obstack) + - frag->fr_literal); + } + + abort (); } -/* Emit an entry in the line number table if the address or line has changed. - ADDR is relative to the current frag in the text section. */ +/* Set an absolute address (may result in a relocation entry). */ -void -dwarf2_gen_line_info (addr, l) - addressT addr; - struct dwarf2_line_info *l; +static void +out_set_addr (seg, frag, ofs) + segT seg; + fragS *frag; + addressT ofs; { - unsigned int filenum = l->filenum; - unsigned int any_output = 0; - subsegT saved_subseg; - segT saved_seg; - fragS *saved_frag; + expressionS expr; + symbolS *sym; - if (flag_debug) - fprintf (stderr, "line: addr %lx file `%s' line %u col %u flags %x\n", - (unsigned long) addr, l->filename, l->line, l->column, l->flags); + sym = symbol_new (fake_label_name, seg, ofs, frag); - if (filenum > 0 && !l->filename) - { - if (filenum >= (unsigned int) ls.num_filenames) - { - as_warn ("Encountered bad file number in line number debug info!"); - return; - } - } - else if (l->filename) - filenum = get_filenum (filenum, l->filename); - else - return; /* no filename, no filnum => no play */ + out_opcode (DW_LNS_extended_op); + out_uleb128 (sizeof_address + 1); - /* Must save these before the subseg_new call, as that call will change - them. */ - saved_seg = now_seg; - saved_subseg = now_subseg; - saved_frag = frag_now; + out_opcode (DW_LNE_set_address); + expr.X_op = O_symbol; + expr.X_add_symbol = sym; + expr.X_add_number = 0; + emit_expr (&expr, sizeof_address); +} - if (!ls.line_seg) - { -#ifdef BFD_ASSEMBLER - symbolS *secsym; -#endif +/* Encode a pair of line and address skips as efficiently as possible. + Note that the line skip is signed, whereas the address skip is unsigned. - ls.line_seg = subseg_new (".debug_line", 0); + The following two routines *must* be kept in sync. This is + enforced by making emit_inc_line_addr abort if we do not emit + exactly the expected number of bytes. */ -#ifdef BFD_ASSEMBLER - bfd_set_section_flags (stdoutput, ls.line_seg, SEC_READONLY); +static int +size_inc_line_addr (line_delta, addr_delta) + int line_delta; + addressT addr_delta; +{ + unsigned int tmp, opcode; + int len = 0; - /* We're going to need this symbol. */ - secsym = symbol_find (".debug_line"); - if (secsym != NULL) - symbol_set_bfdsym (secsym, ls.line_seg->symbol); - else - symbol_table_insert (section_symbol (ls.line_seg)); + /* Scale the address delta by the minimum instruction length. */ +#if DWARF2_LINE_MIN_INSN_LENGTH > 1 + assert (addr_delta % DWARF2_LINE_MIN_INSN_LENGTH == 0); + addr_delta /= DWARF2_LINE_MIN_INSN_LENGTH; #endif - } - - subseg_set (ls.line_seg, DL_BODY); - if (ls.text_seg != saved_seg || ls.text_subseg != saved_subseg) + /* INT_MAX is a signal that this is actually a DW_LNE_end_sequence. + We cannot use special opcodes here, since we want the end_sequence + to emit the matrix entry. */ + if (line_delta == INT_MAX) { - if (!ls.sm.empty_sequence) - { - out_end_sequence (); /* terminate previous sequence */ - ls.sm.empty_sequence = 1; - } - any_output = 1; - ls.text_seg = saved_seg; - ls.text_subseg = saved_subseg; - out_set_addr (addr); - ls.sm.addr = addr; - ls.frag = saved_frag; + if (addr_delta == MAX_SPECIAL_ADDR_DELTA) + len = 1; + else + len = 1 + sizeof_leb128 (addr_delta, 0); + return len + 3; } - if (ls.sm.filenum != filenum) + /* Bias the line delta by the base. */ + tmp = line_delta - DWARF2_LINE_BASE; + + /* If the line increment is out of range of a special opcode, we + must encode it with DW_LNS_advance_line. */ + if (tmp >= DWARF2_LINE_RANGE) { - any_output = 1; - out_opcode (DW_LNS_set_file); - out_uleb128 (filenum); - ls.sm.filenum = filenum; + len = 1 + sizeof_leb128 (line_delta, 1); + line_delta = 0; + tmp = 0 - DWARF2_LINE_BASE; } - if (ls.sm.column != l->column) + /* Bias the opcode by the special opcode base. */ + tmp += DWARF2_LINE_OPCODE_BASE; + + /* Avoid overflow when addr_delta is large. */ + if (addr_delta < 256 + MAX_SPECIAL_ADDR_DELTA) { - any_output = 1; - out_opcode (DW_LNS_set_column); - out_uleb128 (l->column); - ls.sm.column = l->column; + /* Try using a special opcode. */ + opcode = tmp + addr_delta * DWARF2_LINE_RANGE; + if (opcode <= 255) + return len + 1; + + /* Try using DW_LNS_const_add_pc followed by special op. */ + opcode = tmp + (addr_delta - MAX_SPECIAL_ADDR_DELTA) * DWARF2_LINE_RANGE; + if (opcode <= 255) + return len + 2; } - if (((l->flags & DWARF2_FLAG_BEGIN_STMT) != 0) != ls.sm.is_stmt) + /* Otherwise use DW_LNS_advance_pc. */ + len += 1 + sizeof_leb128 (addr_delta, 0); + + /* DW_LNS_copy or special opcode. */ + len += 1; + + return len; +} + +static void +emit_inc_line_addr (line_delta, addr_delta, p, len) + int line_delta; + addressT addr_delta; + char *p; + int len; +{ + unsigned int tmp, opcode; + int need_copy = 0; + char *end = p + len; + +#if DWARF2_LINE_MIN_INSN_LENGTH > 1 + /* Scale the address delta by the minimum instruction length. */ + assert (addr_delta % DWARF2_LINE_MIN_INSN_LENGTH == 0); + addr_delta /= DWARF2_LINE_MIN_INSN_LENGTH; +#endif + /* INT_MAX is a signal that this is actually a DW_LNE_end_sequence. + We cannot use special opcodes here, since we want the end_sequence + to emit the matrix entry. */ + if (line_delta == INT_MAX) { - any_output = 1; - out_opcode (DW_LNS_negate_stmt); + if (addr_delta == MAX_SPECIAL_ADDR_DELTA) + *p++ = DW_LNS_const_add_pc; + else + { + *p++ = DW_LNS_advance_pc; + p += output_leb128 (p, addr_delta, 0); + } + + *p++ = DW_LNS_extended_op; + *p++ = 1; + *p++ = DW_LNE_end_sequence; + goto done; } - if (l->flags & DWARF2_FLAG_BEGIN_BLOCK) + /* Bias the line delta by the base. */ + tmp = line_delta - DWARF2_LINE_BASE; + + /* If the line increment is out of range of a special opcode, we + must encode it with DW_LNS_advance_line. */ + if (tmp >= DWARF2_LINE_RANGE) { - any_output = 1; - out_opcode (DW_LNS_set_basic_block); + *p++ = DW_LNS_advance_line; + p += output_leb128 (p, line_delta, 1); + + /* Prettier, I think, to use DW_LNS_copy instead of a + "line +0, addr +0" special opcode. */ + if (addr_delta == 0) + { + *p++ = DW_LNS_copy; + goto done; + } + + line_delta = 0; + tmp = 0 - DWARF2_LINE_BASE; + need_copy = 1; } - if (ls.sm.line != l->line) + /* Bias the opcode by the special opcode base. */ + tmp += DWARF2_LINE_OPCODE_BASE; + + /* Avoid overflow when addr_delta is large. */ + if (addr_delta < 256 + MAX_SPECIAL_ADDR_DELTA) { - any_output = 1; - if (saved_frag != ls.frag) + /* Try using a special opcode. */ + opcode = tmp + addr_delta * DWARF2_LINE_RANGE; + if (opcode <= 255) + { + *p++ = opcode; + goto done; + } + + /* Try using DW_LNS_const_add_pc followed by special op. */ + opcode = tmp + (addr_delta - MAX_SPECIAL_ADDR_DELTA) * DWARF2_LINE_RANGE; + if (opcode <= 255) { - /* If a new frag got allocated (for whatever reason), then - deal with it by generating a reference symbol. Note: no - end_sequence needs to be generated because the address did - not really decrease (only the reference point changed). */ - out_set_addr (addr); - ls.sm.addr = addr; - ls.frag = saved_frag; + *p++ = DW_LNS_const_add_pc; + *p++ = opcode; + goto done; } - gen_addr_line (l->line - ls.sm.line, - (addr - ls.sm.addr) / DWARF2_LINE_MIN_INSN_LENGTH); - ls.sm.basic_block = 0; - ls.sm.line = l->line; - ls.sm.addr = addr; } - subseg_set (saved_seg, saved_subseg); + /* Otherwise use DW_LNS_advance_pc. */ + *p++ = DW_LNS_advance_pc; + p += output_leb128 (p, addr_delta, 0); - ls.num_line_entries += any_output; - if (any_output) - ls.sm.empty_sequence = 0; + if (need_copy) + *p++ = DW_LNS_copy; + else + *p++ = tmp; + + done: + assert (p == end); } +/* Handy routine to combine calls to the above two routines. */ + static void -gen_dir_list () +out_inc_line_addr (line_delta, addr_delta) + int line_delta; + addressT addr_delta; { - char *str, *slash, *dir_list, *dp, *cp; - int i, j, num_dirs; + int len = size_inc_line_addr (line_delta, addr_delta); + emit_inc_line_addr (line_delta, addr_delta, frag_more (len), len); +} + +/* Generate a variant frag that we can use to relax address/line + increments between fragments of the target segment. */ + +static void +relax_inc_line_addr (line_delta, seg, to_frag, to_ofs, from_frag, from_ofs) + int line_delta; + segT seg; + fragS *to_frag, *from_frag; + addressT to_ofs, from_ofs; +{ + symbolS *to_sym, *from_sym; + expressionS expr; + int max_chars; + + to_sym = symbol_new (fake_label_name, seg, to_ofs, to_frag); + from_sym = symbol_new (fake_label_name, seg, from_ofs, from_frag); + + expr.X_op = O_subtract; + expr.X_add_symbol = to_sym; + expr.X_op_symbol = from_sym; + expr.X_add_number = 0; + + /* The maximum size of the frag is the line delta with a maximum + sized address delta. */ + max_chars = size_inc_line_addr (line_delta, -DWARF2_LINE_MIN_INSN_LENGTH); + + frag_var (rs_dwarf2dbg, max_chars, max_chars, 1, + make_expr_symbol (&expr), line_delta, NULL); +} - dir_list = frag_more (0); - num_dirs = 0; +/* The function estimates the size of a rs_dwarf2dbg 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. */ - for (i = 0; i < ls.num_filenames; ++i) +int +dwarf2dbg_estimate_size_before_relax (frag) + fragS *frag; +{ + offsetT addr_delta; + int size; + + addr_delta = resolve_symbol_value (frag->fr_symbol, 0); + size = size_inc_line_addr (frag->fr_offset, addr_delta); + + frag->fr_subtype = size; + + return size; +} + +/* This function relaxes a rs_dwarf2dbg 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. */ + +int +dwarf2dbg_relax_frag (frag) + fragS *frag; +{ + int old_size, new_size; + + old_size = frag->fr_subtype; + new_size = dwarf2dbg_estimate_size_before_relax (frag); + + return new_size - old_size; +} + +/* This function converts a rs_dwarf2dbg 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. */ + +void +dwarf2dbg_convert_frag (frag) + fragS *frag; +{ + offsetT addr_diff; + + addr_diff = resolve_symbol_value (frag->fr_symbol, 1); + + /* fr_var carries the max_chars that we created the fragment with. + fr_subtype carries the current expected length. We must, of + course, have allocated enough memory earlier. */ + assert (frag->fr_var >= (int) frag->fr_subtype); + + emit_inc_line_addr (frag->fr_offset, addr_diff, + frag->fr_literal + frag->fr_fix, frag->fr_subtype); + + frag->fr_fix += frag->fr_subtype; + frag->fr_type = rs_fill; + frag->fr_var = 0; + frag->fr_offset = 0; +} + +/* Generate .debug_line content for the chain of line number entries + beginning at E, for segment SEG. */ + +static void +process_entries (seg, e) + segT seg; + struct line_entry *e; +{ + unsigned filenum = 1; + unsigned line = 1; + unsigned column = 0; + unsigned flags = DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_BEGIN_STMT : 0; + fragS *frag = NULL; + fragS *last_frag; + addressT frag_ofs = 0; + addressT last_frag_ofs; + struct line_entry *next; + + while (e) { - str = ls.file[i].name; - slash = strrchr (str, '/'); - if (slash) + int changed = 0; + + if (filenum != e->loc.filenum) { - *slash = '\0'; - for (j = 0, dp = dir_list; j < num_dirs; ++j) - { - if (strcmp (str, dp) == 0) - { - ls.file[i].dir = j + 1; - break; - } - dp += strlen (dp); - } - if (j >= num_dirs) + filenum = e->loc.filenum; + out_opcode (DW_LNS_set_file); + out_uleb128 (filenum); + changed = 1; + } + + if (column != e->loc.column) + { + column = e->loc.column; + out_opcode (DW_LNS_set_column); + out_uleb128 (column); + changed = 1; + } + + if ((e->loc.flags ^ flags) & DWARF2_FLAG_BEGIN_STMT) + { + flags = e->loc.flags; + out_opcode (DW_LNS_negate_stmt); + changed = 1; + } + + if (e->loc.flags & DWARF2_FLAG_BEGIN_BLOCK) + { + out_opcode (DW_LNS_set_basic_block); + changed = 1; + } + + if (line != e->loc.line || changed) + { + int line_delta = e->loc.line - line; + if (frag == NULL) { - /* didn't find this directory: append it to the list */ - size_t size = strlen (str) + 1; - cp = frag_more (size); - memcpy (cp, str, size); - ls.file[i].dir = ++num_dirs; + out_set_addr (seg, e->frag, e->frag_ofs); + out_inc_line_addr (line_delta, 0); } - *slash = '/'; - ls.file[i].name = slash + 1; + else if (frag == e->frag) + out_inc_line_addr (line_delta, e->frag_ofs - frag_ofs); + else + relax_inc_line_addr (line_delta, seg, e->frag, e->frag_ofs, + frag, frag_ofs); + + frag = e->frag; + frag_ofs = e->frag_ofs; + line = e->loc.line; + } + else if (frag == NULL) + { + out_set_addr (seg, e->frag, e->frag_ofs); + frag = e->frag; + frag_ofs = e->frag_ofs; } + + next = e->next; + free (e); + e = next; } - out_byte ('\0'); /* terminate directory list */ + + /* Emit a DW_LNE_end_sequence for the end of the section. */ + last_frag = last_frag_for_seg (seg); + last_frag_ofs = get_frag_fix (last_frag); + if (frag == last_frag) + out_inc_line_addr (INT_MAX, last_frag_ofs - frag_ofs); + else + relax_inc_line_addr (INT_MAX, seg, last_frag, last_frag_ofs, + frag, frag_ofs); } +/* Emit the directory and file tables for .debug_line. */ + static void -gen_file_list () +out_file_list () { size_t size; char *cp; - int i; + unsigned int i; + + /* Terminate directory list. */ + out_byte ('\0'); - for (i = 0; i < ls.num_filenames; ++i) + for (i = 1; i < files_in_use; ++i) { - size = strlen (ls.file[i].name) + 1; + if (files[i].filename == NULL) + { + as_bad (_("Unassigned file number %u"), i); + continue; + } + + size = strlen (files[i].filename) + 1; cp = frag_more (size); - memcpy (cp, ls.file[i].name, size); + memcpy (cp, files[i].filename, size); - out_uleb128 (ls.file[i].dir); /* directory number */ + out_uleb128 (files[i].dir); /* directory number */ out_uleb128 (0); /* last modification timestamp */ out_uleb128 (0); /* filesize */ } - out_byte (0); /* terminate filename list */ + + /* Terminate filename list. */ + out_byte (0); } +/* Emit the collected .debug_line data. */ + static void -print_stats (total_size) - unsigned long total_size; +out_debug_line (line_seg) + segT line_seg; { - static const char *opc_name[] = - { - "extended", "copy", "advance_pc", "advance_line", "set_file", - "set_column", "negate_stmt", "set_basic_block", "const_add_pc", - "fixed_advance_pc" - }; - size_t i; - int j; + expressionS expr; + symbolS *line_start; + symbolS *prologue_end; + symbolS *line_end; + struct line_seg *s; + + subseg_set (line_seg, 0); + + line_start = symbol_new_now (); + prologue_end = symbol_make (fake_label_name); + line_end = symbol_make (fake_label_name); + + /* Total length of the information for this compilation unit. */ + expr.X_op = O_subtract; + expr.X_add_symbol = line_end; + expr.X_op_symbol = line_start; + expr.X_add_number = -4; + emit_expr (&expr, 4); + + /* Version. */ + out_two (2); + + /* Length of the prologue following this length. */ + expr.X_op = O_subtract; + expr.X_add_symbol = prologue_end; + expr.X_op_symbol = line_start; + expr.X_add_number = - (4 + 2 + 4); + emit_expr (&expr, 4); + + /* Parameters of the state machine. */ + out_byte (DWARF2_LINE_MIN_INSN_LENGTH); + out_byte (DWARF2_LINE_DEFAULT_IS_STMT); + out_byte (DWARF2_LINE_BASE); + out_byte (DWARF2_LINE_RANGE); + out_byte (DWARF2_LINE_OPCODE_BASE); + + /* Standard opcode lengths. */ + out_byte (0); /* DW_LNS_copy */ + out_byte (1); /* DW_LNS_advance_pc */ + out_byte (1); /* DW_LNS_advance_line */ + out_byte (1); /* DW_LNS_set_file */ + out_byte (1); /* DW_LNS_set_column */ + out_byte (0); /* DW_LNS_negate_stmt */ + out_byte (0); /* DW_LNS_set_basic_block */ + out_byte (0); /* DW_LNS_const_add_pc */ + out_byte (1); /* DW_LNS_fixed_advance_pc */ + + out_file_list (); + + set_symbol_value_now (prologue_end); + + /* For each section, emit a statement program. */ + for (s = all_segs; s; s = s->next) + process_entries (s->seg, s->head->head); + + set_symbol_value_now (line_end); +} + +/* Emit data for .debug_aranges. */ + +static void +out_debug_aranges (aranges_seg, info_seg) + segT aranges_seg; + segT info_seg; +{ + unsigned int addr_size = sizeof_address; + addressT size, skip; + struct line_seg *s; + expressionS expr; + char *p; + + size = 4 + 2 + 4 + 1 + 1; + + skip = 2 * addr_size - (size & (2 * addr_size - 1)); + if (skip == 2 * addr_size) + skip = 0; + size += skip; + + for (s = all_segs; s; s = s->next) + size += 2 * addr_size; + + size += 2 * addr_size; - fprintf (stderr, "Average size: %g bytes/line\n", - total_size / (double) ls.num_line_entries); + subseg_set (aranges_seg, 0); - fprintf (stderr, "\nStandard opcode histogram:\n"); + /* Length of the compilation unit. */ + out_four (size - 4); - for (i = 0; i < sizeof (opc_name)/sizeof (opc_name[0]); ++i) + /* Version. */ + out_two (2); + + /* Offset to .debug_info. */ + expr.X_op = O_symbol; + expr.X_add_symbol = section_symbol (info_seg); + expr.X_add_number = 0; + emit_expr (&expr, 4); + + /* Size of an address (offset portion). */ + out_byte (addr_size); + + /* Size of a segment descriptor. */ + out_byte (0); + + /* Align the header. */ + if (skip) + frag_align (ffs (2 * addr_size) - 1, 0, 0); + + for (s = all_segs; s; s = s->next) { - fprintf (stderr, "%s", opc_name[i]); - for (j = strlen (opc_name[i]); j < 16; ++j) - fprintf (stderr, " "); - fprintf (stderr, ": %u\n", ls.opcode_hist[i]); + fragS *frag; + symbolS *beg, *end; + + frag = first_frag_for_seg (s->seg); + beg = symbol_new (fake_label_name, s->seg, 0, frag); + s->text_start = beg; + + frag = last_frag_for_seg (s->seg); + end = symbol_new (fake_label_name, s->seg, get_frag_fix (frag), frag); + s->text_end = end; + + expr.X_op = O_symbol; + expr.X_add_symbol = beg; + expr.X_add_number = 0; + emit_expr (&expr, addr_size); + + expr.X_op = O_subtract; + expr.X_add_symbol = end; + expr.X_op_symbol = beg; + expr.X_add_number = 0; + emit_expr (&expr, addr_size); } - fprintf (stderr, "\nSpecial opcodes:\naddr\t\t\t\tline skip\n"); + p = frag_more (2 * addr_size); + md_number_to_chars (p, 0, addr_size); + md_number_to_chars (p + addr_size, 0, addr_size); +} + +/* Emit data for .debug_abbrev. Note that this must be kept in + sync with out_debug_info below. */ - fprintf (stderr, "skip: "); - for (j = DWARF2_LINE_BASE; j < DWARF2_LINE_BASE + DWARF2_LINE_RANGE; ++j) - fprintf (stderr, "%3d", j); - fprintf (stderr, "\n-----"); +static void +out_debug_abbrev (abbrev_seg) + segT abbrev_seg; +{ + subseg_set (abbrev_seg, 0); - for (; i < 256; ++i) + out_uleb128 (1); + out_uleb128 (DW_TAG_compile_unit); + out_byte (DW_CHILDREN_no); + out_abbrev (DW_AT_stmt_list, DW_FORM_data4); + if (all_segs->next == NULL) { - j = SPECIAL_LINE (i); - if (j == DWARF2_LINE_BASE) - fprintf (stderr, "\n%4u: ", - ((unsigned int) - DWARF2_LINE_MIN_INSN_LENGTH * SPECIAL_ADDR (i))); - fprintf (stderr, " %2u", ls.opcode_hist[i]); + out_abbrev (DW_AT_low_pc, DW_FORM_addr); + out_abbrev (DW_AT_high_pc, DW_FORM_addr); } - fprintf (stderr, "\n"); + out_abbrev (DW_AT_comp_dir, DW_FORM_string); + out_abbrev (DW_AT_producer, DW_FORM_string); + out_abbrev (DW_AT_language, DW_FORM_data2); + out_abbrev (0, 0); + + /* Terminate the abbreviations for this compilation unit. */ + out_byte (0); } -void -dwarf2_finish () +/* Emit a description of this compilation unit for .debug_info. */ + +static void +out_debug_info (info_seg, abbrev_seg, line_seg) + segT info_seg; + segT abbrev_seg; + segT line_seg; { - addressT body_size, total_size, prolog_size; - subsegT saved_subseg; - segT saved_seg; - char *cp; + char producer[128]; + char *comp_dir; + expressionS expr; + symbolS *info_start; + symbolS *info_end; + char *p; + int len; - if (!ls.line_seg) - /* no .debug_line segment, no work to do... */ - return; + subseg_set (info_seg, 0); - saved_seg = now_seg; - saved_subseg = now_subseg; + info_start = symbol_new_now (); + info_end = symbol_make (fake_label_name); - if (!ls.sm.empty_sequence) - out_end_sequence (); - total_size = body_size = frag_now_fix (); + /* Compilation Unit length. */ + expr.X_op = O_subtract; + expr.X_add_symbol = info_end; + expr.X_op_symbol = info_start; + expr.X_add_number = -4; + emit_expr (&expr, 4); - /* now generate the directory and file lists: */ - subseg_set (ls.line_seg, DL_FILES); - gen_dir_list (); - gen_file_list (); - total_size += frag_now_fix (); + /* DWARF version. */ + out_two (2); - /* and now the header ("statement program prolog", in DWARF2 lingo...) */ - subseg_set (ls.line_seg, DL_PROLOG); + /* .debug_abbrev offset */ + expr.X_op = O_symbol; + expr.X_add_symbol = section_symbol (abbrev_seg); + expr.X_add_number = 0; + emit_expr (&expr, 4); - cp = frag_more (15 + DWARF2_LINE_OPCODE_BASE - 1); + /* Target address size. */ + out_byte (sizeof_address); - total_size += frag_now_fix (); - prolog_size = total_size - body_size - 10; + /* DW_TAG_compile_unit DIE abbrev */ + out_uleb128 (1); -# define STUFF(val,size) md_number_to_chars (cp, val, size); cp += size; - STUFF (total_size - 4, 4); /* length */ - STUFF (2, 2); /* version */ - STUFF (prolog_size, 4); /* prologue_length */ - STUFF (DWARF2_LINE_MIN_INSN_LENGTH, 1); - STUFF (DWARF2_LINE_DEFAULT_IS_STMT, 1); - STUFF (DWARF2_LINE_BASE, 1); - STUFF (DWARF2_LINE_RANGE, 1); - STUFF (DWARF2_LINE_OPCODE_BASE, 1); + /* DW_AT_stmt_list */ + expr.X_op = O_symbol; + expr.X_add_symbol = section_symbol (line_seg); + expr.X_add_number = 0; + emit_expr (&expr, 4); + + /* These two attributes may only be emitted if all of the code is + contiguous. Multiple sections are not that. */ + if (all_segs->next == NULL) + { + /* DW_AT_low_pc */ + expr.X_op = O_symbol; + expr.X_add_symbol = all_segs->text_start; + expr.X_add_number = 0; + emit_expr (&expr, sizeof_address); + + /* DW_AT_high_pc */ + expr.X_op = O_symbol; + expr.X_add_symbol = all_segs->text_end; + expr.X_add_number = 0; + emit_expr (&expr, sizeof_address); + } + + /* DW_AT_comp_dir */ + comp_dir = getpwd (); + len = strlen (comp_dir) + 1; + p = frag_more (len); + memcpy (p, comp_dir, len); - /* standard_opcode_lengths: */ - STUFF (0, 1); /* DW_LNS_copy */ - STUFF (1, 1); /* DW_LNS_advance_pc */ - STUFF (1, 1); /* DW_LNS_advance_line */ - STUFF (1, 1); /* DW_LNS_set_file */ - STUFF (1, 1); /* DW_LNS_set_column */ - STUFF (0, 1); /* DW_LNS_negate_stmt */ - STUFF (0, 1); /* DW_LNS_set_basic_block */ - STUFF (0, 1); /* DW_LNS_const_add_pc */ - STUFF (1, 1); /* DW_LNS_fixed_advance_pc */ + /* DW_AT_producer */ + sprintf (producer, "GNU AS %s", VERSION); + len = strlen (producer) + 1; + p = frag_more (len); + memcpy (p, producer, len); - subseg_set (saved_seg, saved_subseg); + /* DW_AT_language. Yes, this is probably not really MIPS, but the + dwarf2 draft has no standard code for assembler. */ + out_two (DW_LANG_Mips_Assembler); - if (flag_debug) - print_stats (total_size); + set_symbol_value_now (info_end); } void -dwarf2_directive_file (dummy) - int dummy ATTRIBUTE_UNUSED; +dwarf2_finish () { - int len; + segT line_seg; + struct line_seg *s; - /* Continue to accept a bare string and pass it off. */ - SKIP_WHITESPACE (); - if (*input_line_pointer == '"') + /* If no debug information was recorded, nothing to do. */ + if (all_segs == NULL) + return; + + /* Calculate the size of an address for the target machine. */ + sizeof_address = bfd_arch_bits_per_address (stdoutput) / 8; + + /* Create and switch to the line number section. */ + line_seg = subseg_new (".debug_line", 0); + bfd_set_section_flags (stdoutput, line_seg, SEC_READONLY); + + /* For each subsection, chain the debug entries together. */ + for (s = all_segs; s; s = s->next) { - s_app_file (0); - return; + struct line_subseg *ss = s->head; + struct line_entry **ptail = ss->ptail; + + while ((ss = ss->next) != NULL) + { + *ptail = ss->head; + ptail = ss->ptail; + } } - ls.any_dwarf2_directives = 1; + out_debug_line (line_seg); + + /* If this is assembler generated line info, we need .debug_info + and .debug_abbrev sections as well. */ + if (debug_type == DEBUG_DWARF2) + { + segT abbrev_seg; + segT info_seg; + segT aranges_seg; - if (debug_type == DEBUG_NONE) - /* Automatically turn on DWARF2 debug info unless something else - has been selected. */ - debug_type = DEBUG_DWARF2; + info_seg = subseg_new (".debug_info", 0); + abbrev_seg = subseg_new (".debug_abbrev", 0); + aranges_seg = subseg_new (".debug_aranges", 0); - ls.current.filenum = get_absolute_expression (); - ls.current.filename = demand_copy_C_string (&len); + bfd_set_section_flags (stdoutput, info_seg, SEC_READONLY); + bfd_set_section_flags (stdoutput, abbrev_seg, SEC_READONLY); + bfd_set_section_flags (stdoutput, aranges_seg, SEC_READONLY); - demand_empty_rest_of_line (); + record_alignment (aranges_seg, ffs (2 * sizeof_address) - 1); + + out_debug_aranges (aranges_seg, info_seg); + out_debug_abbrev (abbrev_seg); + out_debug_info (info_seg, abbrev_seg, line_seg); + } } +#else void -dwarf2_directive_loc (dummy) - int dummy ATTRIBUTE_UNUSED; +dwarf2_finish () +{ +} + +int +dwarf2dbg_estimate_size_before_relax (frag) + fragS *frag ATTRIBUTE_UNUSED; { - ls.any_dwarf2_directives = 1; + as_fatal (_("dwarf2 is not supported for this object file format")); + return 0; +} - ls.current.filenum = get_absolute_expression (); - SKIP_WHITESPACE (); - ls.current.line = get_absolute_expression (); - SKIP_WHITESPACE (); - ls.current.column = get_absolute_expression (); - demand_empty_rest_of_line (); +int +dwarf2dbg_relax_frag (frag) + fragS *frag ATTRIBUTE_UNUSED; +{ + as_fatal (_("dwarf2 is not supported for this object file format")); + return 0; +} - ls.current.flags = DWARF2_FLAG_BEGIN_STMT; +void +dwarf2dbg_convert_frag (frag) + fragS *frag ATTRIBUTE_UNUSED; +{ + as_fatal (_("dwarf2 is not supported for this object file format")); +} -#ifndef NO_LISTING - if (listing) - listing_source_line (ls.current.line); -#endif +void +dwarf2_emit_insn (size) + int size ATTRIBUTE_UNUSED; +{ } void -dwarf2_where (line) - struct dwarf2_line_info *line; +dwarf2_directive_file (dummy) + int dummy ATTRIBUTE_UNUSED; { - if (ls.any_dwarf2_directives) - *line = ls.current; - else - { - as_where (&line->filename, &line->line); - line->filenum = 0; - line->column = 0; - line->flags = DWARF2_FLAG_BEGIN_STMT; - } + as_fatal (_("dwarf2 is not supported for this object file format")); +} + +void +dwarf2_directive_loc (dummy) + int dummy ATTRIBUTE_UNUSED; +{ + as_fatal (_("dwarf2 is not supported for this object file format")); } +#endif /* BFD_ASSEMBLER */ diff --git a/contrib/binutils/gas/dwarf2dbg.h b/contrib/binutils/gas/dwarf2dbg.h index a3eec1c..cdb76ab 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 Free Software Foundation, Inc. + Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -26,14 +26,12 @@ #define DWARF2_FLAG_BEGIN_STMT (1 << 0) /* beginning of statement */ #define DWARF2_FLAG_BEGIN_BLOCK (1 << 1) /* beginning of basic block */ -struct dwarf2_line_info - { - char *filename; - unsigned int filenum; - unsigned int line; - unsigned int column; - unsigned int flags; - }; +struct dwarf2_line_info { + unsigned int filenum; + unsigned int line; + unsigned int column; + unsigned int flags; +}; /* Implements the .file FILENO "FILENAME" directive. FILENO can be 0 to indicate that no file number has been assigned. All real file @@ -58,12 +56,17 @@ extern void dwarf2_where PARAMS ((struct dwarf2_line_info *l)); source information passed in the arguments. ADDR should be the frag-relative offset of the instruction the information is for and L is the source information that should be associated with that - address. */ + address. */ extern void dwarf2_gen_line_info PARAMS ((addressT addr, struct dwarf2_line_info *l)); -/* Must be called after all other input is processed to finish up the - .debug_line section. */ +/* Must be called for each generated instruction. */ +extern void dwarf2_emit_insn PARAMS ((int)); + extern void dwarf2_finish PARAMS ((void)); +extern int dwarf2dbg_estimate_size_before_relax PARAMS ((fragS *)); +extern int dwarf2dbg_relax_frag PARAMS ((fragS *)); +extern void dwarf2dbg_convert_frag PARAMS ((fragS *)); + #endif /* AS_DWARF2DBG_H */ diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c index 436c8c4..f04e530 100644 --- a/contrib/binutils/gas/ecoff.c +++ b/contrib/binutils/gas/ecoff.c @@ -161,7 +161,6 @@ tqFar -- 8086 far pointers tqVol -- volatile - The dense number table is used in the front ends, and disappears by the time the .o is created. @@ -256,8 +255,6 @@ 5) index: pointer to a local symbol or aux. entry. - - For the following program: #include @@ -727,9 +724,9 @@ typedef enum bt { /* States for whether to hash type or not. */ typedef enum hash_state { - hash_no = 0, /* don't hash type */ - hash_yes = 1, /* ok to hash type, or use previous hash */ - hash_record = 2 /* ok to record hash, but don't use prev. */ + hash_no = 0, /* Don't hash type */ + hash_yes = 1, /* OK to hash type, or use previous hash */ + hash_record = 2 /* OK to record hash, but don't use prev. */ } hash_state_t; /* Types of different sized allocation requests. */ @@ -770,7 +767,7 @@ enum aux_type { can't be represented (assuming there are strings > 4096 bytes). */ /* FIXME: Yes, there can be such strings while emitting C++ class debug - info. Templates are the offender here, the test case in question + info. Templates are the offender here, the test case in question having a mangled class name of t7rb_tree4Z4xkeyZt4pair2ZC4xkeyZt7xsocket1Z4UserZt9select1st2Zt4pair\ @@ -799,7 +796,6 @@ typedef struct vlinks { unsigned long start_index; /* starting index # of page */ } vlinks_t; - /* Virtual array header. */ typedef struct varray { vlinks_t *first; /* first page link */ @@ -825,11 +821,9 @@ typedef struct varray { OBJECTS_PER_PAGE (type), /* objects_last_page */ \ } - -/* Master type for indexes within the symbol table. */ +/* Master type for indexes within the symbol table. */ typedef unsigned long symint_t; - /* Linked list support for nested scopes (file, block, structure, etc.). */ typedef struct scope { struct scope *prev; /* previous scope level */ @@ -838,7 +832,6 @@ typedef struct scope { st_t type; /* type of the node */ } scope_t; - /* For a local symbol we store a gas symbol as well as the debugging information we generate. The gas symbol will be NULL if this is only a debugging symbol. */ @@ -855,7 +848,6 @@ typedef struct localsym { EXTR ecoff_sym; /* ECOFF debugging symbol */ } localsym_t; - /* For aux information we keep the type and the data. */ typedef struct ecoff_aux { enum aux_type type; /* aux type */ @@ -872,7 +864,6 @@ typedef struct ecoff_proc { /* Number of proc_t structures allocated. */ static unsigned long proc_cnt; - /* Forward reference list for tags referenced, but not yet defined. */ typedef struct forward { struct forward *next; /* next forward reference */ @@ -881,7 +872,6 @@ typedef struct forward { aux_t *index_ptr; /* pointer to store symbol index */ } forward_t; - /* Linked list support for tags. The first tag in the list is always the current tag for that block. */ typedef struct tag { @@ -895,7 +885,6 @@ typedef struct tag { localsym_t *sym; /* file's local symbols */ } tag_t; - /* Head of a block's linked list of tags. */ typedef struct thead { struct thead *prev; /* previous block */ @@ -903,7 +892,6 @@ typedef struct thead { struct tag *first_tag; /* first tag in block defined */ } thead_t; - /* Union containing pointers to each the small structures which are freed up. */ typedef union small_free { scope_t *f_scope; /* scope structure */ @@ -912,7 +900,6 @@ typedef union small_free { forward_t *f_forward; /* forward tag reference */ } small_free_t; - /* String hash table entry. */ typedef struct shash { @@ -925,7 +912,6 @@ typedef struct shash { proc_t *proc_ptr; /* procedure descriptor pointer */ } shash_t; - /* Type hash table support. The size of the hash table must fit within a page with the other extended file descriptor information. Because unique types which are hashed are fewer in number than @@ -943,7 +929,6 @@ typedef struct thash { symint_t indx; /* index within string table */ } thash_t; - /* Extended file descriptor that contains all of the support necessary to add things to each file separately. */ typedef struct efdr { @@ -967,8 +952,7 @@ typedef struct efdr { } efdr_t; /* Pre-initialized extended file structure. */ -static const efdr_t init_file = -{ +static const efdr_t init_file = { { /* FDR structure */ 0, /* adr: memory address of beginning of file */ 0, /* rss: file name (of source, if known) */ @@ -1015,11 +999,9 @@ static const efdr_t init_file = { 0 }, /* thash_head: type hash table */ }; - static efdr_t *first_file; /* first file descriptor */ static efdr_t **last_file_ptr = &first_file; /* file descriptor tail */ - /* Line number information is kept in a list until the assembly is finished. */ typedef struct lineno_list { @@ -1060,7 +1042,6 @@ typedef union page { lineno_list_t lineno [ PAGE_SIZE / sizeof (lineno_list_t) ]; } page_type; - /* Structure holding allocation information for small sized structures. */ typedef struct alloc_info { char *alloc_name; /* name of this allocation type (must be first) */ @@ -1072,7 +1053,6 @@ typedef struct alloc_info { int total_pages; /* total number of pages allocated */ } alloc_info_t; - /* Type information collected together. */ typedef struct type_info { bt_t basic_type; /* basic type */ @@ -1130,7 +1110,7 @@ static const type_info_t type_info_init = { /* Global hash table for the tags table and global table for file descriptors. */ -static varray_t file_desc = INIT_VARRAY (efdr_t); +static varray_t file_desc = INIT_VARRAY (efdr_t); static struct hash_control *tag_hash; @@ -1143,7 +1123,6 @@ static type_info_t void_type_info; static type_info_t last_func_type_info; static symbolS *last_func_sym_value; - /* Convert COFF basic type to ECOFF basic type. The T_NULL type really should use bt_Void, but this causes the current ecoff GDB to issue unsupported type messages, and the Ultrix 4.00 dbx (aka MIPS @@ -1399,9 +1378,8 @@ static const st_t map_coff_sym_type[] = { st_Nil, /* 106: C_HIDDEN ??? */ }; - /* Keep track of different sized allocation requests. */ -static alloc_info_t alloc_counts[ (int)alloc_type_last ]; +static alloc_info_t alloc_counts[(int) alloc_type_last]; /* Record whether we have seen any debugging information. */ int ecoff_debugging_seen = 0; @@ -1545,8 +1523,8 @@ add_varray_page (vp) #endif new_links->datum = allocate_page (); - alloc_counts[(int)alloc_type_varray].total_alloc++; - alloc_counts[(int)alloc_type_varray].total_pages++; + alloc_counts[(int) alloc_type_varray].total_alloc++; + alloc_counts[(int) alloc_type_varray].total_pages++; new_links->start_index = vp->num_allocated; vp->objects_last_page = 0; @@ -1582,11 +1560,11 @@ add_string (vp, hash_tbl, str, ret_hash) register const char *err; if (vp->objects_last_page + len >= PAGE_USIZE) - { - vp->num_allocated = - ((vp->num_allocated + PAGE_USIZE - 1) / PAGE_USIZE) * PAGE_USIZE; - add_varray_page (vp); - } + { + vp->num_allocated = + ((vp->num_allocated + PAGE_USIZE - 1) / PAGE_USIZE) * PAGE_USIZE; + add_varray_page (vp); + } hash_ptr = allocate_shash (); hash_ptr->indx = vp->num_allocated; @@ -1636,10 +1614,10 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx) vp = &cur_file_ptr->symbols; - if (vp->objects_last_page == vp->objects_per_page) + if (vp->objects_last_page == vp->objects_per_page) add_varray_page (vp); - psym = &vp->last->datum->sym[ vp->objects_last_page++ ]; + psym = &vp->last->datum->sym[vp->objects_last_page++]; if (str == (const char *) NULL && sym_value != (symbolS *) NULL) psym->name = S_GET_NAME (sym_value); @@ -1705,8 +1683,8 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx) scope_delta = 1; /* For every block type except file, struct, union, or - enumeration blocks, push a level on the tag stack. We omit - file types, so that tags can span file boundaries. */ + enumeration blocks, push a level on the tag stack. We omit + file types, so that tags can span file boundaries. */ if (type != st_File && storage != sc_Info) { ptag_head = allocate_thead (); @@ -1802,11 +1780,12 @@ add_ecoff_symbol (str, type, storage, sym_value, addend, value, indx) value, depth, sc_str); if (str_start && str_end_p1 - str_start > 0) - fprintf (stderr, " st= %-11s name= %.*s\n", st_str, str_end_p1 - str_start, str_start); + fprintf (stderr, " st= %-11s name= %.*s\n", + st_str, str_end_p1 - str_start, str_start); else { unsigned long len = strlen (st_str); - fprintf (stderr, " st= %.*s\n", len-1, st_str); + fprintf (stderr, " st= %.*s\n", len - 1, st_str); } } #endif @@ -1839,7 +1818,6 @@ add_aux_sym_symint (aux_word) return vp->num_allocated++; } - /* Add an auxiliary symbol (passing a file/symbol index combo). */ static symint_t @@ -1899,9 +1877,8 @@ add_aux_sym_tir (t, state, hash_tbl) aux.ti.tq4 = (int) t->type_qualifiers[4]; aux.ti.tq5 = (int) t->type_qualifiers[5]; - /* For anything that adds additional information, we must not hash, - so check here, and reset our state. */ + so check here, and reset our state. */ if (state != hash_no && (t->type_qualifiers[0] == tq_Array @@ -1951,11 +1928,11 @@ add_aux_sym_tir (t, state, hash_tbl) } } - /* Everything is set up, add the aux symbol. */ + /* Everything is set up, add the aux symbol. */ if (vp->objects_last_page == vp->objects_per_page) add_varray_page (vp); - aux_ptr = &vp->last->datum->aux[ vp->objects_last_page++ ]; + aux_ptr = &vp->last->datum->aux[vp->objects_last_page++]; aux_ptr->type = aux_tir; aux_ptr->data = aux; @@ -1971,8 +1948,7 @@ add_aux_sym_tir (t, state, hash_tbl) for an enum bitfield. */ if (t->bitfield) - (void) add_aux_sym_symint ((symint_t)t->sizes[t->num_sizes-1]); - + (void) add_aux_sym_symint ((symint_t) t->sizes[t->num_sizes - 1]); /* Add tag information if needed. Structure, union, and enum references add 2 aux symbols: a [file index, symbol index] @@ -1983,7 +1959,7 @@ add_aux_sym_tir (t, state, hash_tbl) || t->basic_type == bt_Enum) { register symint_t file_index = t->tag_ptr->ifd; - register localsym_t *sym = t->tag_ptr->sym; + register localsym_t *sym = t->tag_ptr->sym; register forward_t *forward_ref = allocate_forward (); if (sym != (localsym_t *) NULL) @@ -1999,11 +1975,11 @@ add_aux_sym_tir (t, state, hash_tbl) (void) add_aux_sym_rndx (ST_RFDESCAPE, indexNil); forward_ref->index_ptr - = &vp->last->datum->aux[ vp->objects_last_page - 1]; + = &vp->last->datum->aux[vp->objects_last_page - 1]; (void) add_aux_sym_symint (file_index); forward_ref->ifd_ptr - = &vp->last->datum->aux[ vp->objects_last_page - 1]; + = &vp->last->datum->aux[vp->objects_last_page - 1]; } /* Add information about array bounds if they exist. */ @@ -2021,7 +1997,7 @@ add_aux_sym_tir (t, state, hash_tbl) }; /* NOTE: Mips documentation claims that the bitfield width goes here. - But it needs to be emitted earlier. */ + But it needs to be emitted earlier. */ return ret; } @@ -2045,16 +2021,16 @@ get_tag (tag, sym, basic_type) if (hash_ptr != (shash_t *) NULL && hash_ptr->tag_ptr != (tag_t *) NULL) - { - tag_ptr = hash_ptr->tag_ptr; - if (sym != (localsym_t *) NULL) - { - tag_ptr->basic_type = basic_type; - tag_ptr->ifd = cur_file_ptr->file_index; - tag_ptr->sym = sym; - } - return tag_ptr; - } + { + tag_ptr = hash_ptr->tag_ptr; + if (sym != (localsym_t *) NULL) + { + tag_ptr->basic_type = basic_type; + tag_ptr->ifd = cur_file_ptr->file_index; + tag_ptr->sym = sym; + } + return tag_ptr; + } if (hash_ptr == (shash_t *) NULL) { @@ -2091,7 +2067,7 @@ get_tag (tag, sym, basic_type) static void add_unknown_tag (ptag) - tag_t *ptag; /* pointer to tag information */ + tag_t *ptag; /* pointer to tag information */ { shash_t *hash_ptr = ptag->hash_ptr; char *name = hash_ptr->string; @@ -2101,7 +2077,7 @@ add_unknown_tag (ptag) #ifdef ECOFF_DEBUG if (debug > 1) { - char *agg_type = "{unknown aggregate type}"; + char *agg_type = "{unknown aggregate type}"; switch (ptag->basic_type) { case bt_Struct: agg_type = "struct"; break; @@ -2240,9 +2216,11 @@ add_file (file_name, indx, fake) this if we see a .file directive with a string, since that implies that some sort of debugging information is being provided. */ - if (! symbol_table_frozen && debug_type == DEBUG_NONE) + if (! symbol_table_frozen && debug_type == DEBUG_UNSPECIFIED) debug_type = DEBUG_ECOFF; } + else + debug_type = DEBUG_NONE; #ifndef NO_LISTING if (listing) @@ -2294,7 +2272,7 @@ add_file (file_name, indx, fake) } } - /* If this is a new file, create it. */ + /* If this is a new file, create it. */ if (fil_ptr == (efdr_t *) NULL) { if (file_desc.objects_last_page == file_desc.objects_per_page) @@ -2334,7 +2312,7 @@ add_file (file_name, indx, fake) last_file_ptr = &fil_ptr->next_file; /* Add void & int types to the file (void should be first to catch - errant 0's within the index fields). */ + errant 0's within the index fields). */ fil_ptr->void_type = add_aux_sym_tir (&void_type_info, hash_yes, &cur_file_ptr->thash_head[0]); @@ -2359,7 +2337,7 @@ ecoff_new_file (name) /* This is a hand coded assembler file, so automatically turn on debugging information. */ - if (debug_type == DEBUG_NONE) + if (debug_type == DEBUG_UNSPECIFIED) debug_type = DEBUG_ECOFF; } @@ -2368,10 +2346,10 @@ ecoff_new_file (name) /* Convert storage class to string. */ static char * -sc_to_string(storage_class) +sc_to_string (storage_class) sc_t storage_class; { - switch(storage_class) + switch (storage_class) { case sc_Nil: return "Nil,"; case sc_Text: return "Text,"; @@ -2409,10 +2387,10 @@ sc_to_string(storage_class) /* Convert symbol type to string. */ static char * -st_to_string(symbol_type) +st_to_string (symbol_type) st_t symbol_type; { - switch(symbol_type) + switch (symbol_type) { case st_Nil: return "Nil,"; case st_Global: return "Global,"; @@ -2734,13 +2712,13 @@ ecoff_directive_type (ignore) coff_type.basic_type = map_coff_types[coff_type.orig_type]; tq_ptr = &coff_type.type_qualifiers[N_TQ]; - while (val &~ N_BTMASK) + while (val & ~N_BTMASK) { if (tq_ptr == &coff_type.type_qualifiers[0]) { /* FIXME: We could handle this by setting the continued bit. - There would still be a limit: the .type argument can not - be infinite. */ + There would still be a limit: the .type argument can not + be infinite. */ as_warn (_("The type of %s is too complex; it will be simplified"), coff_sym_name); break; @@ -2764,11 +2742,11 @@ ecoff_directive_type (ignore) if (tq_shft != &coff_type.type_qualifiers[0] && tq_shft[-1] == tq_Proc) { /* If this is a function, ignore it, so that we don't get two - entries (one from the .ent, and one for the .def that - precedes it). Save the type information so that the end - block can properly add it after the begin block index. For - MIPS knows what reason, we must strip off the function type - at this point. */ + entries (one from the .ent, and one for the .def that + precedes it). Save the type information so that the end + block can properly add it after the begin block index. For + MIPS knows what reason, we must strip off the function type + at this point. */ coff_is_function = 1; tq_shft[-1] = tq_Nil; } @@ -2888,8 +2866,8 @@ ecoff_directive_endef (ignore) } /* If this is an array, make sure the same number of dimensions - and sizes were passed, creating extra sizes for multiply - dimensioned arrays if not passed. */ + and sizes were passed, creating extra sizes for multiply + dimensioned arrays if not passed. */ coff_type.extra_sizes = 0; if (diff) { @@ -2914,7 +2892,7 @@ ecoff_directive_endef (ignore) && coff_type.num_sizes - coff_type.extra_sizes == 1) { /* Is this a bitfield? This is indicated by a structure memeber - having a size field that isn't an array. */ + having a size field that isn't an array. */ coff_type.bitfield = 1; } @@ -2959,7 +2937,7 @@ ecoff_directive_endef (ignore) break; /* For the beginning of structs, unions, and enumerations, the - size info needs to be passed in the value field. */ + size info needs to be passed in the value field. */ case st_Block: if (coff_type.num_sizes - coff_type.num_dims - coff_type.extra_sizes != 1) @@ -2974,8 +2952,8 @@ ecoff_directive_endef (ignore) break; /* For the end of structs, unions, and enumerations, omit the - name which is always ".eos". This needs to be done last, so - that any error reporting above gives the correct name. */ + name which is always ".eos". This needs to be done last, so + that any error reporting above gives the correct name. */ case st_End: free (name); name = (char *) NULL; @@ -2984,10 +2962,10 @@ ecoff_directive_endef (ignore) break; /* Members of structures and unions that aren't bitfields, need - to adjust the value from a byte offset to a bit offset. - Members of enumerations do not have the value adjusted, and - can be distinguished by indx == indexNil. For enumerations, - update the maximum enumeration value. */ + to adjust the value from a byte offset to a bit offset. + Members of enumerations do not have the value adjusted, and + can be distinguished by indx == indexNil. For enumerations, + update the maximum enumeration value. */ case st_Member: if (! coff_type.bitfield && ! coff_inside_enumeration) coff_value *= 8; @@ -3245,9 +3223,10 @@ ecoff_directive_frame (ignore) cur_proc_ptr->pdr.pcreg = tc_get_register (0); -#if 0 /* Alpha-OSF1 adds "the offset of saved $a0 from $sp", according - to Sandro. I don't yet know where this value should be stored, if - anywhere. */ +#if 0 + /* Alpha-OSF1 adds "the offset of saved $a0 from $sp", according to + Sandro. I don't yet know where this value should be stored, if + anywhere. */ demand_empty_rest_of_line (); #else s_ignore (42); @@ -3388,7 +3367,7 @@ mark_stabs (ignore) { if (! stabs_seen) { - /* Add a dummy @stabs dymbol. */ + /* Add a dummy @stabs dymbol. */ stabs_seen = 1; (void) add_ecoff_symbol (stabs_symbol, stNil, scInfo, (symbolS *) NULL, @@ -3399,7 +3378,7 @@ mark_stabs (ignore) /* Parse .weakext directives. */ #ifndef TC_MIPS -/* For TC_MIPS use the version in tc-mips.c. */ +/* For TC_MIPS use the version in tc-mips.c. */ void ecoff_directive_weakext (ignore) int ignore; @@ -3434,7 +3413,7 @@ ecoff_directive_weakext (ignore) if (exp.X_op != O_symbol) { as_bad (_("bad .weakext directive")); - ignore_rest_of_line(); + ignore_rest_of_line (); return; } symbol_set_value_expression (symbolP, &exp); @@ -3646,7 +3625,7 @@ ecoff_frob_symbol (sym) static asymbol scom_symbol; /* We must construct a fake section similar to bfd_com_section - but with the name .scommon. */ + but with the name .scommon. */ if (scom_section.name == NULL) { scom_section = bfd_com_section; @@ -3761,7 +3740,7 @@ ecoff_build_lineno (backend, buf, bufend, offset, linecntptr) embedded PIC code, it will put strings in the .text section before the first procedure. We cope by inserting a dummy line if the address of the first procedure is not 0. Hopefully this - won't screw things up too badly. + won't screw things up too badly. Don't do this for ECOFF assembly source line numbers. They work without this extra attention. */ @@ -3789,8 +3768,8 @@ ecoff_build_lineno (backend, buf, bufend, offset, linecntptr) long delta; /* Get the offset to the memory address of the next line number - (in words). Do this first, so that we can skip ahead to the - next useful line number entry. */ + (in words). Do this first, so that we can skip ahead to the + next useful line number entry. */ if (l->next == (lineno_list_t *) NULL) { /* We want a count of zero, but it will be decremented @@ -4030,11 +4009,11 @@ ecoff_build_symbols (backend, buf, bufend, offset) symint_t indx; /* The value of a block start symbol is the - offset from the start of the procedure. For - other symbols we just use the gas value (but - we must offset it by the vma of the section, - just as BFD does, because BFD will not see - this value). */ + offset from the start of the procedure. For + other symbols we just use the gas value (but + we must offset it by the vma of the section, + just as BFD does, because BFD will not see + this value). */ if (sym_ptr->ecoff_sym.asym.st == (int) st_Block && sym_ptr->ecoff_sym.asym.sc == (int) sc_Text) { @@ -4066,8 +4045,8 @@ ecoff_build_symbols (backend, buf, bufend, offset) sym_ptr->ecoff_sym.asym.st = st_StaticProc; /* Get the type and storage class based on where - the symbol actually wound up. Traditionally, - N_LBRAC and N_RBRAC are *not* relocated. */ + the symbol actually wound up. Traditionally, + N_LBRAC and N_RBRAC are *not* relocated. */ indx = sym_ptr->ecoff_sym.asym.index; if (sym_ptr->ecoff_sym.asym.st == st_Nil && sym_ptr->ecoff_sym.asym.sc == sc_Nil @@ -4143,8 +4122,8 @@ ecoff_build_symbols (backend, buf, bufend, offset) else { /* This must be a user named section. - This is not possible in ECOFF, but it - is in ELF. */ + This is not possible in ECOFF, but it + is in ELF. */ sc = sc_Data; } @@ -4153,11 +4132,11 @@ ecoff_build_symbols (backend, buf, bufend, offset) } /* This is just an external symbol if it is - outside a procedure and it has a type. - FIXME: g++ will generate symbols which have - different names in the debugging information - than the actual symbol. Should we handle - them here? */ + outside a procedure and it has a type. + FIXME: g++ will generate symbols which have + different names in the debugging information + than the actual symbol. Should we handle + them here? */ if ((S_IS_EXTERNAL (as_sym) || S_IS_WEAK (as_sym) || ! S_IS_DEFINED (as_sym)) @@ -4167,14 +4146,14 @@ ecoff_build_symbols (backend, buf, bufend, offset) local = 0; /* This is just an external symbol if it is a - common symbol. */ + common symbol. */ if (S_IS_COMMON (as_sym)) local = 0; /* If an st_end symbol has an associated gas - symbol, then it is a local label created for - a .bend or .end directive. Stabs line - numbers will have \001 in the names. */ + symbol, then it is a local label created for + a .bend or .end directive. Stabs line + numbers will have \001 in the names. */ if (local && sym_ptr->ecoff_sym.asym.st != st_End && strchr (sym_ptr->name, '\001') == 0) @@ -4222,10 +4201,10 @@ ecoff_build_symbols (backend, buf, bufend, offset) } /* The value of the symbol marking the end of a - procedure is the size of the procedure. The - value of the symbol marking the end of a - block is the offset from the start of the - procedure to the block. */ + procedure is the size of the procedure. The + value of the symbol marking the end of a + block is the offset from the start of the + procedure to the block. */ if (begin_type == st_Proc || begin_type == st_StaticProc) { @@ -4239,7 +4218,7 @@ ecoff_build_symbols (backend, buf, bufend, offset) - S_GET_VALUE (begin_ptr->as_sym)); /* If the size is odd, this is probably a - mips16 function; force it to be even. */ + mips16 function; force it to be even. */ if ((sym_ptr->ecoff_sym.asym.value & 1) != 0) ++sym_ptr->ecoff_sym.asym.value; @@ -4305,7 +4284,7 @@ ecoff_build_symbols (backend, buf, bufend, offset) sym_ptr->ecoff_sym.ifd = fil_ptr->file_index; /* Don't try to merge an FDR which has an - external symbol attached to it. */ + external symbol attached to it. */ if (S_IS_EXTERNAL (as_sym) || S_IS_WEAK (as_sym)) fil_ptr->fdr.fMerge = 0; } @@ -4386,9 +4365,9 @@ ecoff_build_procs (backend, buf, bufend, offset) if (first) { /* This code used to force the adr of the very - first fdr to be 0. However, the native tools - don't do that, and I can't remember why it - used to work that way, so I took it out. */ + first fdr to be 0. However, the native tools + don't do that, and I can't remember why it + used to work that way, so I took it out. */ fil_ptr->fdr.adr = adr; first = 0; } @@ -4700,7 +4679,7 @@ ecoff_build_debug (hdr, bufp, backend) efdr_t *fil_ptr; int end_warning; efdr_t *hold_file_ptr; - proc_t * hold_proc_ptr; + proc_t *hold_proc_ptr; symbolS *sym; char *buf; char *bufend; @@ -4871,7 +4850,6 @@ allocate_cluster (npages) return value; } - static page_type *cluster_ptr = NULL; static unsigned long pages_left = 0; @@ -4893,7 +4871,7 @@ allocate_page () pages_left--; return cluster_ptr++; -#else /* MALLOC_CHECK */ +#else /* MALLOC_CHECK */ page_type *ptr; @@ -4901,7 +4879,7 @@ allocate_page () memset (ptr, 0, PAGE_USIZE); return ptr; -#endif /* MALLOC_CHECK */ +#endif /* MALLOC_CHECK */ } /* Allocate scoping information. */ @@ -4914,23 +4892,23 @@ allocate_scope () #ifndef MALLOC_CHECK - ptr = alloc_counts[(int)alloc_type_scope].free_list.f_scope; + ptr = alloc_counts[(int) alloc_type_scope].free_list.f_scope; if (ptr != (scope_t *) NULL) - alloc_counts[ (int)alloc_type_scope ].free_list.f_scope = ptr->free; + alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr->free; else { - register int unallocated = alloc_counts[(int)alloc_type_scope].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_scope].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_scope].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_scope].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (scope_t); - alloc_counts[(int)alloc_type_scope].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_scope].total_pages++; + alloc_counts[(int) alloc_type_scope].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_scope].total_pages++; } ptr = &cur_page->scope[--unallocated]; - alloc_counts[(int)alloc_type_scope].unallocated = unallocated; + alloc_counts[(int) alloc_type_scope].unallocated = unallocated; } #else @@ -4939,7 +4917,7 @@ allocate_scope () #endif - alloc_counts[(int)alloc_type_scope].total_alloc++; + alloc_counts[(int) alloc_type_scope].total_alloc++; *ptr = initial_scope; return ptr; } @@ -4950,11 +4928,11 @@ static void free_scope (ptr) scope_t *ptr; { - alloc_counts[(int)alloc_type_scope].total_free++; + alloc_counts[(int) alloc_type_scope].total_free++; #ifndef MALLOC_CHECK - ptr->free = alloc_counts[(int)alloc_type_scope].free_list.f_scope; - alloc_counts[(int)alloc_type_scope].free_list.f_scope = ptr; + ptr->free = alloc_counts[(int) alloc_type_scope].free_list.f_scope; + alloc_counts[(int) alloc_type_scope].free_list.f_scope = ptr; #else free ((PTR) ptr); #endif @@ -4970,18 +4948,18 @@ allocate_vlinks () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_vlinks].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_vlinks].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_vlinks].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_vlinks].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (vlinks_t); - alloc_counts[(int)alloc_type_vlinks].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_vlinks].total_pages++; + alloc_counts[(int) alloc_type_vlinks].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_vlinks].total_pages++; } ptr = &cur_page->vlinks[--unallocated]; - alloc_counts[(int)alloc_type_vlinks].unallocated = unallocated; + alloc_counts[(int) alloc_type_vlinks].unallocated = unallocated; #else @@ -4989,7 +4967,7 @@ allocate_vlinks () #endif - alloc_counts[(int)alloc_type_vlinks].total_alloc++; + alloc_counts[(int) alloc_type_vlinks].total_alloc++; *ptr = initial_vlinks; return ptr; } @@ -5004,18 +4982,18 @@ allocate_shash () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_shash].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_shash].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_shash].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_shash].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (shash_t); - alloc_counts[(int)alloc_type_shash].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_shash].total_pages++; + alloc_counts[(int) alloc_type_shash].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_shash].total_pages++; } ptr = &cur_page->shash[--unallocated]; - alloc_counts[(int)alloc_type_shash].unallocated = unallocated; + alloc_counts[(int) alloc_type_shash].unallocated = unallocated; #else @@ -5023,7 +5001,7 @@ allocate_shash () #endif - alloc_counts[(int)alloc_type_shash].total_alloc++; + alloc_counts[(int) alloc_type_shash].total_alloc++; *ptr = initial_shash; return ptr; } @@ -5038,18 +5016,18 @@ allocate_thash () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_thash].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_thash].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_thash].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_thash].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (thash_t); - alloc_counts[(int)alloc_type_thash].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_thash].total_pages++; + alloc_counts[(int) alloc_type_thash].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_thash].total_pages++; } ptr = &cur_page->thash[--unallocated]; - alloc_counts[(int)alloc_type_thash].unallocated = unallocated; + alloc_counts[(int) alloc_type_thash].unallocated = unallocated; #else @@ -5057,7 +5035,7 @@ allocate_thash () #endif - alloc_counts[(int)alloc_type_thash].total_alloc++; + alloc_counts[(int) alloc_type_thash].total_alloc++; *ptr = initial_thash; return ptr; } @@ -5072,23 +5050,23 @@ allocate_tag () #ifndef MALLOC_CHECK - ptr = alloc_counts[(int)alloc_type_tag].free_list.f_tag; + ptr = alloc_counts[(int) alloc_type_tag].free_list.f_tag; if (ptr != (tag_t *) NULL) - alloc_counts[(int)alloc_type_tag].free_list.f_tag = ptr->free; + alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr->free; else { - register int unallocated = alloc_counts[(int)alloc_type_tag].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_tag].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_tag].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_tag].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (tag_t); - alloc_counts[(int)alloc_type_tag].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_tag].total_pages++; + alloc_counts[(int) alloc_type_tag].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_tag].total_pages++; } ptr = &cur_page->tag[--unallocated]; - alloc_counts[(int)alloc_type_tag].unallocated = unallocated; + alloc_counts[(int) alloc_type_tag].unallocated = unallocated; } #else @@ -5097,7 +5075,7 @@ allocate_tag () #endif - alloc_counts[(int)alloc_type_tag].total_alloc++; + alloc_counts[(int) alloc_type_tag].total_alloc++; *ptr = initial_tag; return ptr; } @@ -5108,11 +5086,11 @@ static void free_tag (ptr) tag_t *ptr; { - alloc_counts[(int)alloc_type_tag].total_free++; + alloc_counts[(int) alloc_type_tag].total_free++; #ifndef MALLOC_CHECK - ptr->free = alloc_counts[(int)alloc_type_tag].free_list.f_tag; - alloc_counts[(int)alloc_type_tag].free_list.f_tag = ptr; + ptr->free = alloc_counts[(int) alloc_type_tag].free_list.f_tag; + alloc_counts[(int) alloc_type_tag].free_list.f_tag = ptr; #else free ((PTR_T) ptr); #endif @@ -5128,18 +5106,18 @@ allocate_forward () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_forward].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_forward].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_forward].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_forward].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (forward_t); - alloc_counts[(int)alloc_type_forward].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_forward].total_pages++; + alloc_counts[(int) alloc_type_forward].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_forward].total_pages++; } ptr = &cur_page->forward[--unallocated]; - alloc_counts[(int)alloc_type_forward].unallocated = unallocated; + alloc_counts[(int) alloc_type_forward].unallocated = unallocated; #else @@ -5147,7 +5125,7 @@ allocate_forward () #endif - alloc_counts[(int)alloc_type_forward].total_alloc++; + alloc_counts[(int) alloc_type_forward].total_alloc++; *ptr = initial_forward; return ptr; } @@ -5162,23 +5140,23 @@ allocate_thead () #ifndef MALLOC_CHECK - ptr = alloc_counts[(int)alloc_type_thead].free_list.f_thead; + ptr = alloc_counts[(int) alloc_type_thead].free_list.f_thead; if (ptr != (thead_t *) NULL) - alloc_counts[ (int)alloc_type_thead ].free_list.f_thead = ptr->free; + alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr->free; else { - register int unallocated = alloc_counts[(int)alloc_type_thead].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_thead].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_thead].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_thead].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (thead_t); - alloc_counts[(int)alloc_type_thead].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_thead].total_pages++; + alloc_counts[(int) alloc_type_thead].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_thead].total_pages++; } ptr = &cur_page->thead[--unallocated]; - alloc_counts[(int)alloc_type_thead].unallocated = unallocated; + alloc_counts[(int) alloc_type_thead].unallocated = unallocated; } #else @@ -5187,7 +5165,7 @@ allocate_thead () #endif - alloc_counts[(int)alloc_type_thead].total_alloc++; + alloc_counts[(int) alloc_type_thead].total_alloc++; *ptr = initial_thead; return ptr; } @@ -5198,11 +5176,11 @@ static void free_thead (ptr) thead_t *ptr; { - alloc_counts[(int)alloc_type_thead].total_free++; + alloc_counts[(int) alloc_type_thead].total_free++; #ifndef MALLOC_CHECK - ptr->free = (thead_t *) alloc_counts[(int)alloc_type_thead].free_list.f_thead; - alloc_counts[(int)alloc_type_thead].free_list.f_thead = ptr; + ptr->free = (thead_t *) alloc_counts[(int) alloc_type_thead].free_list.f_thead; + alloc_counts[(int) alloc_type_thead].free_list.f_thead = ptr; #else free ((PTR_T) ptr); #endif @@ -5216,18 +5194,18 @@ allocate_lineno_list () #ifndef MALLOC_CHECK - register int unallocated = alloc_counts[(int)alloc_type_lineno].unallocated; - register page_type *cur_page = alloc_counts[(int)alloc_type_lineno].cur_page; + register int unallocated = alloc_counts[(int) alloc_type_lineno].unallocated; + register page_type *cur_page = alloc_counts[(int) alloc_type_lineno].cur_page; if (unallocated == 0) { unallocated = PAGE_SIZE / sizeof (lineno_list_t); - alloc_counts[(int)alloc_type_lineno].cur_page = cur_page = allocate_page (); - alloc_counts[(int)alloc_type_lineno].total_pages++; + alloc_counts[(int) alloc_type_lineno].cur_page = cur_page = allocate_page (); + alloc_counts[(int) alloc_type_lineno].total_pages++; } ptr = &cur_page->lineno[--unallocated]; - alloc_counts[(int)alloc_type_lineno].unallocated = unallocated; + alloc_counts[(int) alloc_type_lineno].unallocated = unallocated; #else @@ -5235,7 +5213,7 @@ allocate_lineno_list () #endif - alloc_counts[(int)alloc_type_lineno].total_alloc++; + alloc_counts[(int) alloc_type_lineno].total_alloc++; *ptr = initial_lineno_list; return ptr; } @@ -5257,7 +5235,7 @@ ecoff_set_gp_prolog_size (sz) cur_proc_ptr->pdr.gp_used = 1; } -int +int ecoff_no_current_file () { return cur_file_ptr == (efdr_t *) NULL; @@ -5272,7 +5250,7 @@ ecoff_generate_asm_lineno () as_where (&filename, &lineno); - if (current_stabs_filename == (char *)NULL + if (current_stabs_filename == (char *) NULL || strcmp (current_stabs_filename, filename)) add_file (filename, 0, 1); @@ -5297,7 +5275,7 @@ ecoff_generate_asm_lineno () pl = &noproc_lineno; while (*pl != (lineno_list_t *) NULL) - pl = &(*pl)->next; + pl = &(*pl)->next; *pl = list; } else diff --git a/contrib/binutils/gas/ehopt.c b/contrib/binutils/gas/ehopt.c index a0a5f62..4131436 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 Free Software Foundation, Inc. + Copyright (C) 1998, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor . This file is part of GAS, the GNU Assembler. @@ -17,7 +17,7 @@ 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. */ +02111-1307, USA. */ #include "as.h" #include "subsegs.h" @@ -31,13 +31,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Try to optimize gcc 2.8 exception frame information. Exception frame information is emitted for every function in the - .eh_frame section. Simple information for a function with no - exceptions looks like this: + .eh_frame or .debug_frame sections. Simple information for a function + with no exceptions looks like this: __FRAME_BEGIN__: .4byte .LLCIE1 / Length of Common Information Entry .LSCIE1: +#if .eh_frame .4byte 0x0 / CIE Identifier Tag +#elif .debug_frame + .4byte 0xffffffff / CIE Identifier Tag +#endif .byte 0x1 / CIE Version .byte 0x0 / CIE Augmentation (none) .byte 0x1 / ULEB128 0x1 (CIE Code Alignment Factor) @@ -84,30 +88,33 @@ __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 ((void)); +static int eh_frame_code_alignment PARAMS ((int)); /* Get the code alignment factor from the CIE. */ static int -eh_frame_code_alignment () +eh_frame_code_alignment (in_seg) + int in_seg; { + /* ??? Assume .eh_frame and .debug_frame have the same alignment. */ static int code_alignment; - segT current_seg; - subsegT current_subseg; + fragS *f; fixS *fix; int offset; + char CIE_id; char augmentation[10]; int iaug; if (code_alignment != 0) return code_alignment; - /* We should find the CIE at the start of the .eh_frame section. */ + /* Can't find the alignment if we've changed sections. */ + if (! in_seg) + return -1; + + /* We should find the CIE at the start of the section. */ - current_seg = now_seg; - current_subseg = now_subseg; - subseg_new (".eh_frame", 0); #if defined (BFD_ASSEMBLER) || defined (MANY_SEGMENTS) f = seg_info (now_seg)->frchainP->frch_root; #else @@ -118,11 +125,15 @@ eh_frame_code_alignment () #else fix = *seg_fix_rootP; #endif - subseg_set (current_seg, current_subseg); /* Look through the frags of the section to find the code alignment. */ - /* First make sure that the CIE Identifier Tag is 0. */ + /* First make sure that the CIE Identifier Tag is 0/-1. */ + + if (strcmp (segment_name (now_seg), ".debug_frame") == 0) + CIE_id = (char)0xff; + else + CIE_id = 0; offset = 4; while (f != NULL && offset >= f->fr_fix) @@ -132,10 +143,10 @@ eh_frame_code_alignment () } if (f == NULL || f->fr_fix - offset < 4 - || f->fr_literal[offset] != 0 - || f->fr_literal[offset + 1] != 0 - || f->fr_literal[offset + 2] != 0 - || f->fr_literal[offset + 3] != 0) + || f->fr_literal[offset] != CIE_id + || 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; @@ -261,33 +272,42 @@ check_eh_frame (exp, pnbytes) expressionS *exp; unsigned int *pnbytes; { - static int saw_size; - static symbolS *size_end_sym; - static int saw_advance_loc4; - static fragS *loc4_frag; - static int loc4_fix; - - if (saw_size - && S_IS_DEFINED (size_end_sym)) + struct frame_data + { + symbolS *size_end_sym; + fragS *loc4_frag; + int saw_size; + int saw_advance_loc4; + int loc4_fix; + }; + + static struct frame_data eh_frame_data; + static struct frame_data debug_frame_data; + struct frame_data *d; + + /* Don't optimize. */ + if (flag_traditional_format) + return 0; + + /* Select the proper section data. */ + if (strcmp (segment_name (now_seg), ".eh_frame") == 0) + d = &eh_frame_data; + else if (strcmp (segment_name (now_seg), ".debug_frame") == 0) + d = &debug_frame_data; + else + return 0; + + if (d->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. */ - saw_size = 0; - saw_advance_loc4 = 0; + d->saw_size = 0; + d->saw_advance_loc4 = 0; } - if (flag_traditional_format) - { - /* Don't optimize. */ - } - else if (strcmp (segment_name (now_seg), ".eh_frame") != 0) - { - saw_size = 0; - saw_advance_loc4 = 0; - } - else if (! saw_size - && *pnbytes == 4) + if (! d->saw_size + && *pnbytes == 4) { /* 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 @@ -301,23 +321,23 @@ check_eh_frame (exp, pnbytes) if ((exp->X_op == O_symbol || exp->X_op == O_subtract) && ! S_IS_DEFINED (exp->X_add_symbol)) { - saw_size = 1; - size_end_sym = exp->X_add_symbol; + d->saw_size = 1; + d->size_end_sym = exp->X_add_symbol; } } - else if (saw_size + 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. */ - saw_advance_loc4 = 1; + d->saw_advance_loc4 = 1; frag_grow (1); - loc4_frag = frag_now; - loc4_fix = frag_now_fix (); + d->loc4_frag = frag_now; + d->loc4_fix = frag_now_fix (); } - else if (saw_advance_loc4 + else if (d->saw_advance_loc4 && *pnbytes == 4 && exp->X_op == O_constant) { @@ -328,9 +348,9 @@ check_eh_frame (exp, pnbytes) reduced to a constant. We can do the optimization entirely in this function. */ - saw_advance_loc4 = 0; + d->saw_advance_loc4 = 0; - ca = eh_frame_code_alignment (); + ca = eh_frame_code_alignment (1); if (ca < 0) { /* Don't optimize. */ @@ -338,41 +358,40 @@ check_eh_frame (exp, pnbytes) else if (exp->X_add_number % ca == 0 && exp->X_add_number / ca < 0x40) { - loc4_frag->fr_literal[loc4_fix] + d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc | (exp->X_add_number / ca); /* No more bytes needed. */ return 1; } else if (exp->X_add_number < 0x100) { - loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc1; + d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc1; *pnbytes = 1; } else if (exp->X_add_number < 0x10000) { - loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc2; + d->loc4_frag->fr_literal[d->loc4_fix] = DW_CFA_advance_loc2; *pnbytes = 2; } } - else if (saw_advance_loc4 + 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. */ - saw_advance_loc4 = 0; + d->saw_advance_loc4 = 0; frag_var (rs_cfa, 4, 0, 0, make_expr_symbol (exp), - loc4_fix, (char *) loc4_frag); + d->loc4_fix, (char *) d->loc4_frag); return 1; } else - saw_advance_loc4 = 0; + d->saw_advance_loc4 = 0; return 0; } @@ -389,7 +408,7 @@ eh_frame_estimate_size_before_relax (frag) offsetT diff; int ret; - ca = eh_frame_code_alignment (); + ca = eh_frame_code_alignment (0); diff = resolve_symbol_value (frag->fr_symbol, 0); if (ca < 0) @@ -444,7 +463,7 @@ eh_frame_convert_frag (frag) { int ca; - ca = eh_frame_code_alignment (); + 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); } diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c index 7cca437..2df2f63 100644 --- a/contrib/binutils/gas/expr.c +++ b/contrib/binutils/gas/expr.c @@ -1,5 +1,5 @@ /* expr.c -operands, expressions- - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,14 +17,12 @@ 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. */ + 02111-1307, USA. */ -/* - * This is really a branch office of as-read.c. I split it out to clearly - * distinguish the world of expressions from the world of statements. - * (It also gives smaller files to re-compile.) - * Here, "operand"s are of expressions, not instructions. - */ +/* This is really a branch office of as-read.c. I split it out to clearly + distinguish the world of expressions from the world of statements. + (It also gives smaller files to re-compile.) + Here, "operand"s are of expressions, not instructions. */ #include #include @@ -43,15 +41,14 @@ static void mri_char_constant PARAMS ((expressionS *)); static void current_location PARAMS ((expressionS *)); static void clean_up_expression PARAMS ((expressionS * expressionP)); static segT operand PARAMS ((expressionS *)); -static operatorT operator PARAMS ((void)); +static operatorT operator PARAMS ((int *)); extern const char EXP_CHARS[], FLT_CHARS[]; /* We keep a mapping of expression symbols to file positions, so that we can provide better error messages. */ -struct expr_symbol_line -{ +struct expr_symbol_line { struct expr_symbol_line *next; symbolS *sym; char *file; @@ -210,10 +207,8 @@ expr_build_dot () return make_expr_symbol (&e); } -/* - * Build any floating-point literal here. - * Also build any bignum literal here. - */ +/* Build any floating-point literal here. + Also build any bignum literal here. */ /* Seems atof_machine can backscan through generic_bignum and hit whatever happens to be loaded before it in memory. And its way too complicated @@ -221,23 +216,23 @@ expr_build_dot () and never write into the early words, thus they'll always be zero. I hate Dean's floating-point code. Bleh. */ LITTLENUM_TYPE generic_bignum[SIZE_OF_LARGE_NUMBER + 6]; -FLONUM_TYPE generic_floating_point_number = -{ - &generic_bignum[6], /* low (JF: Was 0) */ - &generic_bignum[SIZE_OF_LARGE_NUMBER + 6 - 1], /* high JF: (added +6) */ - 0, /* leader */ - 0, /* exponent */ - 0 /* sign */ + +FLONUM_TYPE generic_floating_point_number = { + &generic_bignum[6], /* low. (JF: Was 0) */ + &generic_bignum[SIZE_OF_LARGE_NUMBER + 6 - 1], /* high. JF: (added +6) */ + 0, /* leader. */ + 0, /* exponent. */ + 0 /* sign. */ }; -/* If nonzero, we've been asked to assemble nan, +inf or -inf */ + +/* If nonzero, we've been asked to assemble nan, +inf or -inf. */ int generic_floating_point_magic; static void floating_constant (expressionP) expressionS *expressionP; { - /* input_line_pointer->*/ - /* floating-point constant. */ + /* input_line_pointer -> floating-point constant. */ int error_code; error_code = atof_generic (&input_line_pointer, ".", EXP_CHARS, @@ -255,13 +250,13 @@ floating_constant (expressionP) } } expressionP->X_op = O_big; - /* input_line_pointer->just after constant, */ - /* which may point to whitespace. */ + /* input_line_pointer -> just after constant, which may point to + whitespace. */ expressionP->X_add_number = -1; } -static valueT -generic_bignum_to_int32 () +static valueT +generic_bignum_to_int32 () { valueT number = ((generic_bignum[1] & LITTLENUM_MASK) << LITTLENUM_NUMBER_OF_BITS) @@ -271,17 +266,17 @@ generic_bignum_to_int32 () } #ifdef BFD64 -static valueT -generic_bignum_to_int64 () +static valueT +generic_bignum_to_int64 () { - valueT number = - ((((((((valueT) generic_bignum[3] & LITTLENUM_MASK) - << LITTLENUM_NUMBER_OF_BITS) - | ((valueT) generic_bignum[2] & LITTLENUM_MASK)) - << LITTLENUM_NUMBER_OF_BITS) - | ((valueT) generic_bignum[1] & LITTLENUM_MASK)) - << LITTLENUM_NUMBER_OF_BITS) - | ((valueT) generic_bignum[0] & LITTLENUM_MASK)); + valueT number = + ((((((((valueT) generic_bignum[3] & LITTLENUM_MASK) + << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[2] & LITTLENUM_MASK)) + << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[1] & LITTLENUM_MASK)) + << LITTLENUM_NUMBER_OF_BITS) + | ((valueT) generic_bignum[0] & LITTLENUM_MASK)); return number; } #endif @@ -291,19 +286,19 @@ integer_constant (radix, expressionP) int radix; expressionS *expressionP; { - char *start; /* start of number. */ + char *start; /* Start of number. */ char *suffix = NULL; char c; - valueT number; /* offset or (absolute) value */ - short int digit; /* value of next digit in current radix */ - short int maxdig = 0;/* highest permitted digit value. */ - int too_many_digits = 0; /* if we see >= this number of */ - char *name; /* points to name of symbol */ - symbolS *symbolP; /* points to symbol */ + valueT number; /* Offset or (absolute) value. */ + short int digit; /* Value of next digit in current radix. */ + short int maxdig = 0; /* Highest permitted digit value. */ + int too_many_digits = 0; /* If we see >= this number of. */ + char *name; /* Points to name of symbol. */ + symbolS *symbolP; /* Points to symbol. */ - int small; /* true if fits in 32 bits. */ + int small; /* True if fits in 32 bits. */ - /* May be bignum, or may fit in 32 bits. */ + /* May be bignum, or may fit in 32 bits. */ /* Most numbers fit into 32 bits, and we want this case to be fast. so we pretend it will fit into 32 bits. If, after making up a 32 bit number, we realise that we have scanned more digits than @@ -316,7 +311,7 @@ integer_constant (radix, expressionP) 32 bits, and change it back to a 32-bit number if it fits. The number we are looking for is expected to be positive, but if it fits into 32 bits as an unsigned number, we let it be a 32-bit - number. The cavalier approach is for speed in ordinary cases. */ + number. The cavalier approach is for speed in ordinary cases. */ /* This has been extended for 64 bits. We blindly assume that if you're compiling in 64-bit mode, the target is a 64-bit machine. This should be cleaned up. */ @@ -389,7 +384,7 @@ integer_constant (radix, expressionP) break; case 10: maxdig = radix = 10; - too_many_digits = (valuesize + 11) / 4; /* very rough */ + too_many_digits = (valuesize + 11) / 4; /* Very rough. */ } #undef valuesize start = input_line_pointer; @@ -400,26 +395,26 @@ integer_constant (radix, expressionP) { number = number * radix + digit; } - /* c contains character after number. */ - /* input_line_pointer->char after c. */ + /* c contains character after number. */ + /* input_line_pointer->char after c. */ small = (input_line_pointer - start - 1) < too_many_digits; - if (radix == 16 && c == '_') + if (radix == 16 && c == '_') { /* This is literal of the form 0x333_0_12345678_1. This example is equivalent to 0x00000333000000001234567800000001. */ int num_little_digits = 0; int i; - input_line_pointer = start; /*->1st digit. */ + input_line_pointer = start; /* -> 1st digit. */ know (LITTLENUM_NUMBER_OF_BITS == 16); - for (c = '_'; c == '_'; num_little_digits+=2) + for (c = '_'; c == '_'; num_little_digits += 2) { - /* Convert one 64-bit word. */ - int ndigit = 0; + /* Convert one 64-bit word. */ + int ndigit = 0; number = 0; for (c = *input_line_pointer++; (digit = hex_value (c)) < maxdig; @@ -430,20 +425,23 @@ integer_constant (radix, expressionP) } /* Check for 8 digit per word max. */ - if (ndigit > 8) + if (ndigit > 8) as_bad (_("A bignum with underscores may not have more than 8 hex digits in any word.")); - /* Add this chunk to the bignum. Shift things down 2 little digits.*/ + /* Add this chunk to the bignum. + Shift things down 2 little digits. */ know (LITTLENUM_NUMBER_OF_BITS == 16); - for (i = min (num_little_digits + 1, SIZE_OF_LARGE_NUMBER - 1); i >= 2; i--) - generic_bignum[i] = generic_bignum[i-2]; + for (i = min (num_little_digits + 1, SIZE_OF_LARGE_NUMBER - 1); + i >= 2; + i--) + generic_bignum[i] = generic_bignum[i - 2]; - /* Add the new digits as the least significant new ones. */ + /* Add the new digits as the least significant new ones. */ generic_bignum[0] = number & 0xffffffff; generic_bignum[1] = number >> 16; } - /* Again, c is char after number, input_line_pointer->after c. */ + /* Again, c is char after number, input_line_pointer->after c. */ if (num_little_digits > SIZE_OF_LARGE_NUMBER - 1) num_little_digits = SIZE_OF_LARGE_NUMBER - 1; @@ -454,14 +452,14 @@ integer_constant (radix, expressionP) as_bad (_("A bignum with underscores must have exactly 4 words.")); /* We might have some leading zeros. These can be trimmed to give - * us a change to fit this constant into a small number. - */ - while (generic_bignum[num_little_digits-1] == 0 && num_little_digits > 1) + us a change to fit this constant into a small number. */ + while (generic_bignum[num_little_digits - 1] == 0 + && num_little_digits > 1) num_little_digits--; - + if (num_little_digits <= 2) { - /* will fit into 32 bits. */ + /* will fit into 32 bits. */ number = generic_bignum_to_int32 (); small = 1; } @@ -476,16 +474,16 @@ integer_constant (radix, expressionP) else { small = 0; - number = num_little_digits; /* number of littlenums in the bignum. */ + + /* Number of littlenums in the bignum. */ + number = num_little_digits; } } else if (!small) { - /* - * we saw a lot of digits. manufacture a bignum the hard way. - */ - LITTLENUM_TYPE *leader; /*->high order littlenum of the bignum. */ - LITTLENUM_TYPE *pointer; /*->littlenum we are frobbing now. */ + /* We saw a lot of digits. manufacture a bignum the hard way. */ + LITTLENUM_TYPE *leader; /* -> high order littlenum of the bignum. */ + LITTLENUM_TYPE *pointer; /* -> littlenum we are frobbing now. */ long carry; leader = generic_bignum; @@ -493,15 +491,11 @@ integer_constant (radix, expressionP) generic_bignum[1] = 0; generic_bignum[2] = 0; generic_bignum[3] = 0; - input_line_pointer = start; /*->1st digit. */ + input_line_pointer = start; /* -> 1st digit. */ c = *input_line_pointer++; - for (; - (carry = hex_value (c)) < maxdig; - c = *input_line_pointer++) + for (; (carry = hex_value (c)) < maxdig; c = *input_line_pointer++) { - for (pointer = generic_bignum; - pointer <= leader; - pointer++) + for (pointer = generic_bignum; pointer <= leader; pointer++) { long work; @@ -513,17 +507,17 @@ integer_constant (radix, expressionP) { if (leader < generic_bignum + SIZE_OF_LARGE_NUMBER - 1) { - /* room to grow a longer bignum. */ + /* Room to grow a longer bignum. */ *++leader = carry; } } } - /* again, c is char after number, */ - /* input_line_pointer->after c. */ + /* Again, c is char after number. */ + /* input_line_pointer -> after c. */ know (LITTLENUM_NUMBER_OF_BITS == 16); if (leader < generic_bignum + 2) { - /* will fit into 32 bits. */ + /* Will fit into 32 bits. */ number = generic_bignum_to_int32 (); small = 1; } @@ -537,39 +531,37 @@ integer_constant (radix, expressionP) #endif else { - number = leader - generic_bignum + 1; /* number of littlenums in the bignum. */ + /* Number of littlenums in the bignum. */ + number = leader - generic_bignum + 1; } } - if ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) - && suffix != NULL + if ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) + && suffix != NULL && input_line_pointer - 1 == suffix) c = *input_line_pointer++; if (small) { - /* - * here with number, in correct radix. c is the next char. - * note that unlike un*x, we allow "011f" "0x9f" to - * both mean the same as the (conventional) "9f". this is simply easier - * than checking for strict canonical form. syntax sux! - */ + /* Here with number, in correct radix. c is the next char. + Note that unlike un*x, we allow "011f" "0x9f" to both mean + the same as the (conventional) "9f". + This is simply easier than checking for strict canonical + form. Syntax sux! */ if (LOCAL_LABELS_FB && c == 'b') { - /* - * backward ref to local label. - * because it is backward, expect it to be defined. - */ + /* Backward ref to local label. + Because it is backward, expect it to be defined. */ /* Construct a local label. */ name = fb_label_name ((int) number, 0); - /* seen before, or symbol is defined: ok */ + /* Seen before, or symbol is defined: OK. */ symbolP = symbol_find (name); if ((symbolP != NULL) && (S_IS_DEFINED (symbolP))) { - /* local labels are never absolute. don't waste time - checking absoluteness. */ + /* Local labels are never absolute. Don't waste time + checking absoluteness. */ know (SEG_NORMAL (S_GET_SEGMENT (symbolP))); expressionP->X_op = O_symbol; @@ -577,7 +569,7 @@ integer_constant (radix, expressionP) } else { - /* either not seen or not defined. */ + /* Either not seen or not defined. */ /* @@ Should print out the original string instead of the parsed number. */ as_bad (_("backw. ref to unknown label \"%d:\", 0 assumed."), @@ -589,19 +581,18 @@ integer_constant (radix, expressionP) } /* case 'b' */ else if (LOCAL_LABELS_FB && c == 'f') { - /* - * forward reference. expect symbol to be undefined or - * unknown. undefined: seen it before. unknown: never seen - * it before. - * construct a local label name, then an undefined symbol. - * don't create a xseg frag for it: caller may do that. - * just return it as never seen before. - */ + /* Forward reference. Expect symbol to be undefined or + unknown. undefined: seen it before. unknown: never seen + it before. + + Construct a local label name, then an undefined symbol. + Don't create a xseg frag for it: caller may do that. + Just return it as never seen before. */ name = fb_label_name ((int) number, 1); symbolP = symbol_find_or_make (name); - /* we have no need to check symbol properties. */ + /* We have no need to check symbol properties. */ #ifndef many_segments - /* since "know" puts its arg into a "string", we + /* Since "know" puts its arg into a "string", we can't have newlines in the argument. */ know (S_GET_SEGMENT (symbolP) == undefined_section || S_GET_SEGMENT (symbolP) == text_section || S_GET_SEGMENT (symbolP) == data_section); #endif @@ -640,15 +631,15 @@ integer_constant (radix, expressionP) number |= (-(number >> (TARGET_WORD_SIZE - 1))) << (TARGET_WORD_SIZE - 1); #endif expressionP->X_add_number = number; - input_line_pointer--; /* restore following character. */ - } /* really just a number */ + input_line_pointer--; /* Restore following character. */ + } /* Really just a number. */ } else { - /* not a small number */ + /* Not a small number. */ expressionP->X_op = O_big; - expressionP->X_add_number = number; /* number of littlenums */ - input_line_pointer--; /*->char following number. */ + expressionP->X_add_number = number; /* Number of littlenums. */ + input_line_pointer--; /* -> char following number. */ } } @@ -766,24 +757,20 @@ current_location (expressionp) } } -/* - * Summary of operand(). - * - * in: Input_line_pointer points to 1st char of operand, which may - * be a space. - * - * out: A expressionS. - * The operand may have been empty: in this case X_op == O_absent. - * Input_line_pointer->(next non-blank) char after operand. - */ +/* In: Input_line_pointer points to 1st char of operand, which may + be a space. + + Out: A expressionS. + The operand may have been empty: in this case X_op == O_absent. + Input_line_pointer->(next non-blank) char after operand. */ static segT operand (expressionP) expressionS *expressionP; { char c; - symbolS *symbolP; /* points to symbol */ - char *name; /* points to name of symbol */ + symbolS *symbolP; /* Points to symbol. */ + char *name; /* Points to name of symbol. */ segT segment; /* All integers are regarded as unsigned unless they are negated. @@ -794,10 +781,13 @@ operand (expressionP) though it appears negative if valueT is 32 bits. */ expressionP->X_unsigned = 1; - /* digits, assume it is a bignum. */ + /* Digits, assume it is a bignum. */ + + SKIP_WHITESPACE (); /* Leading whitespace is part of operand. */ + c = *input_line_pointer++; /* input_line_pointer -> past char in c. */ - SKIP_WHITESPACE (); /* leading whitespace is part of operand. */ - c = *input_line_pointer++; /* input_line_pointer->past char in c. */ + if (is_end_of_line[(unsigned char) c]) + goto eol; switch (c) { @@ -812,13 +802,25 @@ operand (expressionP) case '9': input_line_pointer--; - integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) - ? 0 : 10, + integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) + ? 0 : 10, expressionP); break; +#ifdef LITERAL_PREFIXDOLLAR_HEX + case '$': + integer_constant (16, expressionP); + break; +#endif + +#ifdef LITERAL_PREFIXPERCENT_BIN + case '%': + integer_constant (2, expressionP); + break; +#endif + case '0': - /* non-decimal radix */ + /* Non-decimal radix. */ if (NUMBERS_WITH_SUFFIX || flag_m68k_mri) { @@ -833,7 +835,7 @@ operand (expressionP) integer_constant (0, expressionP); break; } - } + } c = *input_line_pointer; switch (c) { @@ -860,7 +862,7 @@ operand (expressionP) } else { - /* The string was only zero */ + /* The string was only zero. */ expressionP->X_op = O_constant; expressionP->X_add_number = 0; } @@ -912,8 +914,8 @@ operand (expressionP) case '6': case '7': integer_constant ((flag_m68k_mri || NUMBERS_WITH_SUFFIX) - ? 0 : 8, - expressionP); + ? 0 : 8, + expressionP); break; case 'f': @@ -935,11 +937,11 @@ operand (expressionP) case 0: case ERROR_EXPONENT_OVERFLOW: if (*cp == 'f' || *cp == 'b') - /* looks like a difference expression */ + /* Looks like a difference expression. */ goto is_0f_label; else if (cp == input_line_pointer + 1) /* No characters has been accepted -- looks like - end of operand. */ + end of operand. */ goto is_0f_label; else goto is_0f_float; @@ -958,7 +960,7 @@ operand (expressionP) break; is_0f_float: - /* fall through */ + /* Fall through. */ ; } @@ -998,17 +1000,21 @@ operand (expressionP) #ifndef NEED_INDEX_OPERATOR case '[': #endif - /* didn't begin with digit & not a name */ + /* Didn't begin with digit & not a name. */ segment = expression (expressionP); - /* Expression() will pass trailing whitespace */ - if ((c == '(' && *input_line_pointer++ != ')') - || (c == '[' && *input_line_pointer++ != ']')) + /* expression () will pass trailing whitespace. */ + if ((c == '(' && *input_line_pointer != ')') + || (c == '[' && *input_line_pointer != ']')) { - as_bad (_("Missing ')' assumed")); - input_line_pointer--; +#ifdef RELAX_PAREN_GROUPING + if (c != '(') +#endif + as_bad (_("Missing '%c' assumed"), c == '(' ? ')' : ']'); } + else + input_line_pointer++; SKIP_WHITESPACE (); - /* here with input_line_pointer->char after "(...)" */ + /* Here with input_line_pointer -> char after "(...)". */ return segment; #ifdef TC_M68K @@ -1027,9 +1033,9 @@ operand (expressionP) if (! flag_m68k_mri) { /* Warning: to conform to other people's assemblers NO - ESCAPEMENT is permitted for a single quote. The next + ESCAPEMENT is permitted for a single quote. The next character, parity errors and all, is taken as the value - of the operand. VERY KINKY. */ + of the operand. VERY KINKY. */ expressionP->X_op = O_constant; expressionP->X_add_number = *input_line_pointer++; break; @@ -1050,7 +1056,7 @@ operand (expressionP) /* Fall through. */ #endif case '~': - /* ~ is permitted to start a label on the Delta. */ + /* '~' is permitted to start a label on the Delta. */ if (is_name_beginner (c)) goto isname; case '!': @@ -1059,12 +1065,13 @@ operand (expressionP) operand (expressionP); if (expressionP->X_op == O_constant) { - /* input_line_pointer -> char after operand */ + /* input_line_pointer -> char after operand. */ if (c == '-') { expressionP->X_add_number = - expressionP->X_add_number; - /* Notice: '-' may overflow: no warning is given. This is - compatible with other people's assemblers. Sigh. */ + /* Notice: '-' may overflow: no warning is given. + This is compatible with other people's + assemblers. Sigh. */ expressionP->X_unsigned = 0; } else if (c == '~' || c == '"') @@ -1092,15 +1099,15 @@ operand (expressionP) #if defined (DOLLAR_DOT) || defined (TC_M68K) case '$': - /* $ is the program counter when in MRI mode, or when DOLLAR_DOT - is defined. */ + /* '$' is the program counter when in MRI mode, or when + DOLLAR_DOT is defined. */ #ifndef DOLLAR_DOT if (! flag_m68k_mri) goto de_fault; #endif if (flag_m68k_mri && hex_p (*input_line_pointer)) { - /* In MRI mode, $ is also used as the prefix for a + /* In MRI mode, '$' is also used as the prefix for a hexadecimal constant. */ integer_constant (16, expressionP); break; @@ -1166,11 +1173,10 @@ operand (expressionP) { goto isname; } + case ',': - case '\n': - case '\0': eol: - /* can't imagine any other kind of operand */ + /* Can't imagine any other kind of operand. */ expressionP->X_op = O_absent; input_line_pointer--; break; @@ -1211,14 +1217,10 @@ operand (expressionP) #ifdef TC_M68K de_fault: #endif - if (is_end_of_line[(unsigned char) c]) - goto eol; - if (is_name_beginner (c)) /* here if did not begin with a digit */ + if (is_name_beginner (c)) /* Here if did not begin with a digit. */ { - /* - * Identifier begins here. - * This is kludged for speed, so code is repeated. - */ + /* Identifier begins here. + This is kludged for speed, so code is repeated. */ isname: name = --input_line_pointer; c = get_symbol_end (); @@ -1271,7 +1273,7 @@ operand (expressionP) SKIP_WHITESPACE (); break; - } + } #endif symbolP = symbol_find_or_make (name); @@ -1301,7 +1303,7 @@ operand (expressionP) { /* Let the target try to parse it. Success is indicated by changing the X_op field to something other than O_absent and pointing - input_line_pointer passed the expression. If it can't parse the + input_line_pointer past the expression. If it can't parse the expression, X_op and input_line_pointer should be unchanged. */ expressionP->X_op = O_absent; --input_line_pointer; @@ -1317,12 +1319,10 @@ operand (expressionP) break; } - /* - * It is more 'efficient' to clean up the expressionS when they are created. - * Doing it here saves lines of code. - */ + /* It is more 'efficient' to clean up the expressionS when they are + created. Doing it here saves lines of code. */ clean_up_expression (expressionP); - SKIP_WHITESPACE (); /*->1st char after operand. */ + SKIP_WHITESPACE (); /* -> 1st char after operand. */ know (*input_line_pointer != ' '); /* The PA port needs this information. */ @@ -1338,19 +1338,18 @@ operand (expressionP) case O_register: return reg_section; } -} /* operand() */ +} -/* Internal. Simplify a struct expression for use by expr() */ - -/* - * In: address of a expressionS. - * The X_op field of the expressionS may only take certain values. - * Elsewise we waste time special-case testing. Sigh. Ditto SEG_ABSENT. - * Out: expressionS may have been modified: - * 'foo-foo' symbol references cancelled to 0, - * which changes X_op from O_subtract to O_constant. - * Unused fields zeroed to help expr(). - */ +/* Internal. Simplify a struct expression for use by expr (). */ + +/* In: address of a expressionS. + The X_op field of the expressionS may only take certain values. + Elsewise we waste time special-case testing. Sigh. Ditto SEG_ABSENT. + + Out: expressionS may have been modified: + 'foo-foo' symbol references cancelled to 0, which changes X_op + from O_subtract to O_constant. + Unused fields zeroed to help expr (). */ static void clean_up_expression (expressionP) @@ -1394,35 +1393,32 @@ clean_up_expression (expressionP) } } -/* Expression parser. */ - -/* - * We allow an empty expression, and just assume (absolute,0) silently. - * Unary operators and parenthetical expressions are treated as operands. - * As usual, Q==quantity==operand, O==operator, X==expression mnemonics. - * - * We used to do a aho/ullman shift-reduce parser, but the logic got so - * warped that I flushed it and wrote a recursive-descent parser instead. - * Now things are stable, would anybody like to write a fast parser? - * Most expressions are either register (which does not even reach here) - * or 1 symbol. Then "symbol+constant" and "symbol-symbol" are common. - * So I guess it doesn't really matter how inefficient more complex expressions - * are parsed. - * - * After expr(RANK,resultP) input_line_pointer->operator of rank <= RANK. - * Also, we have consumed any leading or trailing spaces (operand does that) - * and done all intervening operators. - * - * This returns the segment of the result, which will be - * absolute_section or the segment of a symbol. - */ +/* Expression parser. */ + +/* We allow an empty expression, and just assume (absolute,0) silently. + Unary operators and parenthetical expressions are treated as operands. + As usual, Q==quantity==operand, O==operator, X==expression mnemonics. + + We used to do a aho/ullman shift-reduce parser, but the logic got so + warped that I flushed it and wrote a recursive-descent parser instead. + Now things are stable, would anybody like to write a fast parser? + Most expressions are either register (which does not even reach here) + or 1 symbol. Then "symbol+constant" and "symbol-symbol" are common. + So I guess it doesn't really matter how inefficient more complex expressions + are parsed. + + After expr(RANK,resultP) input_line_pointer->operator of rank <= RANK. + Also, we have consumed any leading or trailing spaces (operand does that) + and done all intervening operators. + + This returns the segment of the result, which will be + absolute_section or the segment of a symbol. */ #undef __ #define __ O_illegal -static const operatorT op_encoding[256] = -{ /* maps ASCII->operators */ - +/* Maps ASCII -> operators. */ +static const operatorT op_encoding[256] = { __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, @@ -1455,28 +1451,25 @@ static const operatorT op_encoding[256] = __, __, __, __, __, __, __, __, __, __, __, __, __, __, __, __ }; - -/* - * Rank Examples - * 0 operand, (expression) - * 1 || - * 2 && - * 3 = <> < <= >= > - * 4 + - - * 5 used for * / % in MRI mode - * 6 & ^ ! | - * 7 * / % << >> - * 8 unary - unary ~ - */ -static operator_rankT op_rank[] = -{ +/* Rank Examples + 0 operand, (expression) + 1 || + 2 && + 3 = <> < <= >= > + 4 + - + 5 used for * / % in MRI mode + 6 & ^ ! | + 7 * / % << >> + 8 unary - unary ~ +*/ +static operator_rankT op_rank[] = { 0, /* O_illegal */ 0, /* O_absent */ 0, /* O_constant */ 0, /* O_symbol */ 0, /* O_symbol_rva */ 0, /* O_register */ - 0, /* O_bit */ + 0, /* O_big */ 9, /* O_uminus */ 9, /* O_bit_not */ 9, /* O_logical_not */ @@ -1524,8 +1517,8 @@ static operator_rankT op_rank[] = mode. Also, MRI uses a different bit_not operator, and this fixes that as well. */ -#define STANDARD_MUL_PRECEDENCE (7) -#define MRI_MUL_PRECEDENCE (5) +#define STANDARD_MUL_PRECEDENCE 8 +#define MRI_MUL_PRECEDENCE 6 void expr_set_precedence () @@ -1559,17 +1552,22 @@ expr_begin () } } -/* Return the encoding for the operator at INPUT_LINE_POINTER. - Advance INPUT_LINE_POINTER to the last character in the operator - (i.e., don't change it for a single character operator). */ +/* Return the encoding for the operator at INPUT_LINE_POINTER, and + sets NUM_CHARS to the number of characters in the operator. + Does not advance INPUT_LINE_POINTER. */ static inline operatorT -operator () +operator (num_chars) + int *num_chars; { int c; operatorT ret; c = *input_line_pointer & 0xff; + *num_chars = 1; + + if (is_end_of_line[c]) + return O_illegal; switch (c) { @@ -1591,14 +1589,14 @@ operator () ret = O_le; break; } - ++input_line_pointer; + *num_chars = 2; return ret; case '=': if (input_line_pointer[1] != '=') return op_encoding[c]; - ++input_line_pointer; + *num_chars = 2; return O_eq; case '>': @@ -1613,7 +1611,7 @@ operator () ret = O_ge; break; } - ++input_line_pointer; + *num_chars = 2; return ret; case '!': @@ -1624,52 +1622,54 @@ operator () return O_bit_inclusive_or; return op_encoding[c]; } - ++input_line_pointer; + *num_chars = 2; return O_bit_exclusive_or; case '|': if (input_line_pointer[1] != '|') return op_encoding[c]; - ++input_line_pointer; + *num_chars = 2; return O_logical_or; case '&': if (input_line_pointer[1] != '&') return op_encoding[c]; - ++input_line_pointer; + *num_chars = 2; return O_logical_and; } - /*NOTREACHED*/ + /* NOTREACHED */ } /* Parse an expression. */ segT expr (rankarg, resultP) - int rankarg; /* Larger # is higher rank. */ - expressionS *resultP; /* Deliver result here. */ + int rankarg; /* Larger # is higher rank. */ + expressionS *resultP; /* Deliver result here. */ { operator_rankT rank = (operator_rankT) rankarg; segT retval; expressionS right; operatorT op_left; operatorT op_right; + int op_chars; know (rank >= 0); retval = operand (resultP); - know (*input_line_pointer != ' '); /* Operand() gobbles spaces. */ + /* operand () gobbles spaces. */ + know (*input_line_pointer != ' '); - op_left = operator (); + op_left = operator (&op_chars); while (op_left != O_illegal && op_rank[(int) op_left] > rank) { segT rightseg; - input_line_pointer++; /*->after 1st character of operator. */ + input_line_pointer += op_chars; /* -> after operator. */ rightseg = expr (op_rank[(int) op_left], &right); if (right.X_op == O_absent) @@ -1709,16 +1709,17 @@ expr (rankarg, resultP) ) as_bad (_("operation combines symbols in different segments")); - op_right = operator (); + op_right = operator (&op_chars); - know (op_right == O_illegal || op_rank[(int) op_right] <= op_rank[(int) op_left]); + know (op_right == O_illegal + || op_rank[(int) op_right] <= op_rank[(int) op_left]); know ((int) op_left >= (int) O_multiply && (int) op_left <= (int) O_logical_or); - /* input_line_pointer->after right-hand quantity. */ - /* left-hand quantity in resultP */ - /* right-hand quantity in right. */ - /* operator in op_left. */ + /* input_line_pointer->after right-hand quantity. */ + /* left-hand quantity in resultP. */ + /* right-hand quantity in right. */ + /* operator in op_left. */ if (resultP->X_op == O_big) { @@ -1744,6 +1745,14 @@ expr (rankarg, resultP) } /* Optimize common cases. */ +#ifdef md_optimize_expr + if (md_optimize_expr (resultP, op_left, &right)) + { + /* Skip. */ + ; + } + else +#endif if (op_left == O_add && right.X_op == O_constant) { /* X + constant. */ @@ -1864,7 +1873,7 @@ expr (rankarg, resultP) } op_left = op_right; - } /* While next operator is >= this rank. */ + } /* While next operator is >= this rank. */ /* The PA port needs this information. */ if (resultP->X_add_symbol) @@ -1873,21 +1882,18 @@ expr (rankarg, resultP) return resultP->X_op == O_constant ? absolute_section : retval; } -/* - * get_symbol_end() - * - * This lives here because it belongs equally in expr.c & read.c. - * Expr.c is just a branch office read.c anyway, and putting it - * here lessens the crowd at read.c. - * - * Assume input_line_pointer is at start of symbol name. - * Advance input_line_pointer past symbol name. - * Turn that character into a '\0', returning its former value. - * This allows a string compare (RMS wants symbol names to be strings) - * of the symbol name. - * There will always be a char following symbol name, because all good - * lines end in end-of-line. - */ +/* This lives here because it belongs equally in expr.c & read.c. + expr.c is just a branch office read.c anyway, and putting it + here lessens the crowd at read.c. + + Assume input_line_pointer is at start of symbol name. + Advance input_line_pointer past symbol name. + Turn that character into a '\0', returning its former value. + This allows a string compare (RMS wants symbol names to be strings) + of the symbol name. + There will always be a char following symbol name, because all good + lines end in end-of-line. */ + char get_symbol_end () { @@ -1907,14 +1913,10 @@ get_symbol_end () return (c); } - unsigned int get_single_number () { expressionS exp; operand (&exp); return exp.X_add_number; - } - -/* end of expr.c */ diff --git a/contrib/binutils/gas/expr.h b/contrib/binutils/gas/expr.h index 0ed6af6..d63ab7f 100644 --- a/contrib/binutils/gas/expr.h +++ b/contrib/binutils/gas/expr.h @@ -1,5 +1,5 @@ /* expr.h -> header file for expr.c - Copyright (C) 1987, 92-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1987, 92-99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -39,8 +39,7 @@ NOTE: This enumeration must match the op_rank array in expr.c. */ -typedef enum -{ +typedef enum { /* An illegal expression. */ O_illegal, /* A nonexistent expression. */ @@ -111,8 +110,7 @@ typedef enum O_max } operatorT; -typedef struct expressionS -{ +typedef struct expressionS { /* The main symbol. */ symbolS *X_add_symbol; /* The second symbol, if needed. */ @@ -142,16 +140,16 @@ typedef struct expressionS unsigned short X_md; } expressionS; -/* "result" should be type (expressionS *). */ +/* "result" should be type (expressionS *). */ #define expression(result) expr (0, result) /* If an expression is O_big, look here for its value. These common - data may be clobbered whenever expr() is called. */ -/* Flonums returned here. Big enough to hold most precise flonum. */ + data may be clobbered whenever expr() is called. */ +/* Flonums returned here. Big enough to hold most precise flonum. */ extern FLONUM_TYPE generic_floating_point_number; -/* Bignums returned here. */ +/* Bignums returned here. */ extern LITTLENUM_TYPE generic_bignum[]; -/* Number of littlenums in above. */ +/* Number of littlenums in above. */ #define SIZE_OF_LARGE_NUMBER (20) typedef char operator_rankT; @@ -169,5 +167,3 @@ extern symbolS *expr_build_uconstant PARAMS ((offsetT)); extern symbolS *expr_build_unary PARAMS ((operatorT, symbolS *)); extern symbolS *expr_build_binary PARAMS ((operatorT, symbolS *, symbolS *)); extern symbolS *expr_build_dot PARAMS ((void)); - -/* end of expr.h */ diff --git a/contrib/binutils/gas/flonum-copy.c b/contrib/binutils/gas/flonum-copy.c index 5bcc5cc..79a34c0 100644 --- a/contrib/binutils/gas/flonum-copy.c +++ b/contrib/binutils/gas/flonum-copy.c @@ -1,5 +1,5 @@ /* flonum_copy.c - copy a flonum - Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1990, 1991, 1992, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -14,8 +14,9 @@ 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. */ + 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. */ #include "as.h" @@ -24,8 +25,8 @@ flonum_copy (in, out) FLONUM_TYPE *in; FLONUM_TYPE *out; { - unsigned int in_length; /* 0 origin */ - unsigned int out_length; /* 0 origin */ + unsigned int in_length; /* 0 origin */ + unsigned int out_length; /* 0 origin */ out->sign = in->sign; in_length = in->leader - in->low; @@ -37,37 +38,35 @@ flonum_copy (in, out) else { out_length = out->high - out->low; - /* - * Assume no GAPS in packing of littlenums. - * I.e. sizeof(array) == sizeof(element) * number_of_elements. - */ + /* Assume no GAPS in packing of littlenums. + I.e. sizeof(array) == sizeof(element) * number_of_elements. */ if (in_length <= out_length) { { - /* - * For defensive programming, zero any high-order littlenums we don't need. - * This is destroying evidence and wasting time, so why bother??? - */ + /* For defensive programming, zero any high-order + littlenums we don't need. This is destroying evidence + and wasting time, so why bother??? */ if (in_length < out_length) { - memset ((char *) (out->low + in_length + 1), '\0', out_length - in_length); + memset ((char *) (out->low + in_length + 1), '\0', + out_length - in_length); } } - memcpy ((void *) (out->low), (void *) (in->low), ((in_length + 1) * sizeof (LITTLENUM_TYPE))); + memcpy ((void *) (out->low), (void *) (in->low), + ((in_length + 1) * sizeof (LITTLENUM_TYPE))); out->exponent = in->exponent; out->leader = in->leader - in->low + out->low; } else { - int shorten; /* 1-origin. Number of littlenums we drop. */ + int shorten; /* 1-origin. Number of littlenums we drop. */ shorten = in_length - out_length; /* Assume out_length >= 0 ! */ - memcpy ((void *) (out->low), (void *) (in->low + shorten), ((out_length + 1) * sizeof (LITTLENUM_TYPE))); + memcpy ((void *) (out->low), (void *) (in->low + shorten), + ((out_length + 1) * sizeof (LITTLENUM_TYPE))); out->leader = out->high; out->exponent = in->exponent + shorten; } } /* if any significant bits */ -} /* flonum_copy() */ - -/* end of flonum_copy.c */ +} diff --git a/contrib/binutils/gas/flonum-konst.c b/contrib/binutils/gas/flonum-konst.c index 22bba05..599ce5e 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, 1996 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -23,13 +23,13 @@ #include "flonum.h" /* JF: I added the last entry to this table, and I'm not sure if its right or not. Could go either way. I wish - I really understood this stuff. */ - + I really understood this stuff. */ const int table_size_of_flonum_powers_of_ten = 13; -static const LITTLENUM_TYPE zero[] = -{1}; +static const LITTLENUM_TYPE zero[] = { + 1 +}; /***********************************************************************\ * * @@ -44,131 +44,149 @@ static const LITTLENUM_TYPE zero[] = \***********************************************************************/ /* JF: If this equals 6553/(2^16)+39321/(2^32)+... it approaches .1 */ -static const LITTLENUM_TYPE minus_1[] = -{ +static const LITTLENUM_TYPE minus_1[] = { 39322, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, - 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 6553}; -static const LITTLENUM_TYPE plus_1[] = -{10}; + 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 39321, 6553 +}; + +static const LITTLENUM_TYPE plus_1[] = { + 10 +}; /* JF: If this equals 655/(2^16) + 23592/(2^32) + ... it approaches .01 */ -static const LITTLENUM_TYPE minus_2[] = -{ +static const LITTLENUM_TYPE minus_2[] = { 10486, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 49807, - 10485, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 655}; -static const LITTLENUM_TYPE plus_2[] = -{100}; + 10485, 36700, 62914, 23592, 49807, 10485, 36700, 62914, 23592, 655 +}; + +static const LITTLENUM_TYPE plus_2[] = { + 100 +}; /* This approaches .0001 */ -static const LITTLENUM_TYPE minus_3[] = -{ +static const LITTLENUM_TYPE minus_3[] = { 52534, 20027, 37329, 65116, 64067, 60397, 14784, 18979, 33659, 19503, - 2726, 9542, 629, 2202, 40475, 10590, 4299, 47815, 36280, 6}; -static const LITTLENUM_TYPE plus_3[] = -{10000}; + 2726, 9542, 629, 2202, 40475, 10590, 4299, 47815, 36280, 6 +}; + +static const LITTLENUM_TYPE plus_3[] = { + 10000 +}; /* JF: this approaches 1e-8 */ -static const LITTLENUM_TYPE minus_4[] = -{ +static const LITTLENUM_TYPE minus_4[] = { 22517, 49501, 54293, 19424, 60699, 6716, 24348, 22618, 23904, 21327, - 3919, 44703, 19149, 28803, 48959, 6259, 50273, 62237, 42}; + 3919, 44703, 19149, 28803, 48959, 6259, 50273, 62237, 42 +}; + /* This equals 1525 * 2^16 + 57600 */ -static const LITTLENUM_TYPE plus_4[] = -{57600, 1525}; +static const LITTLENUM_TYPE plus_4[] = { + 57600, 1525 +}; /* This approaches 1e-16 */ -static const LITTLENUM_TYPE minus_5[] = -{ +static const LITTLENUM_TYPE minus_5[] = { 22199, 45957, 17005, 26266, 10526, 16260, 55017, 35680, 40443, 19789, - 17356, 30195, 55905, 28426, 63010, 44197, 1844}; -static const LITTLENUM_TYPE plus_5[] = -{28609, 34546, 35}; + 17356, 30195, 55905, 28426, 63010, 44197, 1844 +}; -static const LITTLENUM_TYPE minus_6[] = -{ +static const LITTLENUM_TYPE plus_5[] = { + 28609, 34546, 35 +}; + +static const LITTLENUM_TYPE minus_6[] = { 30926, 26518, 13110, 43018, 54982, 48258, 24658, 15209, 63366, 11929, - 20069, 43857, 60487, 51}; -static const LITTLENUM_TYPE plus_6[] = -{61313, 34220, 16731, 11629, 1262}; + 20069, 43857, 60487, 51 +}; -static const LITTLENUM_TYPE minus_7[] = -{ - 29819, 14733, 21490, 40602, 31315, 65186, 2695}; -static const LITTLENUM_TYPE plus_7[] = -{ - 7937, 49002, 60772, 28216, 38893, 55975, 63988, 59711, 20227, 24}; +static const LITTLENUM_TYPE plus_6[] = { + 61313, 34220, 16731, 11629, 1262 +}; -static const LITTLENUM_TYPE minus_8[] = -{ +static const LITTLENUM_TYPE minus_7[] = { + 29819, 14733, 21490, 40602, 31315, 65186, 2695 +}; + +static const LITTLENUM_TYPE plus_7[] = { + 7937, 49002, 60772, 28216, 38893, 55975, 63988, 59711, 20227, 24 +}; + +static const LITTLENUM_TYPE minus_8[] = { 27579, 64807, 12543, 794, 13907, 61297, 12013, 64360, 15961, 20566, - 24178, 15922, 59427, 110}; -static const LITTLENUM_TYPE plus_8[] = -{ + 24178, 15922, 59427, 110 +}; + +static const LITTLENUM_TYPE plus_8[] = { 15873, 11925, 39177, 991, 14589, 3861, 58415, 9076, 62956, 54223, - 56328, 50180, 45274, 48333, 32537, 42547, 9731, 59679, 590}; + 56328, 50180, 45274, 48333, 32537, 42547, 9731, 59679, 590 +}; -static const LITTLENUM_TYPE minus_9[] = -{ +static const LITTLENUM_TYPE minus_9[] = { 11042, 8464, 58971, 63429, 6022, 63485, 5500, 53464, 47545, 50068, 56988, 22819, 49708, 54493, 9920, 47667, 40409, 35764, 10383, 54466, - 32702, 17493, 32420, 34382, 22750, 20681, 12300}; -static const LITTLENUM_TYPE plus_9[] = -{ + 32702, 17493, 32420, 34382, 22750, 20681, 12300 +}; + +static const LITTLENUM_TYPE plus_9[] = { 20678, 27614, 28272, 53066, 55311, 54677, 29038, 9906, 26288, 44486, 13860, 7445, 54106, 15426, 21518, 25599, 29632, 52309, 61207, 26105, - 10482, 21948, 51191, 32988, 60892, 62574, 61390, 24540, 21495, 5}; + 10482, 21948, 51191, 32988, 60892, 62574, 61390, 24540, 21495, 5 +}; -static const LITTLENUM_TYPE minus_10[] = -{ +static const LITTLENUM_TYPE minus_10[] = { 6214, 48771, 23471, 30163, 31763, 38013, 57001, 11770, 18263, 36366, 20742, 45086, 56969, 53231, 37856, 55814, 38057, 15692, 46761, 8713, - 6102, 20083, 8269, 11839, 11571, 50963, 15649, 11698, 40675, 2308}; -static const LITTLENUM_TYPE plus_10[] = -{ + 6102, 20083, 8269, 11839, 11571, 50963, 15649, 11698, 40675, 2308 +}; + +static const LITTLENUM_TYPE plus_10[] = { 63839, 36576, 45712, 44516, 37803, 29482, 4966, 30556, 37961, 23310, 27070, 44972, 29507, 48257, 45209, 7494, 17831, 38728, 41577, 29443, - 36016, 7955, 35339, 35479, 36011, 14553, 49618, 5588, 25396, 28}; + 36016, 7955, 35339, 35479, 36011, 14553, 49618, 5588, 25396, 28 +}; -static const LITTLENUM_TYPE minus_11[] = -{ +static const LITTLENUM_TYPE minus_11[] = { 16663, 56882, 61983, 7804, 36555, 32060, 34502, 1000, 14356, 21681, 6605, 34767, 51411, 59048, 53614, 39850, 30079, 6496, 6846, 26841, - 40778, 19578, 59899, 44085, 54016, 24259, 11232, 21229, 21313, 81}; -static const LITTLENUM_TYPE plus_11[] = -{ + 40778, 19578, 59899, 44085, 54016, 24259, 11232, 21229, 21313, 81 +}; + +static const LITTLENUM_TYPE plus_11[] = { 92, 9054, 62707, 17993, 7821, 56838, 13992, 21321, 29637, 48426, 42982, 38668, 49574, 28820, 18200, 18927, 53979, 16219, 37484, 2516, - 44642, 14665, 11587, 41926, 13556, 23956, 54320, 6661, 55766, 805}; + 44642, 14665, 11587, 41926, 13556, 23956, 54320, 6661, 55766, 805 +}; -static const LITTLENUM_TYPE minus_12[] = -{ +static const LITTLENUM_TYPE minus_12[] = { 33202, 45969, 58804, 56734, 16482, 26007, 44984, 49334, 31007, 32944, 44517, 63329, 47131, 15291, 59465, 2264, 23218, 11829, 59771, 38798, - 31051, 28748, 23129, 40541, 41562, 35108, 50620, 59014, 51817, 6613}; -static const LITTLENUM_TYPE plus_12[] = -{ + 31051, 28748, 23129, 40541, 41562, 35108, 50620, 59014, 51817, 6613 +}; + +static const LITTLENUM_TYPE plus_12[] = { 10098, 37922, 58070, 7432, 10470, 63465, 23718, 62190, 47420, 7009, 38443, 4587, 45596, 38472, 52129, 52779, 29012, 13559, 48688, 31678, - 41753, 58662, 10668, 36067, 29906, 56906, 21461, 46556, 59571, 9}; + 41753, 58662, 10668, 36067, 29906, 56906, 21461, 46556, 59571, 9 +}; -static const LITTLENUM_TYPE minus_13[] = -{ +static const LITTLENUM_TYPE minus_13[] = { 45309, 27592, 37144, 34637, 34328, 41671, 34620, 24135, 53401, 22112, 21576, 45147, 39310, 44051, 48572, 3676, 46544, 59768, 33350, 2323, - 49524, 61568, 3903, 36487, 36356, 30903, 14975, 9035, 29715, 667}; -static const LITTLENUM_TYPE plus_13[] = -{ + 49524, 61568, 3903, 36487, 36356, 30903, 14975, 9035, 29715, 667 +}; + +static const LITTLENUM_TYPE plus_13[] = { 18788, 16960, 6318, 45685, 55400, 46230, 35794, 25588, 7253, 55541, 49716, 59760, 63592, 8191, 63765, 58530, 44667, 13294, 10001, 55586, - 47887, 18738, 9509, 40896, 42506, 52580, 4171, 325, 12329, 98}; + 47887, 18738, 9509, 40896, 42506, 52580, 4171, 325, 12329, 98 +}; /* Shut up complaints about differing pointer types. They only differ in the const attribute, but there isn't any easy way to do this */ #define X (LITTLENUM_TYPE *) -const FLONUM_TYPE flonum_negative_powers_of_ten[] = -{ +const FLONUM_TYPE flonum_negative_powers_of_ten[] = { {X zero, X zero, X zero, 0, '+'}, {X minus_1, X minus_1 + 19, X minus_1 + 19, -20, '+'}, {X minus_2, X minus_2 + 19, X minus_2 + 19, -20, '+'}, @@ -185,8 +203,7 @@ const FLONUM_TYPE flonum_negative_powers_of_ten[] = {X minus_13, X minus_13 + 29, X minus_13 + 29, -880, '+'}, }; -const FLONUM_TYPE flonum_positive_powers_of_ten[] = -{ +const FLONUM_TYPE flonum_positive_powers_of_ten[] = { {X zero, X zero, X zero, 0, '+'}, {X plus_1, X plus_1 + 0, X plus_1 + 0, 0, '+'}, {X plus_2, X plus_2 + 0, X plus_2 + 0, 0, '+'}, @@ -204,6 +221,8 @@ const FLONUM_TYPE flonum_positive_powers_of_ten[] = }; #ifdef VMS -void dummy1 () { } +void +dummy1 () +{ +} #endif -/* end of flonum_const.c */ diff --git a/contrib/binutils/gas/flonum-mult.c b/contrib/binutils/gas/flonum-mult.c index 434a73b..9733724 100644 --- a/contrib/binutils/gas/flonum-mult.c +++ b/contrib/binutils/gas/flonum-mult.c @@ -1,5 +1,6 @@ /* flonum_mult.c - multiply two flonums - Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1987, 1990, 1991, 1992, 2000 + Free Software Foundation, Inc. This file is part of Gas, the GNU Assembler. @@ -22,25 +23,22 @@ #include "flonum.h" /* plan for a . b => p(roduct) - - + +-------+-------+-/ /-+-------+-------+ | a | a | ... | a | a | | A | A-1 | | 1 | 0 | +-------+-------+-/ /-+-------+-------+ - - + +-------+-------+-/ /-+-------+-------+ | b | b | ... | b | b | | B | B-1 | | 1 | 0 | +-------+-------+-/ /-+-------+-------+ - - + +-------+-------+-/ /-+-------+-/ /-+-------+-------+ | p | p | ... | p | ... | p | p | | A+B+1| A+B | | N | | 1 | 0 | +-------+-------+-/ /-+-------+-/ /-+-------+-------+ - + /^\ (carry) a .b ... | ... a .b a .b A B | 0 1 0 0 @@ -56,49 +54,48 @@ | \ +----- P = > a .b N /__ i j - + N = 0 ... A+B - + for all i,j where i+j=N [i,j integers > 0] - + a[], b[], p[] may not intersect. Zero length factors signify 0 significant bits: treat as 0.0. 0.0 factors do the right thing. Zero length product OK. - + I chose the ForTran accent "foo[bar]" instead of the C accent "*garply" because I felt the ForTran way was more intuitive. The C way would probably yield better code on most C compilers. Dean Elsner. - (C style also gives deeper insight [to me] ... oh well ...) - */ + (C style also gives deeper insight [to me] ... oh well ...) */ -void +void flonum_multip (a, b, product) const FLONUM_TYPE *a; const FLONUM_TYPE *b; FLONUM_TYPE *product; { - int size_of_a; /* 0 origin */ - int size_of_b; /* 0 origin */ - int size_of_product; /* 0 origin */ - int size_of_sum; /* 0 origin */ - int extra_product_positions; /* 1 origin */ + int size_of_a; /* 0 origin */ + int size_of_b; /* 0 origin */ + int size_of_product; /* 0 origin */ + int size_of_sum; /* 0 origin */ + int extra_product_positions; /* 1 origin */ unsigned long work; unsigned long carry; long exponent; LITTLENUM_TYPE *q; long significant; /* TRUE when we emit a non-0 littlenum */ - /* ForTran accent follows. */ - int P; /* Scan product low-order -> high. */ + /* ForTran accent follows. */ + int P; /* Scan product low-order -> high. */ int N; /* As in sum above. */ - int A; /* Which [] of a? */ - int B; /* Which [] of b? */ + int A; /* Which [] of a? */ + int B; /* Which [] of b? */ - if ((a->sign != '-' && a->sign != '+') || (b->sign != '-' && b->sign != '+')) + if ((a->sign != '-' && a->sign != '+') + || (b->sign != '-' && b->sign != '+')) { - /* ... - Got to fail somehow. Any suggestions? */ + /* Got to fail somehow. Any suggestions? */ product->sign = 0; return; } @@ -111,8 +108,8 @@ flonum_multip (a, b, product) extra_product_positions = size_of_product - size_of_sum; if (extra_product_positions < 0) { - P = extra_product_positions; /* P < 0 */ - exponent -= extra_product_positions; /* Increases exponent. */ + P = extra_product_positions; /* P < 0 */ + exponent -= extra_product_positions; /* Increases exponent. */ } else { @@ -130,7 +127,8 @@ flonum_multip (a, b, product) if (A <= size_of_a && B <= size_of_b && B >= 0) { #ifdef TRACE - printf ("a:low[%d.]=%04x b:low[%d.]=%04x work_before=%08x\n", A, a->low[A], B, b->low[B], work); + printf ("a:low[%d.]=%04x b:low[%d.]=%04x work_before=%08x\n", + A, a->low[A], B, b->low[B], work); #endif /* Watch out for sign extension! Without the casts, on the DEC Alpha, the multiplication result is *signed* @@ -162,23 +160,19 @@ flonum_multip (a, b, product) exponent++; } } - /* - * [P]-> position # size_of_sum + 1. - * This is where 'carry' should go. - */ + /* [P]-> position # size_of_sum + 1. + This is where 'carry' should go. */ #ifdef TRACE printf ("final carry =%04x\n", carry); #endif if (carry) { if (extra_product_positions > 0) - { - product->low[P] = carry; - } + product->low[P] = carry; else { - /* No room at high order for carry littlenum. */ - /* Shift right 1 to make room for most significant littlenum. */ + /* No room at high order for carry littlenum. */ + /* Shift right 1 to make room for most significant littlenum. */ exponent++; P--; for (q = product->low + P; q >= product->low; q--) @@ -190,11 +184,7 @@ flonum_multip (a, b, product) } } else - { - P--; - } + P--; product->leader = product->low + P; product->exponent = exponent; } - -/* end of flonum_mult.c */ diff --git a/contrib/binutils/gas/flonum.h b/contrib/binutils/gas/flonum.h index 6684f49..d1a5042 100644 --- a/contrib/binutils/gas/flonum.h +++ b/contrib/binutils/gas/flonum.h @@ -1,6 +1,6 @@ /* flonum.h - Floating point package - - Copyright (C) 1987, 90, 91, 92, 94, 95, 1996 Free Software Foundation, Inc. + Copyright (C) 1987, 90, 91, 92, 94, 95, 96, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -49,8 +49,7 @@ A sign value of 'P' means we've been asked to assemble +Inf A sign value of 'N' means we've been asked to assemble -Inf */ -struct FLONUM_STRUCT -{ +struct FLONUM_STRUCT { LITTLENUM_TYPE *low; /* low order littlenum of a bignum */ LITTLENUM_TYPE *high; /* high order littlenum of a bignum */ LITTLENUM_TYPE *leader; /* -> 1st non-zero littlenum */ @@ -61,7 +60,6 @@ struct FLONUM_STRUCT typedef struct FLONUM_STRUCT FLONUM_TYPE; - /***********************************************************************\ * * * Since we can (& do) meet with exponents like 10^5000, it * @@ -74,15 +72,11 @@ typedef struct FLONUM_STRUCT FLONUM_TYPE; * * \***********************************************************************/ - extern const FLONUM_TYPE flonum_positive_powers_of_ten[]; extern const FLONUM_TYPE flonum_negative_powers_of_ten[]; extern const int table_size_of_flonum_powers_of_ten; -/* Flonum_XXX_powers_of_ten[] table has */ -/* legal indices from 0 to */ -/* + this number inclusive. */ - - +/* Flonum_XXX_powers_of_ten[] table has legal indices from 0 to + + this number inclusive. */ /***********************************************************************\ * * @@ -106,5 +100,3 @@ void flonum_multip PARAMS ((const FLONUM_TYPE * a, const FLONUM_TYPE * b, \***********************************************************************/ #define ERROR_EXPONENT_OVERFLOW (2) - -/* end of flonum.h */ diff --git a/contrib/binutils/gas/frags.c b/contrib/binutils/gas/frags.c index d184664..f2f8cfe 100644 --- a/contrib/binutils/gas/frags.c +++ b/contrib/binutils/gas/frags.c @@ -27,6 +27,7 @@ extern fragS zero_address_frag; extern fragS bss_address_frag; /* Initialization for frag routines. */ + void frag_init () { @@ -37,6 +38,7 @@ frag_init () /* Allocate a frag on the specified obstack. Call this routine from everywhere else, so that all the weird alignment hackery can be done in just one place. */ + fragS * frag_alloc (ob) struct obstack *ob; @@ -53,15 +55,12 @@ frag_alloc (ob) return ptr; } -/* - * frag_grow() - * - * Try to augment current frag by nchars chars. - * If there is no room, close of the current frag with a ".fill 0" - * and begin a new frag. Unless the new frag has nchars chars available - * do not return. Do not set up any fields of *now_frag. - */ -void +/* Try to augment current frag by nchars chars. + If there is no room, close of the current frag with a ".fill 0" + and begin a new frag. Unless the new frag has nchars chars available + do not return. Do not set up any fields of *now_frag. */ + +void frag_grow (nchars) unsigned int nchars; { @@ -74,41 +73,40 @@ frag_grow (nchars) frag_new (0); oldc = frchain_now->frch_obstack.chunk_size; frchain_now->frch_obstack.chunk_size = 2 * nchars + SIZEOF_STRUCT_FRAG; - while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars) - { - frag_wane (frag_now); - frag_new (0); - } + if (frchain_now->frch_obstack.chunk_size > 0) + while ((n = obstack_room (&frchain_now->frch_obstack)) < nchars + && (unsigned long) frchain_now->frch_obstack.chunk_size > nchars) + { + frag_wane (frag_now); + frag_new (0); + } frchain_now->frch_obstack.chunk_size = oldc; } if (obstack_room (&frchain_now->frch_obstack) < nchars) as_fatal (_("Can't extend frag %d. chars"), nchars); } -/* - * frag_new() - * - * Call this to close off a completed frag, and start up a new (empty) - * frag, in the same subsegment as the old frag. - * [frchain_now remains the same but frag_now is updated.] - * Because this calculates the correct value of fr_fix by - * looking at the obstack 'frags', it needs to know how many - * characters at the end of the old frag belong to the maximal - * variable part; The rest must belong to fr_fix. - * It doesn't actually set up the old frag's fr_var. You may have - * set fr_var == 1, but allocated 10 chars to the end of the frag; - * In this case you pass old_frags_var_max_size == 10. - * In fact, you may use fr_var for something totally unrelated to the - * size of the variable part of the frag; None of the generic frag - * handling code makes use of fr_var. - * - * Make a new frag, initialising some components. Link new frag at end - * of frchain_now. - */ -void +/* Call this to close off a completed frag, and start up a new (empty) + frag, in the same subsegment as the old frag. + [frchain_now remains the same but frag_now is updated.] + Because this calculates the correct value of fr_fix by + looking at the obstack 'frags', it needs to know how many + characters at the end of the old frag belong to the maximal + variable part; The rest must belong to fr_fix. + It doesn't actually set up the old frag's fr_var. You may have + set fr_var == 1, but allocated 10 chars to the end of the frag; + In this case you pass old_frags_var_max_size == 10. + In fact, you may use fr_var for something totally unrelated to the + size of the variable part of the frag; None of the generic frag + handling code makes use of fr_var. + + Make a new frag, initialising some components. Link new frag at end + of frchain_now. */ + +void frag_new (old_frags_var_max_size) /* Number of chars (already allocated on obstack frags) in - variable_length part of frag. */ + variable_length part of frag. */ int old_frags_var_max_size; { fragS *former_last_fragP; @@ -122,7 +120,7 @@ frag_new (old_frags_var_max_size) assert (frag_now->fr_type != 0); /* This will align the obstack so the next struct we allocate on it - will begin at a correct boundary. */ + will begin at a correct boundary. */ obstack_finish (&frchain_now->frch_obstack); frchP = frchain_now; know (frchP); @@ -136,7 +134,7 @@ frag_new (old_frags_var_max_size) /* Generally, frag_now->points to an address rounded up to next alignment. However, characters will add to obstack frags IMMEDIATELY after the struct frag, even if they are not starting - at an alignment address. */ + at an alignment address. */ former_last_fragP->fr_next = frag_now; frchP->frch_last = frag_now; @@ -150,17 +148,13 @@ frag_new (old_frags_var_max_size) assert (frchain_now->frch_last == frag_now); frag_now->fr_next = NULL; -} /* frag_new() */ +} -/* - * frag_more() - * - * Start a new frag unless we have n more chars of room in the current frag. - * Close off the old frag with a .fill 0. - * - * Return the address of the 1st char to write into. Advance - * frag_now_growth past the new chars. - */ +/* Start a new frag unless we have n more chars of room in the current frag. + Close off the old frag with a .fill 0. + + Return the address of the 1st char to write into. Advance + frag_now_growth past the new chars. */ char * frag_more (nchars) @@ -184,18 +178,14 @@ frag_more (nchars) retval = obstack_next_free (&frchain_now->frch_obstack); obstack_blank_fast (&frchain_now->frch_obstack, nchars); return (retval); -} /* frag_more() */ +} -/* - * frag_var() - * - * Start a new frag unless we have max_chars more chars of room in the current frag. - * Close off the old frag with a .fill 0. - * - * Set up a machine_dependent relaxable frag, then start a new frag. - * Return the address of the 1st char of the var part of the old frag - * to write into. - */ +/* Start a new frag unless we have max_chars more chars of room in the + current frag. Close off the old frag with a .fill 0. + + Set up a machine_dependent relaxable frag, then start a new frag. + Return the address of the 1st char of the var part of the old frag + to write into. */ char * frag_var (type, max_chars, var, subtype, symbol, offset, opcode) @@ -231,13 +221,9 @@ frag_var (type, max_chars, var, subtype, symbol, offset, opcode) return (retval); } -/* - * frag_variant() - * - * OVE: This variant of frag_var assumes that space for the tail has been - * allocated by caller. - * No call to frag_grow is done. - */ +/* OVE: This variant of frag_var assumes that space for the tail has been + allocated by caller. + No call to frag_grow is done. */ char * frag_variant (type, max_chars, var, subtype, symbol, offset, opcode) @@ -269,14 +255,11 @@ frag_variant (type, max_chars, var, subtype, symbol, offset, opcode) as_where (&frag_now->fr_file, &frag_now->fr_line); frag_new (max_chars); return (retval); -} /* frag_variant() */ +} -/* - * frag_wane() - * - * Reduce the variable end of a frag to a harmless state. - */ -void +/* Reduce the variable end of a frag to a harmless state. */ + +void frag_wane (fragP) register fragS *fragP; { @@ -292,7 +275,7 @@ frag_wane (fragP) the maximum number of characters to skip when doing the alignment, or 0 if there is no maximum. */ -void +void frag_align (alignment, fill_character, max) int alignment; int fill_character; @@ -301,9 +284,10 @@ frag_align (alignment, fill_character, max) if (now_seg == absolute_section) { addressT new_off; + addressT mask; - new_off = ((abs_section_offset + alignment - 1) - &~ ((1 << alignment) - 1)); + mask = (~(addressT) 0) << alignment; + new_off = (abs_section_offset + ~mask) & mask; if (max == 0 || new_off - abs_section_offset <= (addressT) max) abs_section_offset = new_off; } @@ -324,7 +308,7 @@ frag_align (alignment, fill_character, max) FILL_PATTERN. MAX is the maximum number of characters to skip when doing the alignment, or 0 if there is no maximum. */ -void +void frag_align_pattern (alignment, fill_pattern, n_fill, max) int alignment; const char *fill_pattern; @@ -338,20 +322,53 @@ frag_align_pattern (alignment, fill_pattern, n_fill, max) memcpy (p, fill_pattern, n_fill); } +/* The NOP_OPCODE is for the alignment fill value. Fill it with a nop + instruction so that the disassembler does not choke on it. */ +#ifndef NOP_OPCODE +#define NOP_OPCODE 0x00 +#endif + +/* Use this to restrict the amount of memory allocated for representing + the alignment code. Needs to be large enough to hold any fixed sized + prologue plus the replicating portion. */ +#ifndef MAX_MEM_FOR_RS_ALIGN_CODE + /* Assume that if HANDLE_ALIGN is not defined then no special action + is required to code fill, which means that we get just repeat the + one NOP_OPCODE byte. */ +# ifndef HANDLE_ALIGN +# define MAX_MEM_FOR_RS_ALIGN_CODE 1 +# else +# define MAX_MEM_FOR_RS_ALIGN_CODE ((1 << alignment) - 1) +# endif +#endif + +void +frag_align_code (alignment, max) + int alignment; + int max; +{ + char *p; + + p = frag_var (rs_align_code, MAX_MEM_FOR_RS_ALIGN_CODE, 1, + (relax_substateT) max, (symbolS *) 0, + (offsetT) alignment, (char *) 0); + *p = NOP_OPCODE; +} + addressT frag_now_fix_octets () { if (now_seg == absolute_section) return abs_section_offset; - return ((char*) obstack_next_free (&frchain_now->frch_obstack) - - frag_now->fr_literal); + return ((char *) obstack_next_free (&frchain_now->frch_obstack) + - frag_now->fr_literal); } addressT frag_now_fix () { - return frag_now_fix_octets() / OCTETS_PER_BYTE; + return frag_now_fix_octets () / OCTETS_PER_BYTE; } void @@ -365,5 +382,3 @@ frag_append_1_char (datum) } obstack_1grow (&frchain_now->frch_obstack, datum); } - -/* end of frags.c */ diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h index dcd9a2f..c1c652b 100644 --- a/contrib/binutils/gas/frags.h +++ b/contrib/binutils/gas/frags.h @@ -26,37 +26,34 @@ struct obstack; #endif -/* - * A code fragment (frag) is some known number of chars, followed by some - * unknown number of chars. Typically the unknown number of chars is an - * instruction address whose size is yet unknown. We always know the greatest - * possible size the unknown number of chars may become, and reserve that - * much room at the end of the frag. - * Once created, frags do not change address during assembly. - * We chain the frags in (a) forward-linked list(s). The object-file address - * of the 1st char of a frag is generally not known until after relax(). - * Many things at assembly time describe an address by {object-file-address - * of a particular frag}+offset. - - BUG: it may be smarter to have a single pointer off to various different - notes for different frag kinds. See how code pans - */ - -struct frag -{ - /* Object file address (as an octet offset). */ +/* A code fragment (frag) is some known number of chars, followed by some + unknown number of chars. Typically the unknown number of chars is an + instruction address whose size is yet unknown. We always know the greatest + possible size the unknown number of chars may become, and reserve that + much room at the end of the frag. + Once created, frags do not change address during assembly. + We chain the frags in (a) forward-linked list(s). The object-file address + of the 1st char of a frag is generally not known until after relax(). + Many things at assembly time describe an address by {object-file-address + of a particular frag}+offset. + + BUG: it may be smarter to have a single pointer off to various different + notes for different frag kinds. See how code pans. */ + +struct frag { + /* Object file address (as an octet offset). */ addressT fr_address; - /* Chain forward; ascending address order. Rooted in frch_root. */ + /* Chain forward; ascending address order. Rooted in frch_root. */ struct frag *fr_next; - /* (Fixed) number of octets we know we have. May be 0. */ + /* (Fixed) number of octets we know we have. May be 0. */ offsetT fr_fix; /* May be used for (Variable) number of octets after above. The generic frag handling code no longer makes any use of fr_var. */ offsetT fr_var; - /* For variable-length tail. */ + /* For variable-length tail. */ symbolS *fr_symbol; - /* For variable-length tail. */ + /* For variable-length tail. */ offsetT fr_offset; /* Points to opcode low addr byte, for relaxation. */ char *fr_opcode; @@ -94,8 +91,8 @@ struct frag }; #define SIZEOF_STRUCT_FRAG \ -((char *)zero_address_frag.fr_literal-(char *)&zero_address_frag) -/* We want to say fr_literal[0] above. */ +((char *) zero_address_frag.fr_literal - (char *) &zero_address_frag) +/* We want to say fr_literal[0] above. */ /* Current frag we are building. This frag is incomplete. It is, however, included in frchain_now. The fr_fix field is bogus; @@ -104,31 +101,28 @@ COMMON fragS *frag_now; extern addressT frag_now_fix PARAMS ((void)); extern addressT frag_now_fix_octets PARAMS ((void)); -/* For foreign-segment symbol fixups. */ +/* For foreign-segment symbol fixups. */ COMMON fragS zero_address_frag; -/* For local common (N_BSS segment) fixups. */ +/* For local common (N_BSS segment) fixups. */ COMMON fragS bss_address_frag; #if 0 -/* - * A macro to speed up appending exactly 1 char - * to current frag. - */ -/* JF changed < 1 to <= 1 to avoid a race conditon */ -#define FRAG_APPEND_1_CHAR(datum) \ -{ \ - if (obstack_room( &frags ) <= 1) {\ - frag_wane (frag_now); \ - frag_new (0); \ - } \ - obstack_1grow( &frags, datum ); \ +/* A macro to speed up appending exactly 1 char to current frag. */ +/* JF changed < 1 to <= 1 to avoid a race conditon. */ +#define FRAG_APPEND_1_CHAR(datum) \ +{ \ + if (obstack_room (&frags) <= 1) \ + { \ + frag_wane (frag_now); \ + frag_new (0); \ + } \ + obstack_1grow (&frags, datum); \ } #else extern void frag_append_1_char PARAMS ((int)); #define FRAG_APPEND_1_CHAR(X) frag_append_1_char (X) #endif - void frag_init PARAMS ((void)); fragS *frag_alloc PARAMS ((struct obstack *)); void frag_grow PARAMS ((unsigned int nchars)); @@ -138,6 +132,7 @@ void frag_align_pattern PARAMS ((int alignment, const char *fill_pattern, int n_fill, int max)); +void frag_align_code PARAMS ((int alignment, int max)); void frag_new PARAMS ((int old_frags_var_max_size)); void frag_wane PARAMS ((fragS * fragP)); diff --git a/contrib/binutils/gas/gasp.c b/contrib/binutils/gas/gasp.c index a8f5619..b38bbf8 100644 --- a/contrib/binutils/gas/gasp.c +++ b/contrib/binutils/gas/gasp.c @@ -20,14 +20,12 @@ You should have received a copy of the GNU General Public License along with GASP; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + 02111-1307, USA. */ /* - This program translates the input macros and stuff into a form suitable for gas to consume. - gasp [-sdhau] [-c char] [-o ] * -s copy source to output @@ -43,10 +41,8 @@ suitable for gas to consume. Macro arg parameters subsituted by name, don't need the &. String can start with ' too. Strings can be surrounded by <..> - A % in a string evaluates the expression + A % in a string evaluates the expression Literal char in a string with ! - - */ #include "config.h" @@ -83,29 +79,28 @@ extern void as_abort PARAMS ((const char *, int, const char *)); is used by the hash table code used by macro.c. */ int chunksize = 0; -#define MAX_INCLUDES 30 /* Maximum include depth */ -#define MAX_REASONABLE 1000 /* Maximum number of expansions */ - -int unreasonable; /* -u on command line */ -int stats; /* -d on command line */ -int print_line_number; /* -p flag on command line */ -int copysource; /* -c flag on command line */ -int warnings; /* Number of WARNINGs generated so far. */ -int errors; /* Number of ERRORs generated so far. */ -int fatals; /* Number of fatal ERRORs generated so far (either 0 or 1). */ -int alternate = 0; /* -a on command line */ -int mri = 0; /* -M on command line */ +#define MAX_INCLUDES 30 /* Maximum include depth. */ +#define MAX_REASONABLE 1000 /* Maximum number of expansions. */ + +int unreasonable; /* -u on command line. */ +int stats; /* -d on command line. */ +int print_line_number; /* -p flag on command line. */ +int copysource; /* -c flag on command line. */ +int warnings; /* Number of WARNINGs generated so far. */ +int errors; /* Number of ERRORs generated so far. */ +int fatals; /* Number of fatal ERRORs generated so far (either 0 or 1). */ +int alternate = 0; /* -a on command line. */ +int mri = 0; /* -M on command line. */ char comment_char = '!'; -int radix = 10; /* Default radix */ +int radix = 10; /* Default radix. */ -int had_end; /* Seen .END */ +int had_end; /* Seen .END. */ -/* The output stream */ +/* The output stream. */ FILE *outfile; -/* the attributes of each character are stored as a bit pattern - chartype, which gives us quick tests. */ - +/* The attributes of each character are stored as a bit pattern + chartype, which gives us quick tests. */ #define FIRSTBIT 1 #define NEXTBIT 2 @@ -121,7 +116,6 @@ FILE *outfile; #define ISBASE(x) (chartype[(unsigned char)(x)] & BASEBIT) static char chartype[256]; - /* Conditional assembly uses the `ifstack'. Each aif pushes another entry onto the stack, and sets the on flag if it should. The aelse sets hadelse, and toggles on. An aend pops a level. We limit to @@ -130,118 +124,101 @@ static char chartype[256]; a bug in the user's macro structure. */ #define IFNESTING 100 -struct - { - int on; /* is the level being output */ - int hadelse; /* has an aelse been seen */ - } -ifstack[IFNESTING]; +struct { + int on; /* Is the level being output. */ + int hadelse; /* Has an aelse been seen. */ +} ifstack[IFNESTING]; + int ifi; /* The final and intermediate results of expression evaluation are kept in exp_t's. Note that a symbol is not an sb, but a pointer into the input - line. It must be coped somewhere safe before the next line is read in. */ - -typedef struct - { - char *name; - int len; - } -symbol; + line. It must be coped somewhere safe before the next line is read in. */ -typedef struct - { - int value; /* constant part */ - symbol add_symbol; /* name part */ - symbol sub_symbol; /* name part */ - } -exp_t; +typedef struct { + char *name; + int len; +} symbol; +typedef struct { + int value; /* Constant part. */ + symbol add_symbol; /* Name part. */ + symbol sub_symbol; /* Name part. */ +} exp_t; /* Hashing is done in a pretty standard way. A hash_table has a pointer to a vector of pointers to hash_entrys, and the size of the vector. A hash_entry contains a union of all the info we like to store in hash table. If there is a hash collision, hash_entries - with the same hash are kept in a chain. */ - -/* What the data in a hash_entry means */ -typedef enum - { - hash_integer, /* name->integer mapping */ - hash_string, /* name->string mapping */ - hash_macro, /* name is a macro */ - hash_formal /* name is a formal argument */ - } hash_type; - -typedef struct hs - { - sb key; /* symbol name */ - hash_type type; /* symbol meaning */ - union - { - sb s; - int i; - struct macro_struct *m; - struct formal_struct *f; - } value; - struct hs *next; /* next hash_entry with same hash key */ - } hash_entry; - -typedef struct - { - hash_entry **table; - int size; - } hash_table; - - -/* how we nest files and expand macros etc. - - we keep a stack of of include_stack structs. each include file - pushes a new level onto the stack. we keep an sb with a pushback + with the same hash are kept in a chain. */ + +/* What the data in a hash_entry means. */ +typedef enum { + hash_integer, /* Name->integer mapping. */ + hash_string, /* Name->string mapping. */ + hash_macro, /* Name is a macro. */ + hash_formal /* Name is a formal argument. */ +} hash_type; + +typedef struct hs { + sb key; /* Symbol name. */ + hash_type type; /* Symbol meaning. */ + union { + sb s; + int i; + struct macro_struct *m; + struct formal_struct *f; + } value; + struct hs *next; /* Next hash_entry with same hash key. */ +} hash_entry; + +typedef struct { + hash_entry **table; + int size; +} hash_table; + +/* How we nest files and expand macros etc. + + We keep a stack of of include_stack structs. Each include file + pushes a new level onto the stack. We keep an sb with a pushback too. unget chars are pushed onto the pushback sb, getchars first checks the pushback sb before reading from the input stream. - small things are expanded by adding the text of the item onto the - pushback sb. larger items are grown by pushing a new level and - allocating the entire pushback buf for the item. each time - something like a macro is expanded, the stack index is changed. we + Small things are expanded by adding the text of the item onto the + pushback sb. Larger items are grown by pushing a new level and + allocating the entire pushback buf for the item. Each time + something like a macro is expanded, the stack index is changed. We can then perform an exitm by popping all entries off the stack with - the same stack index. if we're being reasonable, we can detect - recusive expansion by checking the index is reasonably small. - */ - -typedef enum - { - include_file, include_repeat, include_while, include_macro - } include_type; - -struct include_stack - { - sb pushback; /* current pushback stream */ - int pushback_index; /* next char to read from stream */ - FILE *handle; /* open file */ - sb name; /* name of file */ - int linecount; /* number of lines read so far */ - include_type type; - int index; /* index of this layer */ - } -include_stack[MAX_INCLUDES]; + the same stack index. If we're being reasonable, we can detect + recusive expansion by checking the index is reasonably small. */ + +typedef enum { + include_file, include_repeat, include_while, include_macro +} include_type; + +struct include_stack { + sb pushback; /* Current pushback stream. */ + int pushback_index; /* Next char to read from stream. */ + FILE *handle; /* Open file. */ + sb name; /* Name of file. */ + int linecount; /* Number of lines read so far. */ + include_type type; + int index; /* Index of this layer. */ +} include_stack[MAX_INCLUDES]; struct include_stack *sp; #define isp (sp - include_stack) -/* Include file list */ +/* Include file list. */ -typedef struct include_path -{ +typedef struct include_path { struct include_path *next; sb path; -} include_path; +} include_path; include_path *paths_head; include_path *paths_tail; - static void quit PARAMS ((void)); static void hash_new_table PARAMS ((int, hash_table *)); static int hash PARAMS ((sb *)); @@ -334,16 +311,36 @@ static void do_define PARAMS ((const char *)); static void show_usage PARAMS ((FILE *, int)); static void show_help PARAMS ((void)); -#define FATAL(x) \ - do { include_print_where_line (stderr); fprintf x ; fatals++; quit(); } while(0) -#define ERROR(x) \ - do { include_print_where_line (stderr); fprintf x; errors++; } while(0) -#define WARNING(x) \ - do { include_print_where_line (stderr); fprintf x; warnings++;} while(0) - +#define FATAL(x) \ + do \ + { \ + include_print_where_line (stderr); \ + fprintf x; \ + fatals++; \ + quit (); \ + } \ + while (0) + +#define ERROR(x) \ + do \ + { \ + include_print_where_line (stderr); \ + fprintf x; \ + errors++; \ + } \ + while (0) + +#define WARNING(x) \ + do \ + { \ + include_print_where_line (stderr); \ + fprintf x; \ + warnings++; \ + } \ + while (0) + +/* Exit the program and return the right ERROR code. */ - -/* exit the program and return the right ERROR code. */ static void quit () { @@ -353,20 +350,22 @@ quit () else exitcode = 0; - if (stats) + if (stats) { int i; - for (i = 0; i < sb_max_power_two; i++) + for (i = 0; i < sb_max_power_two; i++) { - fprintf (stderr, "strings size %8d : %d\n", 1<table[i] = 0; } -/* calculate and return the hash value of the sb at key. */ +/* Calculate and return the hash value of the sb at key. */ static int hash (key) @@ -398,11 +397,10 @@ hash (key) return k & 0xf0fff; } -/* lookup key in hash_table tab, if present, then return it, otherwise - build a new one and fill it with hash_integer. */ +/* Look up key in hash_table tab. If present, then return it, + otherwise build a new one and fill it with hash_integer. */ -static -hash_entry * +static hash_entry * hash_create (tab, key) hash_table *tab; sb *key; @@ -433,11 +431,10 @@ hash_create (tab, key) } } -/* add sb name with key into hash_table tab. if replacing old value - and again, then ERROR. */ +/* Add sb name with key into hash_table tab. + If replacing old value and again, then ERROR. */ -static -void +static void hash_add_to_string_table (tab, key, name, again) hash_table *tab; sb *key; @@ -457,14 +454,13 @@ hash_add_to_string_table (tab, key, name, again) ptr->type = hash_string; sb_reset (&ptr->value.s); - + sb_add_sb (&ptr->value.s, name); } -/* add integer name to hash_table tab with sb key. */ +/* Add integer name to hash_table tab with sb key. */ -static -void +static void hash_add_to_int_table (tab, key, name) hash_table *tab; sb *key; @@ -474,11 +470,10 @@ hash_add_to_int_table (tab, key, name) ptr->value.i = name; } -/* lookup sb key in hash_table tab. if found return hash_entry result, - else 0. */ - -static -hash_entry * +/* Look up sb key in hash_table tab. + If found, return hash_entry result, else 0. */ + +static hash_entry * hash_lookup (tab, key) hash_table *tab; sb *key; @@ -496,7 +491,6 @@ hash_lookup (tab, key) return 0; } - /* expressions are handled in a really simple recursive decent way. each bit of @@ -511,14 +505,12 @@ hash_lookup (tab, key) + - & | ~ - */ +/* Make sure that the exp_t at term is constant. + If not the give the op ERROR. */ -/* make sure that the exp_t at term is constant, if not the give the op ERROR. */ - -static -void +static void checkconst (op, term) int op; exp_t *term; @@ -530,12 +522,10 @@ checkconst (op, term) } } -/* turn the number in string at idx into a number of base, - fill in ptr and return the index of the first character not in the - number. */ +/* Turn the number in string at idx into a number of base, fill in + ptr, and return the index of the first character not in the number. */ -static -int +static int sb_strtol (idx, string, base, ptr) int idx; sb *string; @@ -615,8 +605,6 @@ level_0 (idx, string, lhs) return sb_skip_white (idx, string); } - - static int level_1 (idx, string, lhs) int idx; @@ -695,7 +683,6 @@ level_2 (idx, string, lhs) return sb_skip_white (idx, string); } - static int level_3 (idx, string, lhs) int idx; @@ -720,7 +707,7 @@ level_3 (idx, string, lhs) { ERROR ((stderr, _("can't add two relocatable expressions\n"))); } - /* change nn+symbol to symbol + nn */ + /* Change nn+symbol to symbol + nn. */ if (rhs.add_symbol.name) { lhs->add_symbol = rhs.add_symbol; @@ -794,10 +781,9 @@ level_5 (idx, string, lhs) return sb_skip_white (idx, string); } - -/* parse the expression at offset idx into string, fill up res with - the result. return the index of the first char past the expression. - */ +/* Parse the expression at offset idx into string, fill up res with + the result. Return the index of the first char past the + expression. */ static int exp_parse (idx, string, res) @@ -808,9 +794,8 @@ exp_parse (idx, string, res) return level_5 (sb_skip_white (idx, string), string, res); } - -/* turn the expression at exp into text and glue it onto the end of - string. */ +/* Turn the expression at exp into text and glue it onto the end of + string. */ static void exp_string (exp, string) @@ -849,10 +834,9 @@ exp_string (exp, string) sb_add_char (string, '0'); } - -/* parse the expression at offset idx into sb in, return the value in val. - if the expression is not constant, give ERROR emsg. returns the index - of the first character past the end of the expression. */ +/* Parse the expression at offset idx into sb in. Return the value in + val. If the expression is not constant, give ERROR emsg. Return + the index of the first character past the end of the expression. */ static int exp_get_abs (emsg, idx, in, val) @@ -869,11 +853,17 @@ exp_get_abs (emsg, idx, in, val) return idx; } +/* Current label parsed from line. */ +sb label; + +/* Hash table for all assigned variables. */ +hash_table assign_hash_table; -sb label; /* current label parsed from line */ -hash_table assign_hash_table; /* hash table for all assigned variables */ -hash_table keyword_hash_table; /* hash table for keyword */ -hash_table vars; /* hash table for eq variables */ +/* Hash table for keyword. */ +hash_table keyword_hash_table; + +/* Hash table for eq variables. */ +hash_table vars; #define in_comment ';' @@ -886,7 +876,7 @@ strip_comments (out) int i = 0; for (i = 0; i < out->len; i++) { - if (ISCOMMENTCHAR(s[i])) + if (ISCOMMENTCHAR (s[i])) { out->len = i; return; @@ -895,7 +885,7 @@ strip_comments (out) } #endif -/* push back character ch so that it can be read again. */ +/* Push back character ch so that it can be read again. */ static void unget (ch) @@ -911,10 +901,10 @@ unget (ch) sb_add_char (&sp->pushback, ch); } -/* push the sb ptr onto the include stack, with the given name, type and index. */ +/* Push the sb ptr onto the include stack, with the given name, type + and index. */ -static -void +static void include_buf (name, ptr, type, index) sb *name; sb *ptr; @@ -935,10 +925,10 @@ include_buf (name, ptr, type, index) sb_add_sb (&sp->pushback, ptr); } +/* Used in ERROR messages, print info on where the include stack is + onto file. */ -/* used in ERROR messages, print info on where the include stack is onto file. */ -static -void +static void include_print_where_line (file) FILE *file; { @@ -951,7 +941,8 @@ include_print_where_line (file) } } -/* used in listings, print the line number onto file. */ +/* Used in listings, print the line number onto file. */ + static void include_print_line (file) FILE *file; @@ -973,8 +964,7 @@ include_print_line (file) } } - -/* read a line from the top of the include stack into sb in. */ +/* Read a line from the top of the include stack into sb in. */ static int get_line (in) @@ -1022,7 +1012,7 @@ get_line (in) online = 0; if (ch == '+') { - /* continued line */ + /* Continued line. */ if (copysource) { putc (comment_char, outfile); @@ -1047,7 +1037,7 @@ get_line (in) return more; } -/* find a label from sb in and put it in out. */ +/* Find a label from sb in and put it in out. */ static int grab_label (in, out) @@ -1060,9 +1050,9 @@ grab_label (in, out) { sb_add_char (out, in->ptr[i]); i++; - while ((ISNEXTCHAR (in->ptr[i]) + while ((ISNEXTCHAR (in->ptr[i]) || in->ptr[i] == '\\' - || in->ptr[i] == '&') + || in->ptr[i] == '&') && i < in->len) { sb_add_char (out, in->ptr[i]); @@ -1072,8 +1062,8 @@ grab_label (in, out) return i; } -/* find all strange base stuff and turn into decimal. also - find all the other numbers and convert them from the default radix */ +/* Find all strange base stuff and turn into decimal. Also + find all the other numbers and convert them from the default radix. */ static void change_base (idx, in, out) @@ -1133,7 +1123,7 @@ change_base (idx, in, out) } else if (ISFIRSTCHAR (in->ptr[idx])) { - /* copy entire names through quickly */ + /* Copy entire names through quickly. */ sb_add_char (out, in->ptr[idx]); idx++; while (idx < in->len && ISNEXTCHAR (in->ptr[idx])) @@ -1145,13 +1135,13 @@ change_base (idx, in, out) else if (isdigit ((unsigned char) in->ptr[idx])) { int value; - /* all numbers must start with a digit, let's chew it and - spit out decimal */ + /* All numbers must start with a digit, let's chew it and + spit out decimal. */ idx = sb_strtol (idx, in, radix, &value); sprintf (buffer, "%d", value); sb_add_string (out, buffer); - /* skip all undigsested letters */ + /* Skip all undigsested letters. */ while (idx < in->len && ISNEXTCHAR (in->ptr[idx])) { sb_add_char (out, in->ptr[idx]); @@ -1161,7 +1151,7 @@ change_base (idx, in, out) else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { char tchar = in->ptr[idx]; - /* copy entire names through quickly */ + /* Copy entire names through quickly. */ sb_add_char (out, in->ptr[idx]); idx++; while (idx < in->len && in->ptr[idx] != tchar) @@ -1172,7 +1162,7 @@ change_base (idx, in, out) } else { - /* nothing special, just pass it through */ + /* Nothing special, just pass it through. */ sb_add_char (out, in->ptr[idx]); idx++; } @@ -1180,7 +1170,8 @@ change_base (idx, in, out) } -/* .end */ +/* .end */ + static void do_end (in) sb *in; @@ -1190,7 +1181,7 @@ do_end (in) fprintf (outfile, "%s\n", sb_name (in)); } -/* .assign */ +/* .assign */ static void do_assign (again, idx, in) @@ -1198,7 +1189,7 @@ do_assign (again, idx, in) int idx; sb *in; { - /* stick label in symbol table with following value */ + /* Stick label in symbol table with following value. */ exp_t e; sb acc; @@ -1209,11 +1200,9 @@ do_assign (again, idx, in) sb_kill (&acc); } +/* .radix [b|q|d|h] */ -/* .radix [b|q|d|h] */ - -static -void +static void do_radix (ptr) sb *ptr; { @@ -1241,8 +1230,7 @@ do_radix (ptr) } } - -/* Parse off a .b, .w or .l */ +/* Parse off a .b, .w or .l. */ static int get_opsize (idx, in, size) @@ -1281,13 +1269,13 @@ get_opsize (idx, in, size) return idx; } -static -int eol(idx, line) +static int +eol (idx, line) int idx; sb *line; { idx = sb_skip_white (idx, line); - if (idx < line->len + if (idx < line->len && ISCOMMENTCHAR(line->ptr[idx])) return 1; if (idx >= line->len) @@ -1295,8 +1283,8 @@ int eol(idx, line) return 0; } -/* .data [.b|.w|.l] * - or d[bwl] * */ +/* .data [.b|.w|.l] * + or d[bwl] * */ static void do_data (idx, in, size) @@ -1309,13 +1297,14 @@ do_data (idx, in, size) sb acc; sb_new (&acc); - if (!size) + if (!size) { idx = get_opsize (idx, in, &opsize); } - else { - opsize = size; - } + else + { + opsize = size; + } switch (opsize) { case 4: @@ -1329,13 +1318,12 @@ do_data (idx, in, size) break; } - fprintf (outfile, "%s\t", opname); - idx = sb_skip_white (idx, in); + idx = sb_skip_white (idx, in); - if (alternate - && idx < in->len + if (alternate + && idx < in->len && in->ptr[idx] == '"') { int i; @@ -1343,11 +1331,11 @@ do_data (idx, in, size) for (i = 0; i < acc.len; i++) { if (i) - fprintf(outfile,","); + fprintf (outfile, ","); fprintf (outfile, "%d", acc.ptr[i]); } } - else + else { while (!eol (idx, in)) { @@ -1368,7 +1356,7 @@ do_data (idx, in, size) fprintf (outfile, "\n"); } -/* .datab [.b|.w|.l] , */ +/* .datab [.b|.w|.l] , */ static void do_datab (idx, in) @@ -1388,7 +1376,7 @@ do_datab (idx, in) fprintf (outfile, ".fill\t%d,%d,%d\n", repeat, opsize, fill); } -/* .align */ +/* .align */ static void do_align (idx, in) @@ -1415,7 +1403,7 @@ do_align (idx, in) fprintf (outfile, "\n"); } -/* .res[.b|.w|.l] */ +/* .res[.b|.w|.l] */ static void do_res (idx, in, type) @@ -1427,7 +1415,7 @@ do_res (idx, in, type) int count = 0; idx = get_opsize (idx, in, &size); - while (!eol(idx, in)) + while (!eol (idx, in)) { idx = sb_skip_white (idx, in); if (in->ptr[idx] == ',') @@ -1441,8 +1429,7 @@ do_res (idx, in, type) } } - -/* .export */ +/* .export */ static void do_export (in) @@ -1451,7 +1438,7 @@ do_export (in) fprintf (outfile, ".global %s\n", sb_name (in)); } -/* .print [list] [nolist] */ +/* .print [list] [nolist] */ static void do_print (idx, in) @@ -1475,7 +1462,8 @@ do_print (idx, in) } } -/* .head */ +/* .head */ + static void do_heading (idx, in) int idx; @@ -1488,7 +1476,7 @@ do_heading (idx, in) sb_kill (&head); } -/* .page */ +/* .page */ static void do_page () @@ -1496,7 +1484,8 @@ do_page () fprintf (outfile, ".eject\n"); } -/* .form [lin=] [col=] */ +/* .form [lin=] [col=] */ + static void do_form (idx, in) int idx; @@ -1527,7 +1516,6 @@ do_form (idx, in) } - /* Fetch string from the input stream, rules: 'Bxyx -> return 'Bxyza @@ -1535,6 +1523,7 @@ do_form (idx, in) "" -> return string xyx -> return xyz */ + static int get_any_string (idx, in, out, expand, pretend_quoted) int idx; @@ -1548,7 +1537,7 @@ get_any_string (idx, in, out, expand, pretend_quoted) if (idx < in->len) { - if (in->len > 2 && in->ptr[idx+1] == '\'' && ISBASE (in->ptr[idx])) + if (in->len > 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx])) { while (!ISSEP (in->ptr[idx])) sb_add_char (out, in->ptr[idx++]); @@ -1559,12 +1548,12 @@ get_any_string (idx, in, out, expand, pretend_quoted) { int val; char buf[20]; - /* Turns the next expression into a string */ + /* Turns the next expression into a string. */ idx = exp_get_abs (_("% operator needs absolute expression"), idx + 1, in, &val); - sprintf(buf, "%d", val); + sprintf (buf, "%d", val); sb_add_string (out, buf); } else if (in->ptr[idx] == '"' @@ -1573,35 +1562,36 @@ get_any_string (idx, in, out, expand, pretend_quoted) { if (alternate && expand) { - /* Keep the quotes */ - sb_add_char (out, '\"'); - - idx = getstring (idx, in, out); - sb_add_char (out, '\"'); + /* Keep the quotes. */ + sb_add_char (out, '\"'); + + idx = getstring (idx, in, out); + sb_add_char (out, '\"'); } - else { - idx = getstring (idx, in, out); - } + else + { + idx = getstring (idx, in, out); + } } - else + else { - while (idx < in->len + while (idx < in->len && (in->ptr[idx] == '"' || in->ptr[idx] == '\'' - || pretend_quoted + || pretend_quoted || !ISSEP (in->ptr[idx]))) { - if (in->ptr[idx] == '"' + if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { char tchar = in->ptr[idx]; sb_add_char (out, in->ptr[idx++]); while (idx < in->len && in->ptr[idx] != tchar) - sb_add_char (out, in->ptr[idx++]); + sb_add_char (out, in->ptr[idx++]); if (idx == in->len) - return idx; + return idx; } sb_add_char (out, in->ptr[idx++]); } @@ -1611,9 +1601,8 @@ get_any_string (idx, in, out, expand, pretend_quoted) return idx; } - -/* skip along sb in starting at idx, suck off whitespace a ( and more - whitespace. return the idx of the next char */ +/* Skip along sb in starting at idx, suck off whitespace a ( and more + whitespace. Return the idx of the next char. */ static int skip_openp (idx, in) @@ -1627,8 +1616,8 @@ skip_openp (idx, in) return idx; } -/* skip along sb in starting at idx, suck off whitespace a ) and more - whitespace. return the idx of the next char */ +/* Skip along sb in starting at idx, suck off whitespace a ) and more + whitespace. Return the idx of the next char. */ static int skip_closep (idx, in) @@ -1642,7 +1631,7 @@ skip_closep (idx, in) return idx; } -/* .len */ +/* .len */ static int dolen (idx, in, out) @@ -1665,11 +1654,9 @@ dolen (idx, in, out) return idx; } +/* .instr */ -/* .instr */ - -static -int +static int doinstr (idx, in, out) int idx; sb *in; @@ -1714,7 +1701,6 @@ doinstr (idx, in, out) return idx; } - static int dosubstr (idx, in, out) int idx; @@ -1734,14 +1720,13 @@ dosubstr (idx, in, out) idx = exp_get_abs (_("need absolute length.\n"), idx, in, &len); idx = skip_closep (idx, in); - if (len < 0 || pos < 0 || pos > string.len || pos + len > string.len) { sb_add_string (out, " "); } - else + else { sb_add_char (out, '"'); while (len > 0) @@ -1751,11 +1736,12 @@ dosubstr (idx, in, out) } sb_add_char (out, '"'); } - sb_kill(&string); + sb_kill (&string); return idx; } -/* scan line, change tokens in the hash table to their replacements */ +/* Scan line, change tokens in the hash table to their replacements. */ + static void process_assigns (idx, in, buf) int idx; @@ -1813,7 +1799,7 @@ process_assigns (idx, in, buf) idx = dosubstr (idx + 7, in, buf); else if (ISFIRSTCHAR (in->ptr[idx])) { - /* may be a simple name subsitution, see if we have a word */ + /* May be a simple name subsitution, see if we have a word. */ sb acc; int cur = idx + 1; while (cur < in->len @@ -1825,12 +1811,12 @@ process_assigns (idx, in, buf) ptr = hash_lookup (&assign_hash_table, &acc); if (ptr) { - /* Found a definition for it */ + /* Found a definition for it. */ sb_add_sb (buf, &ptr->value.s); } else { - /* No definition, just copy the word */ + /* No definition, just copy the word. */ sb_add_sb (buf, &acc); } sb_kill (&acc); @@ -1857,8 +1843,7 @@ get_and_process (idx, in, out) return idx; } -static -void +static void process_file () { sb line; @@ -1870,13 +1855,13 @@ process_file () sb_new (&line); sb_new (&t1); sb_new (&t2); - sb_new(&acc); + sb_new (&acc); sb_new (&label_in); sb_reset (&line); more = get_line (&line); while (more) { - /* Find any label and pseudo op that we're intested in */ + /* Find any label and pseudo op that we're intested in. */ int l; if (line.len == 0) { @@ -1893,7 +1878,7 @@ process_file () else { l = grab_label (&line, &label_in); - sb_reset (&label); + sb_reset (&label); if (line.ptr[l] == ':') l++; @@ -1936,15 +1921,12 @@ process_file () if (process_pseudo_op (l, &line, &acc)) { - - } else if (condass_on ()) { if (macro_op (l, &line)) { - } else { @@ -1955,7 +1937,7 @@ process_file () } else fprintf (outfile, "\t"); - sb_reset(&t1); + sb_reset (&t1); process_assigns (l, &line, &t1); sb_reset (&t2); change_base (0, &t1, &t2); @@ -1964,13 +1946,14 @@ process_file () } } } - else { - /* Only a label on this line */ - if (label.len && condass_on()) - { - fprintf (outfile, "%s:\n", sb_name (&label)); - } - } + else + { + /* Only a label on this line. */ + if (label.len && condass_on ()) + { + fprintf (outfile, "%s:\n", sb_name (&label)); + } + } } if (had_end) @@ -1983,10 +1966,6 @@ process_file () WARNING ((stderr, _("END missing from end of file.\n"))); } - - - - static void free_old_entry (ptr) hash_entry *ptr; @@ -1994,11 +1973,11 @@ free_old_entry (ptr) if (ptr) { if (ptr->type == hash_string) - sb_kill(&ptr->value.s); + sb_kill (&ptr->value.s); } } -/* name: .ASSIGNA */ +/* name: .ASSIGNA */ static void do_assigna (idx, in) @@ -2026,7 +2005,7 @@ do_assigna (idx, in) sb_kill (&tmp); } -/* name: .ASSIGNC */ +/* name: .ASSIGNC */ static void do_assignc (idx, in) @@ -2052,15 +2031,14 @@ do_assignc (idx, in) sb_kill (&acc); } - -/* name: .REG (reg) */ +/* name: .REG (reg) */ static void do_reg (idx, in) int idx; sb *in; { - /* remove reg stuff from inside parens */ + /* Remove reg stuff from inside parens. */ sb what; if (!mri) idx = skip_openp (idx, in); @@ -2079,7 +2057,6 @@ do_reg (idx, in) sb_kill (&what); } - static int condass_lookup_name (inbuf, idx, out, warn) sb *inbuf; @@ -2101,14 +2078,13 @@ condass_lookup_name (inbuf, idx, out, warn) idx++; ptr = hash_lookup (&vars, &condass_acc); - if (!ptr) { - if (warn) + if (warn) { WARNING ((stderr, _("Can't find preprocessor variable %s.\n"), sb_name (&condass_acc))); } - else + else { sb_add_string (out, "0"); } @@ -2197,11 +2173,12 @@ istrue (idx, in) { int cond; int same; - /* This is a string comparision */ + /* This is a string comparision. */ idx = getstring (idx, in, &acc_a); idx = whatcond (idx, in, &cond); idx = getstring (idx, in, &acc_b); - same = acc_a.len == acc_b.len && (strncmp (acc_a.ptr, acc_b.ptr, acc_a.len) == 0); + same = acc_a.len == acc_b.len + && (strncmp (acc_a.ptr, acc_b.ptr, acc_a.len) == 0); if (cond != EQ && cond != NE) { @@ -2212,7 +2189,7 @@ istrue (idx, in) res = (cond != EQ) ^ same; } else - /* This is a numeric expression */ + /* This is a numeric expression. */ { int vala; int valb; @@ -2264,7 +2241,8 @@ istrue (idx, in) return res; } -/* .AIF */ +/* .AIF */ + static void do_aif (idx, in) int idx; @@ -2275,16 +2253,16 @@ do_aif (idx, in) FATAL ((stderr, _("AIF nesting unreasonable.\n"))); } ifi++; - ifstack[ifi].on = ifstack[ifi-1].on ? istrue (idx, in) : 0; + ifstack[ifi].on = ifstack[ifi - 1].on ? istrue (idx, in) : 0; ifstack[ifi].hadelse = 0; } +/* .AELSE */ -/* .AELSE */ static void do_aelse () { - ifstack[ifi].on = ifstack[ifi-1].on ? !ifstack[ifi].on : 0; + ifstack[ifi].on = ifstack[ifi - 1].on ? !ifstack[ifi].on : 0; if (ifstack[ifi].hadelse) { ERROR ((stderr, _("Multiple AELSEs in AIF.\n"))); @@ -2292,8 +2270,8 @@ do_aelse () ifstack[ifi].hadelse = 1; } +/* .AENDI */ -/* .AENDI */ static void do_aendi () { @@ -2343,7 +2321,7 @@ do_if (idx, in, cond) } ifi++; - ifstack[ifi].on = ifstack[ifi-1].on ? res: 0; + ifstack[ifi].on = ifstack[ifi - 1].on ? res : 0; ifstack[ifi].hadelse = 0; } @@ -2394,7 +2372,7 @@ get_mri_string (idx, in, val, terminator) return idx; } -/* MRI IFC, IFNC. */ +/* MRI IFC, IFNC */ static void do_ifc (idx, in, ifnc) @@ -2429,11 +2407,12 @@ do_ifc (idx, in, ifnc) res ^= ifnc; ifi++; - ifstack[ifi].on = ifstack[ifi-1].on ? res : 0; + ifstack[ifi].on = ifstack[ifi - 1].on ? res : 0; ifstack[ifi].hadelse = 0; } -/* .ENDR */ +/* .ENDR */ + static void do_aendr () { @@ -2443,10 +2422,9 @@ do_aendr () ERROR ((stderr, _("ENDR without a REPT.\n"))); } -/* .AWHILE */ +/* .AWHILE */ -static -void +static void do_awhile (idx, in) int idx; sb *in; @@ -2474,7 +2452,7 @@ do_awhile (idx, in) .AWHILE exp foo .ENDW - */ + */ if (doit) { @@ -2487,7 +2465,7 @@ do_awhile (idx, in) sb_add_string (©, "\n"); sb_add_sb (©, &sub); sb_add_string (©, "\t.AENDW\n"); - /* Push another WHILE */ + /* Push another WHILE. */ include_buf (&exp, ©, include_while, index); sb_kill (©); } @@ -2495,8 +2473,7 @@ do_awhile (idx, in) sb_kill (&sub); } - -/* .AENDW */ +/* .AENDW */ static void do_aendw () @@ -2504,10 +2481,9 @@ do_aendw () ERROR ((stderr, _("AENDW without a AENDW.\n"))); } - /* .EXITM - - Pop things off the include stack until the type and index changes */ + + Pop things off the include stack until the type and index changes. */ static void do_exitm () @@ -2527,7 +2503,7 @@ do_exitm () } } -/* .AREPEAT */ +/* .AREPEAT */ static void do_arepeat (idx, in) @@ -2535,9 +2511,9 @@ do_arepeat (idx, in) sb *in; { int line = linecount (); - sb exp; /* buffer with expression in it */ - sb copy; /* expanded repeat block */ - sb sub; /* contents of AREPEAT */ + sb exp; /* Buffer with expression in it. */ + sb copy; /* Expanded repeat block. */ + sb sub; /* Contents of AREPEAT. */ int rc; int ret; char buffer[30]; @@ -2565,7 +2541,7 @@ do_arepeat (idx, in) .AREPEAT 19 foo .AENDR - */ + */ int index = include_next_index (); sb_add_sb (©, &sub); if (rc > 1) @@ -2589,7 +2565,7 @@ do_arepeat (idx, in) sb_kill (©); } -/* .ENDM */ +/* .ENDM */ static void do_endm () @@ -2619,11 +2595,11 @@ do_irp (idx, in, irpc) sb_kill (&out); } -/* MACRO PROCESSING */ +/* Macro processing. */ + +/* Parse off LOCAL n1, n2,... Invent a label name for it. */ -/* Parse off LOCAL n1, n2,... Invent a label name for it */ -static -void +static void do_local (idx, line) int idx ATTRIBUTE_UNUSED; sb *line ATTRIBUTE_UNUSED; @@ -2674,7 +2650,7 @@ macro_op (idx, in) return 1; } -/* STRING HANDLING */ +/* String handling. */ static int getstring (idx, in, acc) @@ -2685,8 +2661,8 @@ getstring (idx, in, acc) idx = sb_skip_white (idx, in); while (idx < in->len - && (in->ptr[idx] == '"' - || in->ptr[idx] == '<' + && (in->ptr[idx] == '"' + || in->ptr[idx] == '<' || (in->ptr[idx] == '\'' && alternate))) { if (in->ptr[idx] == '<') @@ -2700,30 +2676,32 @@ getstring (idx, in, acc) { if (in->ptr[idx] == '!') { - idx++ ; + idx++; + sb_add_char (acc, in->ptr[idx++]); + } + else + { + if (in->ptr[idx] == '>') + nest--; + if (in->ptr[idx] == '<') + nest++; sb_add_char (acc, in->ptr[idx++]); } - else { - if (in->ptr[idx] == '>') - nest--; - if (in->ptr[idx] == '<') - nest++; - sb_add_char (acc, in->ptr[idx++]); - } } idx++; } - else { - int code; - idx++; - idx = exp_get_abs (_("Character code in string must be absolute expression.\n"), - idx, in, &code); - sb_add_char (acc, code); + else + { + int code; + idx++; + idx = exp_get_abs (_("Character code in string must be absolute expression.\n"), + idx, in, &code); + sb_add_char (acc, code); - if (in->ptr[idx] != '>') - ERROR ((stderr, _("Missing > for character code.\n"))); - idx++; - } + if (in->ptr[idx] != '>') + ERROR ((stderr, _("Missing > for character code.\n"))); + idx++; + } } else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { @@ -2733,30 +2711,30 @@ getstring (idx, in, acc) { if (alternate && in->ptr[idx] == '!') { - idx++ ; + idx++; sb_add_char (acc, in->ptr[idx++]); } - else { - if (in->ptr[idx] == tchar) - { - idx++; - if (idx >= in->len || in->ptr[idx] != tchar) - break; - } - sb_add_char (acc, in->ptr[idx]); - idx++; - } + else + { + if (in->ptr[idx] == tchar) + { + idx++; + if (idx >= in->len || in->ptr[idx] != tchar) + break; + } + sb_add_char (acc, in->ptr[idx]); + idx++; + } } } } - + return idx; } -/* .SDATA[C|Z] */ +/* .SDATA[C|Z] */ -static -void +static void do_sdata (idx, in, type) int idx; sb *in; @@ -2803,12 +2781,14 @@ do_sdata (idx, in, type) fprintf (outfile, "0"); } idx = sb_skip_comma (idx, in); - if (idx == pidx) break; + if (idx == pidx) + break; } if (!alternate && in->ptr[idx] != ',' && idx != in->len) { fprintf (outfile, "\n"); - ERROR ((stderr, _("illegal character in SDATA line (0x%x).\n"), in->ptr[idx])); + ERROR ((stderr, _("illegal character in SDATA line (0x%x).\n"), + in->ptr[idx])); break; } idx++; @@ -2817,7 +2797,7 @@ do_sdata (idx, in, type) fprintf (outfile, "\n"); } -/* .SDATAB */ +/* .SDATAB */ static void do_sdatab (idx, in) @@ -2933,7 +2913,7 @@ include_pop () /* Get the next character from the include stack. If there's anything in the pushback buffer, take that first. If we're at eof, pop from - the stack and try again. Keep the linecount up to date. */ + the stack and try again. Keep the linecount up to date. */ static int get () @@ -2943,7 +2923,7 @@ get () if (sp->pushback.len != sp->pushback_index) { r = (char) (sp->pushback.ptr[sp->pushback_index++]); - /* When they've all gone, reset the pointer */ + /* When they've all gone, reset the pointer. */ if (sp->pushback_index == sp->pushback.len) { sp->pushback.len = 0; @@ -2992,8 +2972,7 @@ include_next_index () return ++index; } - -/* Initialize the chartype vector. */ +/* Initialize the chartype vector. */ static void chartype_init () @@ -3019,7 +2998,7 @@ chartype_init () || x == 'h' || x == 'H' || x == 'd' || x == 'D') chartype [x] |= BASEBIT; - + if (x == ' ' || x == '\t') chartype[x] |= WHITEBIT; @@ -3028,11 +3007,9 @@ chartype_init () } } - - -/* What to do with all the keywords */ -#define PROCESS 0x1000 /* Run substitution over the line */ -#define LAB 0x2000 /* Spit out the label */ +/* What to do with all the keywords. */ +#define PROCESS 0x1000 /* Run substitution over the line. */ +#define LAB 0x2000 /* Spit out the label. */ #define K_EQU (PROCESS|1) #define K_ASSIGN (PROCESS|2) @@ -3089,16 +3066,13 @@ chartype_init () #define K_IRP (PROCESS|54) #define K_IRPC (PROCESS|55) - -struct keyword -{ +struct keyword { char *name; int code; int extra; }; -static struct keyword kinfo[] = -{ +static struct keyword kinfo[] = { { "EQU", K_EQU, 0 }, { "ALTERNATE", K_ALTERNATE, 0 }, { "ASSIGN", K_ASSIGN, 0 }, @@ -3149,8 +3123,7 @@ static struct keyword kinfo[] = handle them here as well, in case they are used in a recursive macro to end the recursion. */ -static struct keyword mrikinfo[] = -{ +static struct keyword mrikinfo[] = { { "IFEQ", K_IFEQ, 0 }, { "IFNE", K_IFNE, 0 }, { "IFLT", K_IFLT, 0 }, @@ -3170,7 +3143,7 @@ static struct keyword mrikinfo[] = }; /* Look for a pseudo op on the line. If one's there then call - its handler. */ + its handler. */ static int process_pseudo_op (idx, line, acc) @@ -3182,7 +3155,7 @@ process_pseudo_op (idx, line, acc) if (line->ptr[idx] == '.' || alternate || mri) { - /* Scan forward and find pseudo name */ + /* Scan forward and find pseudo name. */ char *in; hash_entry *ptr; @@ -3208,13 +3181,15 @@ process_pseudo_op (idx, line, acc) { #if 0 /* This one causes lots of pain when trying to preprocess - ordinary code */ - WARNING ((stderr, _("Unrecognised pseudo op `%s'.\n"), sb_name (acc))); + ordinary code. */ + WARNING ((stderr, _("Unrecognised pseudo op `%s'.\n"), + sb_name (acc))); #endif return 0; } if (ptr->value.i & LAB) - { /* output the label */ + { + /* Output the label. */ if (label.len) { fprintf (outfile, "%s:\t", sb_name (&label)); @@ -3235,13 +3210,13 @@ process_pseudo_op (idx, line, acc) if (ptr->value.i & PROCESS) { - /* Polish the rest of the line before handling the pseudo op */ + /* Polish the rest of the line before handling the pseudo op. */ #if 0 - strip_comments(line); + strip_comments (line); #endif sb_reset (acc); process_assigns (idx, line, acc); - sb_reset(line); + sb_reset (line); change_base (0, acc, line); idx = 0; } @@ -3427,8 +3402,6 @@ process_pseudo_op (idx, line, acc) return 0; } - - /* Add a keyword to the hash table. */ static void @@ -3450,10 +3423,10 @@ add_keyword (name, code) hash_add_to_int_table (&keyword_hash_table, &label, code); sb_kill (&label); -} +} /* Build the keyword hash table - put each keyword in the table twice, - once upper and once lower case.*/ + once upper and once lower case. */ static void process_init () @@ -3470,7 +3443,6 @@ process_init () } } - static void do_define (string) const char *string; @@ -3480,10 +3452,9 @@ do_define (string) hash_entry *ptr; sb_new (&label); - while (*string) { - if (*string == '=') + if (*string == '=') { sb value; sb_new (&value); @@ -3493,13 +3464,14 @@ do_define (string) sb_add_char (&value, *string); string++; } - exp_get_abs (_("Invalid expression on command line.\n"), 0, &value, &res); + exp_get_abs (_("Invalid expression on command line.\n"), + 0, &value, &res); sb_kill (&value); break; } sb_add_char (&label, *string); - string ++; + string++; } ptr = hash_create (&vars, &label); @@ -3508,6 +3480,7 @@ do_define (string) ptr->value.i = res; sb_kill (&label); } + char *program_name; /* The list of long options. */ @@ -3556,11 +3529,11 @@ Usage: %s \n\ } /* Display a help message and exit. */ + static void show_help () { - printf (_("%s: Gnu Assembler Macro Preprocessor\n"), - program_name); + printf (_("%s: Gnu Assembler Macro Preprocessor\n"), program_name); show_usage (stdout, 0); } @@ -3640,7 +3613,7 @@ main (argc, argv) break; case 'h': show_help (); - /*NOTREACHED*/ + /* NOTREACHED */ case 'v': /* This output is intended to follow the GNU standards document. */ printf (_("GNU assembler pre-processor %s\n"), program_version); @@ -3649,12 +3622,12 @@ main (argc, argv) This program is free software; you may redistribute it under the terms of\n\ the GNU General Public License. This program has absolutely no warranty.\n")); exit (0); - /*NOTREACHED*/ + /* NOTREACHED */ case 0: break; default: show_usage (stderr, 1); - /*NOTREACHED*/ + /* NOTREACHED */ } } @@ -3662,24 +3635,26 @@ the GNU General Public License. This program has absolutely no warranty.\n")); macro_init (alternate, mri, 0, exp_get_abs); - if (out_name) { - outfile = fopen (out_name, "w"); - if (!outfile) - { - fprintf (stderr, _("%s: Can't open output file `%s'.\n"), - program_name, out_name); - exit (1); - } - } - else { - outfile = stdout; - } + if (out_name) + { + outfile = fopen (out_name, "w"); + if (!outfile) + { + fprintf (stderr, _("%s: Can't open output file `%s'.\n"), + program_name, out_name); + exit (1); + } + } + else + { + outfile = stdout; + } chartype_init (); if (!outfile) outfile = stdout; - /* Process all the input files */ + /* Process all the input files. */ while (optind < argc) { diff --git a/contrib/binutils/gas/hash.c b/contrib/binutils/gas/hash.c index 0f129fb..f2e98a6 100644 --- a/contrib/binutils/gas/hash.c +++ b/contrib/binutils/gas/hash.c @@ -1,5 +1,5 @@ /* hash.c -- gas hash table code - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 1999 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -37,8 +37,7 @@ /* An entry in a hash table. */ -struct hash_entry -{ +struct hash_entry { /* Next entry for this hash code. */ struct hash_entry *next; /* String being hashed. */ @@ -52,8 +51,7 @@ struct hash_entry /* A hash table. */ -struct hash_control -{ +struct hash_control { /* The hash array. */ struct hash_entry **table; /* The number of slots in the hash table. */ @@ -99,7 +97,7 @@ hash_new () ret->deletions = 0; #endif - return ret; + return ret; } /* Delete a hash table, freeing all allocated memory. */ @@ -222,7 +220,7 @@ hash_insert (table, key, value) ++table->insertions; #endif - p = obstack_alloc (&table->memory, sizeof *p); + p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p)); p->string = key; p->hash = hash; p->data = value; @@ -262,7 +260,7 @@ hash_jam (table, key, value) ++table->insertions; #endif - p = obstack_alloc (&table->memory, sizeof *p); + p = (struct hash_entry *) obstack_alloc (&table->memory, sizeof (*p)); p->string = key; p->hash = hash; p->data = value; @@ -415,14 +413,23 @@ hash_print_statistics (f, name, table) /* This test program is left over from the old hash table code. */ -#define TABLES (6) /* number of hash tables to maintain */ - /* (at once) in any testing */ -#define STATBUFSIZE (12) /* we can have 12 statistics */ +/* Number of hash tables to maintain (at once) in any testing. */ +#define TABLES (6) + +/* We can have 12 statistics. */ +#define STATBUFSIZE (12) + +/* Display statistics here. */ +int statbuf[STATBUFSIZE]; + +/* Human farts here. */ +char answer[100]; -int statbuf[STATBUFSIZE]; /* display statistics here */ -char answer[100]; /* human farts here */ -char *hashtable[TABLES]; /* we test many hash tables at once */ -char *h; /* points to curent hash_control */ +/* We test many hash tables at once. */ +char *hashtable[TABLES]; + +/* Points to curent hash_control. */ +char *h; char **pp; char *p; char *name; @@ -430,8 +437,9 @@ char *value; int size; int used; char command; -int number; /* number 0:TABLES-1 of current hashed */ - /* symbol table */ + +/* Number 0:TABLES-1 of current hashed symbol table. */ +int number; int main () @@ -450,7 +458,7 @@ main () gets (answer); command = answer[0]; if (isupper (command)) - command = tolower (command); /* ecch! */ + command = tolower (command); /* Ecch! */ switch (command) { case '#': @@ -460,8 +468,8 @@ main () case '?': for (pp = hashtable; pp < hashtable + TABLES; pp++) { - printf ("address of hash table #%d control block is %xx\n" - ,pp - hashtable, *pp); + printf ("address of hash table #%d control block is %xx\n", + pp - hashtable, *pp); } break; case 'a': @@ -542,7 +550,7 @@ what (description) printf (" %s : ", description); gets (answer); - /* will one day clean up answer here */ + /* Will one day clean up answer here. */ retval = malloc (strlen (answer) + 1); if (!retval) { @@ -561,7 +569,6 @@ destroy (string, value) free (value); } - void applicatee (string, value) char *string; @@ -570,11 +577,12 @@ applicatee (string, value) printf ("%.20s-%.20s\n", string, value); } +/* Determine number: what hash table to use. + Also determine h: points to hash_control. */ + void -whattable () /* determine number: what hash table to use */ - /* also determine h: points to hash_control */ +whattable () { - for (;;) { printf (" what hash table (%d:%d) ? ", 0, TABLES - 1); @@ -596,6 +604,4 @@ whattable () /* determine number: what hash table to use */ } } -#endif /* #ifdef TEST */ - -/* end of hash.c */ +#endif /* TEST */ diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c index 634f6f7..b390a8f 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, 1999 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -57,35 +57,34 @@ static FILE *f_in; static char *file_name; /* Struct for saving the state of this module for file includes. */ -struct saved_file - { - FILE *f_in; - char *file_name; - int preprocess; - char *app_save; - }; +struct saved_file { + FILE *f_in; + char *file_name; + int preprocess; + char *app_save; +}; -/* These hooks accomodate most operating systems. */ +/* These hooks accomodate most operating systems. */ -void +void input_file_begin () { f_in = (FILE *) 0; } -void +void input_file_end () { } -/* Return BUFFER_SIZE. */ -unsigned int +/* Return BUFFER_SIZE. */ +unsigned int input_file_buffer_size () { return (BUFFER_SIZE); } -int +int input_file_is_open () { return f_in != (FILE *) 0; @@ -130,7 +129,7 @@ input_file_pop (arg) void input_file_open (filename, pre) - char *filename; /* "" means use stdin. Must not be 0. */ + char *filename; /* "" means use stdin. Must not be 0. */ int pre; { int c; @@ -138,16 +137,16 @@ input_file_open (filename, pre) preprocess = pre; - assert (filename != 0); /* Filename may not be NULL. */ + assert (filename != 0); /* Filename may not be NULL. */ if (filename[0]) - { /* We have a file name. Suck it and see. */ + { /* We have a file name. Suck it and see. */ f_in = fopen (filename, "r"); file_name = filename; } else - { /* use stdin for the input file. */ + { /* use stdin for the input file. */ f_in = stdin; - file_name = _("{standard input}"); /* For error messages. */ + file_name = _("{standard input}"); /* For error messages. */ } if (f_in == (FILE *) 0) { @@ -180,7 +179,7 @@ input_file_open (filename, pre) } /* Close input file. */ -void +void input_file_close () { if (f_in != NULL) @@ -188,7 +187,7 @@ input_file_close () fclose (f_in); } /* don't close a null file pointer */ f_in = 0; -} /* input_file_close() */ +} /* This function is passed to do_scrub_chars. */ @@ -212,9 +211,9 @@ input_file_get (buf, buflen) char * input_file_give_next_buffer (where) - char *where; /* Where to place 1st character of new buffer. */ + char *where; /* Where to place 1st character of new buffer. */ { - char *return_value; /* -> Last char of what we read, + 1. */ + char *return_value; /* -> Last char of what we read, + 1. */ register int size; if (f_in == (FILE *) 0) @@ -245,5 +244,3 @@ input_file_give_next_buffer (where) } return (return_value); } - -/* end of input-file.c */ diff --git a/contrib/binutils/gas/input-file.h b/contrib/binutils/gas/input-file.h index 129bf28..14cb5e3 100644 --- a/contrib/binutils/gas/input-file.h +++ b/contrib/binutils/gas/input-file.h @@ -14,12 +14,12 @@ 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. */ + 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. */ /*"input_file.c":Operating-system dependant functions to read source files.*/ - /* * No matter what the operating system, this module must provide the * following services to its callers. @@ -64,5 +64,3 @@ void input_file_close PARAMS ((void)); void input_file_end PARAMS ((void)); void input_file_open PARAMS ((char *filename, int pre)); void input_file_pop PARAMS ((char *arg)); - -/* end of input_file.h */ diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c index ecbdaef..73cf1ec 100644 --- a/contrib/binutils/gas/input-scrub.c +++ b/contrib/binutils/gas/input-scrub.c @@ -1,5 +1,5 @@ /* input_scrub.c - Break up input buffers into whole numbers of lines. - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1997 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,7 +17,7 @@ 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. */ + 02111-1307, USA. */ #include /* Need this to make errno declaration right */ #include "as.h" @@ -52,21 +52,22 @@ */ #define BEFORE_STRING ("\n") -#define AFTER_STRING ("\0") /* memcpy of 0 chars might choke. */ +#define AFTER_STRING ("\0") /* memcpy of 0 chars might choke. */ #define BEFORE_SIZE (1) #define AFTER_SIZE (1) -static char *buffer_start; /*->1st char of full buffer area. */ -static char *partial_where; /*->after last full line in buffer. */ -static int partial_size; /* >=0. Number of chars in partial line in buffer. */ +static char *buffer_start; /*->1st char of full buffer area. */ +static char *partial_where; /*->after last full line in buffer. */ +static int partial_size; /* >=0. Number of chars in partial line in buffer. */ + +/* Because we need AFTER_STRING just after last full line, it clobbers + 1st part of partial line. So we preserve 1st part of partial line + here. */ static char save_source[AFTER_SIZE]; -/* Because we need AFTER_STRING just after last */ -/* full line, it clobbers 1st part of partial */ -/* line. So we preserve 1st part of partial */ -/* line here. */ -static unsigned int buffer_length; /* What is the largest size buffer that */ -/* input_file_give_next_buffer() could */ -/* return to us? */ + +/* What is the largest size buffer that input_file_give_next_buffer() + could return to us? */ +static unsigned int buffer_length; /* The index into an sb structure we are reading from. -1 if none. */ static int sb_index = -1; @@ -84,54 +85,54 @@ int macro_nest; but the latest one are saved off in a struct input_save. These files remain open, so we are limited by the number of open files allowed by the underlying OS. We may also sequentially read more than one source file in an - assembly. */ + assembly. */ /* We must track the physical file and line number for error messages. We also track a "logical" file and line number corresponding to (C?) compiler source line numbers. Whenever we open a file we must fill in - physical_input_file. So if it is NULL we have not opened any files yet. */ + physical_input_file. So if it is NULL we have not opened any files yet. */ static char *physical_input_file; static char *logical_input_file; -typedef unsigned int line_numberT; /* 1-origin line number in a source file. */ -/* A line ends in '\n' or eof. */ +typedef unsigned int line_numberT; /* 1-origin line number in a source file. */ +/* A line ends in '\n' or eof. */ static line_numberT physical_input_line; static int logical_input_line; /* Struct used to save the state of the input handler during include files */ -struct input_save - { - char *buffer_start; - char *partial_where; - int partial_size; - char save_source[AFTER_SIZE]; - unsigned int buffer_length; - char *physical_input_file; - char *logical_input_file; - line_numberT physical_input_line; - int logical_input_line; - int sb_index; - sb from_sb; - int from_sb_is_expansion; /* Should we do a conditional check? */ - struct input_save *next_saved_file; /* Chain of input_saves */ - char *input_file_save; /* Saved state of input routines */ - char *saved_position; /* Caller's saved position in buf */ - }; +struct input_save { + char * buffer_start; + char * partial_where; + int partial_size; + char save_source[AFTER_SIZE]; + unsigned int buffer_length; + char * physical_input_file; + char * logical_input_file; + line_numberT physical_input_line; + int logical_input_line; + int sb_index; + sb from_sb; + int from_sb_is_expansion; /* Should we do a conditional check? */ + struct input_save * next_saved_file; /* Chain of input_saves. */ + char * input_file_save; /* Saved state of input routines. */ + char * saved_position; /* Caller's saved position in buf. */ +}; static struct input_save *input_scrub_push PARAMS ((char *saved_position)); static char *input_scrub_pop PARAMS ((struct input_save *arg)); static void as_1_char PARAMS ((unsigned int c, FILE * stream)); /* Saved information about the file that .include'd this one. When we hit EOF, - we automatically pop to that file. */ + we automatically pop to that file. */ static struct input_save *next_saved_file; /* Push the state of input reading and scrubbing so that we can #include. The return value is a 'void *' (fudged for old compilers) to a save - area, which can be restored by passing it to input_scrub_pop(). */ + area, which can be restored by passing it to input_scrub_pop(). */ + static struct input_save * input_scrub_push (saved_position) char *saved_position; @@ -166,7 +167,7 @@ input_scrub_push (saved_position) memcpy (buffer_start, BEFORE_STRING, (int) BEFORE_SIZE); return saved; -} /* input_scrub_push() */ +} static char * input_scrub_pop (saved) @@ -196,12 +197,12 @@ input_scrub_pop (saved) return saved_position; } - void input_scrub_begin () { know (strlen (BEFORE_STRING) == BEFORE_SIZE); - know (strlen (AFTER_STRING) == AFTER_SIZE || (AFTER_STRING[0] == '\0' && AFTER_SIZE == 1)); + know (strlen (AFTER_STRING) == AFTER_SIZE + || (AFTER_STRING[0] == '\0' && AFTER_SIZE == 1)); input_file_begin (); @@ -210,10 +211,10 @@ input_scrub_begin () buffer_start = xmalloc ((BEFORE_SIZE + buffer_length + buffer_length + AFTER_SIZE)); memcpy (buffer_start, BEFORE_STRING, (int) BEFORE_SIZE); - /* Line number things. */ + /* Line number things. */ logical_input_line = -1; logical_input_file = (char *) NULL; - physical_input_file = NULL; /* No file read yet. */ + physical_input_file = NULL; /* No file read yet. */ next_saved_file = NULL; /* At EOF, don't pop to any other file */ do_scrub_begin (flag_m68k_mri); } @@ -229,9 +230,10 @@ input_scrub_end () } } -/* Start reading input from a new file. */ +/* Start reading input from a new file. + Return start of caller's part of buffer. */ -char * /* Return start of caller's part of buffer. */ +char * input_scrub_new_file (filename) char *filename; { @@ -243,10 +245,9 @@ input_scrub_new_file (filename) return (buffer_start + BEFORE_SIZE); } - /* Include a file from the current file. Save our state, cause it to be restored on EOF, and begin handling a new file. Same result as - input_scrub_new_file. */ + input_scrub_new_file. */ char * input_scrub_include_file (filename, position) @@ -267,7 +268,7 @@ input_scrub_include_sb (from, position, is_expansion) int is_expansion; { if (macro_nest > max_macro_nest) - as_fatal (_("buffers nested too deeply")); + as_fatal (_("macros nested too deeply")); ++macro_nest; #ifdef md_macro_start @@ -305,22 +306,24 @@ char * input_scrub_next_buffer (bufp) char **bufp; { - register char *limit; /*->just after last char of buffer. */ + register char *limit; /*->just after last char of buffer. */ if (sb_index >= 0) { if (sb_index >= from_sb.len) { sb_kill (&from_sb); - if (from_sb_is_expansion) - { - cond_finish_check (macro_nest); + if (from_sb_is_expansion + ) + { + cond_finish_check (macro_nest); #ifdef md_macro_end - /* allow the target to clean up per-macro expansion data */ - md_macro_end (); + /* Allow the target to clean up per-macro expansion + data. */ + md_macro_end (); #endif - } - --macro_nest; + } + --macro_nest; partial_where = NULL; if (next_saved_file != NULL) *bufp = input_scrub_pop (next_saved_file); @@ -347,7 +350,7 @@ input_scrub_next_buffer (bufp) + partial_size); if (limit) { - register char *p; /* Find last newline. */ + register char *p; /* Find last newline. */ for (p = limit - 1; *p != '\n'; --p) ; @@ -396,24 +399,21 @@ input_scrub_next_buffer (bufp) /* Tell the listing we've finished the file. */ LISTING_EOF (); - /* If we should pop to another file at EOF, do it. */ + /* If we should pop to another file at EOF, do it. */ if (next_saved_file) { *bufp = input_scrub_pop (next_saved_file); /* Pop state */ - /* partial_where is now correct to return, since we popped it. */ + /* partial_where is now correct to return, since we popped it. */ } } return (partial_where); -} /* input_scrub_next_buffer() */ +} -/* - * The remaining part of this file deals with line numbers, error - * messages and so on. - */ - +/* The remaining part of this file deals with line numbers, error + messages and so on. Return TRUE if we opened any file. */ int -seen_at_least_1_file () /* TRUE if we opened any file. */ +seen_at_least_1_file () { return (physical_input_file != NULL); } @@ -429,20 +429,17 @@ bump_line_counters () } } -/* - * new_logical_line() - * - * Tells us what the new logical line number and file are. - * If the line_number is -1, we don't change the current logical line - * number. If it is -2, we decrement the logical line number (this is - * to support the .appfile pseudo-op inserted into the stream by - * do_scrub_chars). - * If the fname is NULL, we don't change the current logical file name. - * Returns nonzero if the filename actually changes. - */ +/* Tells us what the new logical line number and file are. + If the line_number is -1, we don't change the current logical line + number. If it is -2, we decrement the logical line number (this is + to support the .appfile pseudo-op inserted into the stream by + do_scrub_chars). + If the fname is NULL, we don't change the current logical file name. + Returns nonzero if the filename actually changes. */ + int new_logical_line (fname, line_number) - char *fname; /* DON'T destroy it! We point to it! */ + char *fname; /* DON'T destroy it! We point to it! */ int line_number; { if (line_number >= 0) @@ -459,16 +456,13 @@ new_logical_line (fname, line_number) } else return 0; -} /* new_logical_line() */ +} -/* - * a s _ w h e r e () - * - * Return the current file name and line number. - * namep should be char * const *, but there are compilers which screw - * up declarations like that, and it's easier to avoid it. - */ -void +/* Return the current file name and line number. + namep should be char * const *, but there are compilers which screw + up declarations like that, and it's easier to avoid it. */ + +void as_where (namep, linep) char **namep; unsigned int *linep; @@ -492,37 +486,30 @@ as_where (namep, linep) if (linep != NULL) *linep = 0; } -} /* as_where() */ +} +/* Output to given stream how much of line we have scanned so far. + Assumes we have scanned up to and including input_line_pointer. + No free '\n' at end of line. */ - - -/* - * a s _ h o w m u c h () - * - * Output to given stream how much of line we have scanned so far. - * Assumes we have scanned up to and including input_line_pointer. - * No free '\n' at end of line. - */ void as_howmuch (stream) - FILE *stream; /* Opened for write please. */ + FILE *stream; /* Opened for write please. */ { - register char *p; /* Scan input line. */ - /* register char c; JF unused */ + register char *p; /* Scan input line. */ for (p = input_line_pointer - 1; *p != '\n'; --p) { } - ++p; /* p->1st char of line. */ + ++p; /* p->1st char of line. */ for (; p <= input_line_pointer; p++) { - /* Assume ASCII. EBCDIC & other micro-computer char sets ignored. */ + /* Assume ASCII. EBCDIC & other micro-computer char sets ignored. */ as_1_char ((unsigned char) *p, stream); } } -static void +static void as_1_char (c, stream) unsigned int c; FILE *stream; @@ -539,5 +526,3 @@ as_1_char (c, stream) } (void) putc (c, stream); } - -/* end of input_scrub.c */ diff --git a/contrib/binutils/gas/itbl-ops.c b/contrib/binutils/gas/itbl-ops.c index 27cca60..9a78219 100644 --- a/contrib/binutils/gas/itbl-ops.c +++ b/contrib/binutils/gas/itbl-ops.c @@ -114,45 +114,39 @@ int itbl_have_entries = 0; /*======================================================================*/ /* structures for keeping itbl format entries */ -struct itbl_range - { - int sbit; /* mask starting bit position */ - int ebit; /* mask ending bit position */ - }; - -struct itbl_field - { - e_type type; /* dreg/creg/greg/immed/symb */ - struct itbl_range range; /* field's bitfield range within instruction */ - unsigned long flags; /* field flags */ - struct itbl_field *next; /* next field in list */ - }; +struct itbl_range { + int sbit; /* mask starting bit position */ + int ebit; /* mask ending bit position */ +}; +struct itbl_field { + e_type type; /* dreg/creg/greg/immed/symb */ + struct itbl_range range; /* field's bitfield range within instruction */ + unsigned long flags; /* field flags */ + struct itbl_field *next; /* next field in list */ +}; /* These structures define the instructions and registers for a processor. * If the type is an instruction, the structure defines the format of an * instruction where the fields are the list of operands. * The flags field below uses the same values as those defined in the - * gnu assembler and are machine specific. */ -struct itbl_entry - { - e_processor processor; /* processor number */ - e_type type; /* dreg/creg/greg/insn */ - char *name; /* mnemionic name for insn/register */ - unsigned long value; /* opcode/instruction mask/register number */ - unsigned long flags; /* effects of the instruction */ - struct itbl_range range; /* bit range within instruction for value */ - struct itbl_field *fields; /* list of operand definitions (if any) */ - struct itbl_entry *next; /* next entry */ - }; - + * gnu assembler and are machine specific. */ +struct itbl_entry { + e_processor processor; /* processor number */ + e_type type; /* dreg/creg/greg/insn */ + char *name; /* mnemionic name for insn/register */ + unsigned long value; /* opcode/instruction mask/register number */ + unsigned long flags; /* effects of the instruction */ + struct itbl_range range; /* bit range within instruction for value */ + struct itbl_field *fields; /* list of operand definitions (if any) */ + struct itbl_entry *next; /* next entry */ +}; /* local data and structures */ static int itbl_num_opcodes = 0; /* Array of entries for each processor and entry type */ -static struct itbl_entry *entries[e_nprocs][e_ntypes] = -{ +static struct itbl_entry *entries[e_nprocs][e_ntypes] = { {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0}, @@ -163,30 +157,28 @@ static struct itbl_entry *entries[e_nprocs][e_ntypes] = static unsigned long build_opcode PARAMS ((struct itbl_entry *e)); static e_type get_type PARAMS ((int yytype)); static e_processor get_processor PARAMS ((int yyproc)); -static struct itbl_entry **get_entries PARAMS ((e_processor processor, +static struct itbl_entry **get_entries PARAMS ((e_processor processor, e_type type)); -static struct itbl_entry *find_entry_byname PARAMS ((e_processor processor, +static struct itbl_entry *find_entry_byname PARAMS ((e_processor processor, e_type type, char *name)); -static struct itbl_entry *find_entry_byval PARAMS ((e_processor processor, +static struct itbl_entry *find_entry_byval PARAMS ((e_processor processor, e_type type, unsigned long val, struct itbl_range *r)); -static struct itbl_entry *alloc_entry PARAMS ((e_processor processor, +static struct itbl_entry *alloc_entry PARAMS ((e_processor processor, e_type type, char *name, unsigned long value)); -static unsigned long apply_range PARAMS ((unsigned long value, +static unsigned long apply_range PARAMS ((unsigned long value, struct itbl_range r)); -static unsigned long extract_range PARAMS ((unsigned long value, +static unsigned long extract_range PARAMS ((unsigned long value, struct itbl_range r)); -static struct itbl_field *alloc_field PARAMS ((e_type type, int sbit, +static struct itbl_field *alloc_field PARAMS ((e_type type, int sbit, int ebit, unsigned long flags)); - /*======================================================================*/ /* Interfaces to the parser */ - /* Open the table and use lex and yacc to parse the entries. * Return 1 for failure; 0 for success. */ -int +int itbl_parse (char *insntbl) { extern FILE *yyin; @@ -213,7 +205,7 @@ struct itbl_entry * itbl_add_reg (int yyprocessor, int yytype, char *regname, int regnum) { -#if 0 +#if 0 #include "as.h" #include "symbols.h" /* Since register names don't have a prefix, we put them in the symbol table so @@ -256,7 +248,7 @@ itbl_add_operand (struct itbl_entry *e, int yytype, int sbit, struct itbl_field *f, **last_f; if (!e) return 0; - /* Add to end of fields' list. */ + /* Add to end of fields' list. */ f = alloc_field (get_type (yytype), sbit, ebit, flags); if (f) { @@ -269,7 +261,6 @@ itbl_add_operand (struct itbl_entry *e, int yytype, int sbit, return f; } - /*======================================================================*/ /* Interfaces for assembler and disassembler */ @@ -278,8 +269,9 @@ itbl_add_operand (struct itbl_entry *e, int yytype, int sbit, #include "symbols.h" static void append_insns_as_macros (void); -/* initialize for gas */ -void +/* Initialize for gas. */ + +void itbl_init (void) { struct itbl_entry *e, **es; @@ -287,11 +279,11 @@ itbl_init (void) e_type type; if (!itbl_have_entries) - return; + return; /* Since register names don't have a prefix, put them in the symbol table so they can't be used as symbols. This simplifies argument parsing as - we can let gas parse registers for us. */ + we can let gas parse registers for us. */ /* Use symbol_create instead of symbol_new so we don't try to output registers into the object file's symbol table. */ @@ -302,22 +294,21 @@ itbl_init (void) for (e = *es; e; e = e->next) { symbol_table_insert (symbol_create (e->name, reg_section, - e->value, &zero_address_frag)); + e->value, &zero_address_frag)); } } append_insns_as_macros (); } - -/* Append insns to opcodes table and increase number of opcodes - * Structure of opcodes table: +/* Append insns to opcodes table and increase number of opcodes + * Structure of opcodes table: * struct itbl_opcode * { * const char *name; - * const char *args; - string describing the arguments. - * unsigned long match; - opcode, or ISA level if pinfo=INSN_MACRO - * unsigned long mask; - opcode mask, or macro id if pinfo=INSN_MACRO - * unsigned long pinfo; - insn flags, or INSN_MACRO + * const char *args; - string describing the arguments. + * unsigned long match; - opcode, or ISA level if pinfo=INSN_MACRO + * unsigned long mask; - opcode mask, or macro id if pinfo=INSN_MACRO + * unsigned long pinfo; - insn flags, or INSN_MACRO * }; * examples: * {"li", "t,i", 0x34000000, 0xffe00000, WR_t }, @@ -325,7 +316,7 @@ itbl_init (void) */ static char *form_args (struct itbl_entry *e); -static void +static void append_insns_as_macros (void) { struct ITBL_OPCODE_STRUCT *new_opcodes, *o; @@ -333,7 +324,7 @@ append_insns_as_macros (void) int n, id, size, new_size, new_num_opcodes; if (!itbl_have_entries) - return; + return; if (!itbl_num_opcodes) /* no new instructions to add! */ { @@ -352,7 +343,7 @@ append_insns_as_macros (void) ASSERT (new_size > size); /* FIXME since ITBL_OPCODES culd be a static table, - we can't realloc or delete the old memory. */ + we can't realloc or delete the old memory. */ new_opcodes = (struct ITBL_OPCODE_STRUCT *) malloc (new_size); if (!new_opcodes) { @@ -363,7 +354,7 @@ append_insns_as_macros (void) memcpy (new_opcodes, ITBL_OPCODES, size); /* FIXME! some NUMOPCODES are calculated expressions. - These need to be changed before itbls can be supported. */ + These need to be changed before itbls can be supported. */ id = ITBL_NUM_MACROS; /* begin the next macro id after the last */ o = &new_opcodes[ITBL_NUM_OPCODES]; /* append macro to opcodes list */ @@ -407,7 +398,7 @@ append_insns_as_macros (void) Don't free name though, since name is being used by the new opcodes table. - Eventually, we should also free the new opcodes table itself + Eventually, we should also free the new opcodes table itself on exit. */ } @@ -454,7 +445,6 @@ form_args (struct itbl_entry *e) } #endif /* !STAND_ALONE */ - /* Get processor's register name from val */ int @@ -501,13 +491,12 @@ itbl_get_val (e_processor processor, e_type type, char *name, return 1; } - /* Assemble instruction "name" with operands "s". * name - name of instruction * s - operands * returns - long word for assembled instruction */ -unsigned long +unsigned long itbl_assemble (char *name, char *s) { unsigned long opcode; @@ -527,11 +516,11 @@ itbl_assemble (char *name, char *s) break; } if (!e) - return 0; /* opcode not in table; invalid instrustion */ + return 0; /* opcode not in table; invalid instruction */ opcode = build_opcode (e); /* parse opcode's args (if any) */ - for (f = e->fields; f; f = f->next) /* for each arg, ... */ + for (f = e->fields; f; f = f->next) /* for each arg, ... */ { struct itbl_entry *r; unsigned long value; @@ -573,7 +562,7 @@ itbl_assemble (char *name, char *s) */ /* If not a symbol, fall thru to IMMED */ case e_immed: - if (*n == '0' && *(n + 1) == 'x') /* hex begins 0x... */ + if (*n == '0' && *(n + 1) == 'x') /* hex begins 0x... */ { n += 2; value = strtol (n, 0, 16); @@ -603,7 +592,7 @@ itbl_assemble (char *name, char *s) * returns - 1 if succeeded; 0 if failed */ -int +int itbl_disassemble (char *s, unsigned long insn) { e_processor processor; @@ -611,24 +600,24 @@ itbl_disassemble (char *s, unsigned long insn) struct itbl_field *f; if (!ITBL_IS_INSN (insn)) - return 0; /* error*/ + return 0; /* error */ processor = get_processor (ITBL_DECODE_PNUM (insn)); /* find entry in list */ e = find_entry_byval (processor, e_insn, insn, 0); if (!e) - return 0; /* opcode not in table; invalid instrustion */ + return 0; /* opcode not in table; invalid instruction */ strcpy (s, e->name); - /* parse insn's args (if any) */ - for (f = e->fields; f; f = f->next) /* for each arg, ... */ + /* Parse insn's args (if any). */ + for (f = e->fields; f; f = f->next) /* for each arg, ... */ { struct itbl_entry *r; unsigned long value; - if (f == e->fields) /* first operand is preceeded by tab */ + if (f == e->fields) /* First operand is preceeded by tab. */ strcat (s, "\t"); - else /* ','s separate following operands */ + else /* ','s separate following operands. */ strcat (s, ","); value = extract_range (insn, f->range); /* n should be in form $n or 0xhhh (are symbol names valid?? */ @@ -638,7 +627,7 @@ itbl_disassemble (char *s, unsigned long insn) case e_creg: case e_greg: /* Accept either a string name - * or '$' followed by the register number */ + or '$' followed by the register number. */ r = find_entry_byval (e->processor, f->type, value, &f->range); if (r) strcat (s, r->name); @@ -646,11 +635,9 @@ itbl_disassemble (char *s, unsigned long insn) sprintf (s, "%s$%lu", s, value); break; case e_addr: - /* use assembler's symbol table to find symbol */ - /* FIXME!! Do we need this? - * if so, what about relocs?? - */ - /* If not a symbol, fall thru to IMMED */ + /* Use assembler's symbol table to find symbol. */ + /* FIXME!! Do we need this? If so, what about relocs?? */ + /* If not a symbol, fall through to IMMED. */ case e_immed: sprintf (s, "%s0x%lx", s, value); break; @@ -658,7 +645,7 @@ itbl_disassemble (char *s, unsigned long insn) return 0; /* error; invalid field spec */ } } - return 1; /* done! */ + return 1; /* Done! */ } /*======================================================================*/ @@ -670,7 +657,7 @@ itbl_disassemble (char *s, unsigned long insn) /* Calculate instruction's opcode and function values from entry */ -static unsigned long +static unsigned long build_opcode (struct itbl_entry *e) { unsigned long opcode; @@ -691,7 +678,7 @@ build_opcode (struct itbl_entry *e) * mask: 0x01f00000. */ -static unsigned long +static unsigned long apply_range (unsigned long rval, struct itbl_range r) { unsigned long mask; @@ -715,7 +702,7 @@ apply_range (unsigned long rval, struct itbl_range r) /* Calculate relative value given the absolute value and bit position range * within the instruction. */ -static unsigned long +static unsigned long extract_range (unsigned long aval, struct itbl_range r) { unsigned long mask; @@ -772,7 +759,7 @@ find_entry_byname (e_processor processor, struct itbl_entry *e, **es; es = get_entries (processor, type); - for (e = *es; e; e = e->next) /* for each entry, ... */ + for (e = *es; e; e = e->next) /* for each entry, ... */ { if (!strcmp (e->name, n)) return e; @@ -794,7 +781,7 @@ find_entry_byval (e_processor processor, e_type type, unsigned long eval; es = get_entries (processor, type); - for (e = *es; e; e = e->next) /* for each entry, ... */ + for (e = *es; e; e = e->next) /* for each entry, ... */ { if (processor != e->processor) continue; @@ -804,7 +791,7 @@ find_entry_byval (e_processor processor, e_type type, * This could cause ambiguities. * For operands, we get an extracted value and a range. */ - /* if range is 0, mask val against the range of the compared entry. */ + /* if range is 0, mask val against the range of the compared entry. */ if (r == 0) /* if no range passed, must be whole 32-bits * so create 32-bit value from entry's range */ { @@ -825,7 +812,7 @@ find_entry_byval (e_processor processor, e_type type, return 0; } -/* Return a pointer to the list of entries for a given processor and type. */ +/* Return a pointer to the list of entries for a given processor and type. */ static struct itbl_entry ** get_entries (e_processor processor, e_type type) @@ -833,9 +820,9 @@ get_entries (e_processor processor, e_type type) return &entries[processor][type]; } -/* Return an integral value for the processor passed from yyparse. */ +/* Return an integral value for the processor passed from yyparse. */ -static e_processor +static e_processor get_processor (int yyproc) { /* translate from yacc's processor to enum */ @@ -844,9 +831,9 @@ get_processor (int yyproc) return e_invproc; /* error; invalid processor */ } -/* Return an integral value for the entry type passed from yyparse. */ +/* Return an integral value for the entry type passed from yyparse. */ -static e_type +static e_type get_type (int yytype) { switch (yytype) @@ -869,7 +856,6 @@ get_type (int yytype) } } - /* Allocate and initialize an entry */ static struct itbl_entry * diff --git a/contrib/binutils/gas/itbl-ops.h b/contrib/binutils/gas/itbl-ops.h index d69ea7f..3dfd6f0 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 Free Software Foundation, Inc. + Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -81,7 +81,7 @@ typedef enum e_invproc /* invalid processor */ } e_processor; -/* 0 means an instruction table was not specified. */ +/* 0 means an instruction table was not specified. */ extern int itbl_have_entries; /* These routines are visible to the main part of the assembler */ @@ -99,7 +99,7 @@ char *itbl_get_name PARAMS ((e_processor processor, e_type type, unsigned long val)); /* These routines are called by the table parser used to build the - dynamic list of new processor instructions and registers. */ + dynamic list of new processor instructions and registers. */ struct itbl_entry *itbl_add_reg PARAMS ((int yyproc, int yytype, char *regname, int regnum)); diff --git a/contrib/binutils/gas/listing.c b/contrib/binutils/gas/listing.c index cecf245..8168ebe 100644 --- a/contrib/binutils/gas/listing.c +++ b/contrib/binutils/gas/listing.c @@ -1,5 +1,6 @@ /* listing.c - mainting assembly listings - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -17,12 +18,10 @@ 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. */ +02111-1307, USA. */ /* - Contributed by Steve Chamberlain - sac@cygnus.com - + Contributed by Steve Chamberlain A listing page looks like: @@ -57,7 +56,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA If the counter goes below zero, listing is suppressed. - Listings are a maintained by read calling various listing_ functions. What happens most is that the macro NO_LISTING is not defined (from the Makefile), then the macro LISTING_NEWLINE expands @@ -121,56 +119,52 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #define LISTING_LHS_CONT_LINES 4 #endif -/* This structure remembers which .s were used */ -typedef struct file_info_struct -{ +/* This structure remembers which .s were used. */ +typedef struct file_info_struct { struct file_info_struct * next; char * filename; long pos; unsigned int linenum; int at_end; -} -file_info_type; +} file_info_type; /* This structure rememebrs which line from which file goes into which - frag */ -struct list_info_struct -{ - /* Frag which this line of source is nearest to */ - fragS * frag; + frag. */ +struct list_info_struct { + /* Frag which this line of source is nearest to. */ + fragS *frag; - /* The actual line in the source file */ + /* The actual line in the source file. */ unsigned int line; /* Pointer to the file info struct for the file which this line - belongs to */ - file_info_type * file; + belongs to. */ + file_info_type *file; /* The expanded text of any macro that may have been executing. */ - char * line_contents; + char *line_contents; - /* Next in list */ - struct list_info_struct * next; + /* Next in list. */ + struct list_info_struct *next; /* Pointer to the file info struct for the high level language - source line that belongs here */ - file_info_type * hll_file; - /* High level language source line */ + source line that belongs here. */ + file_info_type *hll_file; + /* High level language source line. */ unsigned int hll_line; - /* Pointer to any error message associated with this line */ - char * message; + /* Pointer to any error message associated with this line. */ + char *message; - enum - { - EDICT_NONE, - EDICT_SBTTL, - EDICT_TITLE, - EDICT_NOLIST, - EDICT_LIST, - EDICT_NOLIST_NEXT, - EDICT_EJECT - } edict; - char * edict_arg; + enum { + EDICT_NONE, + EDICT_SBTTL, + EDICT_TITLE, + EDICT_NOLIST, + EDICT_LIST, + EDICT_NOLIST_NEXT, + EDICT_EJECT + } edict; + char *edict_arg; /* Nonzero if this line is to be omitted because it contains debugging information. This can become a flags field if we come @@ -180,7 +174,6 @@ struct list_info_struct typedef struct list_info_struct list_info_type; - int listing_lhs_width = LISTING_LHS_WIDTH; int listing_lhs_width_second = LISTING_LHS_WIDTH_SECOND; int listing_lhs_cont_lines = LISTING_LHS_CONT_LINES; @@ -198,7 +191,7 @@ static int paper_height = 60; extern int listing; /* File to output listings to. */ -static FILE * list_file; +static FILE *list_file; /* This static array is used to keep the text of data to be printed before the start of the line. */ @@ -209,13 +202,13 @@ static FILE * list_file; * listing_lhs_cont_lines) \ + 20) -static char * data_buffer; +static char *data_buffer; /* Prototypes. */ static void listing_message PARAMS ((const char *name, const char *message)); -static file_info_type * file_info PARAMS ((const char *file_name)); +static file_info_type *file_info PARAMS ((const char *file_name)); static void new_frag PARAMS ((void)); -static char * buffer_line PARAMS ((file_info_type *file, +static char *buffer_line PARAMS ((file_info_type *file, char *line, unsigned int size)); static void listing_page PARAMS ((list_info_type *list)); static unsigned int calc_hex PARAMS ((list_info_type *list)); @@ -229,18 +222,17 @@ static void print_source PARAMS ((file_info_type *current_file, static int debugging_pseudo PARAMS ((list_info_type *, const char *)); static void listing_listing PARAMS ((char *name)); - static void listing_message (name, message) const char *name; const char *message; { - unsigned int l = strlen (name) + strlen (message) + 1; - char *n = (char *) xmalloc (l); - strcpy (n, name); - strcat (n, message); if (listing_tail != (list_info_type *) NULL) { + unsigned int l = strlen (name) + strlen (message) + 1; + char *n = (char *) xmalloc (l); + strcpy (n, name); + strcat (n, message); listing_tail->message = n; } } @@ -263,7 +255,7 @@ static file_info_type * file_info (file_name) const char *file_name; { - /* Find an entry with this file name */ + /* Find an entry with this file name. */ file_info_type *p = file_info_head; while (p != (file_info_type *) NULL) @@ -273,7 +265,7 @@ file_info (file_name) p = p->next; } - /* Make new entry */ + /* Make new entry. */ p = (file_info_type *) xmalloc (sizeof (file_info_type)); p->next = file_info_head; @@ -287,7 +279,6 @@ file_info (file_name) return p; } - static void new_frag () { @@ -334,7 +325,8 @@ listing_newline (ps) as_where (&file, &line); if (ps == NULL) { - if (line == last_line && !(last_file && file && strcmp (file, last_file))) + if (line == last_line + && !(last_file && file && strcmp (file, last_file))) return; new = (list_info_type *) xmalloc (sizeof (list_info_type)); @@ -346,22 +338,22 @@ listing_newline (ps) same as the one used by input_scrub_new_file(), if that is not true, then this code will fail]. - If we are reading from stdin, then we need to save each input line - here (assuming of course that we actually have a line of input to read), - so that it can be displayed in the listing that is produced at the end - of the assembly. */ + If we are reading from stdin, then we need to save each input + line here (assuming of course that we actually have a line of + input to read), so that it can be displayed in the listing + that is produced at the end of the assembly. */ if (strcmp (file, _("{standard input}")) == 0 && input_line_pointer != NULL) { - char * copy; + char *copy; int len; int seen_quote = 0; for (copy = input_line_pointer - 1; - * copy && (seen_quote - || (! is_end_of_line [(unsigned char) * copy])); - copy ++) - if (* copy == '"' && copy[-1] != '\\') + *copy && (seen_quote + || (! is_end_of_line [(unsigned char) *copy])); + copy++) + if (*copy == '"' && copy[-1] != '\\') seen_quote = ! seen_quote; len = (copy - input_line_pointer) + 2; @@ -370,21 +362,21 @@ listing_newline (ps) if (copy != NULL) { - char * src = input_line_pointer - 1; - char * dest = copy; - + char *src = input_line_pointer - 1; + char *dest = copy; + while (--len) { - unsigned char c = * src ++; + unsigned char c = *src++; /* Omit control characters in the listing. */ if (isascii (c) && ! iscntrl (c)) - * dest ++ = c; + *dest++ = c; } - + *dest = 0; } - + new->line_contents = copy; } else @@ -398,14 +390,14 @@ listing_newline (ps) last_line = line; last_file = file; - + new_frag (); if (listing_tail) listing_tail->next = new; else head = new; - + listing_tail = new; new->frag = frag_now; @@ -417,7 +409,7 @@ listing_newline (ps) new->hll_file = (file_info_type *) NULL; new->hll_line = 0; new->debugging = 0; - + new_frag (); #ifdef OBJ_ELF @@ -464,15 +456,13 @@ listing_prev_line () new_frag (); } -/* - This function returns the next source line from the file supplied, - truncated to size. It appends a fake line to the end of each input - file to make -*/ +/* This function returns the next source line from the file supplied, + truncated to size. It appends a fake line to the end of each input + file to make. */ static char * buffer_line (file, line, size) - file_info_type * file; + file_info_type *file; char *line; unsigned int size; { @@ -481,7 +471,7 @@ buffer_line (file, line, size) char *p = line; - /* If we couldn't open the file, return an empty line */ + /* If we couldn't open the file, return an empty line. */ if (file->at_end) return ""; @@ -501,15 +491,16 @@ buffer_line (file, line, size) file->at_end = 1; return ""; } - + /* Seek to where we were last time this file was open. */ if (file->pos) - fseek(last_open_file, file->pos, SEEK_SET); + fseek (last_open_file, file->pos, SEEK_SET); } c = fgetc (last_open_file); - size -= 1; /* leave room for null */ + /* Leave room for null. */ + size -= 1; while (c != EOF && c != '\n') { @@ -532,23 +523,22 @@ buffer_line (file, line, size) return line; } - static const char *fn; static unsigned int eject; /* Eject pending */ static unsigned int page; /* Current page number */ -static char *title; /* current title */ -static char *subtitle; /* current subtitle */ -static unsigned int on_page; /* number of lines printed on current page */ - +static char *title; /* Current title */ +static char *subtitle; /* Current subtitle */ +static unsigned int on_page; /* Number of lines printed on current page */ static void listing_page (list) list_info_type *list; { /* Grope around, see if we can see a title or subtitle edict coming up - soon (we look down 10 lines of the page and see if it's there)*/ - if ((eject || (on_page >= (unsigned int) paper_height)) && paper_height != 0) + soon. (we look down 10 lines of the page and see if it's there) */ + if ((eject || (on_page >= (unsigned int) paper_height)) + && paper_height != 0) { unsigned int c = 10; int had_title = 0; @@ -572,7 +562,6 @@ listing_page (list) c--; } - if (page > 1) { fprintf (list_file, "\f"); @@ -586,19 +575,18 @@ listing_page (list) } } - static unsigned int calc_hex (list) - list_info_type * list; + list_info_type *list; { int data_buffer_size; list_info_type *first = list; - unsigned int address = ~ (unsigned int) 0; + unsigned int address = ~(unsigned int) 0; fragS *frag; fragS *frag_ptr; unsigned int octet_in_frag; - /* Find first frag which says it belongs to this line */ + /* Find first frag which says it belongs to this line. */ frag = list->frag; while (frag && frag->line != list) frag = frag->fr_next; @@ -607,15 +595,15 @@ calc_hex (list) data_buffer_size = 0; - /* Dump all the frags which belong to this line */ + /* Dump all the frags which belong to this line. */ while (frag_ptr != (fragS *) NULL && frag_ptr->line == first) { - /* Print as many bytes from the fixed part as is sensible */ + /* Print as many bytes from the fixed part as is sensible. */ octet_in_frag = 0; while ((offsetT) octet_in_frag < frag_ptr->fr_fix && data_buffer_size < MAX_BYTES - 3) { - if (address == ~ (unsigned int) 0) + if (address == ~(unsigned int) 0) { address = frag_ptr->fr_address / OCTETS_PER_BYTE; } @@ -626,16 +614,17 @@ calc_hex (list) data_buffer_size += 2; octet_in_frag++; } + if (frag_ptr->fr_type == rs_fill) { unsigned int var_rep_max = octet_in_frag; unsigned int var_rep_idx = octet_in_frag; - /* Print as many bytes from the variable part as is sensible */ + /* Print as many bytes from the variable part as is sensible. */ while (((offsetT) octet_in_frag < (frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset)) && data_buffer_size < MAX_BYTES - 3) { - if (address == ~ (unsigned int) 0) + if (address == ~(unsigned int) 0) { address = frag_ptr->fr_address / OCTETS_PER_BYTE; } @@ -662,11 +651,6 @@ calc_hex (list) return address; } - - - - - static void print_lines (list, lineno, string, address) list_info_type *list; @@ -681,21 +665,21 @@ print_lines (list, lineno, string, address) char *src = data_buffer; int cur; - /* Print the stuff on the first line */ + /* Print the stuff on the first line. */ listing_page (list); nchars = (LISTING_WORD_SIZE * 2 + 1) * listing_lhs_width; - - /* Print the hex for the first line */ - if (address == ~ (unsigned int) 0) + + /* Print the hex for the first line. */ + if (address == ~(unsigned int) 0) { fprintf (list_file, "% 4d ", lineno); for (idx = 0; idx < nchars; idx++) fprintf (list_file, " "); fprintf (list_file, "\t%s\n", string ? string : ""); - - on_page ++; - + + on_page++; + listing_page (0); return; @@ -706,62 +690,61 @@ print_lines (list, lineno, string, address) else fprintf (list_file, "% 4d %04x ", lineno, address); - /* And the data to go along with it */ + /* And the data to go along with it. */ idx = 0; cur = 0; while (src[cur] && idx < nchars) { int offset; offset = cur; - fprintf (list_file, "%c%c", src[offset], src[offset+1]); + fprintf (list_file, "%c%c", src[offset], src[offset + 1]); cur += 2; octet_in_word++; - + if (octet_in_word == LISTING_WORD_SIZE) { fprintf (list_file, " "); idx++; octet_in_word = 0; } - + idx += 2; } - + for (; idx < nchars; idx++) fprintf (list_file, " "); - + fprintf (list_file, "\t%s\n", string ? string : ""); on_page++; listing_page (list); - + if (list->message) { fprintf (list_file, "**** %s\n", list->message); listing_page (list); on_page++; } - + for (lines = 0; lines < (unsigned int) listing_lhs_cont_lines && src[cur]; - lines ++) + lines++) { - nchars = ((LISTING_WORD_SIZE * 2) + 1) - * listing_lhs_width_second - 1; + nchars = ((LISTING_WORD_SIZE * 2) + 1) * listing_lhs_width_second - 1; idx = 0; - - /* Print any more lines of data, but more compactly */ + + /* Print any more lines of data, but more compactly. */ fprintf (list_file, "% 4d ", lineno); - + while (src[cur] && idx < nchars) { - int offset; - offset = cur; - fprintf (list_file, "%c%c", src[offset], src[offset+1]); + int offset; + offset = cur; + fprintf (list_file, "%c%c", src[offset], src[offset + 1]); cur += 2; idx += 2; octet_in_word++; - + if (octet_in_word == LISTING_WORD_SIZE) { fprintf (list_file, " "); @@ -769,14 +752,13 @@ print_lines (list, lineno, string, address) octet_in_word = 0; } } - + fprintf (list_file, "\n"); - on_page ++; + on_page++; listing_page (list); } } - static void list_symbol_table () { @@ -841,7 +823,7 @@ list_symbol_table () buf, S_GET_NAME (ptr)); } - on_page ++; + on_page++; listing_page (0); } } @@ -1008,7 +990,6 @@ listing_listing (name) list = head->next; - while (list) { unsigned int list_line; @@ -1027,6 +1008,8 @@ listing_listing (name) show_listing--; break; case EDICT_NOLIST_NEXT: + if (show_listing == 0) + list_line--; break; case EDICT_EJECT: break; @@ -1049,7 +1032,8 @@ listing_listing (name) p = buffer_line (list->file, buffer, width); } - if (list->edict == EDICT_LIST) + if (list->edict == EDICT_LIST + || (list->edict == EDICT_NOLIST_NEXT && show_listing == 0)) { /* Enable listing for the single line that caused the enable. */ list_line++; @@ -1094,7 +1078,7 @@ listing_listing (name) p = buffer_line (list->file, buffer, width); if (list->file->linenum < list_line) - address = ~ (unsigned int) 0; + address = ~(unsigned int) 0; else address = calc_hex (list); @@ -1110,7 +1094,7 @@ listing_listing (name) } } - if (list->edict == EDICT_NOLIST_NEXT) + if (list->edict == EDICT_NOLIST_NEXT && show_listing == 1) --show_listing; list = list->next; @@ -1126,7 +1110,7 @@ listing_print (name) char *name; { int using_stdout; - + title = ""; subtitle = ""; @@ -1175,7 +1159,6 @@ listing_print (name) } } - void listing_file (name) const char *name; @@ -1235,7 +1218,6 @@ listing_list (on) } } - void listing_psize (width_only) int width_only; @@ -1324,8 +1306,6 @@ listing_title (depth) } } - - void listing_source_line (line) unsigned int line; @@ -1346,12 +1326,9 @@ listing_source_file (file) listing_tail->hll_file = file_info (file); } - - #else - -/* Dummy functions for when compiled without listing enabled */ +/* Dummy functions for when compiled without listing enabled. */ void listing_flags (ignore) @@ -1360,21 +1337,21 @@ listing_flags (ignore) s_ignore (0); } -void +void listing_list (on) int on; { s_ignore (0); } -void +void listing_eject (ignore) int ignore; { s_ignore (0); } -void +void listing_psize (ignore) int ignore; { @@ -1388,7 +1365,7 @@ listing_nopage (ignore) s_ignore (0); } -void +void listing_title (depth) int depth; { @@ -1402,20 +1379,21 @@ listing_file (name) } -void +void listing_newline (name) char *name; { } -void +void listing_source_line (n) unsigned int n; { } -void + +void listing_source_file (n) const char *n; { diff --git a/contrib/binutils/gas/literal.c b/contrib/binutils/gas/literal.c index a3f8fc4..f3ccce3 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 Free Software Foundation, Inc. + Copyright (C) 1994, 2000 Free Software Foundation, Inc. Written by Ken Raeburn (raeburn@cygnus.com). This file is part of GAS, the GNU Assembler. @@ -16,7 +16,7 @@ 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. */ + the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This isn't quite a "constant" pool. Some of the values may get adjusted at run time, e.g., for symbolic relocations when shared diff --git a/contrib/binutils/gas/macro.c b/contrib/binutils/gas/macro.c index 12a757e..74a17ff 100644 --- a/contrib/binutils/gas/macro.c +++ b/contrib/binutils/gas/macro.c @@ -1,5 +1,6 @@ /* macro.c - macro support for gas and gasp - Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com @@ -19,7 +20,7 @@ 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. */ + 02111-1307, USA. */ #include "config.h" @@ -172,7 +173,7 @@ buffer_and_nest (from, to, ptr, get_line) while (more) { - /* Try and find the first pseudo op on the line */ + /* Try and find the first pseudo op on the line. */ int i = line_start; if (! macro_alternate && ! macro_mri) @@ -180,26 +181,26 @@ buffer_and_nest (from, to, ptr, get_line) /* With normal syntax we can suck what we want till we get to the dot. With the alternate, labels have to start in the first column, since we cant tell what's a label and - whats a pseudoop */ + whats a pseudoop. */ - /* Skip leading whitespace */ + /* Skip leading whitespace. */ while (i < ptr->len && ISWHITE (ptr->ptr[i])) i++; - /* Skip over a label */ + /* Skip over a label. */ while (i < ptr->len && (isalnum ((unsigned char) ptr->ptr[i]) || ptr->ptr[i] == '_' || ptr->ptr[i] == '$')) i++; - /* And a colon */ + /* And a colon. */ if (i < ptr->len && ptr->ptr[i] == ':') i++; } - /* Skip trailing whitespace */ + /* Skip trailing whitespace. */ while (i < ptr->len && ISWHITE (ptr->ptr[i])) i++; @@ -208,24 +209,26 @@ buffer_and_nest (from, to, ptr, get_line) || macro_mri)) { if (ptr->ptr[i] == '.') - i++; + i++; if (strncasecmp (ptr->ptr + i, from, from_len) == 0 - && (ptr->len == (i + from_len) || ! isalnum (ptr->ptr[i + from_len]))) + && (ptr->len == (i + from_len) + || ! isalnum (ptr->ptr[i + from_len]))) depth++; if (strncasecmp (ptr->ptr + i, to, to_len) == 0 - && (ptr->len == (i + to_len) || ! isalnum (ptr->ptr[i + to_len]))) + && (ptr->len == (i + to_len) + || ! isalnum (ptr->ptr[i + to_len]))) { depth--; if (depth == 0) { - /* Reset the string to not include the ending rune */ + /* Reset the string to not include the ending rune. */ ptr->len = line_start; break; } } } - /* Add a CR to the end and keep running */ + /* Add a CR to the end and keep running. */ sb_add_char (ptr, '\n'); line_start = ptr->len; more = get_line (ptr); @@ -257,7 +260,7 @@ get_token (idx, in, name) sb_add_char (name, in->ptr[idx++]); } } - /* Ignore trailing & */ + /* Ignore trailing &. */ if (macro_alternate && idx < in->len && in->ptr[idx] == '&') idx++; return idx; @@ -274,7 +277,7 @@ getstring (idx, in, acc) idx = sb_skip_white (idx, in); while (idx < in->len - && (in->ptr[idx] == '"' + && (in->ptr[idx] == '"' || (in->ptr[idx] == '<' && (macro_alternate || macro_mri)) || (in->ptr[idx] == '\'' && macro_alternate))) { @@ -287,7 +290,7 @@ getstring (idx, in, acc) { if (in->ptr[idx] == '!') { - idx++ ; + idx++; sb_add_char (acc, in->ptr[idx++]); } else @@ -304,29 +307,47 @@ getstring (idx, in, acc) else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { char tchar = in->ptr[idx]; + int escaped = 0; + idx++; + while (idx < in->len) { + if (in->ptr[idx - 1] == '\\') + escaped ^= 1; + else + escaped = 0; + if (macro_alternate && in->ptr[idx] == '!') { - idx++ ; - sb_add_char (acc, in->ptr[idx++]); + idx ++; + + sb_add_char (acc, in->ptr[idx]); + + idx ++; + } + else if (escaped && in->ptr[idx] == tchar) + { + sb_add_char (acc, tchar); + idx ++; } else { if (in->ptr[idx] == tchar) { - idx++; + idx ++; + if (idx >= in->len || in->ptr[idx] != tchar) break; } + sb_add_char (acc, in->ptr[idx]); - idx++; + idx ++; } } } } - + return idx; } @@ -351,7 +372,7 @@ get_any_string (idx, in, out, expand, pretend_quoted) if (idx < in->len) { - if (in->len > 2 && in->ptr[idx+1] == '\'' && ISBASE (in->ptr[idx])) + if (in->len > 2 && in->ptr[idx + 1] == '\'' && ISBASE (in->ptr[idx])) { while (!ISSEP (in->ptr[idx])) sb_add_char (out, in->ptr[idx++]); @@ -362,7 +383,7 @@ get_any_string (idx, in, out, expand, pretend_quoted) { int val; char buf[20]; - /* Turns the next expression into a string */ + /* Turns the next expression into a string. */ idx = (*macro_expr) (_("% operator needs absolute expression"), idx + 1, in, @@ -378,39 +399,39 @@ get_any_string (idx, in, out, expand, pretend_quoted) && ! macro_strip_at && expand) { - /* Keep the quotes */ - sb_add_char (out, '\"'); + /* Keep the quotes. */ + sb_add_char (out, '\"'); idx = getstring (idx, in, out); - sb_add_char (out, '\"'); + sb_add_char (out, '\"'); } else { idx = getstring (idx, in, out); } } - else + else { - while (idx < in->len + while (idx < in->len && (in->ptr[idx] == '"' || in->ptr[idx] == '\'' - || pretend_quoted + || pretend_quoted || (in->ptr[idx] != ' ' && in->ptr[idx] != '\t' && in->ptr[idx] != ',' && (in->ptr[idx] != '<' || (! macro_alternate && ! macro_mri))))) { - if (in->ptr[idx] == '"' + if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { char tchar = in->ptr[idx]; sb_add_char (out, in->ptr[idx++]); while (idx < in->len && in->ptr[idx] != tchar) - sb_add_char (out, in->ptr[idx++]); + sb_add_char (out, in->ptr[idx++]); if (idx == in->len) - return idx; + return idx; } sb_add_char (out, in->ptr[idx++]); } @@ -449,15 +470,15 @@ do_formals (macro, idx, in) idx = sb_skip_white (idx, in); if (formal->name.len) { - /* This is a formal */ + /* This is a formal. */ if (idx < in->len && in->ptr[idx] == '=') { - /* Got a default */ + /* Got a default. */ idx = get_any_string (idx + 1, in, &formal->def, 1, 0); } } - /* Add to macro's hash table */ + /* Add to macro's hash table. */ hash_jam (macro->formal_hash, sb_terminate (&formal->name), formal); formal->index = macro->formal_count; @@ -490,7 +511,7 @@ do_formals (macro, idx, in) sb_add_string (&formal->name, name); - /* Add to macro's hash table */ + /* Add to macro's hash table. */ hash_jam (macro->formal_hash, name, formal); formal->index = NARG_INDEX; @@ -532,14 +553,14 @@ define_macro (idx, in, label, get_line, namep) sb_add_sb (&name, label); if (idx < in->len && in->ptr[idx] == '(') { - /* It's the label: MACRO (formals,...) sort */ + /* It's the label: MACRO (formals,...) sort */ idx = do_formals (macro, idx + 1, in); if (in->ptr[idx] != ')') return _("missing ) after formals"); } else { - /* It's the label: MACRO formals,... sort */ + /* It's the label: MACRO formals,... sort */ idx = do_formals (macro, idx, in); } } @@ -550,7 +571,7 @@ define_macro (idx, in, label, get_line, namep) idx = do_formals (macro, idx, in); } - /* and stick it in the macro hash table */ + /* And stick it in the macro hash table. */ for (idx = 0; idx < name.len; idx++) if (isupper ((unsigned char) name.ptr[idx])) name.ptr[idx] = tolower (name.ptr[idx]); @@ -627,7 +648,7 @@ sub_actual (start, in, t, formal_hash, kind, out, copyifnotthere) { sb_add_sb (out, t); } - else + else { sb_add_char (out, '\\'); sb_add_sb (out, t); @@ -676,14 +697,14 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals) src++; if (in->ptr[src] == comment_char && comment_char != '\0') { - /* This is a comment, just drop the rest of the line */ + /* This is a comment, just drop the rest of the line. */ while (src < in->len && in->ptr[src] != '\n') src++; } else if (in->ptr[src] == '(') { - /* Sub in till the next ')' literally */ + /* Sub in till the next ')' literally. */ src++; while (src < in->len && in->ptr[src] != ')') { @@ -696,17 +717,17 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals) } else if (in->ptr[src] == '@') { - /* Sub in the macro invocation number */ + /* Sub in the macro invocation number. */ char buffer[10]; src++; - sprintf (buffer, "%05d", macro_number); + sprintf (buffer, "%d", macro_number); sb_add_string (out, buffer); } else if (in->ptr[src] == '&') { /* This is a preprocessor variable name, we don't do them - here */ + here. */ sb_add_char (out, '\\'); sb_add_char (out, '&'); src++; @@ -901,10 +922,10 @@ macro_expand (idx, in, m, out, comment_char) const char *err; sb_new (&t); - - /* Reset any old value the actuals may have */ + + /* Reset any old value the actuals may have. */ for (f = m->formals; f; f = f->next) - sb_reset (&f->actual); + sb_reset (&f->actual); f = m->formals; while (f != NULL && f->index < 0) f = f->next; @@ -930,13 +951,13 @@ macro_expand (idx, in, m, out, comment_char) } } - /* Peel off the actuals and store them away in the hash tables' actuals */ + /* Peel off the actuals and store them away in the hash tables' actuals. */ idx = sb_skip_white (idx, in); while (idx < in->len && in->ptr[idx] != comment_char) { int scan; - /* Look and see if it's a positional or keyword arg */ + /* Look and see if it's a positional or keyword arg. */ scan = idx; while (scan < in->len && !ISSEP (in->ptr[scan]) @@ -950,19 +971,19 @@ macro_expand (idx, in, m, out, comment_char) /* It's OK to go from positional to keyword. */ /* This is a keyword arg, fetch the formal name and - then the actual stuff */ + then the actual stuff. */ sb_reset (&t); idx = get_token (idx, in, &t); if (in->ptr[idx] != '=') return _("confusion in formal parameters"); - /* Lookup the formal in the macro's list */ + /* Lookup the formal in the macro's list. */ ptr = (formal_entry *) hash_find (m->formal_hash, sb_terminate (&t)); if (!ptr) return _("macro formal argument does not exist"); else { - /* Insert this value into the right place */ + /* Insert this value into the right place. */ sb_reset (&ptr->actual); idx = get_any_string (idx + 1, in, &ptr->actual, 0, 0); if (ptr->actual.len > 0) @@ -971,7 +992,7 @@ macro_expand (idx, in, m, out, comment_char) } else { - /* This is a positional arg */ + /* This is a positional arg. */ is_positional = 1; if (is_keyword) return _("can't mix positional and keyword arguments"); @@ -1118,7 +1139,7 @@ check_macro (line, expand, comment_char, error, info) sb_kill (&line_sb); - /* export the macro information if requested */ + /* Export the macro information if requested. */ if (info) *info = macro; @@ -1163,7 +1184,7 @@ expand_irp (irpc, idx, in, out, get_line, comment_char) sb_new (&sub); if (! buffer_and_nest (mn, "ENDR", &sub, get_line)) return _("unexpected end of file in irp or irpc"); - + sb_new (&f.name); sb_new (&f.def); sb_new (&f.actual); diff --git a/contrib/binutils/gas/macro.h b/contrib/binutils/gas/macro.h index 9c61acd..030fc91 100644 --- a/contrib/binutils/gas/macro.h +++ b/contrib/binutils/gas/macro.h @@ -1,5 +1,5 @@ /* macro.h - header file for macro support for gas and gasp - Copyright (C) 1994, 95, 96, 97, 1998 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com @@ -19,7 +19,7 @@ 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. */ + 02111-1307, USA. */ #ifndef MACRO_H @@ -28,41 +28,37 @@ #include "ansidecl.h" #include "sb.h" -/* Structures used to store macros. +/* Structures used to store macros. Each macro knows its name and included text. It gets built with a list of formal arguments, and also keeps a hash table which points into the list to speed up formal search. Each formal knows its name and its default value. Each time the macro is expanded, the - formals get the actual values attatched to them. */ + formals get the actual values attatched to them. */ /* describe the formal arguments to a macro */ -typedef struct formal_struct - { - struct formal_struct *next; /* next formal in list */ - sb name; /* name of the formal */ - sb def; /* the default value */ - sb actual; /* the actual argument (changed on each expansion) */ - int index; /* the index of the formal 0..formal_count-1 */ - } -formal_entry; +typedef struct formal_struct { + struct formal_struct *next; /* next formal in list */ + sb name; /* name of the formal */ + sb def; /* the default value */ + sb actual; /* the actual argument (changed on each expansion) */ + int index; /* the index of the formal 0..formal_count-1 */ +} formal_entry; /* Other values found in the index field of a formal_entry. */ #define QUAL_INDEX (-1) #define NARG_INDEX (-2) #define LOCAL_INDEX (-3) -/* describe the macro. */ +/* describe the macro. */ -typedef struct macro_struct - { - sb sub; /* substitution text. */ - int formal_count; /* number of formal args. */ - formal_entry *formals; /* pointer to list of formal_structs */ - struct hash_control *formal_hash; /* hash table of formals. */ - } -macro_entry; +typedef struct macro_struct { + sb sub; /* substitution text. */ + int formal_count; /* number of formal args. */ + formal_entry *formals; /* pointer to list of formal_structs */ + struct hash_control *formal_hash; /* hash table of formals. */ +} macro_entry; /* Whether any macros have been defined. */ @@ -81,7 +77,7 @@ extern void macro_mri_mode PARAMS ((int)); extern const char *define_macro PARAMS ((int idx, sb *in, sb *label, int (*get_line) PARAMS ((sb *)), const char **namep)); -extern int check_macro PARAMS ((const char *, sb *, int, const char **, +extern int check_macro PARAMS ((const char *, sb *, int, const char **, macro_entry **)); extern void delete_macro PARAMS ((const char *)); extern const char *expand_irp diff --git a/contrib/binutils/gas/messages.c b/contrib/binutils/gas/messages.c index e4b7ad0..e342673 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, 1998 + Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 98, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -16,7 +16,7 @@ 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. */ + 02111-1307, USA. */ #include "as.h" @@ -47,8 +47,7 @@ static void as_show_where PARAMS ((void)); static void as_warn_internal PARAMS ((char *, unsigned int, char *)); static void as_bad_internal PARAMS ((char *, unsigned int, char *)); -/* - * Despite the rest of the comments in this file, (FIXME-SOON), +/* Despite the rest of the comments in this file, (FIXME-SOON), * here is the current scheme for error messages etc: * * as_fatal() is used when gas is quite confused and @@ -105,26 +104,26 @@ identify (file) fprintf (stderr, _("Assembler messages:\n")); } -static int warning_count; /* Count of number of warnings issued */ +/* The number of warnings issued. */ +static int warning_count; -int +int had_warnings () { return (warning_count); } /* Nonzero if we've hit a 'bad error', and should not write an obj file, - and exit with a nonzero error code */ + and exit with a nonzero error code. */ static int error_count; -int +int had_errors () { return (error_count); } - /* Print the current location to stderr. */ static void @@ -139,15 +138,11 @@ as_show_where () fprintf (stderr, "%s:%u: ", file, line); } -/* - * a s _ p e r r o r - * - * Like perror(3), but with more info. - */ +/* Like perror(3), but with more info. */ -void +void as_perror (gripe, filename) - const char *gripe; /* Unpunctuated error theme. */ + const char *gripe; /* Unpunctuated error theme. */ const char *filename; { const char *errtxt; @@ -166,18 +161,15 @@ as_perror (gripe, filename) #endif } -/* - * a s _ t s k t s k () - * - * Send to stderr a string as a warning, and locate warning - * in input file(s). - * Please only use this for when we have some recovery action. - * Please explain in string (which may have '\n's) what recovery was done. - */ +/* Send to stderr a string as a warning, and locate warning + in input file(s). + Please only use this for when we have some recovery action. + Please explain in string (which may have '\n's) what recovery was + done. */ #ifdef USE_STDARG -void -as_tsktsk (const char *format,...) +void +as_tsktsk (const char *format, ...) { va_list args; @@ -186,9 +178,9 @@ as_tsktsk (const char *format,...) vfprintf (stderr, format, args); va_end (args); (void) putc ('\n', stderr); -} /* as_tsktsk() */ +} #else -void +void as_tsktsk (format, va_alist) const char *format; va_dcl @@ -200,7 +192,7 @@ as_tsktsk (format, va_alist) vfprintf (stderr, format, args); va_end (args); (void) putc ('\n', stderr); -} /* as_tsktsk() */ +} #endif /* not NO_STDARG */ /* The common portion of as_warn and as_warn_where. */ @@ -227,18 +219,15 @@ as_warn_internal (file, line, buffer) #endif } -/* - * a s _ w a r n () - * - * Send to stderr a string as a warning, and locate warning - * in input file(s). - * Please only use this for when we have some recovery action. - * Please explain in string (which may have '\n's) what recovery was done. - */ +/* Send to stderr a string as a warning, and locate warning + in input file(s). + Please only use this for when we have some recovery action. + Please explain in string (which may have '\n's) what recovery was + done. */ #ifdef USE_STDARG -void -as_warn (const char *format,...) +void +as_warn (const char *format, ...) { va_list args; char buffer[2000]; @@ -250,10 +239,9 @@ as_warn (const char *format,...) va_end (args); as_warn_internal ((char *) NULL, 0, buffer); } -} /* as_warn() */ +} #else -/*VARARGS1 */ -void +void as_warn (format, va_alist) const char *format; va_dcl @@ -268,16 +256,16 @@ as_warn (format, va_alist) va_end (args); as_warn_internal ((char *) NULL, 0, buffer); } -} /* as_warn() */ +} #endif /* not NO_STDARG */ -/* as_warn_where, like as_bad but the file name and line number are - passed in. Unfortunately, we have to repeat the function in order - to handle the varargs correctly and portably. */ +/* Like as_bad but the file name and line number are passed in. + Unfortunately, we have to repeat the function in order to handle + the varargs correctly and portably. */ #ifdef USE_STDARG -void -as_warn_where (char *file, unsigned int line, const char *format,...) +void +as_warn_where (char *file, unsigned int line, const char *format, ...) { va_list args; char buffer[2000]; @@ -289,10 +277,9 @@ as_warn_where (char *file, unsigned int line, const char *format,...) va_end (args); as_warn_internal (file, line, buffer); } -} /* as_warn() */ +} #else -/*VARARGS1 */ -void +void as_warn_where (file, line, format, va_alist) char *file; unsigned int line; @@ -309,7 +296,7 @@ as_warn_where (file, line, format, va_alist) va_end (args); as_warn_internal (file, line, buffer); } -} /* as_warn() */ +} #endif /* not NO_STDARG */ /* The common portion of as_bad and as_bad_where. */ @@ -336,18 +323,15 @@ as_bad_internal (file, line, buffer) #endif } -/* - * a s _ b a d () - * - * Send to stderr a string as a warning, and locate warning in input file(s). - * Please us when there is no recovery, but we want to continue processing - * but not produce an object file. - * Please explain in string (which may have '\n's) what recovery was done. - */ +/* Send to stderr a string as a warning, and locate warning in input + file(s). Please us when there is no recovery, but we want to + continue processing but not produce an object file. + Please explain in string (which may have '\n's) what recovery was + done. */ #ifdef USE_STDARG -void -as_bad (const char *format,...) +void +as_bad (const char *format, ...) { va_list args; char buffer[2000]; @@ -360,8 +344,7 @@ as_bad (const char *format,...) } #else -/*VARARGS1 */ -void +void as_bad (format, va_alist) const char *format; va_dcl @@ -377,13 +360,13 @@ as_bad (format, va_alist) } #endif /* not NO_STDARG */ -/* as_bad_where, like as_bad but the file name and line number are - passed in. Unfortunately, we have to repeat the function in order - to handle the varargs correctly and portably. */ +/* Like as_bad but the file name and line number are passed in. + Unfortunately, we have to repeat the function in order to handle + the varargs correctly and portably. */ #ifdef USE_STDARG -void -as_bad_where (char *file, unsigned int line, const char *format,...) +void +as_bad_where (char *file, unsigned int line, const char *format, ...) { va_list args; char buffer[2000]; @@ -396,8 +379,7 @@ as_bad_where (char *file, unsigned int line, const char *format,...) } #else -/*VARARGS1 */ -void +void as_bad_where (file, line, format, va_alist) char *file; unsigned int line; @@ -415,18 +397,14 @@ as_bad_where (file, line, format, va_alist) } #endif /* not NO_STDARG */ -/* - * a s _ f a t a l () - * - * Send to stderr a string as a fatal message, and print location of error in - * input file(s). - * Please only use this for when we DON'T have some recovery action. - * It xexit()s with a warning status. - */ +/* Send to stderr a string as a fatal message, and print location of + error in input file(s). + Please only use this for when we DON'T have some recovery action. + It xexit()s with a warning status. */ #ifdef USE_STDARG -void -as_fatal (const char *format,...) +void +as_fatal (const char *format, ...) { va_list args; @@ -436,11 +414,14 @@ as_fatal (const char *format,...) vfprintf (stderr, format, args); (void) putc ('\n', stderr); va_end (args); + /* Delete the output file, if it exists. This will prevent make from + thinking that a file was created and hence does not need rebuilding. */ + if (out_file_name != NULL) + unlink (out_file_name); xexit (EXIT_FAILURE); -} /* as_fatal() */ +} #else -/*VARARGS1*/ -void +void as_fatal (format, va_alist) char *format; va_dcl @@ -454,13 +435,11 @@ as_fatal (format, va_alist) (void) putc ('\n', stderr); va_end (args); xexit (EXIT_FAILURE); -} /* as_fatal() */ +} #endif /* not NO_STDARG */ -/* - * as_assert: Indicate assertion failure. - * Arguments: Filename, line number, optional function name. - */ +/* Indicate assertion failure. + Arguments: Filename, line number, optional function name. */ void as_assert (file, line, fn) @@ -480,6 +459,7 @@ as_assert (file, line, fn) /* as_abort: Print a friendly message saying how totally hosed we are, and exit without producing a core file. */ + void as_abort (file, line, fn) const char *file, *fn; @@ -537,5 +517,3 @@ sprint_value (buf, val) #endif abort (); } - -/* end of messages.c */ diff --git a/contrib/binutils/gas/obj.h b/contrib/binutils/gas/obj.h index 7fe5551..4c9759f 100644 --- a/contrib/binutils/gas/obj.h +++ b/contrib/binutils/gas/obj.h @@ -50,18 +50,27 @@ struct format_ops { int flavor; unsigned dfl_leading_underscore : 1; unsigned emit_section_symbols : 1; + void (*begin) PARAMS ((void)); + void (*app_file) PARAMS ((const char *)); void (*frob_symbol) PARAMS ((symbolS *, int *)); void (*frob_file) PARAMS ((void)); + void (*frob_file_before_adjust) PARAMS ((void)); void (*frob_file_after_relocs) PARAMS ((void)); bfd_vma (*s_get_size) PARAMS ((symbolS *)); void (*s_set_size) PARAMS ((symbolS *, bfd_vma)); bfd_vma (*s_get_align) PARAMS ((symbolS *)); void (*s_set_align) PARAMS ((symbolS *, bfd_vma)); int (*s_get_other) PARAMS ((symbolS *)); + void (*s_set_other) PARAMS ((symbolS *, int)); int (*s_get_desc) PARAMS ((symbolS *)); + void (*s_set_desc) PARAMS ((symbolS *, int)); + int (*s_get_type) PARAMS ((symbolS *)); + void (*s_set_type) PARAMS ((symbolS *, int)); void (*copy_symbol_attributes) PARAMS ((symbolS *, symbolS *)); void (*generate_asm_lineno) PARAMS ((void)); void (*process_stab) PARAMS ((segT, int, const char *, int, int, int)); + int (*separate_stab_sections) PARAMS ((void)); + void (*init_stab_section) PARAMS ((segT)); int (*sec_sym_ok_for_reloc) PARAMS ((asection *)); void (*pop_insert) PARAMS ((void)); /* For configurations using ECOFF_DEBUGGING, this callback is used. */ diff --git a/contrib/binutils/gas/po/POTFILES.in b/contrib/binutils/gas/po/POTFILES.in index b4d0125..30dab30 100644 --- a/contrib/binutils/gas/po/POTFILES.in +++ b/contrib/binutils/gas/po/POTFILES.in @@ -13,6 +13,8 @@ bit_fix.h cgen.h cond.c cond.c +config/e-crisaout.c +config/e-criself.c config/e-i386aout.c config/e-i386coff.c config/e-i386elf.c @@ -46,6 +48,10 @@ config/tc-arc.c config/tc-arc.h config/tc-arm.c config/tc-arm.h +config/tc-avr.c +config/tc-avr.h +config/tc-cris.c +config/tc-cris.h config/tc-d10v.c config/tc-d10v.h config/tc-d30v.c @@ -66,8 +72,12 @@ config/tc-i860.c config/tc-i860.h config/tc-i960.c config/tc-i960.h +config/tc-ia64.c +config/tc-ia64.h config/tc-m32r.c config/tc-m32r.h +config/tc-m68hc11.c +config/tc-m68hc11.h config/tc-m68k.c config/tc-m68k.h config/tc-m88k.c @@ -94,6 +104,8 @@ config/tc-tahoe.c config/tc-tahoe.h config/tc-tic30.c config/tc-tic30.h +config/tc-tic54x.c +config/tc-tic54x.h config/tc-tic80.c config/tc-tic80.h config/tc-v850.c diff --git a/contrib/binutils/gas/po/gas.pot b/contrib/binutils/gas/po/gas.pot index 4a2cd86..4428b64 100644 --- a/contrib/binutils/gas/po/gas.pot +++ b/contrib/binutils/gas/po/gas.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-04-05 14:09+0930\n" +"POT-Creation-Date: 2001-01-11 12:04-0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -14,76 +14,76 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: ENCODING\n" -#: app.c:466 app.c:480 +#: app.c:464 app.c:478 msgid "end of file in comment" msgstr "" -#: app.c:559 +#: app.c:557 msgid "end of file in string: inserted '\"'" msgstr "" -#: app.c:625 +#: app.c:623 #, c-format msgid "Unknown escape '\\%c' in string: Ignored" msgstr "" -#: app.c:634 +#: app.c:632 msgid "End of file in string: '\"' inserted" msgstr "" -#: app.c:754 +#: app.c:752 msgid "end of file not at end of a line; newline inserted" msgstr "" -#: app.c:911 +#: app.c:910 msgid "end of file in multiline comment" msgstr "" -#: app.c:960 +#: app.c:974 msgid "end of file after a one-character quote; \\0 inserted" msgstr "" -#: app.c:968 +#: app.c:982 msgid "end of file in escape character" msgstr "" -#: app.c:980 +#: app.c:994 msgid "Missing close quote: (assumed)" msgstr "" -#: app.c:1043 app.c:1097 app.c:1166 +#: app.c:1057 app.c:1111 app.c:1186 msgid "end of file in comment; newline inserted" msgstr "" -#: app.c:1107 +#: app.c:1121 msgid "EOF in Comment: Newline inserted" msgstr "" -#: as.c:148 +#: as.c:147 msgid "missing emulation mode name" msgstr "" -#: as.c:163 +#: as.c:162 #, c-format msgid "unrecognized emulation name `%s'" msgstr "" -#: as.c:210 +#: as.c:209 #, c-format msgid "GNU assembler version %s (%s) using BFD version %s" msgstr "" -#: as.c:213 +#: as.c:212 #, c-format msgid "GNU assembler version %s (%s)" msgstr "" -#: as.c:222 +#: as.c:221 #, c-format msgid "Usage: %s [option...] [asmfile...]\n" msgstr "" -#: as.c:224 +#: as.c:223 msgid "" "Options:\n" " -a[sub-option...]\t turn on listings\n" @@ -100,135 +100,139 @@ msgid "" " \t =FILE list to FILE (must be last sub-option)\n" msgstr "" -#: as.c:238 +#: as.c:237 msgid " -D produce assembler debugging messages\n" msgstr "" -#: as.c:240 +#: as.c:239 msgid " --defsym SYM=VAL define symbol SYM to given value\n" msgstr "" -#: as.c:256 +#: as.c:255 #, c-format msgid " emulate output (default %s)\n" msgstr "" -#: as.c:260 +#: as.c:259 msgid " -f skip whitespace and comment preprocessing\n" msgstr "" -#: as.c:262 +#: as.c:261 msgid " --gstabs generate stabs debugging information\n" msgstr "" -#: as.c:264 +#: as.c:263 msgid " --gdwarf2 generate DWARF2 debugging information\n" msgstr "" -#: as.c:266 +#: as.c:265 msgid " --help show this message and exit\n" msgstr "" -#: as.c:268 +#: as.c:267 +msgid " --target-help show target specific options\n" +msgstr "" + +#: as.c:269 msgid "" " -I DIR add DIR to search list for .include directives\n" msgstr "" -#: as.c:270 +#: as.c:271 msgid " -J don't warn about signed overflow\n" msgstr "" -#: as.c:272 +#: as.c:273 msgid "" " -K warn when differences altered for long " "displacements\n" msgstr "" -#: as.c:274 +#: as.c:275 msgid " -L,--keep-locals keep local symbols (e.g. starting with `L')\n" msgstr "" -#: as.c:276 +#: as.c:277 msgid " -M,--mri assemble in MRI compatibility mode\n" msgstr "" -#: as.c:278 +#: as.c:279 msgid "" " --MD FILE write dependency information in FILE (default " "none)\n" msgstr "" -#: as.c:280 +#: as.c:281 msgid " -nocpp ignored\n" msgstr "" -#: as.c:282 +#: as.c:283 msgid "" " -o OBJFILE name the object-file output OBJFILE (default " "a.out)\n" msgstr "" -#: as.c:284 +#: as.c:285 msgid " -R fold data section into text section\n" msgstr "" -#: as.c:286 +#: as.c:287 msgid "" " --statistics print various measured statistics from execution\n" msgstr "" -#: as.c:288 +#: as.c:289 msgid " --strip-local-absolute strip local absolute symbols\n" msgstr "" -#: as.c:290 +#: as.c:291 msgid "" " --traditional-format Use same format as native assembler when possible\n" msgstr "" -#: as.c:292 +#: as.c:293 msgid " --version print assembler version number and exit\n" msgstr "" -#: as.c:294 +#: as.c:295 msgid " -W --no-warn suppress warnings\n" msgstr "" -#: as.c:296 +#: as.c:297 msgid " --warn don't suppress warnings\n" msgstr "" -#: as.c:298 +#: as.c:299 msgid " --fatal-warnings treat warnings as errors\n" msgstr "" -#: as.c:300 +#: as.c:301 msgid "" " --itbl INSTTBL extend instruction set to include instructions\n" " matching the specifications defined in file " "INSTTBL\n" msgstr "" -#: as.c:303 +#: as.c:304 msgid " -w ignored\n" msgstr "" -#: as.c:305 +#: as.c:306 msgid " -X ignored\n" msgstr "" -#: as.c:307 +#: as.c:308 msgid " -Z generate object file even after errors\n" msgstr "" -#: as.c:309 +#: as.c:310 msgid "" " --listing-lhs-width set the width in words of the output data column " "of\n" " the listing\n" msgstr "" -#: as.c:312 +#: as.c:313 msgid "" " --listing-lhs-width2 set the width in words of the continuation lines\n" " of the output data column; ignored if smaller " @@ -236,398 +240,408 @@ msgid "" " the width of the first line\n" msgstr "" -#: as.c:316 +#: as.c:317 msgid "" " --listing-rhs-width set the max width in characters of the lines from\n" " the source file\n" msgstr "" -#: as.c:319 +#: as.c:320 msgid "" " --listing-cont-lines set the maximum number of continuation lines used\n" " for the output data column of the listing\n" msgstr "" -#: as.c:326 gasp.c:3554 +#: as.c:327 gasp.c:3527 #, c-format msgid "Report bugs to %s\n" msgstr "" #. This output is intended to follow the GNU standards document. -#: as.c:516 +#: as.c:527 #, c-format msgid "GNU assembler %s\n" msgstr "" -#: as.c:517 -msgid "Copyright 1997 Free Software Foundation, Inc.\n" +#: as.c:528 +msgid "Copyright 2000 Free Software Foundation, Inc.\n" msgstr "" -#: as.c:518 gasp.c:3648 +#: as.c:529 gasp.c:3621 msgid "" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty.\n" msgstr "" -#: as.c:521 +#: as.c:532 #, c-format msgid "This assembler was configured for a target of `%s'.\n" msgstr "" -#: as.c:528 +#: as.c:539 msgid "multiple emulation names specified" msgstr "" -#: as.c:530 +#: as.c:541 msgid "emulations not handled in this configuration" msgstr "" -#: as.c:535 +#: as.c:546 #, c-format msgid "alias = %s\n" msgstr "" -#: as.c:536 +#: as.c:547 #, c-format msgid "canonical = %s\n" msgstr "" -#: as.c:537 +#: as.c:548 #, c-format msgid "cpu-type = %s\n" msgstr "" -#: as.c:539 +#: as.c:550 #, c-format msgid "format = %s\n" msgstr "" -#: as.c:542 +#: as.c:553 #, c-format msgid "bfd-target = %s\n" msgstr "" -#: as.c:555 +#: as.c:566 msgid "bad defsym; format is --defsym name=value" msgstr "" -#: as.c:575 +#: as.c:590 msgid "No file name following -t option\n" msgstr "" -#: as.c:591 +#: as.c:606 #, c-format msgid "Failed to read instruction table %s\n" msgstr "" -#: as.c:705 +#: as.c:723 #, c-format msgid "invalid listing option `%c'" msgstr "" -#: as.c:899 +#: as.c:922 #, c-format msgid "%d warnings, treating warnings as errors" msgstr "" -#: as.c:930 +#: as.c:953 #, c-format msgid "%s: total time in assembly: %ld.%06ld\n" msgstr "" -#: as.c:933 +#: as.c:956 #, c-format msgid "%s: data size %ld\n" msgstr "" +#: as.h:225 +#, c-format +msgid "Case value %ld unexpected at line %d of file \"%s\"\n" +msgstr "" + #. #. * We have a GROSS internal error. #. * This should never happen. #. -#: atof-generic.c:438 config/tc-a29k.c:544 config/tc-i860.c:335 -#: config/tc-i860.c:708 config/tc-m68k.c:3124 config/tc-m68k.c:3153 -#: config/tc-sparc.c:2462 +#: atof-generic.c:437 config/tc-a29k.c:544 config/tc-i860.c:340 +#: config/tc-i860.c:832 config/tc-m68k.c:3176 config/tc-m68k.c:3205 +#: config/tc-sparc.c:2543 msgid "failed sanity check." msgstr "" -#: cond.c:75 +#: cond.c:77 msgid "invalid identifier for \".ifdef\"" msgstr "" -#: cond.c:128 +#: cond.c:131 msgid "non-constant expression in \".if\" statement" msgstr "" -#: cond.c:224 +#: cond.c:227 msgid "bad format for ifc or ifnc" msgstr "" -#: cond.c:258 +#: cond.c:261 msgid "\".elseif\" without matching \".if\" - ignored" msgstr "" -#: cond.c:263 +#: cond.c:266 msgid "\".elseif\" after \".else\" - ignored" msgstr "" -#: cond.c:266 cond.c:375 +#: cond.c:269 cond.c:378 msgid "here is the previous \"else\"" msgstr "" -#: cond.c:269 cond.c:378 +#: cond.c:272 cond.c:381 msgid "here is the previous \"if\"" msgstr "" -#: cond.c:302 +#: cond.c:305 msgid "non-constant expression in \".elseif\" statement" msgstr "" -#: cond.c:337 +#: cond.c:340 msgid "\".endif\" without \".if\"" msgstr "" -#: cond.c:367 +#: cond.c:370 msgid ".else without matching .if - ignored" msgstr "" -#: cond.c:372 +#: cond.c:375 msgid "duplicate \"else\" - ignored" msgstr "" -#: cond.c:423 +#: cond.c:426 msgid ".ifeqs syntax error" msgstr "" -#: cond.c:506 +#: cond.c:509 msgid "end of macro inside conditional" msgstr "" -#: cond.c:508 +#: cond.c:511 msgid "end of file inside conditional" msgstr "" -#: cond.c:511 +#: cond.c:514 msgid "here is the start of the unterminated conditional" msgstr "" -#: cond.c:515 +#: cond.c:518 msgid "here is the \"else\" of the unterminated conditional" msgstr "" -#: config/obj-aout.c:163 +#: config/obj-aout.c:162 #, c-format msgid "Attempt to put a common symbol into set %s" msgstr "" -#: config/obj-aout.c:167 +#: config/obj-aout.c:166 #, c-format msgid "Attempt to put an undefined symbol into set %s" msgstr "" -#: config/obj-aout.c:198 config/obj-coff.c:1204 config/obj-elf.c:1675 -#: ecoff.c:3668 +#: config/obj-aout.c:197 config/obj-coff.c:1246 config/obj-elf.c:1739 +#: ecoff.c:3647 #, c-format msgid "Symbol `%s' can not be both weak and common" msgstr "" -#: config/obj-aout.c:256 config/obj-coff.c:1916 +#: config/obj-aout.c:255 config/obj-coff.c:1982 msgid "unresolved relocation" msgstr "" -#: config/obj-aout.c:258 config/obj-coff.c:1918 +#: config/obj-aout.c:257 config/obj-coff.c:1984 #, c-format msgid "bad relocation: symbol `%s' not in symbol table" msgstr "" -#: config/obj-aout.c:345 +#: config/obj-aout.c:344 #, c-format msgid "%s: bad type for weak symbol" msgstr "" -#: config/obj-aout.c:462 config/obj-coff.c:2849 write.c:1805 +#: config/obj-aout.c:458 config/obj-coff.c:2913 write.c:1868 #, c-format msgid "%s: global symbols not supported in common sections" msgstr "" -#: config/obj-aout.c:529 +#: config/obj-aout.c:524 #, c-format msgid "Local symbol %s never defined." msgstr "" -#: config/obj-aout.c:617 +#: config/obj-aout.c:612 msgid "subsegment index too high" msgstr "" -#: config/obj-bout.c:313 config/obj-vms.c:566 +#: config/obj-bout.c:319 config/obj-vms.c:561 #, c-format msgid "Local symbol %s never defined" msgstr "" -#: config/obj-coff.c:149 +#: config/obj-coff.c:156 #, c-format msgid "Inserting \"%s\" into structure table failed: %s" msgstr "" #. Zero is used as an end marker in the file. -#: config/obj-coff.c:444 +#: config/obj-coff.c:451 msgid "Line numbers must be positive integers\n" msgstr "" -#: config/obj-coff.c:477 config/obj-coff.c:2263 +#: config/obj-coff.c:484 config/obj-coff.c:2328 msgid ".ln pseudo-op inside .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:520 ecoff.c:3304 +#: config/obj-coff.c:527 ecoff.c:3283 msgid ".loc outside of .text" msgstr "" -#: config/obj-coff.c:527 +#: config/obj-coff.c:534 msgid ".loc pseudo-op inside .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:615 config/obj-coff.c:2320 +#: config/obj-coff.c:622 config/obj-coff.c:2385 msgid ".def pseudo-op used inside of .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:661 config/obj-coff.c:2373 +#: config/obj-coff.c:668 config/obj-coff.c:2437 msgid ".endef pseudo-op used outside of .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:699 +#: config/obj-coff.c:706 #, c-format msgid "`%s' symbol without preceding function" msgstr "" -#: config/obj-coff.c:753 config/obj-coff.c:2448 +#: config/obj-coff.c:793 config/obj-coff.c:2512 #, c-format msgid "unexpected storage class %d" msgstr "" -#: config/obj-coff.c:866 config/obj-coff.c:2555 +#: config/obj-coff.c:906 config/obj-coff.c:2619 msgid ".dim pseudo-op used outside of .def/.endef: ignored." msgstr "" -#: config/obj-coff.c:886 config/obj-coff.c:2575 +#: config/obj-coff.c:926 config/obj-coff.c:2639 msgid "badly formed .dim directive ignored" msgstr "" -#: config/obj-coff.c:937 config/obj-coff.c:2638 +#: config/obj-coff.c:977 config/obj-coff.c:2702 msgid ".size pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:953 config/obj-coff.c:2654 +#: config/obj-coff.c:993 config/obj-coff.c:2718 msgid ".scl pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:971 config/obj-coff.c:2672 +#: config/obj-coff.c:1011 config/obj-coff.c:2736 msgid ".tag pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:990 config/obj-coff.c:2690 +#: config/obj-coff.c:1030 config/obj-coff.c:2754 #, c-format msgid "tag not found for .tag %s" msgstr "" -#: config/obj-coff.c:1005 config/obj-coff.c:2705 +#: config/obj-coff.c:1045 config/obj-coff.c:2769 msgid ".type pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:1027 config/obj-coff.c:2727 +#: config/obj-coff.c:1067 config/obj-coff.c:2791 msgid ".val pseudo-op used outside of .def/.endef ignored." msgstr "" -#: config/obj-coff.c:1165 config/obj-coff.c:2922 +#: config/obj-coff.c:1207 config/obj-coff.c:2986 msgid "mismatched .eb" msgstr "" -#: config/obj-coff.c:1183 config/obj-coff.c:2962 +#: config/obj-coff.c:1225 config/obj-coff.c:3026 msgid "C_EFCN symbol out of scope" msgstr "" #. STYP_INFO #. STYP_LIB #. STYP_OVER -#: config/obj-coff.c:1405 +#: config/obj-coff.c:1447 #, c-format msgid "unsupported section attribute '%c'" msgstr "" -#: config/obj-coff.c:1410 config/obj-coff.c:3668 config/tc-ppc.c:3791 +#: config/obj-coff.c:1452 config/obj-coff.c:3726 config/tc-ppc.c:3925 #, c-format msgid "unknown section attribute '%c'" msgstr "" -#: config/obj-coff.c:1432 config/tc-ppc.c:3809 read.c:2504 +#: config/obj-coff.c:1482 config/tc-ppc.c:3943 read.c:2512 #, c-format msgid "error setting flags for \"%s\": %s" msgstr "" -#: config/obj-coff.c:1558 +#: config/obj-coff.c:1493 config/obj-elf.c:723 +#, c-format +msgid "Ignoring changed section attributes for %s" +msgstr "" + +#: config/obj-coff.c:1629 #, c-format msgid "0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n" msgstr "" -#: config/obj-coff.c:1743 config/obj-ieee.c:69 +#: config/obj-coff.c:1809 config/obj-ieee.c:69 msgid "Out of step\n" msgstr "" -#: config/obj-coff.c:2178 +#: config/obj-coff.c:2244 msgid "bfd_coff_swap_scnhdr_out failed" msgstr "" -#: config/obj-coff.c:2405 +#: config/obj-coff.c:2469 msgid "`.bf' symbol without preceding function\n" msgstr "" -#: config/obj-coff.c:3365 config/obj-ieee.c:522 output-file.c:52 +#: config/obj-coff.c:3422 config/obj-ieee.c:507 output-file.c:52 #: output-file.c:119 #, c-format msgid "FATAL: Can't create %s" msgstr "" -#: config/obj-coff.c:3542 +#: config/obj-coff.c:3600 #, c-format msgid "Can't close %s: %s" msgstr "" -#: config/obj-coff.c:3576 +#: config/obj-coff.c:3634 #, c-format msgid "Too many new sections; can't add \"%s\"" msgstr "" -#: config/obj-coff.c:3986 config/tc-m88k.c:1260 config/tc-sparc.c:3354 +#: config/obj-coff.c:4041 config/tc-m88k.c:1257 config/tc-sparc.c:3531 msgid "Expected comma after name" msgstr "" -#: config/obj-coff.c:3992 read.c:1967 +#: config/obj-coff.c:4047 read.c:1956 msgid "Missing size expression" msgstr "" -#: config/obj-coff.c:3998 +#: config/obj-coff.c:4053 #, c-format msgid "lcomm length (%d.) <0! Ignored." msgstr "" -#: config/obj-coff.c:4026 read.c:2188 +#: config/obj-coff.c:4081 read.c:2190 #, c-format msgid "Symbol %s already defined" msgstr "" -#: config/obj-coff.c:4120 config/tc-i960.c:3255 +#: config/obj-coff.c:4176 config/tc-i960.c:3215 #, c-format msgid "No 'bal' entry point for leafproc %s" msgstr "" -#: config/obj-coff.c:4199 write.c:2507 +#: config/obj-coff.c:4255 write.c:2575 #, c-format msgid "Negative of non-absolute symbol %s" msgstr "" -#: config/obj-coff.c:4220 write.c:2521 +#: config/obj-coff.c:4276 write.c:2589 msgid "callj to difference of 2 symbols" msgstr "" -#: config/obj-coff.c:4266 +#: config/obj-coff.c:4322 #, c-format msgid "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld." msgstr "" @@ -635,218 +649,221 @@ msgstr "" #. This is a COBR instruction. They have only a 13-bit #. displacement and are only to be used for local branches: #. flag as error, don't generate relocation. -#: config/obj-coff.c:4356 config/tc-i960.c:3275 write.c:2665 +#: config/obj-coff.c:4411 config/tc-i960.c:3235 write.c:2733 msgid "can't use COBR format with external label" msgstr "" -#: config/obj-coff.c:4436 +#: config/obj-coff.c:4490 #, c-format msgid "Value of %ld too large for field of %d bytes at 0x%lx" msgstr "" -#: config/obj-coff.c:4450 write.c:2764 +#: config/obj-coff.c:4504 write.c:2823 #, c-format msgid "Signed .word overflow; switch may be too large; %ld at 0x%lx" msgstr "" -#: config/obj-ecoff.c:240 +#: config/obj-ecoff.c:241 msgid "Can't set GP value" msgstr "" -#: config/obj-ecoff.c:247 +#: config/obj-ecoff.c:248 msgid "Can't set register masks" msgstr "" -#: config/obj-elf.c:299 config/tc-sparc.c:3495 config/tc-v850.c:263 +#: config/obj-elf.c:308 config/tc-sparc.c:3674 config/tc-v850.c:259 msgid "Expected comma after symbol-name" msgstr "" -#: config/obj-elf.c:306 config/tc-arc.c:779 config/tc-sparc.c:3502 +#: config/obj-elf.c:315 config/tc-sparc.c:3684 #, c-format msgid ".COMMon length (%d.) <0! Ignored." msgstr "" -#: config/obj-elf.c:316 config/tc-alpha.c:4320 config/tc-sparc.c:3512 -#: config/tc-v850.c:285 +#: config/obj-elf.c:325 config/tc-alpha.c:4335 config/tc-sparc.c:3694 +#: config/tc-v850.c:282 msgid "Ignoring attempt to re-define symbol" msgstr "" -#: config/obj-elf.c:324 config/tc-arc.c:797 config/tc-sparc.c:3520 -#: config/tc-v850.c:295 +#: config/obj-elf.c:333 config/tc-sparc.c:3702 config/tc-v850.c:292 #, c-format msgid "Length of .comm \"%s\" is already %ld. Not changed to %d." msgstr "" -#: config/obj-elf.c:347 config/tc-arc.c:816 config/tc-v850.c:322 +#: config/obj-elf.c:356 config/tc-v850.c:319 msgid "Common alignment negative; 0 assumed" msgstr "" -#: config/obj-elf.c:366 config/tc-m32r.c:1269 config/tc-ppc.c:1396 -#: config/tc-v850.c:385 +#: config/obj-elf.c:375 config/tc-m32r.c:1286 config/tc-ppc.c:1518 +#: config/tc-v850.c:382 msgid "Common alignment not a power of 2" msgstr "" -#: config/obj-elf.c:429 config/tc-arc.c:876 config/tc-sparc.c:3644 -#: config/tc-v850.c:563 +#: config/obj-elf.c:438 config/tc-sparc.c:3826 config/tc-v850.c:564 #, c-format msgid "bad .common segment %s" msgstr "" -#: config/obj-elf.c:658 +#: config/obj-elf.c:664 #, c-format msgid "Setting incorrect section type for %s" msgstr "" #: config/obj-elf.c:668 #, c-format +msgid "Ignoring incorrect section type for %s" +msgstr "" + +#: config/obj-elf.c:681 +#, c-format msgid "Setting incorrect section attributes for %s" msgstr "" -#: config/obj-elf.c:726 +#: config/obj-elf.c:753 msgid "Unrecognized .section attribute: want a,w,x" msgstr "" -#: config/obj-elf.c:766 +#: config/obj-elf.c:793 msgid "Unrecognized section attribute" msgstr "" -#: config/obj-elf.c:788 +#: config/obj-elf.c:815 msgid "Unrecognized section type" msgstr "" -#: config/obj-elf.c:839 +#: config/obj-elf.c:866 msgid "Missing section name" msgstr "" -#: config/obj-elf.c:905 +#: config/obj-elf.c:932 msgid "Bad .section directive - character following name is not '#'" msgstr "" -#: config/obj-elf.c:1006 +#: config/obj-elf.c:1033 msgid ".previous without corresponding .section; ignored" msgstr "" -#: config/obj-elf.c:1033 +#: config/obj-elf.c:1060 msgid ".popsection without corresponding .pushsection; ignored" msgstr "" -#: config/obj-elf.c:1085 -#, c-format -msgid "multiple .symver directives for symbol `%s'" -msgstr "" - -#: config/obj-elf.c:1094 +#: config/obj-elf.c:1113 msgid "expected comma after name in .symver" msgstr "" -#: config/obj-elf.c:1115 +#: config/obj-elf.c:1137 #, c-format msgid "missing version name in `%s' for symbol `%s'" msgstr "" -#: config/obj-elf.c:1324 config/obj-som.c:148 config/obj-som.c:193 +#: config/obj-elf.c:1148 +#, c-format +msgid "multiple versions [`%s'|`%s'] for symbol `%s'" +msgstr "" + +#: config/obj-elf.c:1361 config/obj-som.c:155 config/obj-som.c:201 msgid "Expected quoted string" msgstr "" -#: config/obj-elf.c:1345 +#: config/obj-elf.c:1382 #, c-format msgid "expected comma after name `%s' in .size directive" msgstr "" -#: config/obj-elf.c:1354 +#: config/obj-elf.c:1391 msgid "missing expression in .size directive" msgstr "" -#: config/obj-elf.c:1421 +#: config/obj-elf.c:1467 #, c-format msgid "ignoring unrecognized symbol type \"%s\"" msgstr "" -#: config/obj-elf.c:1599 +#: config/obj-elf.c:1648 msgid ".size expression too complicated to fix up" msgstr "" -#: config/obj-elf.c:1630 +#: config/obj-elf.c:1680 #, c-format msgid "" "invalid attempt to declare external version name as default in symbol `%s'" msgstr "" -#: config/obj-elf.c:1762 +#: config/obj-elf.c:1862 #, c-format msgid "Failed to set up debugging information: %s" msgstr "" -#: config/obj-elf.c:1782 +#: config/obj-elf.c:1882 #, c-format msgid "Can't start writing .mdebug section: %s" msgstr "" -#: config/obj-elf.c:1790 +#: config/obj-elf.c:1890 #, c-format msgid "Could not write .mdebug section: %s" msgstr "" -#: config/obj-ieee.c:460 +#: config/obj-ieee.c:455 msgid "too many sections" msgstr "" -#: config/obj-som.c:131 +#: config/obj-som.c:138 msgid "Only one .version pseudo-op per file!" msgstr "" -#: config/obj-som.c:157 +#: config/obj-som.c:164 #, c-format msgid "FATAL: Attaching version header %s" msgstr "" -#: config/obj-som.c:176 +#: config/obj-som.c:184 msgid "Only one .copyright pseudo-op per file!" msgstr "" -#: config/obj-som.c:202 +#: config/obj-som.c:210 #, c-format msgid "FATAL: Attaching copyright header %s" msgstr "" -#: config/obj-vms.c:464 +#: config/obj-vms.c:462 #, c-format msgid "compiler emitted zero-size common symbol `%s' already defined" msgstr "" -#: config/obj-vms.c:474 +#: config/obj-vms.c:472 #, c-format msgid "compiler redefined zero-size common symbol `%s'" msgstr "" -#: config/obj-vms.c:597 +#: config/obj-vms.c:591 #, c-format msgid "Couldn't create VMS object file \"%s\"" msgstr "" -#: config/obj-vms.c:623 +#: config/obj-vms.c:616 msgid "I/O error writing VMS object file (length prefix)" msgstr "" -#: config/obj-vms.c:637 +#: config/obj-vms.c:630 msgid "I/O error writing VMS object file" msgstr "" -#: config/obj-vms.c:1240 +#: config/obj-vms.c:1220 msgid "Couldn't find source file \"%s\", status=%%X%x" msgstr "" -#: config/obj-vms.c:1749 config/obj-vms.c:2937 +#: config/obj-vms.c:1718 config/obj-vms.c:2894 #, c-format msgid "debugger forward reference error, dbx type %d" msgstr "" -#: config/obj-vms.c:1825 +#: config/obj-vms.c:1793 #, c-format msgid "Variable descriptor %d too complicated. Defined as `void *'." msgstr "" -#: config/obj-vms.c:2144 +#: config/obj-vms.c:2107 msgid "" "***Warning - the assembly code generated by the compiler has placed \n" " global constant(s) in the text psect. These will not be available to \n" @@ -857,92 +874,92 @@ msgid "" " I didn't warn you! \n" msgstr "" -#: config/obj-vms.c:2463 +#: config/obj-vms.c:2421 #, c-format msgid "debugginer output: %d is an unknown untyped variable." msgstr "" -#: config/obj-vms.c:2681 +#: config/obj-vms.c:2639 #, c-format msgid "debugger output: structure element `%s' has undefined type" msgstr "" -#: config/obj-vms.c:2792 +#: config/obj-vms.c:2750 #, c-format msgid "debugger output: %d is an unknown type of variable." msgstr "" -#: config/obj-vms.c:2926 +#: config/obj-vms.c:2883 #, c-format msgid "debugger output: Unable to resolve %d circular references." msgstr "" -#: config/obj-vms.c:3131 +#: config/obj-vms.c:3085 #, c-format msgid "Module name truncated: %s\n" msgstr "" -#: config/obj-vms.c:3410 +#: config/obj-vms.c:3363 #, c-format msgid "Symbol %s replaced by %s\n" msgstr "" #. impossible -#: config/obj-vms.c:3694 +#: config/obj-vms.c:3646 #, c-format msgid "Unknown VMS psect type (%ld)" msgstr "" -#: config/obj-vms.c:3735 +#: config/obj-vms.c:3687 #, c-format msgid "Globalsymbol attribute for symbol %s was unexpected." msgstr "" -#: config/obj-vms.c:3885 +#: config/obj-vms.c:3836 msgid "Invalid data type for globalvalue" msgstr "" -#: config/obj-vms.c:3897 +#: config/obj-vms.c:3848 #, c-format msgid "Invalid globalvalue of %s" msgstr "" -#: config/obj-vms.c:4247 +#: config/obj-vms.c:4198 msgid "Couldn't find fixup fragment when checking for indirect reference" msgstr "" -#: config/obj-vms.c:4591 config/obj-vms.c:4733 +#: config/obj-vms.c:4541 config/obj-vms.c:4682 msgid "Fixup data addsy and subsy don't have the same type" msgstr "" -#: config/obj-vms.c:4595 config/obj-vms.c:4737 +#: config/obj-vms.c:4545 config/obj-vms.c:4686 msgid "Fixup data addsy and subsy don't have an appropriate type" msgstr "" -#: config/obj-vms.c:4598 config/obj-vms.c:4740 +#: config/obj-vms.c:4548 config/obj-vms.c:4689 msgid "Fixup data is erroneously \"pcrel\"" msgstr "" -#: config/obj-vms.c:4614 config/obj-vms.c:4759 +#: config/obj-vms.c:4564 config/obj-vms.c:4708 msgid "Fixup datum is not a longword" msgstr "" -#: config/obj-vms.c:4618 config/obj-vms.c:4763 +#: config/obj-vms.c:4568 config/obj-vms.c:4712 msgid "Fixup datum is not \"fixP->fx_addsy\"" msgstr "" -#: config/obj-vms.c:4834 +#: config/obj-vms.c:4783 #, c-format msgid "" "g++ wrote an extern reference to `%s' as a routine.\n" "I will fix it, but I hope that it was note really a routine." msgstr "" -#: config/obj-vms.c:4966 +#: config/obj-vms.c:4915 msgid "Can't handle global xtors symbols yet." msgstr "" -#: config/obj-vms.c:4969 +#: config/obj-vms.c:4918 #, c-format msgid "Unknown %s" msgstr "" @@ -950,31 +967,32 @@ msgstr "" #. #. * Error otherwise. #. -#: config/obj-vms.c:5054 +#: config/obj-vms.c:5003 #, c-format msgid "unhandled stab type %d" msgstr "" -#: config/tc-a29k.c:160 config/tc-sparc.c:3696 +#: config/tc-a29k.c:160 config/tc-sparc.c:3878 msgid "Unknown segment type" msgstr "" #. Probably a memory allocation problem? Give up now. -#: config/tc-a29k.c:330 config/tc-hppa.c:1387 config/tc-i860.c:202 -#: config/tc-mips.c:1062 config/tc-mips.c:1104 config/tc-sparc.c:789 +#: config/tc-a29k.c:330 config/tc-hppa.c:1412 config/tc-mips.c:1030 +#: config/tc-mips.c:1072 config/tc-sparc.c:846 msgid "Broken assembler. No assembly attempted." msgstr "" -#: config/tc-a29k.c:375 config/tc-arc.c:535 config/tc-d10v.c:507 -#: config/tc-d30v.c:553 config/tc-h8300.c:305 config/tc-h8500.c:297 -#: config/tc-mcore.c:656 config/tc-mn10200.c:935 config/tc-mn10300.c:1294 -#: config/tc-ppc.c:1852 config/tc-sh.c:632 config/tc-tic80.c:291 -#: config/tc-v850.c:2033 config/tc-w65.c:257 config/tc-z8k.c:341 +#: config/tc-a29k.c:375 config/tc-avr.c:1124 config/tc-d10v.c:532 +#: config/tc-d30v.c:552 config/tc-h8300.c:296 config/tc-h8500.c:294 +#: config/tc-mcore.c:655 config/tc-mn10200.c:954 config/tc-mn10300.c:1335 +#: config/tc-ppc.c:1974 config/tc-sh.c:838 config/tc-tic80.c:282 +#: config/tc-v850.c:2076 config/tc-w65.c:248 config/tc-z8k.c:336 msgid "missing operand" msgstr "" -#: config/tc-a29k.c:415 config/tc-hppa.c:1533 config/tc-i860.c:407 -#: config/tc-i860.c:423 config/tc-sparc.c:1352 config/tc-sparc.c:1358 +#: config/tc-a29k.c:415 config/tc-cris.c:913 config/tc-cris.c:921 +#: config/tc-hppa.c:1545 config/tc-i860.c:431 config/tc-i860.c:448 +#: config/tc-sparc.c:1408 config/tc-sparc.c:1414 #, c-format msgid "Unknown opcode: `%s'" msgstr "" @@ -994,64 +1012,64 @@ msgstr "" msgid "Immediate value of %ld is too large" msgstr "" -#: config/tc-a29k.c:892 config/tc-i860.c:940 +#: config/tc-a29k.c:890 #, c-format msgid "bad relocation type: 0x%02x" msgstr "" -#: config/tc-a29k.c:916 +#: config/tc-a29k.c:914 #, c-format msgid "need %o3\n" msgstr "" -#: config/tc-a29k.c:932 +#: config/tc-a29k.c:930 msgid "a29k_convert_frag\n" msgstr "" -#: config/tc-a29k.c:941 +#: config/tc-a29k.c:939 msgid "a29k_estimate_size_before_relax\n" msgstr "" -#: config/tc-a29k.c:1092 +#: config/tc-a29k.c:1090 #, c-format msgid "label \"$%d\" redefined" msgstr "" -#: config/tc-a29k.c:1165 +#: config/tc-a29k.c:1163 msgid "Invalid expression after %%%%\n" msgstr "" -#: config/tc-a29k.c:1176 +#: config/tc-a29k.c:1174 msgid "Invalid register in & expression" msgstr "" -#: config/tc-alpha.c:834 +#: config/tc-alpha.c:837 #, c-format msgid "internal error: can't hash opcode `%s': %s" msgstr "" -#: config/tc-alpha.c:868 +#: config/tc-alpha.c:871 #, c-format msgid "internal error: can't hash macro `%s': %s" msgstr "" -#: config/tc-alpha.c:951 config/tc-i960.c:2738 +#: config/tc-alpha.c:954 config/tc-i960.c:2700 msgid "syntax error" msgstr "" -#: config/tc-alpha.c:1025 config/tc-arm.c:5167 config/tc-h8300.c:1413 -#: config/tc-h8500.c:1222 config/tc-hppa.c:3904 config/tc-i860.c:813 -#: config/tc-m68k.c:4125 config/tc-m88k.c:1106 config/tc-ns32k.c:1589 -#: config/tc-sparc.c:2741 config/tc-z8k.c:1355 +#: config/tc-alpha.c:1028 config/tc-arm.c:6629 config/tc-h8300.c:1373 +#: config/tc-h8500.c:1197 config/tc-hppa.c:3939 config/tc-i860.c:931 +#: config/tc-m68hc11.c:478 config/tc-m68k.c:4179 config/tc-m88k.c:1105 +#: config/tc-ns32k.c:1663 config/tc-sparc.c:2830 config/tc-z8k.c:1324 msgid "Bad call to MD_ATOF()" msgstr "" -#: config/tc-alpha.c:1075 +#: config/tc-alpha.c:1078 #, c-format msgid "Unknown CPU identifier `%s'" msgstr "" -#: config/tc-alpha.c:1119 +#: config/tc-alpha.c:1122 msgid "" "Alpha options:\n" "-32addr\t\t\ttreat addresses as 32-bit values\n" @@ -1062,974 +1080,948 @@ msgid "" "\t\t\tthese variants include PALcode opcodes\n" msgstr "" -#: config/tc-alpha.c:1129 +#: config/tc-alpha.c:1132 msgid "" "VMS options:\n" "-+\t\t\thash encode (don't truncate) names longer than 64 characters\n" "-H\t\t\tshow new symbol after hash truncation\n" msgstr "" -#: config/tc-alpha.c:1298 +#: config/tc-alpha.c:1305 #, c-format msgid "unhandled relocation type %s" msgstr "" -#: config/tc-alpha.c:1311 +#: config/tc-alpha.c:1318 msgid "non-absolute expression in constant field" msgstr "" -#: config/tc-alpha.c:1325 +#: config/tc-alpha.c:1332 #, c-format msgid "type %d reloc done?\n" msgstr "" -#: config/tc-alpha.c:1376 config/tc-alpha.c:1383 config/tc-mips.c:7360 +#: config/tc-alpha.c:1383 config/tc-alpha.c:1390 config/tc-mips.c:7356 msgid "Used $at without \".set noat\"" msgstr "" -#: config/tc-alpha.c:1561 +#: config/tc-alpha.c:1572 #, c-format msgid "cannot represent `%s' relocation in object file" msgstr "" -#: config/tc-alpha.c:1568 +#: config/tc-alpha.c:1579 #, c-format msgid "internal error? cannot generate `%s' relocation" msgstr "" -#: config/tc-alpha.c:1622 +#: config/tc-alpha.c:1633 #, c-format msgid "frame reg expected, using $%d." msgstr "" -#: config/tc-alpha.c:1747 +#: config/tc-alpha.c:1758 #, c-format msgid "No !literal!%d was found" msgstr "" #. only support one relocation op per insn -#: config/tc-alpha.c:1935 +#: config/tc-alpha.c:1946 msgid "More than one relocation op per insn" msgstr "" -#: config/tc-alpha.c:1952 +#: config/tc-alpha.c:1963 msgid "No relocation operand" msgstr "" -#: config/tc-alpha.c:1958 +#: config/tc-alpha.c:1969 #, c-format msgid "No !sequence-number after !%s" msgstr "" -#: config/tc-alpha.c:1971 +#: config/tc-alpha.c:1982 #, c-format msgid "Unknown relocation operand: !%s" msgstr "" -#: config/tc-alpha.c:1984 +#: config/tc-alpha.c:1995 #, c-format msgid "Bad sequence number: !%s!%s" msgstr "" -#: config/tc-alpha.c:2335 +#: config/tc-alpha.c:2346 #, c-format msgid "operand out of range (%s not between %d and %d)" msgstr "" -#: config/tc-alpha.c:2434 config/tc-arc.c:548 config/tc-d10v.c:596 -#: config/tc-d30v.c:636 config/tc-mn10200.c:990 config/tc-mn10300.c:1365 -#: config/tc-ppc.c:1818 config/tc-ppc.c:1926 config/tc-ppc.c:1938 -#: config/tc-v850.c:1819 config/tc-v850.c:1842 config/tc-v850.c:2055 +#: config/tc-alpha.c:2445 config/tc-d10v.c:621 config/tc-d30v.c:640 +#: config/tc-mn10200.c:1009 config/tc-mn10300.c:1406 config/tc-ppc.c:1940 +#: config/tc-ppc.c:2048 config/tc-ppc.c:2060 config/tc-v850.c:1856 +#: config/tc-v850.c:1879 config/tc-v850.c:2099 msgid "too many fixups" msgstr "" -#: config/tc-alpha.c:2645 config/tc-alpha.c:2714 +#: config/tc-alpha.c:2660 config/tc-alpha.c:2729 #, c-format msgid "inappropriate arguments for opcode `%s'" msgstr "" -#: config/tc-alpha.c:2647 config/tc-alpha.c:2716 +#: config/tc-alpha.c:2662 config/tc-alpha.c:2731 #, c-format msgid "opcode `%s' not supported for target %s" msgstr "" -#: config/tc-alpha.c:2651 config/tc-alpha.c:2719 +#: config/tc-alpha.c:2666 config/tc-alpha.c:2734 config/tc-avr.c:1090 #, c-format msgid "unknown opcode `%s'" msgstr "" -#: config/tc-alpha.c:2691 config/tc-alpha.c:2758 config/tc-alpha.c:3269 -#: config/tc-alpha.c:3329 config/tc-alpha.c:3381 config/tc-alpha.c:3456 -#: config/tc-alpha.c:3541 config/tc-alpha.c:3667 config/tc-alpha.c:3844 -#: config/tc-alpha.c:3901 config/tc-alpha.c:4011 config/tc-alpha.c:4118 -#: config/tc-alpha.c:4195 +#: config/tc-alpha.c:2706 config/tc-alpha.c:2773 config/tc-alpha.c:3284 +#: config/tc-alpha.c:3344 config/tc-alpha.c:3396 config/tc-alpha.c:3471 +#: config/tc-alpha.c:3556 config/tc-alpha.c:3682 config/tc-alpha.c:3859 +#: config/tc-alpha.c:3916 config/tc-alpha.c:4026 config/tc-alpha.c:4133 +#: config/tc-alpha.c:4210 #, c-format msgid "Cannot use !%s!%d with %s" msgstr "" -#: config/tc-alpha.c:2779 +#: config/tc-alpha.c:2794 msgid "can not resolve expression" msgstr "" -#: config/tc-alpha.c:2921 config/tc-alpha.c:3113 +#: config/tc-alpha.c:2936 config/tc-alpha.c:3128 msgid "overflow in literal (.lita) table" msgstr "" -#: config/tc-alpha.c:2928 config/tc-alpha.c:2951 config/tc-alpha.c:3126 -#: config/tc-alpha.c:3470 config/tc-alpha.c:3548 config/tc-alpha.c:3596 -#: config/tc-alpha.c:3696 config/tc-alpha.c:3921 config/tc-alpha.c:4033 +#: config/tc-alpha.c:2943 config/tc-alpha.c:2966 config/tc-alpha.c:3141 +#: config/tc-alpha.c:3485 config/tc-alpha.c:3563 config/tc-alpha.c:3611 +#: config/tc-alpha.c:3711 config/tc-alpha.c:3936 config/tc-alpha.c:4048 msgid "macro requires $at register while noat in effect" msgstr "" -#: config/tc-alpha.c:2930 config/tc-alpha.c:2953 config/tc-alpha.c:3128 +#: config/tc-alpha.c:2945 config/tc-alpha.c:2968 config/tc-alpha.c:3143 msgid "macro requires $at while $at in use" msgstr "" -#: config/tc-alpha.c:3075 expr.c:86 read.c:3160 +#: config/tc-alpha.c:3090 expr.c:83 read.c:3164 msgid "bignum invalid; zero assumed" msgstr "" -#: config/tc-alpha.c:3077 expr.c:88 read.c:3162 read.c:3498 read.c:4396 +#: config/tc-alpha.c:3092 expr.c:85 read.c:3166 read.c:3499 read.c:4397 msgid "floating point number invalid; zero assumed" msgstr "" -#: config/tc-alpha.c:3082 +#: config/tc-alpha.c:3097 msgid "can't handle expression" msgstr "" -#: config/tc-alpha.c:3119 +#: config/tc-alpha.c:3134 msgid "overflow in literal (.lit8) table" msgstr "" -#: config/tc-alpha.c:3291 +#: config/tc-alpha.c:3306 #, c-format -msgid "bad instruction format for lda !%s!%d" +msgid "bad instruction format for lda !%s!%ld" msgstr "" -#: config/tc-alpha.c:4291 config/tc-ppc.c:1345 config/tc-ppc.c:3555 -#: read.c:1387 +#: config/tc-alpha.c:4306 config/tc-ppc.c:1467 config/tc-ppc.c:3689 +#: read.c:1369 #, c-format msgid ".COMMon length (%ld.) <0! Ignored." msgstr "" -#: config/tc-alpha.c:4329 config/tc-alpha.c:4338 config/tc-ppc.c:3592 -#: read.c:1408 +#: config/tc-alpha.c:4344 config/tc-alpha.c:4353 config/tc-ppc.c:3726 +#: read.c:1393 #, c-format msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld." msgstr "" -#: config/tc-alpha.c:4440 ecoff.c:3109 +#: config/tc-alpha.c:4455 ecoff.c:3087 msgid ".ent directive has no name" msgstr "" -#: config/tc-alpha.c:4448 +#: config/tc-alpha.c:4463 msgid "nested .ent directives" msgstr "" -#: config/tc-alpha.c:4484 ecoff.c:3057 +#: config/tc-alpha.c:4499 ecoff.c:3035 msgid ".end directive has no name" msgstr "" -#: config/tc-alpha.c:4493 +#: config/tc-alpha.c:4508 msgid ".end directive names different symbol than .ent" msgstr "" -#: config/tc-alpha.c:4568 +#: config/tc-alpha.c:4585 #, c-format msgid "Invalid argument %d to .prologue." msgstr "" -#: config/tc-alpha.c:4596 +#: config/tc-alpha.c:4677 msgid "ECOFF debugging is disabled." msgstr "" -#: config/tc-alpha.c:4617 +#: config/tc-alpha.c:4698 msgid "Unknown section directive" msgstr "" -#: config/tc-alpha.c:4654 +#: config/tc-alpha.c:4734 msgid ".ent directive has no symbol" msgstr "" -#: config/tc-alpha.c:4682 +#: config/tc-alpha.c:4761 msgid "Bad .frame directive 1./2. param" msgstr "" -#: config/tc-alpha.c:4694 +#: config/tc-alpha.c:4773 msgid "Bad .frame directive 3./4. param" msgstr "" -#: config/tc-alpha.c:4719 +#: config/tc-alpha.c:4798 msgid ".pdesc directive not in link (.link) section" msgstr "" -#: config/tc-alpha.c:4727 +#: config/tc-alpha.c:4806 msgid ".pdesc has no matching .ent" msgstr "" -#: config/tc-alpha.c:4738 +#: config/tc-alpha.c:4817 msgid ".pdesc directive has no entry symbol" msgstr "" -#: config/tc-alpha.c:4751 +#: config/tc-alpha.c:4830 msgid "No comma after .pdesc " msgstr "" -#: config/tc-alpha.c:4774 +#: config/tc-alpha.c:4853 msgid "unknown procedure kind" msgstr "" -#: config/tc-alpha.c:4869 +#: config/tc-alpha.c:4947 msgid ".name directive not in link (.link) section" msgstr "" -#: config/tc-alpha.c:4877 +#: config/tc-alpha.c:4955 msgid ".name directive has no symbol" msgstr "" -#: config/tc-alpha.c:4912 +#: config/tc-alpha.c:4989 msgid "No symbol after .linkage" msgstr "" -#: config/tc-alpha.c:4941 +#: config/tc-alpha.c:5017 msgid "No symbol after .code_address" msgstr "" -#: config/tc-alpha.c:4976 ecoff.c:3274 +#: config/tc-alpha.c:5050 ecoff.c:3253 msgid "Bad .mask directive" msgstr "" -#: config/tc-alpha.c:4998 ecoff.c:3205 +#: config/tc-alpha.c:5071 ecoff.c:3183 msgid "Bad .fmask directive" msgstr "" -#: config/tc-alpha.c:5169 config/tc-arm.c:1325 read.c:2151 read.c:2731 -#: stabs.c:460 +#: config/tc-alpha.c:5241 config/tc-arm.c:1593 read.c:2150 read.c:2737 +#: stabs.c:464 #, c-format msgid "Expected comma after name \"%s\"" msgstr "" #. *symbol_get_obj (symbolP) = (signed char) temp; -#: config/tc-alpha.c:5180 +#: config/tc-alpha.c:5252 #, c-format msgid "unhandled: .proc %s,%d" msgstr "" -#: config/tc-alpha.c:5215 +#: config/tc-alpha.c:5287 #, c-format msgid "Tried to .set unrecognized mode `%s'" msgstr "" #. not fatal, but it might not work in the end -#: config/tc-alpha.c:5232 +#: config/tc-alpha.c:5304 msgid "File overrides no-base-register option." msgstr "" -#: config/tc-alpha.c:5249 +#: config/tc-alpha.c:5321 #, c-format msgid "Bad base register, using $%d." msgstr "" -#: config/tc-alpha.c:5271 +#: config/tc-alpha.c:5343 #, c-format msgid "Alignment too large: %d. assumed" msgstr "" -#: config/tc-alpha.c:5275 config/tc-d30v.c:2182 +#: config/tc-alpha.c:5347 config/tc-d30v.c:2219 msgid "Alignment negative: 0 assumed" msgstr "" -#: config/tc-alpha.c:5588 +#: config/tc-alpha.c:5662 #, c-format msgid "Chose GP value of %lx\n" msgstr "" -#: config/tc-arc.c:137 -msgid "" -"ARC options:\n" -"-EB\t\t\tgenerate big endian output\n" -"-EL\t\t\tgenerate little endian output\n" -msgstr "" - -#: config/tc-arc.c:155 config/tc-arc.c:178 config/tc-arc.c:922 -#: config/tc-hppa.c:1347 config/tc-hppa.c:6734 config/tc-hppa.c:6740 -#: config/tc-hppa.c:6746 config/tc-hppa.c:6752 config/tc-mn10300.c:883 -#: config/tc-mn10300.c:1993 -msgid "could not set architecture and machine" -msgstr "" - -#: config/tc-arc.c:175 -msgid "virtual memory exhausted" -msgstr "" - -#: config/tc-arc.c:254 config/tc-mn10200.c:1354 config/tc-mn10300.c:1904 -#: config/tc-ppc.c:1102 config/tc-v850.c:1618 -#, c-format -msgid "operand out of range (%s not between %ld and %ld)" -msgstr "" - -#: config/tc-arc.c:389 -#, c-format -msgid "unknown syntax format character `%c'" -msgstr "" - -#: config/tc-arc.c:488 -msgid "too many suffixes" -msgstr "" - -#: config/tc-arc.c:533 config/tc-d10v.c:505 config/tc-d30v.c:551 -#: config/tc-mn10200.c:932 config/tc-mn10300.c:1291 config/tc-ppc.c:1850 -#: config/tc-tic80.c:287 config/tc-v850.c:2030 -msgid "illegal operand" -msgstr "" - -#: config/tc-arc.c:620 config/tc-mn10200.c:1031 config/tc-mn10300.c:1435 -#: config/tc-ppc.c:1975 config/tc-v850.c:2108 -#, c-format -msgid "junk at end of line: `%s'" -msgstr "" - -#: config/tc-arc.c:660 -msgid "8 byte instruction in delay slot" -msgstr "" - -#: config/tc-arc.c:662 -msgid "8 byte jump instruction with delay slot" -msgstr "" - -#: config/tc-arc.c:670 -msgid "conditional branch follows set of flags" -msgstr "" - -#: config/tc-arc.c:749 config/tc-arm.c:6377 -#, c-format -msgid "bad instruction `%s'" -msgstr "" - -#: config/tc-arc.c:772 -msgid "expected comma after symbol-name" -msgstr "" - -#: config/tc-arc.c:789 -msgid "ignoring attempt to re-define symbol" -msgstr "" - -#: config/tc-arc.c:804 -msgid "expected comma after common length" -msgstr "" - -#: config/tc-arc.c:897 -msgid ".cpu command must appear before any instructions" -msgstr "" - -#: config/tc-arc.c:916 -msgid ".cpu conflicts with previous value" -msgstr "" - -#: config/tc-arc.c:927 -msgid "bad .cpu op" -msgstr "" - -#: config/tc-arc.c:951 config/tc-ppc.c:2623 -msgid "missing rename string" -msgstr "" - -#: config/tc-arc.c:963 -msgid "invalid symbol to rename to" +#: config/tc-arc.c:1618 config/tc-arm.c:7532 +msgid "md_estimate_size_before_relax\n" msgstr "" -#: config/tc-arc.c:1010 config/tc-d10v.c:284 config/tc-d30v.c:366 -#: config/tc-mips.c:8770 config/tc-mn10200.c:355 config/tc-pj.c:365 -#: config/tc-ppc.c:4384 config/tc-sh.c:1742 config/tc-v850.c:1276 -msgid "bad call to md_atof" +#: config/tc-arc.c:1630 +msgid "md_convert_frag\n" msgstr "" -#: config/tc-arc.c:1097 -#, c-format -msgid "missing ')' in %-op" +#: config/tc-arm.c:1156 +msgid "Bad arguments to instruction" msgstr "" -#: config/tc-arc.c:1131 -msgid "expression too complex for %%st" +#: config/tc-arm.c:1157 +msgid "r15 not allowed here" msgstr "" -#: config/tc-arc.c:1326 config/tc-arm.c:3142 config/tc-d10v.c:1475 -#: config/tc-d30v.c:1828 config/tc-mips.c:3250 config/tc-mips.c:4182 -#: config/tc-mips.c:4967 config/tc-mips.c:5513 config/tc-ppc.c:4720 -#: config/tc-v850.c:2338 -msgid "expression too complex" +#: config/tc-arm.c:1158 +msgid "Instruction should not have flags" msgstr "" -#: config/tc-arc.c:1392 config/tc-ppc.c:4823 config/tc-v850.c:2382 -msgid "unresolved expression that must be resolved" +#: config/tc-arm.c:1159 +msgid "Instruction is not conditional" msgstr "" -#: config/tc-arc.c:1457 config/tc-sparc.c:3203 -#, c-format -msgid "internal error: can't export reloc type %d (`%s')" +#: config/tc-arm.c:1160 +msgid "acc0 expected" msgstr "" -#: config/tc-arm.c:1023 +#: config/tc-arm.c:1289 msgid "Literal Pool Overflow" msgstr "" -#: config/tc-arm.c:1165 +#: config/tc-arm.c:1431 msgid "Invalid syntax for .req directive." msgstr "" -#: config/tc-arm.c:1237 config/tc-mips.c:9963 read.c:2040 +#: config/tc-arm.c:1506 config/tc-mips.c:9916 read.c:2035 #, c-format msgid "Alignment too large: %d. assumed." msgstr "" -#: config/tc-arm.c:1240 read.c:2045 +#: config/tc-arm.c:1509 read.c:2040 msgid "Alignment negative. 0 assumed." msgstr "" -#: config/tc-arm.c:1374 config/tc-m32r.c:418 read.c:2790 read.c:4867 +#: config/tc-arm.c:1643 config/tc-m32r.c:417 read.c:2795 read.c:4857 #, c-format msgid "symbol `%s' already defined" msgstr "" -#: config/tc-arm.c:1444 +#: config/tc-arm.c:1714 msgid "selected processor does not support THUMB opcodes" msgstr "" -#: config/tc-arm.c:1456 +#: config/tc-arm.c:1727 msgid "selected processor does not support ARM opcodes" msgstr "" -#: config/tc-arm.c:1465 +#: config/tc-arm.c:1739 #, c-format msgid "invalid instruction size selected (%d)" msgstr "" -#: config/tc-arm.c:1500 +#: config/tc-arm.c:1774 #, c-format msgid "invalid operand to .code directive (%d) (expecting 16 or 32)" msgstr "" -#: config/tc-arm.c:1511 +#: config/tc-arm.c:1785 msgid "Garbage following instruction" msgstr "" #. In the few cases where we might be able to accept something else #. this error can be overridden. -#: config/tc-arm.c:1560 +#: config/tc-arm.c:1835 #, c-format msgid "Register expected, not '%.100s'" msgstr "" -#. In the few cases where we might be able to accept something else -#. this error can be overridden. -#: config/tc-arm.c:1586 -msgid " expected" +#. In the few cases where we might be able to accept +#. something else this error can be overridden. +#: config/tc-arm.c:1907 +msgid "flag for {c}psr instruction expected" msgstr "" -#: config/tc-arm.c:1616 +#: config/tc-arm.c:1937 msgid "Illegal co-processor number" msgstr "" -#: config/tc-arm.c:1623 +#: config/tc-arm.c:1944 msgid "Bad or missing co-processor number" msgstr "" -#: config/tc-arm.c:1647 +#: config/tc-arm.c:1968 config/tc-arm.c:3054 config/tc-arm.c:3246 msgid "bad or missing expression" msgstr "" -#: config/tc-arm.c:1653 +#: config/tc-arm.c:1974 msgid "immediate co-processor expression too large" msgstr "" #. In the few cases where we might be able to accept something else #. this error can be overridden. -#: config/tc-arm.c:1678 +#: config/tc-arm.c:1999 msgid "Co-processor register expected" msgstr "" #. In the few cases where we might be able to accept something else #. this error can be overridden. -#: config/tc-arm.c:1702 +#: config/tc-arm.c:2023 msgid "Floating point register expected" msgstr "" -#: config/tc-arm.c:1719 +#: config/tc-arm.c:2040 msgid "immediate expression expected" msgstr "" -#: config/tc-arm.c:1734 +#: config/tc-arm.c:2055 msgid "co-processor address must be word aligned" msgstr "" -#: config/tc-arm.c:1740 +#: config/tc-arm.c:2061 msgid "offset too large" msgstr "" -#: config/tc-arm.c:1788 +#: config/tc-arm.c:2109 msgid "pc may not be used in post-increment" msgstr "" -#: config/tc-arm.c:1804 config/tc-arm.c:2934 +#: config/tc-arm.c:2125 config/tc-arm.c:2578 config/tc-arm.c:3438 +#: config/tc-arm.c:4358 msgid "pre-indexed expression expected" msgstr "" -#: config/tc-arm.c:1817 config/tc-arm.c:2946 config/tc-arm.c:3288 +#: config/tc-arm.c:2138 config/tc-arm.c:2591 config/tc-arm.c:3449 +#: config/tc-arm.c:4370 config/tc-arm.c:4716 msgid "missing ]" msgstr "" -#: config/tc-arm.c:1827 +#: config/tc-arm.c:2148 msgid "pc may not be used with write-back" msgstr "" -#: config/tc-arm.c:1881 -msgid " expected" +#: config/tc-arm.c:2203 +msgid "comma expected after register name" msgstr "" -#: config/tc-arm.c:1942 config/tc-arm.c:2556 -msgid "Register or shift expression expected" +#: config/tc-arm.c:2222 +msgid "{C|S}PSR expected" msgstr "" -#: config/tc-arm.c:1956 config/tc-arm.c:2271 config/tc-arm.c:2523 -#: config/tc-arm.c:2543 -msgid "Invalid constant" +#: config/tc-arm.c:2250 +msgid "comma missing after psr flags" +msgstr "" + +#: config/tc-arm.c:2267 config/tc-arm.c:2277 +msgid "only a register or immediate value can follow a psr flag" +msgstr "" + +#: config/tc-arm.c:2284 +msgid "immediate value cannot be used to set this field" msgstr "" -#: config/tc-arm.c:1967 -msgid "Error: unrecognised syntax for second argument to msr instruction" +#: config/tc-arm.c:2301 config/tc-arm.c:3673 config/tc-arm.c:3939 +#: config/tc-arm.c:3959 +msgid "Invalid constant" msgstr "" -#: config/tc-arm.c:2016 +#: config/tc-arm.c:2351 msgid "rdhi, rdlo and rm must all be different" msgstr "" -#: config/tc-arm.c:2072 +#: config/tc-arm.c:2407 msgid "rd and rm should be different in mul" msgstr "" -#: config/tc-arm.c:2128 +#: config/tc-arm.c:2463 msgid "rd and rm should be different in mla" msgstr "" -#: config/tc-arm.c:2255 -msgid "bad_segment" +#: config/tc-arm.c:2512 +#, c-format +msgid "acc0 expected, not '%.100s'" msgstr "" -#: config/tc-arm.c:2301 config/tc-arm.c:2378 -msgid "Shift expression expected" +#: config/tc-arm.c:2695 +msgid "rdhi and rdlo must be different" msgstr "" -#: config/tc-arm.c:2342 -msgid "Invalid immediate shift" +#: config/tc-arm.c:2815 +msgid "Warning: Instruction unpredictable when using r15" +msgstr "" + +#: config/tc-arm.c:3063 config/tc-arm.c:3255 config/tc-arm.c:5503 +#: config/tc-arm.c:5536 config/tc-arm.c:5546 +msgid "immediate value out of range" +msgstr "" + +#: config/tc-arm.c:3403 +msgid "'[' expected after PLD mnemonic" +msgstr "" + +#: config/tc-arm.c:3428 config/tc-arm.c:3458 +msgid "writeback used in preload instruction" +msgstr "" + +#. Deny all knowledge. +#: config/tc-arm.c:3506 +#, c-format +msgid "bad instruction '%.100s'" +msgstr "" + +#: config/tc-arm.c:3530 +msgid "Destination register must be even" +msgstr "" + +#: config/tc-arm.c:3536 +msgid "r12 or r14 not allowed here" msgstr "" -#: config/tc-arm.c:2371 +#: config/tc-arm.c:3544 +msgid "pre/post-indexing used when modified address register is destination" +msgstr "" + +#: config/tc-arm.c:3657 +msgid "bad_segment" +msgstr "" + +#: config/tc-arm.c:3703 config/tc-arm.c:3714 +msgid "Shift expression expected" +msgstr "" + +#: config/tc-arm.c:3738 msgid "shift requires register or #expression" msgstr "" -#: config/tc-arm.c:2372 +#: config/tc-arm.c:3739 msgid "shift requires #expression" msgstr "" -#: config/tc-arm.c:2514 config/tc-arm.c:2975 +#: config/tc-arm.c:3769 +msgid "Shift of 0 ignored." +msgstr "" + +#: config/tc-arm.c:3775 +msgid "Invalid immediate shift" +msgstr "" + +#: config/tc-arm.c:3930 config/tc-arm.c:4400 msgid "Constant expression expected" msgstr "" -#: config/tc-arm.c:2609 +#: config/tc-arm.c:3972 +msgid "Register or shift expression expected" +msgstr "" + +#: config/tc-arm.c:4025 msgid "Invalid floating point immediate expression" msgstr "" -#: config/tc-arm.c:2612 +#: config/tc-arm.c:4029 msgid "Floating point register or immediate expression expected" msgstr "" -#: config/tc-arm.c:2781 +#: config/tc-arm.c:4198 msgid "address offset too large" msgstr "" -#: config/tc-arm.c:2853 +#: config/tc-arm.c:4275 msgid "Processor does not support halfwords or signed bytes" msgstr "" -#: config/tc-arm.c:2874 +#: config/tc-arm.c:4296 msgid "Address expected" msgstr "" -#: config/tc-arm.c:2904 config/tc-arm.c:2918 config/tc-arm.c:2955 +#: config/tc-arm.c:4326 config/tc-arm.c:4341 config/tc-arm.c:4379 #, c-format msgid "%s register same as write-back base" msgstr "" -#: config/tc-arm.c:2905 config/tc-arm.c:2919 config/tc-arm.c:2956 +#: config/tc-arm.c:4328 config/tc-arm.c:4343 config/tc-arm.c:4381 msgid "destination" msgstr "" -#: config/tc-arm.c:2905 config/tc-arm.c:2919 config/tc-arm.c:2956 +#: config/tc-arm.c:4328 config/tc-arm.c:4343 config/tc-arm.c:4381 msgid "source" msgstr "" -#: config/tc-arm.c:2995 +#: config/tc-arm.c:4420 msgid "literal pool insertion failed" msgstr "" -#: config/tc-arm.c:3033 +#: config/tc-arm.c:4459 msgid "Pre-increment instruction with translate" msgstr "" -#: config/tc-arm.c:3074 +#: config/tc-arm.c:4500 msgid "Bad range in register list" msgstr "" -#: config/tc-arm.c:3082 config/tc-arm.c:3091 config/tc-arm.c:3132 +#: config/tc-arm.c:4508 config/tc-arm.c:4517 config/tc-arm.c:4559 #, c-format msgid "Warning: Duplicated register (r%d) in register list" msgstr "" -#: config/tc-arm.c:3094 +#: config/tc-arm.c:4520 msgid "Warning: Register range not in ascending order" msgstr "" -#: config/tc-arm.c:3105 +#: config/tc-arm.c:4532 msgid "Missing `}'" msgstr "" -#: config/tc-arm.c:3121 +#: config/tc-arm.c:4548 msgid "invalid register mask" msgstr "" -#: config/tc-arm.c:3180 +#: config/tc-arm.c:4569 config/tc-avr.c:852 config/tc-cris.c:2733 +#: config/tc-d10v.c:1560 config/tc-d30v.c:1865 config/tc-mips.c:3230 +#: config/tc-mips.c:4162 config/tc-mips.c:4947 config/tc-mips.c:5493 +#: config/tc-ppc.c:4854 config/tc-v850.c:2385 +msgid "expression too complex" +msgstr "" + +#: config/tc-arm.c:4608 msgid "r15 not allowed as base register" msgstr "" -#: config/tc-arm.c:3248 config/tc-arm.c:3262 +#: config/tc-arm.c:4676 config/tc-arm.c:4690 msgid "r15 not allowed in swap" msgstr "" -#: config/tc-arm.c:3615 config/tc-v850.c:1921 config/tc-v850.c:1942 +#: config/tc-arm.c:4788 +msgid "Use of r15 in bx in ARM mode is not really useful" +msgstr "" + +#: config/tc-arm.c:5044 config/tc-v850.c:1959 config/tc-v850.c:1980 msgid "constant expression expected" msgstr "" -#: config/tc-arm.c:3621 +#: config/tc-arm.c:5050 msgid "Constant value required for number of registers" msgstr "" -#: config/tc-arm.c:3629 +#: config/tc-arm.c:5058 msgid "number of registers must be in the range [1:4]" msgstr "" -#: config/tc-arm.c:3689 +#: config/tc-arm.c:5119 msgid "R15 not allowed as base register with write-back" msgstr "" -#: config/tc-arm.c:3936 +#: config/tc-arm.c:5367 msgid "lo register required" msgstr "" -#: config/tc-arm.c:3944 +#: config/tc-arm.c:5375 msgid "hi register required" msgstr "" -#: config/tc-arm.c:4013 +#: config/tc-arm.c:5445 msgid "dest and source1 must be the same register" msgstr "" -#: config/tc-arm.c:4020 +#: config/tc-arm.c:5452 msgid "subtract valid only on lo regs" msgstr "" -#: config/tc-arm.c:4044 +#: config/tc-arm.c:5476 msgid "invalid Hi register with immediate" msgstr "" -#: config/tc-arm.c:4071 config/tc-arm.c:4104 config/tc-arm.c:4114 -msgid "immediate value out of range" -msgstr "" - -#: config/tc-arm.c:4082 +#: config/tc-arm.c:5514 msgid "invalid immediate value for stack adjust" msgstr "" -#: config/tc-arm.c:4093 +#: config/tc-arm.c:5525 msgid "invalid immediate for address calculation" msgstr "" -#: config/tc-arm.c:4180 +#: config/tc-arm.c:5612 msgid "source1 and dest must be same register" msgstr "" -#: config/tc-arm.c:4215 +#: config/tc-arm.c:5646 msgid "Invalid immediate for shift" msgstr "" -#: config/tc-arm.c:4294 +#: config/tc-arm.c:5725 msgid "only lo regs allowed with immediate" msgstr "" -#: config/tc-arm.c:4313 +#: config/tc-arm.c:5744 msgid "invalid immediate" msgstr "" -#: config/tc-arm.c:4367 +#: config/tc-arm.c:5798 msgid "expected ']'" msgstr "" -#: config/tc-arm.c:4433 +#: config/tc-arm.c:5865 msgid "byte or halfword not valid for base register" msgstr "" -#: config/tc-arm.c:4438 +#: config/tc-arm.c:5870 msgid "R15 based store not allowed" msgstr "" -#: config/tc-arm.c:4443 +#: config/tc-arm.c:5875 msgid "Invalid base register for register offset" msgstr "" -#: config/tc-arm.c:4461 +#: config/tc-arm.c:5893 msgid "invalid offset" msgstr "" -#: config/tc-arm.c:4472 +#: config/tc-arm.c:5904 msgid "invalid base register in load/store" msgstr "" -#: config/tc-arm.c:4496 +#: config/tc-arm.c:5928 msgid "Invalid offset" msgstr "" -#: config/tc-arm.c:4570 +#: config/tc-arm.c:6003 msgid "dest and source1 one must be the same register" msgstr "" -#: config/tc-arm.c:4578 +#: config/tc-arm.c:6011 msgid "Rs and Rd must be different in MUL" msgstr "" -#: config/tc-arm.c:4722 +#: config/tc-arm.c:6155 msgid "" "Inserted missing '!': load/store multiple always writes back base register" msgstr "" -#: config/tc-arm.c:4738 config/tc-arm.c:4838 +#: config/tc-arm.c:6171 config/tc-arm.c:6271 msgid "Expression too complex" msgstr "" -#: config/tc-arm.c:4744 +#: config/tc-arm.c:6177 msgid "only lo-regs valid in load/store multiple" msgstr "" -#: config/tc-arm.c:4790 +#: config/tc-arm.c:6223 msgid "Syntax: ldrs[b] Rd, [Rb, Ro]" msgstr "" -#: config/tc-arm.c:4854 +#: config/tc-arm.c:6287 msgid "invalid register list to push/pop instruction" msgstr "" -#: config/tc-arm.c:4996 +#: config/tc-arm.c:6429 config/tc-cris.c:664 msgid "Virtual memory exhausted" msgstr "" -#: config/tc-arm.c:5394 +#: config/tc-arm.c:6835 #, c-format msgid "invalid constant (%lx) after fixup" msgstr "" -#: config/tc-arm.c:5428 +#: config/tc-arm.c:6871 #, c-format -msgid "Unable to compute ADRL instructions for PC offset of 0x%x" +msgid "Unable to compute ADRL instructions for PC offset of 0x%lx" msgstr "" -#: config/tc-arm.c:5456 +#: config/tc-arm.c:6901 #, c-format msgid "bad immediate value for offset (%ld)" msgstr "" -#: config/tc-arm.c:5477 config/tc-arm.c:5499 +#: config/tc-arm.c:6923 config/tc-arm.c:6945 msgid "invalid literal constant: pool needs to be closer" msgstr "" -#: config/tc-arm.c:5479 +#: config/tc-arm.c:6925 #, c-format msgid "bad immediate value for half-word offset (%ld)" msgstr "" -#: config/tc-arm.c:5516 +#: config/tc-arm.c:6962 msgid "shift expression is too large" msgstr "" -#: config/tc-arm.c:5534 config/tc-arm.c:5543 +#: config/tc-arm.c:6981 config/tc-arm.c:6990 msgid "Invalid swi expression" msgstr "" -#: config/tc-arm.c:5553 +#: config/tc-arm.c:7000 msgid "Invalid expression in load/store multiple" msgstr "" -#: config/tc-arm.c:5605 +#: config/tc-arm.c:7053 msgid "gas can't handle same-section branch dest >= 0x04000000" msgstr "" -#: config/tc-arm.c:5614 +#: config/tc-arm.c:7062 msgid "out of range branch" msgstr "" -#: config/tc-arm.c:5631 config/tc-arm.c:5647 config/tc-mips.c:9790 +#: config/tc-arm.c:7095 config/tc-arm.c:7111 config/tc-mips.c:9743 msgid "Branch out of range" msgstr "" -#: config/tc-arm.c:5669 +#: config/tc-arm.c:7134 msgid "Branch with link out of range" msgstr "" -#: config/tc-arm.c:5736 +#: config/tc-arm.c:7201 msgid "Illegal value for co-processor offset" msgstr "" -#: config/tc-arm.c:5759 +#: config/tc-arm.c:7225 #, c-format msgid "Invalid offset, target not word aligned (0x%08X)" msgstr "" -#: config/tc-arm.c:5764 config/tc-arm.c:5773 config/tc-arm.c:5780 -#: config/tc-arm.c:5787 config/tc-arm.c:5794 +#: config/tc-arm.c:7231 config/tc-arm.c:7240 config/tc-arm.c:7247 +#: config/tc-arm.c:7254 config/tc-arm.c:7261 #, c-format -msgid "Invalid offset, value too big (0x%08X)" +msgid "Invalid offset, value too big (0x%08lX)" msgstr "" -#: config/tc-arm.c:5831 +#: config/tc-arm.c:7300 msgid "Invalid immediate for stack address calculation" msgstr "" -#: config/tc-arm.c:5840 +#: config/tc-arm.c:7309 #, c-format msgid "Invalid immediate for address calculation (value = 0x%08lX)" msgstr "" -#: config/tc-arm.c:5850 +#: config/tc-arm.c:7319 msgid "Invalid 8bit immediate" msgstr "" -#: config/tc-arm.c:5858 +#: config/tc-arm.c:7327 msgid "Invalid 3bit immediate" msgstr "" -#: config/tc-arm.c:5874 +#: config/tc-arm.c:7343 #, c-format msgid "Invalid immediate: %ld is too large" msgstr "" -#: config/tc-arm.c:5889 +#: config/tc-arm.c:7358 #, c-format msgid "Illegal Thumb shift value: %ld" msgstr "" -#: config/tc-arm.c:5903 +#: config/tc-arm.c:7372 config/tc-mn10300.c:1961 #, c-format msgid "Bad relocation fixup type (%d)" msgstr "" -#: config/tc-arm.c:5973 +#: config/tc-arm.c:7445 msgid "Literal referenced across section boundary (Implicit dump?)" msgstr "" -#: config/tc-arm.c:5986 +#: config/tc-arm.c:7458 #, c-format msgid "Internal_relocation (type %d) not fixed up (IMMEDIATE)" msgstr "" -#: config/tc-arm.c:5992 +#: config/tc-arm.c:7464 msgid "ADRL used for a symbol not defined in the same file" msgstr "" -#: config/tc-arm.c:5998 +#: config/tc-arm.c:7469 #, c-format msgid "Internal_relocation (type %d) not fixed up (OFFSET_IMM)" msgstr "" -#: config/tc-arm.c:6018 config/tc-mcore.c:2110 config/tc-ns32k.c:2283 +#: config/tc-arm.c:7490 config/tc-cris.c:2672 config/tc-mcore.c:2109 +#: config/tc-ns32k.c:2369 msgid "" msgstr "" -#: config/tc-arm.c:6021 +#: config/tc-arm.c:7493 #, c-format -msgid "Can not represent %s relocation in this object file format (%d)" +msgid "Cannot represent %s relocation in this object file format" msgstr "" -#: config/tc-arm.c:6042 config/tc-mips.c:11281 config/tc-sh.c:2866 +#: config/tc-arm.c:7514 config/tc-mips.c:11261 config/tc-sh.c:3177 #, c-format msgid "Can not represent %s relocation in this object file format" msgstr "" -#: config/tc-arm.c:6060 -msgid "md_estimate_size_before_relax\n" -msgstr "" - -#: config/tc-arm.c:6135 +#: config/tc-arm.c:7611 #, c-format msgid "No operator -- statement `%s'\n" msgstr "" -#: config/tc-arm.c:6153 +#: config/tc-arm.c:7629 msgid "selected processor does not support this opcode" msgstr "" -#: config/tc-arm.c:6197 +#: config/tc-arm.c:7675 #, c-format msgid "Opcode `%s' must have suffix from list: <%s>" msgstr "" -#: config/tc-arm.c:6227 +#: config/tc-arm.c:7706 msgid "Warning: Use of the 'nv' conditional is deprecated\n" msgstr "" -#: config/tc-arm.c:6244 +#: config/tc-arm.c:7723 #, c-format msgid "Opcode `%s' is unconditional\n" msgstr "" -#: config/tc-arm.c:6269 +#: config/tc-arm.c:7747 #, c-format msgid "Opcode `%s' must have suffix from <%s>\n" msgstr "" -#: config/tc-arm.c:6355 +#: config/tc-arm.c:7838 #, c-format msgid "register '%s' does not exist\n" msgstr "" -#: config/tc-arm.c:6360 +#: config/tc-arm.c:7843 #, c-format msgid "ignoring redefinition of register alias '%s'" msgstr "" -#: config/tc-arm.c:6366 +#: config/tc-arm.c:7849 #, c-format msgid "" "ignoring redefinition of register alias '%s' to non-existant register '%s'" msgstr "" -#: config/tc-arm.c:6370 +#: config/tc-arm.c:7853 msgid "ignoring incomplete .req pseuso op" msgstr "" -#: config/tc-arm.c:6550 +#: config/tc-arm.c:7860 +#, c-format +msgid "bad instruction `%s'" +msgstr "" + +#: config/tc-arm.c:8035 #, c-format msgid "Unrecognised APCS switch -m%s" msgstr "" -#: config/tc-arm.c:6693 config/tc-arm.c:6706 config/tc-arm.c:6719 -#: config/tc-arm.c:6732 config/tc-arm.c:6738 +#: config/tc-arm.c:8192 config/tc-arm.c:8205 config/tc-arm.c:8218 +#: config/tc-arm.c:8231 config/tc-arm.c:8237 #, c-format msgid "Invalid architecture variant -m%s" msgstr "" -#: config/tc-arm.c:6745 +#: config/tc-arm.c:8244 #, c-format msgid "Invalid processor variant -m%s" msgstr "" -#: config/tc-arm.c:6768 +#: config/tc-arm.c:8267 msgid "" " ARM Specific Assembler Options:\n" " -m[arm][] select processor variant\n" @@ -2045,3910 +2037,5372 @@ msgid "" " -k generate PIC code.\n" msgstr "" -#: config/tc-arm.c:6780 +#: config/tc-arm.c:8279 msgid "" " -mapcs-32, -mapcs-26 specify which ARM Procedure Calling Standard to " "use\n" +" -matpcs use ARM/Thumb Procedure Calling Standard\n" " -mapcs-float floating point args are passed in FP regs\n" " -mapcs-reentrant the code is position independent/reentrant\n" msgstr "" -#: config/tc-arm.c:6786 +#: config/tc-arm.c:8286 msgid " -moabi support the old ELF ABI\n" msgstr "" -#: config/tc-arm.c:6790 +#: config/tc-arm.c:8290 msgid "" " -EB assemble code for a big endian cpu\n" " -EL assemble code for a little endian cpu\n" msgstr "" -#: config/tc-arm.c:6939 +#: config/tc-arm.c:8443 #, c-format msgid "%s: unexpected function type: %d" msgstr "" -#: config/tc-d10v.c:228 +#: config/tc-arm.h:98 +msgid "arm convert_frag\n" +msgstr "" + +#: config/tc-avr.c:185 +msgid "Known MCU names:" +msgstr "" + +#: config/tc-avr.c:254 msgid "" -"D10V options:\n" -"-O optimize. Will do some operations in parallel.\n" +"AVR options:\n" +" -mmcu=[avr-name] select microcontroller variant\n" +" [avr-name] can be:\n" +" avr1 - AT90S1200, ATtiny1x, ATtiny28\n" +" avr2 - AT90S2xxx, AT90S4xxx, AT90S8xxx, ATtiny22\n" +" avr3 - ATmega103, ATmega603\n" +" avr4 - ATmega83, ATmega85\n" +" avr5 - ATmega161, ATmega163, ATmega32, AT94K\n" +" or immediate microcontroller name.\n" +msgstr "" + +#: config/tc-avr.c:264 +msgid "" +" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n" +" -mno-skip-bug disable warnings for skipping two-word instructions\n" +" (default for avr4, avr5)\n" +" -mno-wrap reject rjmp/rcall instructions with 8K wrap-around\n" +" (default for avr3, avr5)\n" msgstr "" -#: config/tc-d10v.c:547 config/tc-d10v.c:629 config/tc-d30v.c:652 +#: config/tc-avr.c:312 #, c-format -msgid "operand out of range: %d" +msgid "unknown MCU: %s\n" msgstr "" -#: config/tc-d10v.c:690 -msgid "Instruction must be executed in parallel with another instruction." +#: config/tc-avr.c:321 +#, c-format +msgid "redefinition of mcu type `%s' to `%s'" msgstr "" -#: config/tc-d10v.c:742 -msgid "Instruction must be executed in parallel" +#: config/tc-avr.c:372 config/tc-d10v.c:313 config/tc-d30v.c:366 +#: config/tc-mips.c:8789 config/tc-mn10200.c:375 config/tc-pj.c:356 +#: config/tc-ppc.c:4518 config/tc-sh.c:2058 config/tc-v850.c:1291 +msgid "bad call to md_atof" msgstr "" -#: config/tc-d10v.c:745 -msgid "Long instructions may not be combined." +#: config/tc-avr.c:435 +msgid "constant value required" msgstr "" -#: config/tc-d10v.c:785 -msgid "One of these instructions may not be executed in parallel." +#: config/tc-avr.c:438 +#, c-format +msgid "number must be less than %d" msgstr "" -#: config/tc-d10v.c:790 config/tc-d30v.c:860 -msgid "Two IU instructions may not be executed in parallel" +#: config/tc-avr.c:490 +msgid "`,' required" msgstr "" -#: config/tc-d10v.c:792 config/tc-d10v.c:800 config/tc-d10v.c:815 -#: config/tc-d10v.c:828 config/tc-d30v.c:861 config/tc-d30v.c:870 -msgid "Swapping instruction order" +#: config/tc-avr.c:509 +msgid "undefined combination of operands" msgstr "" -#: config/tc-d10v.c:798 config/tc-d30v.c:867 -msgid "Two MU instructions may not be executed in parallel" +#: config/tc-avr.c:518 +msgid "skipping two-word instruction" msgstr "" -#: config/tc-d10v.c:819 config/tc-d30v.c:886 -msgid "IU instruction may not be in the left container" +#: config/tc-avr.c:580 +msgid "register r16-r23 required" msgstr "" -#: config/tc-d10v.c:832 config/tc-d30v.c:899 -msgid "MU instruction may not be in the right container" +#: config/tc-avr.c:586 +msgid "register number above 15 required" msgstr "" -#: config/tc-d10v.c:836 config/tc-d30v.c:907 -msgid "unknown execution type passed to write_2_short()" +#: config/tc-avr.c:592 +msgid "even register number required" msgstr "" -#: config/tc-d10v.c:1049 config/tc-d10v.c:1063 config/tc-h8300.c:1279 -#: config/tc-h8500.c:1122 config/tc-mcore.c:989 config/tc-pj.c:274 -#: config/tc-sh.c:1355 config/tc-z8k.c:1223 -msgid "can't find opcode " +#: config/tc-avr.c:598 +msgid "register r24, r26, r28 or r30 required" msgstr "" -#: config/tc-d10v.c:1076 config/tc-d10v.c:1094 config/tc-d30v.c:1385 -msgid "Unable to mix instructions as specified" +#: config/tc-avr.c:604 +msgid "register name or number from 0 to 31 required" msgstr "" -#: config/tc-d10v.c:1142 config/tc-d30v.c:1520 -#, c-format -msgid "unknown opcode: %s" +#: config/tc-avr.c:622 +msgid "pointer register (X, Y or Z) required" msgstr "" -#: config/tc-d10v.c:1223 config/tc-d10v.c:1369 config/tc-tic80.c:537 -msgid "bad opcode or operands" +#: config/tc-avr.c:629 +msgid "cannot both predecrement and postincrement" msgstr "" -#: config/tc-d10v.c:1272 config/tc-m68k.c:4232 -msgid "value out of range" +#: config/tc-avr.c:637 +msgid "addressing mode not supported" msgstr "" -#: config/tc-d10v.c:1344 -msgid "illegal operand - register name found where none expected" +#: config/tc-avr.c:643 +msgid "can't predecrement" msgstr "" -#: config/tc-d10v.c:1380 config/tc-tic80.c:548 -msgid "Register number must be EVEN" +#: config/tc-avr.c:646 +msgid "pointer register Z required" +msgstr "" + +#: config/tc-avr.c:664 +msgid "pointer register (Y or Z) required" msgstr "" -#: config/tc-d10v.c:1412 config/tc-d30v.c:1772 config/tc-mn10200.c:1233 -#: config/tc-mn10300.c:1761 config/tc-ppc.c:5020 config/tc-v850.c:2255 +#: config/tc-avr.c:769 #, c-format -msgid "reloc %d not supported by object file format" +msgid "unknown constraint `%c'" msgstr "" -#: config/tc-d10v.c:1525 +#: config/tc-avr.c:882 config/tc-avr.c:898 config/tc-avr.c:999 #, c-format -msgid "line %d: rep or repi must include at least 4 instructions" +msgid "odd address operand: %ld" msgstr "" -#: config/tc-d10v.c:1544 config/tc-d30v.c:1953 +#: config/tc-avr.c:890 config/tc-avr.c:909 #, c-format -msgid "line %d: unknown relocation type: 0x%x" +msgid "operand out of range: %ld" msgstr "" -#: config/tc-d30v.c:191 +#: config/tc-avr.c:1008 config/tc-d10v.c:1631 config/tc-d30v.c:1990 #, c-format -msgid "Register name %s conflicts with symbol of the same name" +msgid "line %d: unknown relocation type: 0x%x" msgstr "" -#: config/tc-d30v.c:289 -msgid "" -"\n" -"D30V options:\n" -"-O Make adjacent short instructions parallel if " -"possible.\n" -"-n Warn about all NOPs inserted by the assembler.\n" -"-N\t\t\tWarn about NOPs inserted after word multiplies.\n" -"-c Warn about symbols whoes names match register " -"names.\n" -"-C Opposite of -C. -c is the default.\n" +#: config/tc-avr.c:1022 +msgid "only constant expression allowed" msgstr "" -#: config/tc-d30v.c:463 -msgid "unexpected 12-bit reloc type" +#: config/tc-avr.c:1060 config/tc-d10v.c:1495 config/tc-d30v.c:1807 +#: config/tc-mn10200.c:1254 config/tc-mn10300.c:1810 config/tc-ppc.c:5161 +#: config/tc-v850.c:2301 +#, c-format +msgid "reloc %d not supported by object file format" msgstr "" -#: config/tc-d30v.c:470 -msgid "unexpected 18-bit reloc type" +#: config/tc-avr.c:1084 config/tc-d10v.c:1102 config/tc-d10v.c:1116 +#: config/tc-h8300.c:1239 config/tc-h8500.c:1098 config/tc-mcore.c:988 +#: config/tc-pj.c:265 config/tc-sh.c:1640 config/tc-z8k.c:1195 +msgid "can't find opcode " msgstr "" -#: config/tc-d30v.c:714 +#: config/tc-avr.c:1101 #, c-format -msgid "%s NOP inserted" +msgid "illegal opcode %s for mcu %s" msgstr "" -#: config/tc-d30v.c:715 -msgid "sequential" +#: config/tc-avr.c:1109 +msgid "garbage at end of line" msgstr "" -#: config/tc-d30v.c:715 -msgid "parallel" +#: config/tc-avr.c:1173 +msgid "illegal expression" msgstr "" -#: config/tc-d30v.c:856 -msgid "Instructions may not be executed in parallel" +#: config/tc-avr.c:1199 config/tc-avr.c:1265 +msgid "`)' required" msgstr "" -#: config/tc-d30v.c:869 config/tc-d30v.c:876 config/tc-d30v.c:892 -#: config/tc-d30v.c:901 +#: config/tc-avr.c:1219 #, c-format -msgid "Executing %s in IU may not work" +msgid "constant out of 8-bit range: %d" +msgstr "" + +#: config/tc-avr.c:1222 +msgid "expression possibly out of 8-bit range" msgstr "" -#: config/tc-d30v.c:888 +#: config/tc-avr.c:1293 config/tc-avr.c:1300 #, c-format -msgid "special left instruction `%s' kills instruction `%s' in right container" +msgid "illegal %srelocation size: %d" msgstr "" -#: config/tc-d30v.c:1267 config/tc-d30v.c:1284 -msgid "Cannot assemble instruction" +#: config/tc-cris.c:672 +#, c-format +msgid "Can't hash `%s': %s\n" msgstr "" -#: config/tc-d30v.c:1269 -msgid "First opcode is long. Unable to mix instructions as specified." +#: config/tc-cris.c:673 +msgid "(unknown reason)" msgstr "" -#: config/tc-d30v.c:1337 -msgid "word of NOPs added between word multiply and load" +#: config/tc-cris.c:677 +#, c-format +msgid "Buggy opcode: `%s' \"%s\"\n" msgstr "" -#: config/tc-d30v.c:1339 -msgid "word of NOPs added between word multiply and 16-bit multiply" +#: config/tc-cris.c:1002 +#, c-format +msgid "Immediate value not in 5 bit unsigned range: %ld" msgstr "" -#: config/tc-d30v.c:1369 -msgid "Instruction uses long version, so it cannot be mixed as specified" +#: config/tc-cris.c:1018 +#, c-format +msgid "Immediate value not in 4 bit unsigned range: %ld" msgstr "" -#: config/tc-d30v.c:1453 config/tc-d30v.c:1490 +#: config/tc-cris.c:1057 #, c-format -msgid "unknown condition code: %s" +msgid "Immediate value not in 6 bit range: %ld" msgstr "" -#: config/tc-d30v.c:1483 +#: config/tc-cris.c:1072 #, c-format -msgid "cmpu doesn't support condition code %s" +msgid "Immediate value not in 6 bit unsigned range: %ld" msgstr "" -#: config/tc-d30v.c:1531 +#. Others have a generic warning. +#: config/tc-cris.c:1159 #, c-format -msgid "operands for opcode `%s' do not match any valid format" +msgid "Unimplemented register `%s' specified" msgstr "" -#: config/tc-d30v.c:1744 -msgid "Odd numbered register used as target of multi-register instruction" +#. We've come to the end of instructions with this +#. opcode, so it must be an error. +#: config/tc-cris.c:1309 +msgid "Illegal operands" msgstr "" -#: config/tc-d30v.c:1842 +#: config/tc-cris.c:1341 config/tc-cris.c:1372 #, c-format -msgid "line %d: unable to place address of symbol '%s' into a byte" +msgid "Immediate value not in 8 bit range: %ld" msgstr "" -#: config/tc-d30v.c:1845 +#: config/tc-cris.c:1351 config/tc-cris.c:1379 #, c-format -msgid "line %d: unable to place value %x into a byte" +msgid "Immediate value not in 16 bit range: %ld" msgstr "" -#: config/tc-d30v.c:1853 -#, c-format -msgid "line %d: unable to place address of symbol '%s' into a short" +#. FIXME: Find out and change to as_warn_where. Add testcase. +#: config/tc-cris.c:2316 +msgid "32-bit conditional branch generated" msgstr "" -#: config/tc-d30v.c:1856 -#, c-format -msgid "line %d: unable to place value %x into a short" +#. FIXME: Is this function mentioned in the internals.texi manual? If +#. not, add it. +#: config/tc-cris.c:2395 +msgid "Bad call to md_atof () - floating point formats are not supported" msgstr "" -#: config/tc-d30v.c:1864 +#: config/tc-cris.c:2456 #, c-format -msgid "line %d: unable to place address of symbol '%s' into a quad" +msgid "Value not in 16 bit range: %ld" msgstr "" -#: config/tc-d30v.c:2034 +#: config/tc-cris.c:2466 #, c-format -msgid "value too large to fit in %d bits" +msgid "Value not in 8 bit range: %ld" msgstr "" -#: config/tc-d30v.c:2178 +#: config/tc-cris.c:2473 #, c-format -msgid "Alignment too large: %d assumed" +msgid "Value not in 4 bit unsigned range: %ld" msgstr "" -#: config/tc-fr30.c:84 -msgid " FR30 specific command line options:\n" +#: config/tc-cris.c:2480 +#, c-format +msgid "Value not in 5 bit unsigned range: %ld" msgstr "" -#: config/tc-fr30.c:143 +#: config/tc-cris.c:2487 #, c-format -msgid "Instruction %s not allowed in a delay slot." +msgid "Value not in 6 bit range: %ld" msgstr "" -#: config/tc-fr30.c:380 config/tc-m32r.c:1537 -msgid "Addend to unresolved symbol not on word boundary." +#: config/tc-cris.c:2494 +#, c-format +msgid "Value not in 6 bit unsigned range: %ld" msgstr "" -#: config/tc-fr30.c:538 config/tc-i960.c:786 config/tc-m32r.c:1844 -msgid "Bad call to md_atof()" +#: config/tc-cris.c:2542 +msgid "Please use --help to see usage and options for this assembler.\n" msgstr "" -#: config/tc-h8300.c:254 config/tc-h8300.c:262 -msgid "Reg not valid for H8/300" +#: config/tc-cris.c:2554 +msgid "--no-underscore is invalid with a.out format" msgstr "" -#: config/tc-h8300.c:423 config/tc-h8300.c:426 config/tc-h8300.c:429 -#: config/tc-h8300.c:433 -msgid "Invalid register list for ldm/stm\n" +#: config/tc-cris.c:2619 +msgid "" +"Semantics error. This type of operand can not be relocated, it must be an " +"assembly-time constant" msgstr "" -#: config/tc-h8300.c:490 config/tc-h8300.c:553 config/tc-h8300.c:560 -msgid "Wrong size pointer register for architecture." +#: config/tc-cris.c:2673 +#, c-format +msgid "Cannot generate relocation type for symbol %s, code %s" msgstr "" -#: config/tc-h8300.c:518 config/tc-h8300.c:527 config/tc-h8300.c:537 -msgid "expected @(exp, reg16)" +#: config/tc-cris.c:2686 +msgid "CRIS-specific options:\n" msgstr "" -#: config/tc-h8300.c:617 -msgid "expect :8 or :16 here" +#: config/tc-cris.c:2688 +msgid "" +" -h, -H Don't execute, print this help text. Deprecated.\n" msgstr "" -#: config/tc-h8300.c:823 -#, c-format -msgid "operand %s0x%lx out of range." +#: config/tc-cris.c:2690 +msgid " -N Warn when branches are expanded to jumps.\n" msgstr "" -#: config/tc-h8300.c:910 -msgid "Can't work out size of operand.\n" +#: config/tc-cris.c:2692 +msgid "" +" --underscore User symbols are normally prepended with " +"underscore.\n" msgstr "" -#: config/tc-h8300.c:964 -#, c-format -msgid "Opcode `%s' with these operand types not available in H8/300 mode" +#: config/tc-cris.c:2694 +msgid " Registers will not need any prefix.\n" msgstr "" -#: config/tc-h8300.c:1016 config/tc-h8300.c:1036 -msgid "Need #1 or #2 here" +#: config/tc-cris.c:2696 +msgid " --no-underscore User symbols do not have any prefix.\n" msgstr "" -#: config/tc-h8300.c:1031 -msgid "#4 not valid on H8/300." +#: config/tc-cris.c:2698 +msgid " Registers will require a `$'-prefix.\n" msgstr "" -#: config/tc-h8300.c:1112 config/tc-h8300.c:1150 -#, c-format -msgid "branch operand has odd offset (%lx)\n" +#: config/tc-cris.c:2718 +msgid "Invalid relocation" msgstr "" -#: config/tc-h8300.c:1191 -msgid "destination operand must be 16 bit register" +#: config/tc-cris.c:2758 +msgid "Invalid pc-relative relocation" msgstr "" -#: config/tc-h8300.c:1201 -msgid "source operand must be 8 bit register" +#: config/tc-cris.c:2796 +#, c-format +msgid "Adjusted signed .word (%ld) overflows: `switch'-statement too large." msgstr "" -#: config/tc-h8300.c:1209 -msgid "destination operand must be 16bit absolute address" +#: config/tc-cris.c:2870 +msgid "Unknown .syntax operand" msgstr "" -#: config/tc-h8300.c:1216 -msgid "destination operand must be 8 bit register" -msgstr "" - -#: config/tc-h8300.c:1225 -msgid "source operand must be 16bit absolute address" -msgstr "" - -#: config/tc-h8300.c:1233 -msgid "invalid operands" -msgstr "" - -#: config/tc-h8300.c:1290 config/tc-h8500.c:1129 config/tc-mips.c:7966 -#: config/tc-sh.c:1584 config/tc-w65.c:759 config/tc-z8k.c:1235 -msgid "unknown opcode" -msgstr "" - -#: config/tc-h8300.c:1336 -msgid "mismatch between opcode size and operand size" +#: config/tc-d10v.c:246 +msgid "" +"D10V options:\n" +"-O Optimize. Will do some operations in parallel.\n" +"--gstabs-packing Pack adjacent short instructions together even\n" +" when --gstabs is specified. On by default.\n" +"--no-gstabs-packing If --gstabs is specified, do not pack adjacent\n" +" instructions together.\n" msgstr "" -#: config/tc-h8300.c:1348 config/tc-h8500.c:1157 config/tc-sh.c:1698 -#: config/tc-w65.c:791 config/tc-z8k.c:1290 -msgid "call to tc_crawl_symbol_chain \n" +#: config/tc-d10v.c:530 config/tc-d30v.c:550 config/tc-mn10200.c:951 +#: config/tc-mn10300.c:1332 config/tc-ppc.c:1972 config/tc-tic80.c:278 +#: config/tc-v850.c:2073 +msgid "illegal operand" msgstr "" -#: config/tc-h8300.c:1362 config/tc-h8500.c:1171 config/tc-sh.c:1705 -#: config/tc-w65.c:805 config/tc-z8k.c:1304 -msgid "call to tc_headers_hook \n" +#: config/tc-d10v.c:573 config/tc-d10v.c:655 config/tc-d30v.c:656 +#, c-format +msgid "operand out of range: %d" msgstr "" -#: config/tc-h8300.c:1451 config/tc-h8500.c:1260 config/tc-z8k.c:1415 -msgid "call to tc_aout_fix_to_chars \n" +#: config/tc-d10v.c:716 +msgid "Instruction must be executed in parallel with another instruction." msgstr "" -#: config/tc-h8300.c:1461 config/tc-z8k.c:1425 -msgid "call to md_convert_frag \n" +#: config/tc-d10v.c:772 +msgid "Instruction must be executed in parallel" msgstr "" -#: config/tc-h8300.c:1506 config/tc-z8k.c:1500 -msgid "call tomd_estimate_size_before_relax \n" +#: config/tc-d10v.c:775 +msgid "Long instructions may not be combined." msgstr "" -#: config/tc-h8500.c:337 -msgid ":24 not valid for this opcode" +#: config/tc-d10v.c:817 +msgid "One of these instructions may not be executed in parallel." msgstr "" -#: config/tc-h8500.c:344 -msgid "expect :8,:16 or :24" +#: config/tc-d10v.c:821 config/tc-d30v.c:877 +msgid "Two IU instructions may not be executed in parallel" msgstr "" -#: config/tc-h8500.c:401 -msgid "syntax error in reg list" +#: config/tc-d10v.c:823 config/tc-d10v.c:831 config/tc-d10v.c:848 +#: config/tc-d10v.c:865 config/tc-d30v.c:878 config/tc-d30v.c:887 +msgid "Swapping instruction order" msgstr "" -#: config/tc-h8500.c:419 -msgid "missing final register in range" +#: config/tc-d10v.c:829 config/tc-d30v.c:884 +msgid "Two MU instructions may not be executed in parallel" msgstr "" -#: config/tc-h8500.c:506 config/tc-h8500.c:513 config/tc-h8500.c:519 -msgid "expected @(exp, Rn)" +#: config/tc-d10v.c:852 config/tc-d30v.c:904 +msgid "IU instruction may not be in the left container" msgstr "" -#: config/tc-h8500.c:535 -msgid "@Rn+ needs word register" +#: config/tc-d10v.c:854 config/tc-d10v.c:871 +msgid "" +"Instruction in R container is squashed by flow control instruction in L " +"container." msgstr "" -#: config/tc-h8500.c:545 -msgid "@Rn needs word register" +#: config/tc-d10v.c:869 config/tc-d30v.c:915 +msgid "MU instruction may not be in the right container" msgstr "" -#: config/tc-h8500.c:845 config/tc-sh.c:1149 -#, c-format -msgid "unhandled %d\n" +#: config/tc-d10v.c:877 config/tc-d30v.c:927 +msgid "unknown execution type passed to write_2_short()" msgstr "" -#: config/tc-h8500.c:873 config/tc-sh.c:1173 -#, c-format -msgid "operand must be absolute in range %d..%d" +#: config/tc-d10v.c:1130 config/tc-d10v.c:1151 config/tc-d30v.c:1411 +msgid "Unable to mix instructions as specified" msgstr "" -#: config/tc-h8500.c:963 config/tc-sh.c:1299 +#: config/tc-d10v.c:1198 config/tc-d30v.c:1548 #, c-format -msgid "failed for %d\n" -msgstr "" - -#: config/tc-h8500.c:1145 config/tc-sh.c:1394 config/tc-sh.c:1632 -#: config/tc-w65.c:779 -msgid "invalid operands for opcode" +msgid "unknown opcode: %s" msgstr "" -#: config/tc-hppa.c:1140 -msgid "Missing .exit\n" +#: config/tc-d10v.c:1280 config/tc-d10v.c:1451 config/tc-tic80.c:535 +msgid "bad opcode or operands" msgstr "" -#: config/tc-hppa.c:1143 -msgid "Missing .procend\n" +#: config/tc-d10v.c:1353 config/tc-m68k.c:4286 +msgid "value out of range" msgstr "" -#: config/tc-hppa.c:1322 -msgid "Invalid field selector. Assuming F%%." +#: config/tc-d10v.c:1426 +msgid "illegal operand - register name found where none expected" msgstr "" -#: config/tc-hppa.c:1353 -msgid "-R option not supported on this target." +#: config/tc-d10v.c:1462 config/tc-tic80.c:546 +msgid "Register number must be EVEN" msgstr "" -#: config/tc-hppa.c:1369 config/tc-sparc.c:746 config/tc-sparc.c:781 +#: config/tc-d10v.c:1611 #, c-format -msgid "Internal error: can't hash `%s': %s\n" +msgid "line %d: rep or repi must include at least 4 instructions" msgstr "" -#: config/tc-hppa.c:1377 config/tc-i860.c:191 +#: config/tc-d30v.c:192 #, c-format -msgid "internal error: losing opcode: `%s' \"%s\"\n" -msgstr "" - -#: config/tc-hppa.c:1446 config/tc-hppa.c:6873 config/tc-hppa.c:6928 -msgid "Missing function name for .PROC (corrupted label chain)" -msgstr "" - -#: config/tc-hppa.c:1449 config/tc-hppa.c:6931 -msgid "Missing function name for .PROC" +msgid "Register name %s conflicts with symbol of the same name" msgstr "" -#: config/tc-hppa.c:1570 config/tc-hppa.c:4715 -msgid "could not update architecture and machine" +#: config/tc-d30v.c:288 +msgid "" +"\n" +"D30V options:\n" +"-O Make adjacent short instructions parallel if " +"possible.\n" +"-n Warn about all NOPs inserted by the assembler.\n" +"-N\t\t\tWarn about NOPs inserted after word multiplies.\n" +"-c Warn about symbols whoes names match register " +"names.\n" +"-C Opposite of -C. -c is the default.\n" msgstr "" -#: config/tc-hppa.c:1783 -msgid "Invalid Indexed Load Completer." +#: config/tc-d30v.c:462 +msgid "unexpected 12-bit reloc type" msgstr "" -#: config/tc-hppa.c:1788 -msgid "Invalid Indexed Load Completer Syntax." +#: config/tc-d30v.c:469 +msgid "unexpected 18-bit reloc type" msgstr "" -#: config/tc-hppa.c:1824 -msgid "Invalid Short Load/Store Completer." +#: config/tc-d30v.c:720 +#, c-format +msgid "%s NOP inserted" msgstr "" -#: config/tc-hppa.c:1883 config/tc-hppa.c:1888 -msgid "Invalid Store Bytes Short Completer" +#: config/tc-d30v.c:721 +msgid "sequential" msgstr "" -#: config/tc-hppa.c:2199 config/tc-hppa.c:2205 -msgid "Invalid left/right combination completer" +#: config/tc-d30v.c:721 +msgid "parallel" msgstr "" -#: config/tc-hppa.c:2254 config/tc-hppa.c:2261 -msgid "Invalid permutation completer" +#: config/tc-d30v.c:873 +msgid "Instructions may not be executed in parallel" msgstr "" -#: config/tc-hppa.c:2362 +#: config/tc-d30v.c:886 #, c-format -msgid "Invalid Add Condition: %s" +msgid "Executing %s in IU may not work" msgstr "" -#: config/tc-hppa.c:2373 config/tc-hppa.c:2383 +#: config/tc-d30v.c:893 #, c-format -msgid "Invalid Add and Branch Condition: %c" -msgstr "" - -#: config/tc-hppa.c:2404 -msgid "Invalid Compare/Subtract Condition" +msgid "Executing %s in IU may not work in parallel execution" msgstr "" -#: config/tc-hppa.c:2444 +#: config/tc-d30v.c:906 #, c-format -msgid "Invalid Bit Branch Condition: %c" +msgid "special left instruction `%s' kills instruction `%s' in right container" msgstr "" -#: config/tc-hppa.c:2530 +#: config/tc-d30v.c:917 #, c-format -msgid "Invalid Compare/Subtract Condition: %s" +msgid "Executing %s in reverse serial with %s may not work" msgstr "" -#: config/tc-hppa.c:2542 +#: config/tc-d30v.c:920 #, c-format -msgid "Invalid Compare/Subtract Condition: %c" +msgid "Executing %s in IU in reverse serial may not work" msgstr "" -#: config/tc-hppa.c:2557 -msgid "Invalid Compare and Branch Condition." +#: config/tc-d30v.c:1290 config/tc-d30v.c:1307 +msgid "Cannot assemble instruction" msgstr "" -#: config/tc-hppa.c:2655 -msgid "Invalid Logical Instruction Condition." +#: config/tc-d30v.c:1292 +msgid "First opcode is long. Unable to mix instructions as specified." msgstr "" -#: config/tc-hppa.c:2711 -msgid "Invalid Shift/Extract/Deposit Condition." +#: config/tc-d30v.c:1361 +msgid "word of NOPs added between word multiply and load" msgstr "" -#: config/tc-hppa.c:2823 -msgid "Invalid Unit Instruction Condition." +#: config/tc-d30v.c:1363 +msgid "word of NOPs added between word multiply and 16-bit multiply" msgstr "" -#: config/tc-hppa.c:3096 config/tc-hppa.c:3129 config/tc-hppa.c:3166 -#: config/tc-hppa.c:3205 -msgid "Branch to unaligned address" +#: config/tc-d30v.c:1395 +msgid "Instruction uses long version, so it cannot be mixed as specified" msgstr "" -#: config/tc-hppa.c:3389 -msgid "Invalid SFU identifier" +#: config/tc-d30v.c:1478 config/tc-d30v.c:1516 +#, c-format +msgid "unknown condition code: %s" msgstr "" -#: config/tc-hppa.c:3439 -msgid "Invalid COPR identifier" +#: config/tc-d30v.c:1509 +#, c-format +msgid "cmpu doesn't support condition code %s" msgstr "" -#: config/tc-hppa.c:3568 -msgid "Invalid Floating Point Operand Format." +#: config/tc-d30v.c:1559 +#, c-format +msgid "operands for opcode `%s' do not match any valid format" msgstr "" -#: config/tc-hppa.c:3706 config/tc-hppa.c:3730 config/tc-hppa.c:3753 -#: config/tc-hppa.c:3776 config/tc-hppa.c:3799 -msgid "Invalid register for single precision fmpyadd or fmpysub" +#: config/tc-d30v.c:1777 +msgid "Odd numbered register used as target of multi-register instruction" msgstr "" -#: config/tc-hppa.c:3848 +#: config/tc-d30v.c:1879 #, c-format -msgid "Invalid operands %s" +msgid "line %d: unable to place address of symbol '%s' into a byte" msgstr "" -#: config/tc-hppa.c:4415 -msgid "Unknown relocation encountered in md_apply_fix." +#: config/tc-d30v.c:1882 +#, c-format +msgid "line %d: unable to place value %x into a byte" msgstr "" -#: config/tc-hppa.c:4425 +#: config/tc-d30v.c:1890 #, c-format -msgid "no hppa_fixup entry for this fixup (fixP = 0x%x, type = 0x%x)\n" +msgid "line %d: unable to place address of symbol '%s' into a short" msgstr "" -#: config/tc-hppa.c:4567 config/tc-hppa.c:4592 +#: config/tc-d30v.c:1893 #, c-format -msgid "Undefined register: '%s'." +msgid "line %d: unable to place value %x into a short" msgstr "" -#: config/tc-hppa.c:4630 +#: config/tc-d30v.c:1901 #, c-format -msgid "Non-absolute symbol: '%s'." +msgid "line %d: unable to place address of symbol '%s' into a quad" msgstr "" -#: config/tc-hppa.c:4645 +#: config/tc-d30v.c:2072 #, c-format -msgid "Undefined absolute constant: '%s'." +msgid "value too large to fit in %d bits" msgstr "" -#: config/tc-hppa.c:4754 +#: config/tc-d30v.c:2215 #, c-format -msgid "Invalid FP Compare Condition: %s" +msgid "Alignment too large: %d assumed" msgstr "" -#: config/tc-hppa.c:4810 -#, c-format -msgid "Invalid FTEST completer: %s" +#: config/tc-fr30.c:84 +msgid " FR30 specific command line options:\n" msgstr "" -#: config/tc-hppa.c:4877 config/tc-hppa.c:4915 +#: config/tc-fr30.c:143 #, c-format -msgid "Invalid FP Operand Format: %3s" +msgid "Instruction %s not allowed in a delay slot." msgstr "" -#: config/tc-hppa.c:4994 -msgid "Bad segment in expression." +#: config/tc-fr30.c:380 config/tc-m32r.c:1555 +msgid "Addend to unresolved symbol not on word boundary." msgstr "" -#: config/tc-hppa.c:5053 -msgid "Bad segment (should be absolute)." +#: config/tc-fr30.c:538 config/tc-i960.c:772 config/tc-m32r.c:1864 +msgid "Bad call to md_atof()" msgstr "" -#: config/tc-hppa.c:5152 -#, c-format -msgid "Invalid argument location: %s\n" +#: config/tc-h8300.c:245 config/tc-h8300.c:253 +msgid "Reg not valid for H8/300" msgstr "" -#: config/tc-hppa.c:5183 -#, c-format -msgid "Invalid argument description: %d" +#: config/tc-h8300.c:413 config/tc-h8300.c:416 config/tc-h8300.c:419 +#: config/tc-h8300.c:423 +msgid "Invalid register list for ldm/stm\n" msgstr "" -#: config/tc-hppa.c:5206 -#, c-format -msgid "Invalid Nullification: (%c)" +#: config/tc-h8300.c:475 config/tc-h8300.c:537 config/tc-h8300.c:544 +msgid "Wrong size pointer register for architecture." msgstr "" -#: config/tc-hppa.c:5950 -#, c-format -msgid "Invalid .CALL argument: %s" +#: config/tc-h8300.c:502 config/tc-h8300.c:511 config/tc-h8300.c:521 +msgid "expected @(exp, reg16)" msgstr "" -#: config/tc-hppa.c:6082 -msgid ".callinfo is not within a procedure definition" +#: config/tc-h8300.c:600 +msgid "expect :8 or :16 here" msgstr "" -#: config/tc-hppa.c:6102 +#: config/tc-h8300.c:801 #, c-format -msgid "FRAME parameter must be a multiple of 8: %d\n" +msgid "operand %s0x%lx out of range." msgstr "" -#: config/tc-hppa.c:6121 -msgid "Value for ENTRY_GR must be in the range 3..18\n" +#: config/tc-h8300.c:889 +msgid "Can't work out size of operand.\n" msgstr "" -#: config/tc-hppa.c:6133 -msgid "Value for ENTRY_FR must be in the range 12..21\n" +#: config/tc-h8300.c:937 +#, c-format +msgid "Opcode `%s' with these operand types not available in H8/300 mode" msgstr "" -#: config/tc-hppa.c:6143 -msgid "Value for ENTRY_SR must be 3\n" +#: config/tc-h8300.c:988 config/tc-h8300.c:1008 +msgid "Need #1 or #2 here" msgstr "" -#: config/tc-hppa.c:6199 -#, c-format -msgid "Invalid .CALLINFO argument: %s" +#: config/tc-h8300.c:1003 +msgid "#4 not valid on H8/300." msgstr "" -#: config/tc-hppa.c:6293 -msgid "The .ENTER pseudo-op is not supported" +#: config/tc-h8300.c:1089 config/tc-h8300.c:1121 +#, c-format +msgid "branch operand has odd offset (%lx)\n" msgstr "" -#: config/tc-hppa.c:6309 -msgid "Misplaced .entry. Ignored." +#: config/tc-h8300.c:1159 +msgid "destination operand must be 16 bit register" msgstr "" -#: config/tc-hppa.c:6313 -msgid "Missing .callinfo." +#: config/tc-h8300.c:1168 +msgid "source operand must be 8 bit register" msgstr "" -#: config/tc-hppa.c:6361 -msgid ".REG must use a label" +#: config/tc-h8300.c:1176 +msgid "destination operand must be 16bit absolute address" msgstr "" -#: config/tc-hppa.c:6363 -msgid ".EQU must use a label" +#: config/tc-h8300.c:1183 +msgid "destination operand must be 8 bit register" msgstr "" -#: config/tc-hppa.c:6416 -msgid ".EXIT must appear within a procedure" +#: config/tc-h8300.c:1191 +msgid "source operand must be 16bit absolute address" msgstr "" -#: config/tc-hppa.c:6420 -msgid "Missing .callinfo" +#: config/tc-h8300.c:1199 +msgid "invalid operands" msgstr "" -#: config/tc-hppa.c:6424 -msgid "No .ENTRY for this .EXIT" +#: config/tc-h8300.c:1250 config/tc-h8500.c:1104 config/tc-mips.c:7984 +#: config/tc-sh.c:1877 config/tc-w65.c:740 config/tc-z8k.c:1205 +msgid "unknown opcode" msgstr "" -#: config/tc-hppa.c:6451 -#, c-format -msgid "Cannot define export symbol: %s\n" +#: config/tc-h8300.c:1296 +msgid "mismatch between opcode size and operand size" msgstr "" -#: config/tc-hppa.c:6504 -#, c-format -msgid "Using ENTRY rather than CODE in export directive for %s" +#: config/tc-h8300.c:1307 config/tc-h8500.c:1131 config/tc-sh.c:2013 +#: config/tc-w65.c:770 config/tc-z8k.c:1258 +msgid "call to tc_crawl_symbol_chain \n" msgstr "" -#: config/tc-hppa.c:6613 -#, c-format -msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s" +#: config/tc-h8300.c:1321 config/tc-h8500.c:1145 config/tc-sh.c:2020 +#: config/tc-w65.c:784 config/tc-z8k.c:1272 +msgid "call to tc_headers_hook \n" msgstr "" -#: config/tc-hppa.c:6695 -msgid "Missing label name on .LABEL" +#: config/tc-h8300.c:1412 config/tc-h8500.c:1235 config/tc-z8k.c:1386 +msgid "call to tc_aout_fix_to_chars \n" msgstr "" -#: config/tc-hppa.c:6700 -msgid "extra .LABEL arguments ignored." +#: config/tc-h8300.c:1422 config/tc-z8k.c:1396 +msgid "call to md_convert_frag \n" msgstr "" -#: config/tc-hppa.c:6717 -msgid "The .LEAVE pseudo-op is not supported" +#: config/tc-h8300.c:1467 config/tc-z8k.c:1477 +msgid "call tomd_estimate_size_before_relax \n" msgstr "" -#: config/tc-hppa.c:6756 -msgid "Unrecognized .LEVEL argument\n" +#: config/tc-h8500.c:333 +msgid ":24 not valid for this opcode" msgstr "" -#: config/tc-hppa.c:6792 -#, c-format -msgid "Cannot define static symbol: %s\n" +#: config/tc-h8500.c:340 +msgid "expect :8,:16 or :24" msgstr "" -#: config/tc-hppa.c:6827 -msgid "Nested procedures" +#: config/tc-h8500.c:397 +msgid "syntax error in reg list" msgstr "" -#: config/tc-hppa.c:6837 -msgid "Cannot allocate unwind descriptor\n" +#: config/tc-h8500.c:415 +msgid "missing final register in range" msgstr "" -#: config/tc-hppa.c:6935 -msgid "misplaced .procend" +#: config/tc-h8500.c:502 config/tc-h8500.c:509 config/tc-h8500.c:515 +msgid "expected @(exp, Rn)" msgstr "" -#: config/tc-hppa.c:6938 -msgid "Missing .callinfo for this procedure" +#: config/tc-h8500.c:531 +msgid "@Rn+ needs word register" msgstr "" -#: config/tc-hppa.c:6941 -msgid "Missing .EXIT for a .ENTRY" +#: config/tc-h8500.c:541 +msgid "@Rn needs word register" msgstr "" -#: config/tc-hppa.c:6980 -msgid "Not in a space.\n" +#: config/tc-h8500.c:838 config/tc-sh.c:1357 +#, c-format +msgid "unhandled %d\n" msgstr "" -#: config/tc-hppa.c:6983 -msgid "Not in a subspace.\n" +#: config/tc-h8500.c:866 config/tc-sh.c:1382 +#, c-format +msgid "operand must be absolute in range %d..%d" msgstr "" -#: config/tc-hppa.c:7073 -msgid "Invalid .SPACE argument" +#: config/tc-h8500.c:955 config/tc-sh.c:1580 +#, c-format +msgid "failed for %d\n" msgstr "" -#: config/tc-hppa.c:7121 -msgid "Can't change spaces within a procedure definition. Ignored" +#: config/tc-h8500.c:1120 config/tc-sh.c:1681 config/tc-sh.c:1926 +#: config/tc-w65.c:759 +msgid "invalid operands for opcode" msgstr "" -#: config/tc-hppa.c:7248 +#. Simple range checking for FIELD againt HIGH and LOW bounds. +#. IGNORE is used to suppress the error message. +#: config/tc-hppa.c:1119 #, c-format -msgid "Undefined space: '%s' Assuming space number = 0." +msgid "Field out of range [%d..%d] (%d)." msgstr "" -#: config/tc-hppa.c:7272 -msgid "Must be in a space before changing or declaring subspaces.\n" +#. Simple alignment checking for FIELD againt ALIGN (a power of two). +#. IGNORE is used to suppress the error message. +#: config/tc-hppa.c:1133 +#, c-format +msgid "Field not properly aligned [%d] (%d)." msgstr "" -#: config/tc-hppa.c:7276 -msgid "Can't change subspaces within a procedure definition. Ignored" +#: config/tc-hppa.c:1162 +msgid "Missing .exit\n" msgstr "" -#: config/tc-hppa.c:7311 -msgid "Parameters of an existing subspace can't be modified" +#: config/tc-hppa.c:1165 +msgid "Missing .procend\n" msgstr "" -#: config/tc-hppa.c:7362 -msgid "Alignment must be a power of 2" +#: config/tc-hppa.c:1345 +msgid "Invalid field selector. Assuming F%%." msgstr "" -#: config/tc-hppa.c:7404 -msgid "FIRST not supported as a .SUBSPACE argument" +#: config/tc-hppa.c:1372 config/tc-hppa.c:6839 config/tc-hppa.c:6845 +#: config/tc-hppa.c:6851 config/tc-hppa.c:6857 config/tc-mn10300.c:924 +#: config/tc-mn10300.c:2133 +msgid "could not set architecture and machine" msgstr "" -#: config/tc-hppa.c:7406 -msgid "Invalid .SUBSPACE argument" +#: config/tc-hppa.c:1378 +msgid "-R option not supported on this target." msgstr "" -#: config/tc-hppa.c:7589 +#: config/tc-hppa.c:1394 config/tc-sparc.c:802 config/tc-sparc.c:838 #, c-format -msgid "Internal error: Unable to find containing space for %s." +msgid "Internal error: can't hash `%s': %s\n" msgstr "" -#: config/tc-hppa.c:7630 +#: config/tc-hppa.c:1402 config/tc-i860.c:190 #, c-format -msgid "Out of memory: could not allocate new space chain entry: %s\n" +msgid "internal error: losing opcode: `%s' \"%s\"\n" msgstr "" -#: config/tc-hppa.c:7716 -#, c-format -msgid "Out of memory: could not allocate new subspace chain entry: %s\n" +#: config/tc-hppa.c:1471 config/tc-hppa.c:6978 config/tc-hppa.c:7033 +msgid "Missing function name for .PROC (corrupted label chain)" msgstr "" -#: config/tc-hppa.c:8383 -#, c-format -msgid "Symbol '%s' could not be created." +#: config/tc-hppa.c:1474 config/tc-hppa.c:7036 +msgid "Missing function name for .PROC" msgstr "" -#: config/tc-hppa.c:8387 -msgid "No memory for symbol name." +#: config/tc-hppa.c:1582 config/tc-hppa.c:4812 +msgid "could not update architecture and machine" msgstr "" -#: config/tc-i386.c:509 -msgid "same type of prefix used twice" +#: config/tc-hppa.c:1789 +msgid "Invalid Indexed Load Completer." msgstr "" -#: config/tc-i386.c:552 -msgid "bad argument to syntax directive." +#: config/tc-hppa.c:1794 +msgid "Invalid Indexed Load Completer Syntax." msgstr "" -#: config/tc-i386.c:636 config/tc-m68k.c:3750 -#, c-format -msgid "Internal Error: Can't hash %s: %s" +#: config/tc-hppa.c:1830 +msgid "Invalid Short Load/Store Completer." msgstr "" -#: config/tc-i386.c:866 -msgid "Unknown" +#: config/tc-hppa.c:1889 config/tc-hppa.c:1894 +msgid "Invalid Store Bytes Short Completer" msgstr "" -#: config/tc-i386.c:914 config/tc-i386.c:4407 -#, c-format -msgid "can not do %d byte pc-relative relocation" +#: config/tc-hppa.c:2205 config/tc-hppa.c:2211 +msgid "Invalid left/right combination completer" msgstr "" -#: config/tc-i386.c:924 config/tc-i386.c:4421 -#, c-format -msgid "can not do %d byte relocation" +#: config/tc-hppa.c:2260 config/tc-hppa.c:2267 +msgid "Invalid permutation completer" msgstr "" -#: config/tc-i386.c:1030 config/tc-i386.c:1113 +#: config/tc-hppa.c:2368 #, c-format -msgid "no such 386 instruction: `%s'" +msgid "Invalid Add Condition: %s" msgstr "" -#: config/tc-i386.c:1039 +#: config/tc-hppa.c:2379 config/tc-hppa.c:2389 #, c-format -msgid "invalid character %s in mnemonic" +msgid "Invalid Add and Branch Condition: %c" msgstr "" -#: config/tc-i386.c:1046 -msgid "expecting prefix; got nothing" +#: config/tc-hppa.c:2410 +msgid "Invalid Compare/Subtract Condition" msgstr "" -#: config/tc-i386.c:1048 -msgid "expecting mnemonic; got nothing" +#: config/tc-hppa.c:2450 +#, c-format +msgid "Invalid Bit Branch Condition: %c" msgstr "" -#: config/tc-i386.c:1066 +#: config/tc-hppa.c:2536 #, c-format -msgid "redundant %s prefix" +msgid "Invalid Compare/Subtract Condition: %s" msgstr "" -#: config/tc-i386.c:1122 +#: config/tc-hppa.c:2548 #, c-format -msgid "expecting string instruction after `%s'" +msgid "Invalid Compare/Subtract Condition: %c" msgstr "" -#: config/tc-i386.c:1145 -#, c-format -msgid "invalid character %s before operand %d" +#: config/tc-hppa.c:2563 +msgid "Invalid Compare and Branch Condition." msgstr "" -#: config/tc-i386.c:1159 -#, c-format -msgid "unbalanced parenthesis in operand %d." +#: config/tc-hppa.c:2659 +msgid "Invalid Logical Instruction Condition." msgstr "" -#: config/tc-i386.c:1162 -#, c-format -msgid "unbalanced brackets in operand %d." +#: config/tc-hppa.c:2714 +msgid "Invalid Shift/Extract/Deposit Condition." msgstr "" -#: config/tc-i386.c:1171 -#, c-format -msgid "invalid character %s in operand %d" +#: config/tc-hppa.c:2826 +msgid "Invalid Unit Instruction Condition." msgstr "" -#: config/tc-i386.c:1198 -#, c-format -msgid "spurious operands; (%d operands/instruction max)" +#: config/tc-hppa.c:3174 config/tc-hppa.c:3205 config/tc-hppa.c:3238 +#: config/tc-hppa.c:3270 +msgid "Branch to unaligned address" msgstr "" -#: config/tc-i386.c:1219 -msgid "expecting operand after ','; got nothing" +#: config/tc-hppa.c:3450 +msgid "Invalid SFU identifier" msgstr "" -#: config/tc-i386.c:1224 -msgid "expecting operand before ','; got nothing" +#: config/tc-hppa.c:3500 +msgid "Invalid COPR identifier" msgstr "" -#. we found no match -#: config/tc-i386.c:1464 -#, c-format -msgid "suffix or operands invalid for `%s'" +#: config/tc-hppa.c:3629 +msgid "Invalid Floating Point Operand Format." +msgstr "" + +#: config/tc-hppa.c:3746 config/tc-hppa.c:3766 config/tc-hppa.c:3786 +#: config/tc-hppa.c:3806 config/tc-hppa.c:3826 +msgid "Invalid register for single precision fmpyadd or fmpysub" msgstr "" -#: config/tc-i386.c:1472 +#: config/tc-hppa.c:3883 #, c-format -msgid "indirect %s without `*'" +msgid "Invalid operands %s" msgstr "" -#. Warn them that a data or address size prefix doesn't affect -#. assembly of the next line of code. -#: config/tc-i386.c:1479 +#: config/tc-hppa.c:4001 #, c-format -msgid "stand-alone `%s' prefix" +msgid "Cannot handle fixup at %s:%d" msgstr "" -#: config/tc-i386.c:1514 config/tc-i386.c:1529 -msgid "`%s' operand %d must use `%%es' segment" +#: config/tc-hppa.c:4296 +msgid " -Q ignored\n" msgstr "" -#: config/tc-i386.c:1596 config/tc-i386.c:1637 config/tc-i386.c:1664 -msgid "using `%%%s' instead of `%%%s' due to `%c' suffix" +#: config/tc-hppa.c:4300 +msgid " -c print a warning if a comment is found\n" msgstr "" -#: config/tc-i386.c:1609 config/tc-i386.c:1626 config/tc-i386.c:1653 -msgid "`%%%s' not allowed with `%s%c'" +#: config/tc-hppa.c:4366 +#, c-format +msgid "no hppa_fixup entry for fixup type 0x%x at %s:%d" msgstr "" -#: config/tc-i386.c:1697 config/tc-i386.c:1717 -msgid "no instruction mnemonic suffix given; can't determine immediate size" +#: config/tc-hppa.c:4533 +msgid "Unknown relocation encountered in md_apply_fix." msgstr "" -#: config/tc-i386.c:1742 -msgid "" -"no instruction mnemonic suffix given and no register operands; can't size " -"instruction" +#: config/tc-hppa.c:4676 config/tc-hppa.c:4701 +#, c-format +msgid "Undefined register: '%s'." msgstr "" -#. reversed arguments on faddp, fsubp, etc. -#: config/tc-i386.c:1844 -msgid "translating to `%s %%%s,%%%s'" +#: config/tc-hppa.c:4735 +#, c-format +msgid "Non-absolute symbol: '%s'." msgstr "" -#. extraneous `l' suffix on fp insn -#: config/tc-i386.c:1851 -msgid "translating to `%s %%%s'" +#: config/tc-hppa.c:4750 +#, c-format +msgid "Undefined absolute constant: '%s'." msgstr "" -#: config/tc-i386.c:2066 -msgid "you can't `pop %%cs'" +#: config/tc-hppa.c:4851 +#, c-format +msgid "Invalid FP Compare Condition: %s" msgstr "" -#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. -#: config/tc-i386.c:2097 +#: config/tc-hppa.c:4907 #, c-format -msgid "translating to `%sp'" +msgid "Invalid FTEST completer: %s" msgstr "" -#: config/tc-i386.c:2146 config/tc-i386.c:2208 config/tc-i386.c:2250 -msgid "skipping prefixes on this instruction" +#: config/tc-hppa.c:4974 config/tc-hppa.c:5012 +#, c-format +msgid "Invalid FP Operand Format: %3s" msgstr "" -#: config/tc-i386.c:2265 -msgid "16-bit jump out of range" +#: config/tc-hppa.c:5091 +msgid "Bad segment in expression." msgstr "" -#: config/tc-i386.c:2274 +#: config/tc-hppa.c:5150 +msgid "Bad segment (should be absolute)." +msgstr "" + +#: config/tc-hppa.c:5193 #, c-format -msgid "can't handle non absolute segment in `%s'" +msgid "Invalid argument location: %s\n" msgstr "" -#: config/tc-i386.c:2382 config/tc-i386.c:2432 +#: config/tc-hppa.c:5224 #, c-format -msgid "%ld shortened to %ld" +msgid "Invalid argument description: %d" msgstr "" -#: config/tc-i386.c:2502 -msgid "only 1 or 2 immediate operands are allowed" +#: config/tc-hppa.c:5247 +#, c-format +msgid "Invalid Nullification: (%c)" msgstr "" -#: config/tc-i386.c:2534 config/tc-i386.c:2755 -msgid "GOT relocations not supported in 16 bit mode" +#: config/tc-hppa.c:5983 +#, c-format +msgid "Invalid .CALL argument: %s" msgstr "" -#: config/tc-i386.c:2555 config/tc-i386.c:2776 -msgid "bad reloc specifier in expression" +#: config/tc-hppa.c:6114 +msgid ".callinfo is not within a procedure definition" msgstr "" -#: config/tc-i386.c:2573 config/tc-i386.c:2810 +#: config/tc-hppa.c:6134 #, c-format -msgid "ignoring junk `%s' after expression" +msgid "FRAME parameter must be a multiple of 8: %d\n" msgstr "" -#. missing or bad expr becomes absolute 0 -#: config/tc-i386.c:2580 -#, c-format -msgid "missing or invalid immediate expression `%s' taken as 0" +#: config/tc-hppa.c:6153 +msgid "Value for ENTRY_GR must be in the range 3..18\n" msgstr "" -#: config/tc-i386.c:2607 config/tc-i386.c:2853 -#, c-format -msgid "unimplemented segment %s in operand" +#: config/tc-hppa.c:6165 +msgid "Value for ENTRY_FR must be in the range 12..21\n" msgstr "" -#: config/tc-i386.c:2609 config/tc-i386.c:2855 -#, c-format -msgid "unimplemented segment type %d in operand" +#: config/tc-hppa.c:6175 +msgid "Value for ENTRY_SR must be 3\n" msgstr "" -#: config/tc-i386.c:2653 +#: config/tc-hppa.c:6231 #, c-format -msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'" +msgid "Invalid .CALLINFO argument: %s" msgstr "" -#: config/tc-i386.c:2659 -#, c-format -msgid "scale factor of %d without an index register" +#: config/tc-hppa.c:6342 +msgid "The .ENTER pseudo-op is not supported" msgstr "" -#. missing or bad expr becomes absolute 0 -#: config/tc-i386.c:2821 -#, c-format -msgid "missing or invalid displacement expression `%s' taken as 0" +#: config/tc-hppa.c:6358 +msgid "Misplaced .entry. Ignored." msgstr "" -#: config/tc-i386.c:3035 config/tc-i386.c:3041 config/tc-i386.c:3050 -#, c-format -msgid "bad segment name `%s'" +#: config/tc-hppa.c:6362 +msgid "Missing .callinfo." msgstr "" -#: config/tc-i386.c:3108 -#, c-format -msgid "`%s' is not a valid base/index expression" +#: config/tc-hppa.c:6426 +msgid ".REG expression must be a register" msgstr "" -#: config/tc-i386.c:3112 -#, c-format -msgid "`%s' is not a valid %s bit base/index expression" +#: config/tc-hppa.c:6442 read.c:4728 +msgid "bad or irreducible absolute expression; zero assumed" msgstr "" -#: config/tc-i386.c:3133 config/tc-i386.c:3487 -#, c-format -msgid "too many memory references for `%s'" +#: config/tc-hppa.c:6453 +msgid ".REG must use a label" msgstr "" -#: config/tc-i386.c:3219 config/tc-i386.c:3354 config/tc-i386.c:3457 -#: config/tc-i386.c:3572 config/tc-i386.c:3608 -#, c-format -msgid "bad register name `%s'" +#: config/tc-hppa.c:6455 +msgid ".EQU must use a label" msgstr "" -#: config/tc-i386.c:3433 -#, c-format -msgid "bad memory operand `%s'" +#: config/tc-hppa.c:6508 +msgid ".EXIT must appear within a procedure" msgstr "" -#: config/tc-i386.c:3448 -#, c-format -msgid "junk `%s' after register" +#: config/tc-hppa.c:6512 +msgid "Missing .callinfo" msgstr "" -#: config/tc-i386.c:3465 -msgid "immediate operand illegal with absolute jump" +#: config/tc-hppa.c:6516 +msgid "No .ENTRY for this .EXIT" msgstr "" -#: config/tc-i386.c:3565 +#: config/tc-hppa.c:6543 #, c-format -msgid "expecting `,' or `)' after index register in `%s'" +msgid "Cannot define export symbol: %s\n" msgstr "" -#: config/tc-i386.c:3587 +#: config/tc-hppa.c:6601 #, c-format -msgid "expecting `)' after scale factor in `%s'" +msgid "Using ENTRY rather than CODE in export directive for %s" msgstr "" -#: config/tc-i386.c:3594 +#: config/tc-hppa.c:6718 #, c-format -msgid "expecting index register or scale factor after `,'; got '%c'" +msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s" msgstr "" -#: config/tc-i386.c:3601 -#, c-format -msgid "expecting `,' or `)' after base register in `%s'" +#: config/tc-hppa.c:6800 +msgid "Missing label name on .LABEL" +msgstr "" + +#: config/tc-hppa.c:6805 +msgid "extra .LABEL arguments ignored." +msgstr "" + +#: config/tc-hppa.c:6822 +msgid "The .LEAVE pseudo-op is not supported" +msgstr "" + +#: config/tc-hppa.c:6861 +msgid "Unrecognized .LEVEL argument\n" msgstr "" -#. it's not a memory operand; argh! -#: config/tc-i386.c:3641 +#: config/tc-hppa.c:6897 #, c-format -msgid "invalid char %s beginning operand %d `%s'" +msgid "Cannot define static symbol: %s\n" msgstr "" -#: config/tc-i386.c:4099 -msgid "Bad call to md_atof ()" +#: config/tc-hppa.c:6932 +msgid "Nested procedures" msgstr "" -#: config/tc-i386.c:4250 -msgid " -m\t\t\t do long jump\n" +#: config/tc-hppa.c:6942 +msgid "Cannot allocate unwind descriptor\n" msgstr "" -#: config/tc-i386.c:4253 -msgid "" -" -V\t\t\t print assembler version number\n" -" -k\t\t\t ignored\n" -" -Qy, -Qn\t\t ignored\n" -" -q\t\t\t ignored\n" -" -s\t\t\t ignored\n" +#: config/tc-hppa.c:7040 +msgid "misplaced .procend" msgstr "" -#: config/tc-i386.c:4307 -msgid "GOT already in symbol table" +#: config/tc-hppa.c:7043 +msgid "Missing .callinfo for this procedure" msgstr "" -#: config/tc-i386.c:4456 -#, c-format -msgid "cannot represent relocation type %s" +#: config/tc-hppa.c:7046 +msgid "Missing .EXIT for a .ENTRY" msgstr "" -#: config/tc-i860.c:157 config/tc-i860.c:161 -msgid "Unknown temporary pseudo register" +#: config/tc-hppa.c:7084 +msgid "Not in a space.\n" msgstr "" -#: config/tc-i860.c:183 config/tc-mips.c:1059 -#, c-format -msgid "internal error: can't hash `%s': %s\n" +#: config/tc-hppa.c:7087 +msgid "Not in a subspace.\n" msgstr "" -#: config/tc-i860.c:341 -#, c-format -msgid "Expanded opcode after delayed branch: `%s'" +#: config/tc-hppa.c:7178 +msgid "Invalid .SPACE argument" +msgstr "" + +#: config/tc-hppa.c:7225 +msgid "Can't change spaces within a procedure definition. Ignored" msgstr "" -#: config/tc-i860.c:343 +#: config/tc-hppa.c:7354 #, c-format -msgid "Expanded opcode in dual mode: `%s'" +msgid "Undefined space: '%s' Assuming space number = 0." msgstr "" -#: config/tc-i860.c:580 -msgid "Fsr1 equals fdest with Pipelining" +#: config/tc-hppa.c:7378 +msgid "Must be in a space before changing or declaring subspaces.\n" msgstr "" -#: config/tc-i860.c:631 -msgid "5-bit immediate too large" +#: config/tc-hppa.c:7382 +msgid "Can't change subspaces within a procedure definition. Ignored" msgstr "" -#: config/tc-i860.c:725 -msgid "Illegal operands" +#: config/tc-hppa.c:7417 +msgid "Parameters of an existing subspace can't be modified" msgstr "" -#: config/tc-i860.c:749 config/tc-sparc.c:2644 -msgid "bad segment" +#: config/tc-hppa.c:7468 +msgid "Alignment must be a power of 2" msgstr "" -#: config/tc-i860.c:878 -#, c-format -msgid "26-bit branch w/o pc relative set: 0x%08x" +#: config/tc-hppa.c:7510 +msgid "FIRST not supported as a .SUBSPACE argument" msgstr "" -#. align pcrel offset, see manual -#. check for overflow -#: config/tc-i860.c:882 -#, c-format -msgid "26-bit branch offset overflow: 0x%08x" +#: config/tc-hppa.c:7512 +msgid "Invalid .SUBSPACE argument" msgstr "" -#: config/tc-i860.c:891 config/tc-i860.c:922 +#: config/tc-hppa.c:7692 #, c-format -msgid "16-bit immediate 4-byte alignment error: 0x%08x" +msgid "Internal error: Unable to find containing space for %s." msgstr "" -#: config/tc-i860.c:896 config/tc-i860.c:927 +#: config/tc-hppa.c:7731 #, c-format -msgid "16-bit immediate 2-byte alignment error: 0x%08x" +msgid "Out of memory: could not allocate new space chain entry: %s\n" msgstr "" -#: config/tc-i860.c:904 +#: config/tc-hppa.c:7817 #, c-format -msgid "16-bit branch offset overflow: 0x%08x" +msgid "Out of memory: could not allocate new subspace chain entry: %s\n" msgstr "" -#: config/tc-i860.c:912 +#: config/tc-hppa.c:8511 #, c-format -msgid "16-bit immediate 16-byte alignment error: 0x%08x" +msgid "Symbol '%s' could not be created." msgstr "" -#: config/tc-i860.c:917 -#, c-format -msgid "16-bit immediate 8-byte alignment error: 0x%08x" +#: config/tc-hppa.c:8515 +msgid "No memory for symbol name." msgstr "" -#: config/tc-i860.c:933 +#: config/tc-i386.c:581 #, c-format -msgid "16-bit immediate overflow: 0x%08x" +msgid "%s shortened to %s" msgstr "" -#: config/tc-i860.c:951 -msgid "md_number_to_disp\n" +#: config/tc-i386.c:636 +msgid "same type of prefix used twice" msgstr "" -#: config/tc-i860.c:961 -msgid "i860_number_to_field\n" +#: config/tc-i386.c:654 +msgid "64bit mode not supported on this CPU." msgstr "" -#: config/tc-i860.c:1001 -msgid "i860_convert_frag\n" +#: config/tc-i386.c:658 +msgid "32bit mode not supported on this CPU." msgstr "" -#: config/tc-i860.c:1010 -msgid "i860_estimate_size_before_relax\n" +#: config/tc-i386.c:691 +msgid "bad argument to syntax directive." msgstr "" -#: config/tc-i960.c:559 +#: config/tc-i386.c:734 #, c-format -msgid "Hashing returned \"%s\"." +msgid "no such architecture: `%s'" msgstr "" -#. Offset of last character in opcode mnemonic -#: config/tc-i960.c:593 -msgid "branch prediction invalid on this opcode" +#: config/tc-i386.c:739 +msgid "missing cpu architecture" msgstr "" -#: config/tc-i960.c:636 +#: config/tc-i386.c:812 config/tc-i386.c:835 config/tc-m68k.c:3802 #, c-format -msgid "invalid opcode, \"%s\"." +msgid "Internal Error: Can't hash %s: %s" msgstr "" -#: config/tc-i960.c:641 -#, c-format -msgid "improper number of operands. expecting %d, got %d" +#: config/tc-i386.c:1088 +msgid "There are no unsigned pc-relative relocations" msgstr "" -#: config/tc-i960.c:876 +#: config/tc-i386.c:1095 config/tc-i386.c:4622 #, c-format -msgid "Fixup of %ld too large for field width of %d" +msgid "can not do %d byte pc-relative relocation" msgstr "" -#: config/tc-i960.c:994 +#: config/tc-i386.c:1112 #, c-format -msgid "invalid architecture %s" +msgid "can not do %s %d byte relocation" msgstr "" -#: config/tc-i960.c:1014 -msgid "I960 options:\n" +#: config/tc-i386.c:1221 config/tc-i386.c:1314 +#, c-format +msgid "no such instruction: `%s'" msgstr "" -#: config/tc-i960.c:1017 -msgid "" -"\n" -"\t\t\tspecify variant of 960 architecture\n" -"-b\t\t\tadd code to collect statistics about branches taken\n" -"-link-relax\t\tpreserve individual alignment directives so linker\n" -"\t\t\tcan do relaxing (b.out format only)\n" -"-no-relax\t\tdon't alter compare-and-branch instructions for\n" -"\t\t\tlong displacements\n" +#: config/tc-i386.c:1230 +#, c-format +msgid "invalid character %s in mnemonic" msgstr "" -#: config/tc-i960.c:1425 -msgid "too many operands" +#: config/tc-i386.c:1237 +msgid "expecting prefix; got nothing" msgstr "" -#: config/tc-i960.c:1485 config/tc-i960.c:1715 -msgid "expression syntax error" +#: config/tc-i386.c:1239 +msgid "expecting mnemonic; got nothing" msgstr "" -#: config/tc-i960.c:1523 -msgid "attempt to branch into different segment" +#: config/tc-i386.c:1257 +#, c-format +msgid "redundant %s prefix" msgstr "" -#: config/tc-i960.c:1527 +#: config/tc-i386.c:1325 #, c-format -msgid "target of %s instruction must be a label" +msgid "`%s' is not supported on `%s'" msgstr "" -#: config/tc-i960.c:1567 -msgid "unmatched '['" +#: config/tc-i386.c:1330 +msgid "use .code16 to ensure correct addressing mode" msgstr "" -#: config/tc-i960.c:1578 -msgid "garbage after index spec ignored" +#: config/tc-i386.c:1338 +#, c-format +msgid "expecting string instruction after `%s'" msgstr "" -#. We never moved: there was no opcode either! -#: config/tc-i960.c:1645 -msgid "missing opcode" +#: config/tc-i386.c:1359 +#, c-format +msgid "invalid character %s before operand %d" msgstr "" -#: config/tc-i960.c:1953 -msgid "invalid constant" +#: config/tc-i386.c:1373 +#, c-format +msgid "unbalanced parenthesis in operand %d." msgstr "" -#: config/tc-i960.c:2066 -msgid "invalid index register" +#: config/tc-i386.c:1376 +#, c-format +msgid "unbalanced brackets in operand %d." msgstr "" -#: config/tc-i960.c:2089 -msgid "invalid scale factor" +#: config/tc-i386.c:1385 +#, c-format +msgid "invalid character %s in operand %d" msgstr "" -#: config/tc-i960.c:2272 -msgid "unaligned register" -msgstr "" +#: config/tc-i386.c:1412 +#, c-format +msgid "spurious operands; (%d operands/instruction max)" +msgstr "" -#: config/tc-i960.c:2295 -msgid "no such sfr in this architecture" +#: config/tc-i386.c:1435 +msgid "expecting operand after ','; got nothing" msgstr "" -#: config/tc-i960.c:2333 -msgid "illegal literal" +#: config/tc-i386.c:1440 +msgid "expecting operand before ','; got nothing" msgstr "" -#. Should not happen: see block comment above -#: config/tc-i960.c:2566 +#. We found no match. +#: config/tc-i386.c:1782 #, c-format -msgid "Trying to 'bal' to %s" +msgid "suffix or operands invalid for `%s'" msgstr "" -#: config/tc-i960.c:2577 -msgid "Looks like a proc, but can't tell what kind.\n" +#: config/tc-i386.c:1793 +#, c-format +msgid "indirect %s without `*'" msgstr "" -#: config/tc-i960.c:2609 -msgid "should have 1 or 2 operands" +#. Warn them that a data or address size prefix doesn't +#. affect assembly of the next line of code. +#: config/tc-i386.c:1801 +#, c-format +msgid "stand-alone `%s' prefix" msgstr "" -#: config/tc-i960.c:2618 config/tc-i960.c:2637 -#, c-format -msgid "Redefining leafproc %s" +#: config/tc-i386.c:1837 config/tc-i386.c:1852 +msgid "`%s' operand %d must use `%%es' segment" msgstr "" -#: config/tc-i960.c:2669 -msgid "should have two operands" +#: config/tc-i386.c:1867 +msgid "Extended register `%%%s' available only in 64bit mode." msgstr "" -#: config/tc-i960.c:2679 -msgid "'entry_num' must be absolute number in [0,31]" +#. Prohibit these changes in the 64bit mode, since +#. the lowering is more complicated. +#: config/tc-i386.c:1938 config/tc-i386.c:1989 config/tc-i386.c:2004 +#: config/tc-i386.c:2032 config/tc-i386.c:2060 +msgid "Incorrect register `%%%s' used with`%c' suffix" msgstr "" -#: config/tc-i960.c:2688 -#, c-format -msgid "Redefining entrynum for sysproc %s" +#: config/tc-i386.c:1944 config/tc-i386.c:1994 config/tc-i386.c:2065 +msgid "using `%%%s' instead of `%%%s' due to `%c' suffix" msgstr "" -#: config/tc-i960.c:2799 -msgid "architecture of opcode conflicts with that of earlier instruction(s)" +#: config/tc-i386.c:1957 config/tc-i386.c:1975 config/tc-i386.c:2019 +#: config/tc-i386.c:2046 +msgid "`%%%s' not allowed with `%s%c'" msgstr "" -#: config/tc-i960.c:2820 -msgid "big endian mode is not supported" +#: config/tc-i386.c:2106 +msgid "no instruction mnemonic suffix given; can't determine immediate size" msgstr "" -#: config/tc-i960.c:2822 +#: config/tc-i386.c:2132 #, c-format -msgid "ignoring unrecognized .endian type `%s'" +msgid "" +"no instruction mnemonic suffix given; can't determine immediate size %x %c" msgstr "" -#: config/tc-i960.c:3104 -#, c-format -msgid "leafproc symbol '%s' undefined" +#: config/tc-i386.c:2157 +msgid "" +"no instruction mnemonic suffix given and no register operands; can't size " +"instruction" msgstr "" -#: config/tc-i960.c:3114 -#, c-format -msgid "Warning: making leafproc entries %s and %s both global\n" +#: config/tc-i386.c:2205 +msgid "64bit operations available only in 64bit modes." msgstr "" -#: config/tc-i960.c:3223 -msgid "option --link-relax is only supported in b.out format" +#. Reversed arguments on faddp, fsubp, etc. +#: config/tc-i386.c:2273 +msgid "translating to `%s %%%s,%%%s'" msgstr "" -#: config/tc-i960.c:3266 -msgid "callj to difference of two symbols" +#. Extraneous `l' suffix on fp insn. +#: config/tc-i386.c:2280 +msgid "translating to `%s %%%s'" msgstr "" -#. Pretend that we do not recognise this option. -#: config/tc-m32r.c:223 -msgid "Unrecognised option: -hidden" +#: config/tc-i386.c:2551 +msgid "you can't `pop %%cs'" msgstr "" -#: config/tc-m32r.c:256 -msgid " M32R specific command line options:\n" +#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc. +#: config/tc-i386.c:2584 +#, c-format +msgid "translating to `%sp'" msgstr "" -#: config/tc-m32r.c:258 +#: config/tc-i386.c:2627 msgid "" -" -m32r disable support for the m32rx instruction set\n" +"Can't encode registers '%%%s' in the instruction requiring REX prefix.\n" msgstr "" -#: config/tc-m32r.c:260 -msgid " -m32rx support the extended m32rx instruction set\n" +#: config/tc-i386.c:2679 config/tc-i386.c:2751 config/tc-i386.c:2798 +msgid "skipping prefixes on this instruction" msgstr "" -#: config/tc-m32r.c:262 -msgid " -O try to combine instructions in parallel\n" +#: config/tc-i386.c:2819 +msgid "16-bit jump out of range" msgstr "" -#: config/tc-m32r.c:265 -msgid "" -" -warn-explicit-parallel-conflicts warn when parallel instructions\n" +#: config/tc-i386.c:2828 +#, c-format +msgid "can't handle non absolute segment in `%s'" msgstr "" -#: config/tc-m32r.c:267 -msgid " violate contraints\n" +#: config/tc-i386.c:3085 +msgid "only 1 or 2 immediate operands are allowed" msgstr "" -#: config/tc-m32r.c:269 -msgid " -no-warn-explicit-parallel-conflicts do not warn when parallel\n" +#: config/tc-i386.c:3115 config/tc-i386.c:3353 +msgid "GOT relocations not supported in 16 bit mode" msgstr "" -#: config/tc-m32r.c:271 -msgid "" -" instructions violate contraints\n" +#: config/tc-i386.c:3152 config/tc-i386.c:3389 +msgid "bad reloc specifier in expression" msgstr "" -#: config/tc-m32r.c:273 -msgid "" -" -Wp synonym for -warn-explicit-parallel-conflicts\n" +#: config/tc-i386.c:3170 config/tc-i386.c:3424 +#, c-format +msgid "ignoring junk `%s' after expression" msgstr "" -#: config/tc-m32r.c:275 -msgid "" -" -Wnp synonym for -no-warn-explicit-parallel-conflicts\n" +#. Missing or bad expr becomes absolute 0. +#: config/tc-i386.c:3177 +#, c-format +msgid "missing or invalid immediate expression `%s' taken as 0" msgstr "" -#: config/tc-m32r.c:278 -msgid "" -" -warn-unmatched-high warn when an (s)high reloc has no matching low " -"reloc\n" +#: config/tc-i386.c:3208 config/tc-i386.c:3454 +#, c-format +msgid "unimplemented segment %s in operand" msgstr "" -#: config/tc-m32r.c:280 -msgid " -no-warn-unmatched-high do not warn about missing low relocs\n" +#: config/tc-i386.c:3210 config/tc-i386.c:3456 +#, c-format +msgid "unimplemented segment type %d in operand" msgstr "" -#: config/tc-m32r.c:282 -msgid " -Wuh synonym for -warn-unmatched-high\n" +#: config/tc-i386.c:3252 config/tc-i386.c:5392 +#, c-format +msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'" msgstr "" -#: config/tc-m32r.c:284 -msgid " -Wnuh synonym for -no-warn-unmatched-high\n" +#: config/tc-i386.c:3258 +#, c-format +msgid "scale factor of %d without an index register" msgstr "" -#: config/tc-m32r.c:288 -msgid " -relax create linker relaxable code\n" +#. Missing or bad expr becomes absolute 0. +#: config/tc-i386.c:3435 +#, c-format +msgid "missing or invalid displacement expression `%s' taken as 0" msgstr "" -#: config/tc-m32r.c:290 -msgid " -cpu-desc provide runtime cpu description file\n" +#: config/tc-i386.c:3541 +#, c-format +msgid "`%s' is not a valid base/index expression" msgstr "" -#: config/tc-m32r.c:685 -msgid "Instructions write to the same destination register." +#: config/tc-i386.c:3545 +#, c-format +msgid "`%s' is not a valid %s bit base/index expression" msgstr "" -#: config/tc-m32r.c:693 -msgid "Instructions do not use parallel execution pipelines." +#: config/tc-i386.c:3620 +#, c-format +msgid "bad memory operand `%s'" msgstr "" -#: config/tc-m32r.c:700 -msgid "Instructions share the same execution pipeline" +#: config/tc-i386.c:3635 +#, c-format +msgid "junk `%s' after register" msgstr "" -#: config/tc-m32r.c:769 config/tc-m32r.c:855 +#: config/tc-i386.c:3644 config/tc-i386.c:3759 config/tc-i386.c:3795 #, c-format -msgid "not a 16 bit instruction '%s'" +msgid "bad register name `%s'" msgstr "" -#: config/tc-m32r.c:776 config/tc-m32r.c:862 config/tc-m32r.c:1017 -#, c-format -msgid "unknown instruction '%s'" +#: config/tc-i386.c:3652 +msgid "immediate operand illegal with absolute jump" msgstr "" -#: config/tc-m32r.c:784 config/tc-m32r.c:869 config/tc-m32r.c:1024 +#: config/tc-i386.c:3674 #, c-format -msgid "instruction '%s' is for the M32RX only" +msgid "too many memory references for `%s'" msgstr "" -#: config/tc-m32r.c:792 config/tc-m32r.c:877 +#: config/tc-i386.c:3752 #, c-format -msgid "instruction '%s' cannot be executed in parallel." +msgid "expecting `,' or `)' after index register in `%s'" msgstr "" -#: config/tc-m32r.c:839 config/tc-m32r.c:902 config/tc-m32r.c:1074 -msgid "internal error: lookup/get operands failed" +#: config/tc-i386.c:3774 +#, c-format +msgid "expecting `)' after scale factor in `%s'" msgstr "" -#: config/tc-m32r.c:887 +#: config/tc-i386.c:3781 #, c-format -msgid "'%s': only the NOP instruction can be issued in parallel on the m32r" +msgid "expecting index register or scale factor after `,'; got '%c'" msgstr "" -#: config/tc-m32r.c:916 +#: config/tc-i386.c:3788 #, c-format -msgid "" -"%s: output of 1st instruction is the same as an input to 2nd instruction - " -"is this intentional ?" +msgid "expecting `,' or `)' after base register in `%s'" msgstr "" -#: config/tc-m32r.c:920 +#. It's not a memory operand; argh! +#: config/tc-i386.c:3829 #, c-format -msgid "" -"%s: output of 2nd instruction is the same as an input to 1st instruction - " -"is this intentional ?" +msgid "invalid char %s beginning operand %d `%s'" msgstr "" -#: config/tc-m32r.c:1235 config/tc-ppc.c:1337 config/tc-ppc.c:3547 read.c:1378 -msgid "Expected comma after symbol-name: rest of line ignored." +#: config/tc-i386.c:4267 +msgid "Bad call to md_atof ()" msgstr "" -#: config/tc-m32r.c:1244 +#: config/tc-i386.c:4431 config/tc-sparc.c:548 #, c-format -msgid ".SCOMMon length (%ld.) <0! Ignored." +msgid "No compiled in support for %d bit object file format" msgstr "" -#: config/tc-m32r.c:1258 config/tc-ppc.c:1359 config/tc-ppc.c:2266 -#: config/tc-ppc.c:3571 -msgid "ignoring bad alignment" +#: config/tc-i386.c:4449 +msgid "" +" -Q ignored\n" +" -V print assembler version number\n" +" -k ignored\n" +" -q quieten some warnings\n" +" -s ignored\n" msgstr "" -#: config/tc-m32r.c:1284 config/tc-ppc.c:1370 config/tc-ppc.c:3583 read.c:1398 -#: read.c:2111 -#, c-format -msgid "Ignoring attempt to re-define symbol `%s'." +#: config/tc-i386.c:4456 +msgid " -q quieten some warnings\n" msgstr "" -#: config/tc-m32r.c:1293 -#, c-format -msgid "Length of .scomm \"%s\" is already %ld. Not changed to %ld." +#: config/tc-i386.c:4475 +msgid "Unknown architecture" msgstr "" -#: config/tc-m32r.c:1766 -msgid "Unmatched high/shigh reloc" +#: config/tc-i386.c:4515 +msgid "GOT already in symbol table" msgstr "" -#: config/tc-m68k.c:646 -msgid "Unknown PC relative instruction" +#: config/tc-i386.c:4636 +#, c-format +msgid "can not do %d byte relocation" msgstr "" -#: config/tc-m68k.c:772 +#: config/tc-i386.c:4697 #, c-format -msgid "Can not do %d byte pc-relative relocation" +msgid "cannot represent relocation type %s" msgstr "" -#: config/tc-m68k.c:774 +#: config/tc-i386.c:4994 #, c-format -msgid "Can not do %d byte pc-relative pic relocation" +msgid "too many memory references for '%s'" msgstr "" -#: config/tc-m68k.c:779 +#: config/tc-i386.c:5157 #, c-format -msgid "Can not do %d byte relocation" +msgid "Unknown operand modifier `%s'\n" msgstr "" -#: config/tc-m68k.c:781 +#: config/tc-i386.c:5364 #, c-format -msgid "Can not do %d byte pic relocation" +msgid "`%s' is not a valid segment register" msgstr "" -#: config/tc-m68k.c:885 config/tc-mips.c:11262 -#, c-format -msgid "Cannot make %s relocation PC relative" +#: config/tc-i386.c:5374 config/tc-i386.c:5495 +msgid "Register scaling only allowed in memory operands." msgstr "" -#: config/tc-m68k.c:998 config/tc-tahoe.c:1505 config/tc-vax.c:1774 -msgid "No operator" +#: config/tc-i386.c:5405 +msgid "Too many register references in memory operand.\n" msgstr "" -#: config/tc-m68k.c:1028 config/tc-tahoe.c:1522 config/tc-vax.c:1791 -msgid "Unknown operator" +#: config/tc-i386.c:5474 +#, c-format +msgid "Syntax error. Expecting a constant. Got `%s'.\n" msgstr "" -#: config/tc-m68k.c:1803 -msgid "invalid instruction for this architecture; needs " +#: config/tc-i386.c:5544 +#, c-format +msgid "Unrecognized token '%s'" msgstr "" -#: config/tc-m68k.c:1808 -msgid "fpu (68040, 68060 or 68881/68882)" +#: config/tc-i386.c:5561 +#, c-format +msgid "Unexpected token `%s'\n" msgstr "" -#: config/tc-m68k.c:1811 -msgid "mmu (68030 or 68851)" +#: config/tc-i386.c:5705 +#, c-format +msgid "Unrecognized token `%s'\n" msgstr "" -#: config/tc-m68k.c:1814 -msgid "68020 or higher" +#: config/tc-i860.c:154 config/tc-i860.c:158 +msgid "Unknown temporary pseudo register" msgstr "" -#: config/tc-m68k.c:1817 -msgid "68000 or higher" +#: config/tc-i860.c:181 config/tc-mips.c:1027 +#, c-format +msgid "internal error: can't hash `%s': %s\n" msgstr "" -#: config/tc-m68k.c:1820 -msgid "68010 or higher" +#: config/tc-i860.c:201 +msgid "Defective assembler. No assembly attempted." msgstr "" -#: config/tc-m68k.c:1848 -msgid "operands mismatch" +#: config/tc-i860.c:347 +#, c-format +msgid "Expanded opcode after delayed branch: `%s'" msgstr "" -#: config/tc-m68k.c:1905 config/tc-m68k.c:1911 config/tc-m68k.c:1917 -msgid "operand out of range" +#: config/tc-i860.c:351 +#, c-format +msgid "Expanded opcode in dual mode: `%s'" msgstr "" -#: config/tc-m68k.c:1974 +#: config/tc-i860.c:355 #, c-format -msgid "Bignum too big for %c format; truncated" +msgid "An instruction was expanded (%s)" msgstr "" -#: config/tc-m68k.c:2042 -msgid "displacement too large for this architecture; needs 68020 or higher" +#: config/tc-i860.c:613 +msgid "Pipelined instruction: fsrc1 = fdest" msgstr "" -#: config/tc-m68k.c:2152 -msgid "" -"scale factor invalid on this architecture; needs cpu32 or 68020 or higher" +#: config/tc-i860.c:776 config/tc-i860.c:783 config/tc-i860.c:790 +msgid "Assembler does not yet support PIC" msgstr "" -#: config/tc-m68k.c:2157 -msgid "invalid index size for coldfire" +#: config/tc-i860.c:849 +#, c-format +msgid "Illegal operands for %s" msgstr "" -#: config/tc-m68k.c:2210 -msgid "Forcing byte displacement" +#: config/tc-i860.c:873 config/tc-sparc.c:2730 +msgid "bad segment" msgstr "" -#: config/tc-m68k.c:2212 -msgid "byte displacement out of range" +#: config/tc-i860.c:965 +msgid "md_number_to_disp\n" msgstr "" -#: config/tc-m68k.c:2259 config/tc-m68k.c:2297 -msgid "invalid operand mode for this architecture; needs 68020 or higher" +#: config/tc-i860.c:975 +msgid "i860_number_to_field\n" msgstr "" -#: config/tc-m68k.c:2283 config/tc-m68k.c:2317 -msgid ":b not permitted; defaulting to :w" +#: config/tc-i860.c:984 +msgid "i860_estimate_size_before_relax\n" msgstr "" -#: config/tc-m68k.c:2399 -msgid "unsupported byte value; use a different suffix" +#: config/tc-i860.c:1075 +msgid "" +" -EL\t\t\t generate code for little endian mode (default)\n" +" -EB\t\t\t generate code for big endian mode\n" +" -mwarn-expand\t\t warn if pseudo operations are expanded\n" msgstr "" -#: config/tc-m68k.c:2413 -msgid "unknown/incorrect operand" +#. SVR4 compatibility flags. +#: config/tc-i860.c:1081 +msgid "" +" -V\t\t\t print assembler version number\n" +" -Qy, -Qn\t\t ignored\n" msgstr "" -#: config/tc-m68k.c:2446 config/tc-m68k.c:2454 config/tc-m68k.c:2461 -#: config/tc-m68k.c:2468 -msgid "out of range" +#: config/tc-i860.c:1150 +msgid "This immediate requires 0 MOD 2 alignment" msgstr "" -#: config/tc-m68k.c:2518 -msgid "Can't use long branches on 68000/68010/5200" +#: config/tc-i860.c:1153 +msgid "This immediate requires 0 MOD 4 alignment" msgstr "" -#: config/tc-m68k.c:2606 -msgid "Expression out of range, using 0" +#: config/tc-i860.c:1156 +msgid "This immediate requires 0 MOD 8 alignment" msgstr "" -#: config/tc-m68k.c:2718 config/tc-m68k.c:2734 -msgid "Floating point register in register list" +#: config/tc-i860.c:1159 +msgid "This immediate requires 0 MOD 16 alignment" msgstr "" -#: config/tc-m68k.c:2724 -msgid "Wrong register in floating-point reglist" +#: config/tc-i860.c:1257 +msgid "5-bit immediate too large" msgstr "" -#: config/tc-m68k.c:2740 -msgid "incorrect register in reglist" +#: config/tc-i860.c:1260 +msgid "5-bit field must be absolute" msgstr "" -#: config/tc-m68k.c:2746 -msgid "wrong register in floating-point reglist" +#: config/tc-i860.c:1306 config/tc-i860.c:1329 +msgid "A branch offset requires 0 MOD 4 alignment" msgstr "" -#: config/tc-m68k.c:2822 -msgid "failed sanity check" +#: config/tc-i860.c:1350 +#, c-format +msgid "Unrecognized fix-up (0x%08x)" msgstr "" -#. ERROR -#: config/tc-m68k.c:3187 -msgid "Extra )" +#: config/tc-i860.h:82 +msgid "i860_convert_frag\n" msgstr "" -#. ERROR -#: config/tc-m68k.c:3198 -msgid "Missing )" +#: config/tc-i960.c:549 +#, c-format +msgid "Hashing returned \"%s\"." msgstr "" -#: config/tc-m68k.c:3215 -msgid "Missing operand" +#. Offset of last character in opcode mnemonic +#: config/tc-i960.c:583 +msgid "branch prediction invalid on this opcode" msgstr "" -#: config/tc-m68k.c:3547 +#: config/tc-i960.c:623 #, c-format -msgid "%s -- statement `%s' ignored" +msgid "invalid opcode, \"%s\"." msgstr "" -#: config/tc-m68k.c:3591 +#: config/tc-i960.c:628 #, c-format -msgid "Don't know how to figure width of %c in md_assemble()" +msgid "improper number of operands. expecting %d, got %d" msgstr "" -#: config/tc-m68k.c:3759 config/tc-m68k.c:3795 +#: config/tc-i960.c:860 #, c-format -msgid "Internal Error: Can't find %s in hash table" +msgid "Fixup of %ld too large for field width of %d" msgstr "" -#: config/tc-m68k.c:3762 config/tc-m68k.c:3798 +#: config/tc-i960.c:977 #, c-format -msgid "Internal Error: Can't hash %s: %s" +msgid "invalid architecture %s" msgstr "" -#: config/tc-m68k.c:3926 -#, c-format -msgid "unrecognized default cpu `%s' ???" +#: config/tc-i960.c:997 +msgid "I960 options:\n" msgstr "" -#: config/tc-m68k.c:3938 -msgid "68040 and 68851 specified; mmu instructions may assemble incorrectly" +#: config/tc-i960.c:1000 +msgid "" +"\n" +"\t\t\tspecify variant of 960 architecture\n" +"-b\t\t\tadd code to collect statistics about branches taken\n" +"-link-relax\t\tpreserve individual alignment directives so linker\n" +"\t\t\tcan do relaxing (b.out format only)\n" +"-no-relax\t\tdon't alter compare-and-branch instructions for\n" +"\t\t\tlong displacements\n" msgstr "" -#: config/tc-m68k.c:3958 -msgid "options for 68881 and no-68881 both given" +#: config/tc-i960.c:1403 +msgid "too many operands" msgstr "" -#: config/tc-m68k.c:3960 -msgid "options for 68851 and no-68851 both given" +#: config/tc-i960.c:1462 config/tc-i960.c:1689 +msgid "expression syntax error" msgstr "" -#: config/tc-m68k.c:4031 -#, c-format -msgid "text label `%s' aligned to odd boundary" +#: config/tc-i960.c:1500 +msgid "attempt to branch into different segment" msgstr "" -#: config/tc-m68k.c:4248 -msgid "invalid byte branch offset" +#: config/tc-i960.c:1504 +#, c-format +msgid "target of %s instruction must be a label" msgstr "" -#: config/tc-m68k.c:4305 -msgid "short branch with zero offset: use :w" +#: config/tc-i960.c:1543 +msgid "unmatched '['" msgstr "" -#: config/tc-m68k.c:4351 -msgid "Long branch offset not supported." +#: config/tc-i960.c:1554 +msgid "garbage after index spec ignored" msgstr "" -#: config/tc-m68k.c:4412 -#, c-format -msgid "Internal error (long PC-relative operand) for insn 0x%04x at 0x%lx" +#. We never moved: there was no opcode either! +#: config/tc-i960.c:1620 +msgid "missing opcode" msgstr "" -#: config/tc-m68k.c:4443 -msgid "displacement doesn't fit in one byte" +#: config/tc-i960.c:1923 +msgid "invalid constant" msgstr "" -#: config/tc-m68k.c:4556 -msgid "Long branch offset to extern symbol not supported." +#: config/tc-i960.c:2035 +msgid "invalid index register" msgstr "" -#: config/tc-m68k.c:4905 config/tc-m68k.c:4916 -msgid "expression out of range: defaulting to 1" +#: config/tc-i960.c:2058 +msgid "invalid scale factor" msgstr "" -#: config/tc-m68k.c:4948 -msgid "expression out of range: defaulting to 0" +#: config/tc-i960.c:2241 +msgid "unaligned register" +msgstr "" + +#: config/tc-i960.c:2264 +msgid "no such sfr in this architecture" +msgstr "" + +#: config/tc-i960.c:2302 +msgid "illegal literal" msgstr "" -#: config/tc-m68k.c:4981 config/tc-m68k.c:4993 +#. Should not happen: see block comment above +#: config/tc-i960.c:2532 #, c-format -msgid "Can't deal with expression; defaulting to %ld" +msgid "Trying to 'bal' to %s" msgstr "" -#: config/tc-m68k.c:5007 -msgid "expression doesn't fit in BYTE" +#: config/tc-i960.c:2543 +msgid "Looks like a proc, but can't tell what kind.\n" msgstr "" -#: config/tc-m68k.c:5011 -msgid "expression doesn't fit in WORD" +#: config/tc-i960.c:2574 +msgid "should have 1 or 2 operands" msgstr "" -#: config/tc-m68k.c:5104 +#: config/tc-i960.c:2583 config/tc-i960.c:2602 #, c-format -msgid "%s: unrecognized processor name" +msgid "Redefining leafproc %s" msgstr "" -#: config/tc-m68k.c:5169 -msgid "bad coprocessor id" +#: config/tc-i960.c:2633 +msgid "should have two operands" msgstr "" -#: config/tc-m68k.c:5175 -msgid "unrecognized fopt option" +#: config/tc-i960.c:2643 +msgid "'entry_num' must be absolute number in [0,31]" msgstr "" -#: config/tc-m68k.c:5309 +#: config/tc-i960.c:2652 #, c-format -msgid "option `%s' may not be negated" +msgid "Redefining entrynum for sysproc %s" msgstr "" -#: config/tc-m68k.c:5320 -#, c-format -msgid "option `%s' not recognized" +#: config/tc-i960.c:2759 +msgid "architecture of opcode conflicts with that of earlier instruction(s)" msgstr "" -#: config/tc-m68k.c:5353 -msgid "bad format of OPT NEST=depth" +#: config/tc-i960.c:2780 +msgid "big endian mode is not supported" msgstr "" -#: config/tc-m68k.c:5416 -msgid "missing label" +#: config/tc-i960.c:2782 +#, c-format +msgid "ignoring unrecognized .endian type `%s'" msgstr "" -#: config/tc-m68k.c:5440 config/tc-m68k.c:5469 -msgid "bad register list" +#: config/tc-i960.c:3064 +#, c-format +msgid "leafproc symbol '%s' undefined" msgstr "" -#: config/tc-m68k.c:5442 +#: config/tc-i960.c:3074 #, c-format -msgid "bad register list: %s" +msgid "Warning: making leafproc entries %s and %s both global\n" msgstr "" -#: config/tc-m68k.c:5540 -msgid "restore without save" +#: config/tc-i960.c:3183 +msgid "option --link-relax is only supported in b.out format" msgstr "" -#: config/tc-m68k.c:5717 config/tc-m68k.c:6066 -msgid "syntax error in structured control directive" +#: config/tc-i960.c:3226 +msgid "callj to difference of two symbols" msgstr "" -#: config/tc-m68k.c:5768 -msgid "missing condition code in structured control directive" +#: config/tc-ia64.c:4077 +msgid "Register name expected" msgstr "" -#: config/tc-m68k.c:6100 -msgid "missing then" +#: config/tc-ia64.c:4082 config/tc-ia64.c:4368 +msgid "Comma expected" msgstr "" -#: config/tc-m68k.c:6182 -msgid "else without matching if" +#: config/tc-ia64.c:4090 +msgid "Register value annotation ignored" msgstr "" -#: config/tc-m68k.c:6216 -msgid "endi without matching if" +#: config/tc-ia64.c:4114 +msgid "Directive invalid within a bundle" msgstr "" -#: config/tc-m68k.c:6257 -msgid "break outside of structured loop" +#: config/tc-ia64.c:4181 +msgid "Missing predicate relation type" msgstr "" -#: config/tc-m68k.c:6296 -msgid "next outside of structured loop" +#: config/tc-ia64.c:4197 +msgid "Unrecognized predicate relation type" msgstr "" -#: config/tc-m68k.c:6348 -msgid "missing =" +#: config/tc-ia64.c:4217 config/tc-ia64.c:4242 +msgid "Predicate register expected" msgstr "" -#: config/tc-m68k.c:6386 -msgid "missing to or downto" +#: config/tc-ia64.c:4229 +msgid "Duplicate predicate register ignored" msgstr "" -#: config/tc-m68k.c:6422 config/tc-m68k.c:6456 config/tc-m68k.c:6666 -msgid "missing do" +#: config/tc-ia64.c:4251 +msgid "Bad register range" msgstr "" -#: config/tc-m68k.c:6559 -msgid "endf without for" +#: config/tc-ia64.c:4279 +msgid "Predicate source and target required" msgstr "" -#: config/tc-m68k.c:6615 -msgid "until without repeat" +#: config/tc-ia64.c:4281 config/tc-ia64.c:4293 +msgid "Use of p0 is not valid in this context" msgstr "" -#: config/tc-m68k.c:6702 -msgid "endw without while" +#: config/tc-ia64.c:4288 +msgid "At least two PR arguments expected" msgstr "" -#: config/tc-m68k.c:6818 -#, c-format -msgid "unrecognized option `%s'" +#: config/tc-ia64.c:4302 +msgid "At least one PR argument expected" msgstr "" -#: config/tc-m68k.c:6863 +#: config/tc-ia64.c:4338 #, c-format -msgid "unrecognized architecture specification `%s'" +msgid "Inserting \"%s\" into entry hint table failed: %s" msgstr "" -#: config/tc-m68k.c:6933 -msgid "" -"680X0 options:\n" -"-l\t\t\tuse 1 word for refs to undefined symbols [default 2]\n" -"-m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060\n" -" | -m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360\n" -" | -mcpu32 | -m5200\n" -"\t\t\tspecify variant of 680X0 architecture [default 68020]\n" -"-m68881 | -m68882 | -mno-68881 | -mno-68882\n" -"\t\t\ttarget has/lacks floating-point coprocessor\n" -"\t\t\t[default yes for 68020, 68030, and cpu32]\n" +#. FIXME -- need 62-bit relocation type +#: config/tc-ia64.c:4758 +msgid "62-bit relocation not yet implemented" msgstr "" -#: config/tc-m68k.c:6943 -msgid "" -"-m68851 | -mno-68851\n" -"\t\t\ttarget has/lacks memory-management unit coprocessor\n" -"\t\t\t[default yes for 68020 and up]\n" -"-pic, -k\t\tgenerate position independent code\n" -"-S\t\t\tturn jbsr into jsr\n" -"--register-prefix-optional\n" -"\t\t\trecognize register names without prefix character\n" -"--bitwise-or\t\tdo not treat `|' as a comment character\n" +#: config/tc-ia64.c:4820 +msgid "lower 16 bits of mask ignored" msgstr "" -#: config/tc-m68k.c:6952 +#: config/tc-ia64.c:5317 +msgid "Value truncated to 62 bits" +msgstr "" + +#: config/tc-ia64.c:5668 msgid "" -"--base-size-default-16\tbase reg without size is 16 bits\n" -"--base-size-default-32\tbase reg without size is 32 bits (default)\n" -"--disp-size-default-16\tdisplacement with unknown size is 16 bits\n" -"--disp-size-default-32\tdisplacement with unknown size is 32 bits (default)\n" +"Additional NOP may be necessary to workaround Itanium processor A/B step " +"errata" msgstr "" -#: config/tc-m68k.c:6987 +#: config/tc-ia64.c:5849 #, c-format -msgid "Error %s in %s\n" +msgid "Unrecognized option '-x%s'" msgstr "" -#: config/tc-m68k.c:6991 -#, c-format -msgid "Opcode(%d.%s): " +#: config/tc-ia64.c:5877 +msgid "" +"IA-64 options:\n" +" -milp32|-milp64|-mlp64|-mp64\tselect data model (default -mlp64)\n" +" -mle | -mbe\t\t select little- or big-endian byte order (default -mle)\n" +" -x | -xexplicit\t turn on dependency violation checking (default)\n" +" -xauto\t\t automagically remove dependency violations\n" +" -xdebug\t\t debug dependency violation checker\n" +msgstr "" + +#: config/tc-ia64.c:6147 config/tc-mips.c:1014 +msgid "Could not set architecture and machine" +msgstr "" + +#: config/tc-ia64.c:6223 +msgid "Explicit stops are ignored in auto mode" msgstr "" -#: config/tc-m88k.c:206 +#: config/tc-ia64.c:6273 +msgid "Found '{' after explicit switch to automatic mode" +msgstr "" + +#: config/tc-ia64.c:6686 #, c-format -msgid "Can't hash instruction '%s':%s" +msgid "Unhandled dependency %s for %s (%s), note %d" msgstr "" -#: config/tc-m88k.c:258 +#: config/tc-ia64.c:7962 #, c-format -msgid "Invalid mnemonic '%s'" +msgid "Unrecognized dependency specifier %d\n" msgstr "" -#: config/tc-m88k.c:278 -msgid "Parameter syntax error" +#: config/tc-ia64.c:8753 +msgid "Only the first path encountering the conflict is reported" msgstr "" -#: config/tc-m88k.c:333 -msgid "Unknown relocation type" +#: config/tc-ia64.c:8756 +msgid "This is the location of the conflicting usage" msgstr "" -#. Having this here repeats the warning somtimes. -#. But can't we stand that? -#: config/tc-m88k.c:446 -msgid "Use of obsolete instruction" +#. Pretend that we do not recognise this option. +#: config/tc-m32r.c:231 +msgid "Unrecognised option: -hidden" msgstr "" -#: config/tc-m88k.c:563 -msgid "Expression truncated to 16 bits" +#: config/tc-m32r.c:265 +msgid " M32R specific command line options:\n" msgstr "" -#: config/tc-m88k.c:629 config/tc-m88k.c:651 -msgid "Expression truncated to 5 bits" +#: config/tc-m32r.c:267 +msgid "" +" -m32r disable support for the m32rx instruction set\n" msgstr "" -#: config/tc-m88k.c:873 -msgid "Expression truncated to 9 bits" +#: config/tc-m32r.c:269 +msgid " -m32rx support the extended m32rx instruction set\n" msgstr "" -#: config/tc-m88k.c:895 -msgid "Removed lower 2 bits of expression" +#: config/tc-m32r.c:271 +msgid " -O try to combine instructions in parallel\n" msgstr "" -#: config/tc-m88k.c:1034 -msgid "Bad relocation type" +#: config/tc-m32r.c:274 +msgid "" +" -warn-explicit-parallel-conflicts warn when parallel instructions\n" msgstr "" -#: config/tc-m88k.c:1047 -msgid "md_number_to_disp not defined" +#: config/tc-m32r.c:276 +msgid " violate contraints\n" msgstr "" -#: config/tc-m88k.c:1057 -msgid "md_number_to_field not defined" +#: config/tc-m32r.c:278 +msgid " -no-warn-explicit-parallel-conflicts do not warn when parallel\n" msgstr "" -#: config/tc-m88k.c:1170 -msgid "Relaxation should never occur" +#: config/tc-m32r.c:280 +msgid "" +" instructions violate contraints\n" msgstr "" -#: config/tc-m88k.c:1267 config/tc-sparc.c:3363 read.c:1973 -#, c-format -msgid "BSS length (%d.) <0! Ignored." +#: config/tc-m32r.c:282 +msgid "" +" -Wp synonym for -warn-explicit-parallel-conflicts\n" msgstr "" -#: config/tc-m88k.c:1311 -#, c-format -msgid "Ignoring attempt to re-define symbol %s." +#: config/tc-m32r.c:284 +msgid "" +" -Wnp synonym for -no-warn-explicit-parallel-conflicts\n" msgstr "" -#: config/tc-mcore.c:509 -#, c-format -msgid "register expected, but saw '%.6s'" +#: config/tc-m32r.c:287 +msgid "" +" -warn-unmatched-high warn when an (s)high reloc has no matching low " +"reloc\n" msgstr "" -#: config/tc-mcore.c:593 -#, c-format -msgid "control register expected, but saw '%.6s'" +#: config/tc-m32r.c:289 +msgid " -no-warn-unmatched-high do not warn about missing low relocs\n" msgstr "" -#: config/tc-mcore.c:631 -msgid "bad/missing psr specifier" +#: config/tc-m32r.c:291 +msgid " -Wuh synonym for -warn-unmatched-high\n" msgstr "" -#: config/tc-mcore.c:792 -msgid "more than 65K literal pools" +#: config/tc-m32r.c:293 +msgid " -Wnuh synonym for -no-warn-unmatched-high\n" msgstr "" -#: config/tc-mcore.c:846 -msgid "missing ']'" +#: config/tc-m32r.c:297 +msgid " -relax create linker relaxable code\n" msgstr "" -#: config/tc-mcore.c:886 -msgid "operand must be a constant" +#: config/tc-m32r.c:299 +msgid " -cpu-desc provide runtime cpu description file\n" msgstr "" -#: config/tc-mcore.c:888 -#, c-format -msgid "operand must be absolute in range %d..%d, not %d" +#: config/tc-m32r.c:688 +msgid "Instructions write to the same destination register." msgstr "" -#: config/tc-mcore.c:926 -msgid "operand must be a multiple of 4" +#: config/tc-m32r.c:696 +msgid "Instructions do not use parallel execution pipelines." msgstr "" -#: config/tc-mcore.c:933 -msgid "operand must be a multiple of 2" +#: config/tc-m32r.c:703 +msgid "Instructions share the same execution pipeline" msgstr "" -#: config/tc-mcore.c:947 config/tc-mcore.c:1459 config/tc-mcore.c:1513 -msgid "base register expected" +#: config/tc-m32r.c:773 config/tc-m32r.c:870 +#, c-format +msgid "not a 16 bit instruction '%s'" msgstr "" -#: config/tc-mcore.c:996 +#: config/tc-m32r.c:780 config/tc-m32r.c:877 config/tc-m32r.c:1033 #, c-format -msgid "unknown opcode \"%s\"" +msgid "unknown instruction '%s'" msgstr "" -#: config/tc-mcore.c:1039 -msgid "invalid register: r15 illegal" +#: config/tc-m32r.c:789 config/tc-m32r.c:884 config/tc-m32r.c:1040 +#, c-format +msgid "instruction '%s' is for the M32RX only" msgstr "" -#: config/tc-mcore.c:1087 config/tc-mcore.c:1663 -msgid "M340 specific opcode used when assembling for M210" +#: config/tc-m32r.c:798 config/tc-m32r.c:893 +#, c-format +msgid "instruction '%s' cannot be executed in parallel." msgstr "" -#: config/tc-mcore.c:1105 config/tc-mcore.c:1144 config/tc-mcore.c:1163 -#: config/tc-mcore.c:1182 config/tc-mcore.c:1209 config/tc-mcore.c:1238 -#: config/tc-mcore.c:1275 config/tc-mcore.c:1310 config/tc-mcore.c:1329 -#: config/tc-mcore.c:1348 config/tc-mcore.c:1380 config/tc-mcore.c:1405 -#: config/tc-mcore.c:1462 config/tc-mcore.c:1516 config/tc-mcore.c:1552 -#: config/tc-mcore.c:1610 config/tc-mcore.c:1632 config/tc-mcore.c:1655 -msgid "second operand missing" +#: config/tc-m32r.c:854 config/tc-m32r.c:918 config/tc-m32r.c:1090 +msgid "internal error: lookup/get operands failed" msgstr "" -#: config/tc-mcore.c:1120 -msgid "destination register must be r1" +#: config/tc-m32r.c:903 +#, c-format +msgid "'%s': only the NOP instruction can be issued in parallel on the m32r" msgstr "" -#: config/tc-mcore.c:1141 -msgid "source register must be r1" +#: config/tc-m32r.c:932 +#, c-format +msgid "" +"%s: output of 1st instruction is the same as an input to 2nd instruction - " +"is this intentional ?" msgstr "" -#: config/tc-mcore.c:1204 config/tc-mcore.c:1261 -msgid "immediate is not a power of two" +#: config/tc-m32r.c:936 +#, c-format +msgid "" +"%s: output of 2nd instruction is the same as an input to 1st instruction - " +"is this intentional ?" msgstr "" -#: config/tc-mcore.c:1232 -msgid "translating bgeni to movi" +#: config/tc-m32r.c:1250 config/tc-ppc.c:1459 config/tc-ppc.c:3681 read.c:1358 +msgid "Expected comma after symbol-name: rest of line ignored." msgstr "" -#: config/tc-mcore.c:1269 -msgid "translating mgeni to movi" +#: config/tc-m32r.c:1260 +#, c-format +msgid ".SCOMMon length (%ld.) <0! Ignored." msgstr "" -#: config/tc-mcore.c:1301 -msgid "translating bmaski to movi" +#: config/tc-m32r.c:1274 config/tc-ppc.c:1481 config/tc-ppc.c:2392 +#: config/tc-ppc.c:3705 +msgid "ignoring bad alignment" msgstr "" -#: config/tc-mcore.c:1375 +#: config/tc-m32r.c:1301 config/tc-ppc.c:1492 config/tc-ppc.c:3717 read.c:1382 +#: read.c:2108 #, c-format -msgid "displacement too large (%d)" +msgid "Ignoring attempt to re-define symbol `%s'." msgstr "" -#: config/tc-mcore.c:1389 -msgid "Invalid register: r0 and r15 illegal" +#: config/tc-m32r.c:1310 +#, c-format +msgid "Length of .scomm \"%s\" is already %ld. Not changed to %ld." msgstr "" -#: config/tc-mcore.c:1420 -msgid "bad starting register: r0 and r15 invalid" +#: config/tc-m32r.c:1786 +msgid "Unmatched high/shigh reloc" msgstr "" -#: config/tc-mcore.c:1433 -msgid "ending register must be r15" +#: config/tc-m68hc11.c:305 +#, c-format +msgid "" +"Motorola 68HC11/68HC12 options:\n" +" -m68hc11 | -m68hc12 specify the processor [default %s]\n" +" --force-long-branchs always turn relative branchs into absolute ones\n" +" -S,--short-branchs do not turn relative branchs into absolute ones\n" +" when the offset is out of range\n" +" --strict-direct-mode do not turn the direct mode into extended mode\n" +" when the instruction does not support direct mode\n" +" --print-insn-syntax print the syntax of instruction in case of error\n" +" --print-opcodes print the list of instructions with syntax\n" +" --generate-example generate an example of each instruction\n" +" (used for testing)\n" msgstr "" -#: config/tc-mcore.c:1453 -msgid "bad base register: must be r0" +#: config/tc-m68hc11.c:346 +#, c-format +msgid "Default target `%s' is not supported." msgstr "" -#: config/tc-mcore.c:1471 -msgid "first register must be r4" +#. Dump the opcode statistics table. +#: config/tc-m68hc11.c:365 +msgid "Name # Modes Min ops Max ops Modes mask # Used\n" msgstr "" -#: config/tc-mcore.c:1482 -msgid "last register must be r7" +#: config/tc-m68hc11.c:415 +#, c-format +msgid "Option `%s' is not recognized." msgstr "" -#: config/tc-mcore.c:1519 -msgid "reg-reg expected" +#: config/tc-m68hc11.c:636 +msgid "#" msgstr "" -#: config/tc-mcore.c:1629 -msgid "second operand must be 1" +#: config/tc-m68hc11.c:645 +msgid "#" msgstr "" -#: config/tc-mcore.c:1650 -msgid "zero used as immediate value" +#: config/tc-m68hc11.c:654 config/tc-m68hc11.c:663 +msgid ",X" msgstr "" -#: config/tc-mcore.c:1677 -msgid "duplicated psr bit specifier" +#: config/tc-m68hc11.c:681 +msgid "*" msgstr "" -#: config/tc-mcore.c:1683 -msgid "`af' must appear alone" +#: config/tc-m68hc11.c:693 +msgid "#" msgstr "" -#: config/tc-mcore.c:1690 +#: config/tc-m68hc11.c:703 #, c-format -msgid "unimplemented opcode \"%s\"" +msgid "symbol%d" msgstr "" -#: config/tc-mcore.c:1699 -#, c-format -msgid "ignoring operands: %s " +#: config/tc-m68hc11.c:705 +msgid "" msgstr "" -#: config/tc-mcore.c:1768 config/tc-w65.c:856 -msgid "Bad call to MD_NTOF()" +#: config/tc-m68hc11.c:724 +msgid "